CN116303803A - Blockchain-based service agreement authorization method, system and medium - Google Patents
Blockchain-based service agreement authorization method, system and medium Download PDFInfo
- Publication number
- CN116303803A CN116303803A CN202310452138.4A CN202310452138A CN116303803A CN 116303803 A CN116303803 A CN 116303803A CN 202310452138 A CN202310452138 A CN 202310452138A CN 116303803 A CN116303803 A CN 116303803A
- Authority
- CN
- China
- Prior art keywords
- service
- token
- intermediary
- user
- blockchain
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6245—Protecting personal data, e.g. for financial or medical purposes
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2141—Access rights, e.g. capability lists, access control lists, access tables, access matrices
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Medical Informatics (AREA)
- Computing Systems (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
Description
技术领域technical field
本申请涉及用户区块链,尤其涉及服务协议授权方法、系统和介质。This application relates to user block chains, and in particular to service agreement authorization methods, systems and media.
背景技术Background technique
一方面,随着隐私保护意识的提升和隐私法律法规的完善,对用户的隐私数据(或称个人数据、个人信息、隐私信息、用户数据等,以下有时简称“隐私”)的授权、确权等操作的要求也变得更高。On the one hand, with the improvement of privacy protection awareness and the improvement of privacy laws and regulations, the authorization and confirmation of users' private data (or personal data, personal information, private information, user data, etc., hereinafter sometimes referred to as "privacy") The requirements for other operations have also become higher.
另一方面,业务场景也变得越来越复杂。例如,在一些情况下,存储用户的隐私数据的实体(以下有时称为“隐私数据提供方”,“数据服务提供方”、“服务提供方”或简称“数据提供方”)和消费隐私数据以向用户提供服务的实体(以下有时称为“隐私数据消费方”、“隐私数据商户”,或简称“商户”)可能不同。例如,实体A(例如是平台型实体)可能存储了大量用户隐私数据,而实体B(例如是小型实体)为了向用户提供服务,可能需要使用其本身没有存储的隐私数据,此时实体B可能需要向在用户授权的情况下实体A请求隐私数据,因此需要用户、数据提供方(实体A)、商户(实体B)三方的交互。在更复杂的情况下,在数据提供方和商户之间,可能还存在一个或多个渠道方。On the other hand, business scenarios are becoming more and more complex. For example, in some cases, entities that store users' private data (hereinafter sometimes referred to as "private data providers", "data service providers", "service providers" or simply "data providers") and consumers of private data The entities that provide services to users (hereinafter sometimes referred to as "private data consumers", "private data merchants", or "merchant" for short) may be different. For example, entity A (such as a platform entity) may store a large amount of user privacy data, while entity B (such as a small entity) may need to use private data that it does not store in order to provide services to users. At this time, entity B may It is necessary to request private data from entity A under the authorization of the user, so the interaction between the user, the data provider (entity A), and the merchant (entity B) is required. In more complicated cases, there may be one or more channel parties between the data provider and the merchant.
在当前隐私保护要求和业务场景下,授权、确权、防篡改、稽查等操作均需要可靠、实时性高的方案。Under current privacy protection requirements and business scenarios, reliable and real-time solutions are required for operations such as authorization, confirmation of rights, anti-tampering, and auditing.
因此,需要能够改善用户隐私确权的方案。Therefore, there is a need for a solution that can improve user privacy and right confirmation.
发明内容Contents of the invention
为了克服现有技术的缺陷,本说明书的一个或多个实施例通过将区块链(尤其是可信链)应用于用户隐私确权,从多个角度改善了用户隐私确权。In order to overcome the defects of the prior art, one or more embodiments of this specification improve user privacy confirmation from multiple perspectives by applying blockchain (especially trusted chain) to user privacy confirmation.
本说明书的一个或多个实施例通过以下技术方案来实现其上述目的。One or more embodiments of this specification achieve the above-mentioned purpose through the following technical solutions.
在一个方面,提供了一种基于区块链的服务协议授权方法,该方法包括:服务能力注册操作,其中由网关将服务提供方的服务能力注册到该区块链并获得服务令牌,其中该服务能力与服务协议相关联;中间方签约操作,其中由中间方利用该服务令牌或上一级中间方的令牌从该区块链获取该服务协议并签署该服务协议,该中间方的服务协议签署事务由该网关或该上一级中间方记录到该区块链,并获得该中间方的令牌;以及用户签约操作,其中由该用户利用中间方的令牌从该区块链获取该服务协议并签署该服务协议,该用户的服务协议签署事务由该中间方记录到该区块链,并获得该用户的令牌。In one aspect, a blockchain-based service agreement authorization method is provided, the method comprising: a service capability registration operation, wherein the gateway registers the service capability of the service provider to the blockchain and obtains a service token, wherein The service capability is associated with the service agreement; the intermediate party signs the operation, wherein the intermediate party uses the service token or the token of the upper intermediate party to obtain the service agreement from the blockchain and signs the service agreement, the intermediate party The service agreement signing transaction of the gateway or the upper-level intermediary is recorded in the block chain, and the token of the intermediary is obtained; The chain obtains the service agreement and signs the service agreement, and the user's service agreement signing transaction is recorded to the blockchain by the intermediate party, and the user's token is obtained.
优选地,该服务能力注册操作包括:由该网关接收来自该服务提供方的服务注册请求,该服务注册请求包括用于标识该服务能力的服务代码和该服务协议;基于该服务注册请求,由该网关将该服务能力注册到该区块链,其中该区块链对该网关的网关ID执行合法性校验,并完成该网关ID与该服务代码的映射;以及由该网关接收来自该区块链的服务令牌,并将该服务令牌传送给该服务提供方。Preferably, the service capability registration operation includes: the gateway receives a service registration request from the service provider, the service registration request includes a service code for identifying the service capability and the service agreement; based on the service registration request, by The gateway registers the service capability with the blockchain, wherein the blockchain performs a legality check on the gateway ID of the gateway, and completes the mapping between the gateway ID and the service code; The service token of the block chain, and transmit the service token to the service provider.
优选地,存在多级中间方,且该中间方签约操作包括最高层级中间方向网关签约操作以及低一层级中间方向高一层级中间方签约操作,且该用户签约操作包括用户向最低层级中间方签约操作。Preferably, there are multi-level intermediate parties, and the intermediate party signing operation includes the highest level intermediate party signing operation towards the gateway and the lower level intermediate party signing operation towards the higher level intermediate party, and the user signing operation includes the user signing with the lowest level intermediate party operate.
优选地,最高层级中间方向网关签约操作包括:由该最高层级中间方向该网关请求该服务令牌;由该最高层级中间方基于该服务令牌从该区块链获取该服务协议;由该最高层级中间方向该网关签署该服务协议,并由该网关将该服务协议签署事务传送到该区块链;由该区块链执行共识算法以记录该服务协议签署事务,其中由该区块链校验该最高层级中间方ID和该服务令牌合法性,并完成该最高层级中间方ID与该服务令牌的映射;由该区块链生成该最高层级中间方的令牌并将其传送到该网关;以及由该网关将该最高层级中间方的令牌传送到该最高层级中间方。Preferably, the signing operation of the highest-level intermediary to the gateway includes: requesting the service token from the highest-level intermediary to the gateway; obtaining the service agreement from the blockchain based on the service token by the highest-level intermediary; The intermediate direction of the hierarchy signs the service agreement with the gateway, and the gateway transmits the service agreement signing transaction to the blockchain; the blockchain executes the consensus algorithm to record the service agreement signing transaction, and the blockchain check Verify the legality of the highest-level intermediary ID and the service token, and complete the mapping between the highest-level intermediary ID and the service token; generate the token of the highest-level intermediary by the blockchain and transmit it to the gateway; and communicating, by the gateway, the top-level intermediary's token to the top-level intermediary.
优选地,低一层级中间方向高一层级中间方签约操作包括:由该低一层级中间方向该高一层级中间方请求该高一层级中间方的令牌;由该低一层级中间方基于该令牌从该区块链获取该服务协议;由该低一层级中间方向该高一层级中间方签署该服务协议,并由该高一层级中间方将该服务协议签署事务传送到该区块链;由该区块链执行共识算法以记录该服务协议签署事务,其中由该区块链校验该低一层级中间方ID和该高一层级中间方的令牌的合法性,并完成该低一层级中间方ID与该高一层级中间方的令牌的映射;由该区块链生成该低一层级中间方的令牌;由该区块链将该低一层级中间方的令牌传送到该高一层级中间方;以及由该高一层级中间方将该低一层级中间方的令牌传送到该低一层级中间方。Preferably, the signing operation of the lower-level intermediate party to the higher-level intermediate party includes: the lower-level intermediate party requests the higher-level intermediate party's token from the higher-level intermediate party; the lower-level intermediate party based on the The token obtains the service agreement from the blockchain; the lower-level intermediate party signs the service agreement with the higher-level intermediate party, and the higher-level intermediate party transmits the service agreement signing transaction to the blockchain ; The block chain executes the consensus algorithm to record the service agreement signing transaction, wherein the block chain checks the legitimacy of the lower-level intermediary ID and the token of the higher-level intermediary, and completes the low-level The mapping between the ID of the first-level intermediary and the token of the higher-level intermediary; the token of the lower-level intermediary is generated by the blockchain; the token of the lower-level intermediary is transmitted by the blockchain to the higher-level intermediary; and the lower-level intermediary's token is transmitted by the higher-level intermediary to the lower-level intermediary.
优选地,该用户签约操作包括:由该用户向中间方请求该中间方的令牌,其中该中间方为最低层级中间方;由该用户基于该令牌从该区块链获取该服务协议;由该用户向该中间方签署该服务协议,并由该中间方将该服务协议签署事务传送到该区块链;由该区块链执行共识算法以记录该服务协议签署事务,其中由该区块链校验该用户主体和该中间方的令牌的合法性,并完成该用户主体与该中间方的令牌的映射;由该区块链生成该用户的令牌;由该区块链将该用户的令牌传送到该中间方;以及由该中间方将该用户的令牌传送到该用户。Preferably, the user signing operation includes: the user requests the intermediary for a token of the intermediary, wherein the intermediary is the lowest-level intermediary; the user obtains the service agreement from the blockchain based on the token; The user signs the service agreement to the intermediate party, and the intermediate party transmits the service agreement signing transaction to the blockchain; the blockchain executes the consensus algorithm to record the service agreement signing transaction, in which the district The block chain verifies the legitimacy of the user subject and the token of the intermediary, and completes the mapping between the user subject and the token of the intermediary; the block chain generates the user's token; the block chain transferring the user's token to the intermediary; and transferring the user's token to the user by the intermediary.
优选地,该方法进一步包括:确权调用操作,其中由中间方使用该用户的令牌通过该网关请求该区块链确权,并基于确权的结果来从该服务提供方获取服务数据。Preferably, the method further includes: a right confirmation call operation, wherein the intermediary uses the user's token to request the block chain right confirmation through the gateway, and obtains service data from the service provider based on the right confirmation result.
优选地,该确权调用操作包括:由中间方使用该用户的令牌向该网关传送服务请求;基于该服务请求,由该网关向该区块链传送确权请求;由该区块链调用确权共识执行确权,其中该区块链使用该用户的令牌基于签约操作中所完成的映射来获得该用户的用户主体、该中间方的中间方ID、该网关的网关ID以及该服务代码,以校验该用户的用户主体、该中间方的中间方ID、该网关的网关ID以及该服务代码与该确权请求中的对应项目是否匹配;该网关基于该确权的结果,向该服务提供方调用服务能力并将相关联的服务数据转发给该中间方;以及由该中间方使用该服务数据向该用户提供服务。Preferably, the right confirmation call operation includes: the intermediary uses the user's token to send a service request to the gateway; based on the service request, the gateway sends a right confirmation request to the block chain; the block chain calls The rights confirmation consensus executes rights confirmation, in which the blockchain uses the user's token to obtain the user's user principal, the intermediary's intermediary ID, the gateway's gateway ID, and the service based on the mapping completed in the signing operation. code to check whether the user's user subject, the intermediary ID of the intermediary party, the gateway ID of the gateway, and the service code match the corresponding items in the right confirmation request; The service provider invokes the service capability and forwards the associated service data to the intermediary; and the intermediary uses the service data to provide services to the user.
优选地,该方法进一步包括:由该网关将服务能力调用事务记录到该区块链。Preferably, the method further includes: the gateway records the service capability invocation transaction into the block chain.
优选地,该区块链为信任链,且该网关为可信网关。Preferably, the blockchain is a chain of trust, and the gateway is a trusted gateway.
优选地,该服务协议签署事务的哈希值在公域上公开。Preferably, the hash value of the service agreement signing transaction is published on the public domain.
优选地,该服务协议为隐私协议。Preferably, the service agreement is a privacy agreement.
在另一方面,提供了一种用于基于区块链进行服务协议授权的系统,该系统包括:服务能力注册装置,其中由网关将服务提供方的服务能力注册到该区块链并获得服务令牌,其中该服务能力与服务协议相关联;中间方签约装置,其中由中间方利用该服务令牌或上一级中间方的令牌从该区块链获取该服务协议并签署该服务协议,该中间方的服务协议签署事务由该网关或该上一级中间方记录到该区块链,并获得该中间方的令牌;以及用户签约装置,其中由该用户利用中间方的令牌从该区块链获取该服务协议并签署该服务协议,该用户的服务协议签署事务由该中间方记录到该区块链,并获得该用户的令牌。In another aspect, a system for authorization of service agreements based on blockchain is provided, the system includes: a service capability registration device, wherein the gateway registers the service capability of the service provider to the blockchain and obtains the service Token, wherein the service capability is associated with the service agreement; the intermediate party signing device, wherein the intermediate party uses the service token or the token of the upper intermediate party to obtain the service agreement from the block chain and sign the service agreement , the service agreement signing transaction of the intermediate party is recorded in the block chain by the gateway or the upper-level intermediate party, and the token of the intermediate party is obtained; and the user signing device, wherein the user utilizes the token of the intermediate party Obtain the service agreement from the block chain and sign the service agreement, the user's service agreement signing transaction is recorded in the block chain by the intermediate party, and the user's token is obtained.
在又另一方面,提供了一种用于基于区块链进行服务协议授权的装置,包括:处理器;以及与该处理器耦合的存储器,该存储器存储有处理器可执行指令,该指令在被该处理器执行时使该处理器执行如上文所描述的方法。In yet another aspect, a device for authorization of a service agreement based on blockchain is provided, including: a processor; and a memory coupled to the processor, the memory stores processor-executable instructions, and the instructions are stored in When executed by the processor, the processor is caused to perform the method as described above.
在又另一方面中,提供了一种非瞬态处理器可读存储介质,包括处理器可执行指令,该指令在被该处理器执行时使该处理器执行如上文所描述的方法。In yet another aspect, there is provided a non-transitory processor-readable storage medium comprising processor-executable instructions which, when executed by the processor, cause the processor to perform the method as described above.
与现有技术相比,本说明书的一个或多个实施例能够实现以下技术效果中的一者或多者:Compared with the prior art, one or more embodiments of this specification can achieve one or more of the following technical effects:
链路调用实时确权且开放;The link call is confirmed and opened in real time;
基于信任链具备公域访问能力;Based on the chain of trust, it has the ability to access the public domain;
解决了服务多层级授信问题,最终确保多层级隐私数据调用具备可信和传递性;Solved the problem of multi-level credit authorization of services, and finally ensured that multi-level private data calls are credible and transitive;
用户数据不会在渠道方留存,减少了隐私泄露的风险;User data will not be retained on the channel side, reducing the risk of privacy leakage;
保护了渠道方的商业机密。The commercial secrets of the channel party are protected.
附图说明Description of drawings
以上发明内容以及下面的具体实施方式在结合附图阅读时会得到更好的理解。需要说明的是,附图仅作为所请求保护的发明的示例。在附图中,相同的附图标记代表相同或类似的元素。The above summary of the invention and the following specific implementation methods will be better understood when read in conjunction with the accompanying drawings. It should be noted that the drawings are merely examples of the claimed invention. In the drawings, the same reference numerals represent the same or similar elements.
图1示出根据本说明书实施例的用于服务协议授权的系统的整体工作示意图。Fig. 1 shows a schematic diagram of the overall operation of a system for service agreement authorization according to an embodiment of the present specification.
图2示出根据本说明书实施例的用于服务注册的示例过程的示意图。FIG. 2 shows a schematic diagram of an example process for service registration according to an embodiment of the specification.
图3示出根据本说明书实施例的用于渠道方向网关的签约操作的示例过程的示意图。Fig. 3 shows a schematic diagram of an example process for a subscription operation of a channel-direction gateway according to an embodiment of the present specification.
图4示出根据本说明书实施例的用于商户向渠道方的签约操作的示例过程的示意图。Fig. 4 shows a schematic diagram of an example process for a merchant to sign a contract with a channel party according to an embodiment of the present specification.
图5示出根据本说明书实施例的用于用户向商户的签约操作的示例过程的示意图。Fig. 5 shows a schematic diagram of an example process for a user to sign a contract with a merchant according to an embodiment of the present specification.
图6示出根据本说明书实施例的用于确权调用的示例过程的示意图。Fig. 6 shows a schematic diagram of an example process for confirming a call according to an embodiment of the present specification.
图7示出根据本说明书实施例的用于基于区块链的示例服务协议授权方法的示意流程图。Fig. 7 shows a schematic flow chart of an example service agreement authorization method based on blockchain according to an embodiment of the present specification.
图8示出根据本说明书实施例的用于基于区块链进行示例服务协议授权的系统的示意流程图。Fig. 8 shows a schematic flowchart of a system for performing example service agreement authorization based on blockchain according to an embodiment of the present specification.
图9示出用于实现根据本说明书一个或多个实施例的方法的装置的示意框图。Fig. 9 shows a schematic block diagram of an apparatus for implementing a method according to one or more embodiments of this specification.
具体实施方式Detailed ways
以下具体实施方式的内容足以使任何本领域技术人员了解本说明书的一个或多个实施例的技术内容并据以实施,且根据本说明书所揭露的说明书、权利要求及附图,本领域技术人员可轻易地理解本说明书的一个或多个实施例相关的目的及优点。The content of the following specific embodiments is sufficient for any person skilled in the art to understand and implement the technical content of one or more embodiments of this specification, and according to the description, claims and drawings disclosed in this specification, those skilled in the art Objects and advantages associated with one or more embodiments of the present specification can be readily understood.
如背景技术部分所述,随着隐私保护要求的提高和业务场景复杂化,对隐私数据的授权、确权、防篡改、稽查等操作均需要可靠、实时性高的方案。As mentioned in the background technology section, with the improvement of privacy protection requirements and the complexity of business scenarios, reliable and real-time solutions are required for operations such as authorization, confirmation, anti-tampering, and auditing of private data.
已经提供了一些隐私保护方案。在大部分方案中,通过数据提供方和商户签订协议,并执行事后稽查的方式来处理用户隐私数据。一些方案提供更自动化的处理。例如,在一种方案中,由数据提供方提供API接口,通过API接口签名验签机制,商户可利用其签名和/或密钥等来向数据提供方请求数据。Some privacy protection schemes have been provided. In most solutions, the data provider and the merchant sign an agreement and perform post-mortem audits to process user privacy data. Some schemes provide more automated processing. For example, in one solution, the data provider provides an API interface, and through the API interface signature verification mechanism, the merchant can use its signature and/or key to request data from the data provider.
然而,这些方案仍存在问题,例如:However, these solutions still have problems, such as:
第一、用户的确权协议保持在商户的私域里面,不方便外部访问和确权检查,同时还存在商户篡改用户隐私协议的可能性。First, the user's right confirmation agreement is kept in the merchant's private domain, which is inconvenient for external access and right confirmation inspection. At the same time, there is also the possibility that the merchant tampers with the user's privacy agreement.
第二、无法实时执行隐私确权,只能通过事后离线巡检的方式来检查是否存在对隐私数据的滥用。Second, it is impossible to perform privacy confirmation in real time, and can only check whether there is any abuse of private data through offline inspection after the event.
第三、至多解决了B2B(即数据提供方与商户)的确权问题,而没有解决B2B2C(即数据提供方与商户与用户)的确权问题。Third, at most it solves the problem of B2B (that is, data provider and merchant) right confirmation, but does not solve the problem of B2B2C (that is, data provider and merchant and user) right confirmation.
第四、难以用于复杂场景,例如存在多级别签约的场景(例如在存在渠道方的情况下)。Fourth, it is difficult to be used in complex scenarios, such as scenarios where there are multi-level contracts (for example, when there are channel parties).
本说明书的一些实施例通过将区块链应用于隐私确权调用,解决了上述问题的一些或全部。Some embodiments of this specification solve some or all of the above-mentioned problems by applying blockchain to privacy confirmation calls.
参见图1,其示出根据本说明书实施例的用于服务协议授权的系统100的整体工作示意图。Referring to FIG. 1 , it shows a schematic diagram of the overall operation of a
如图1所示,系统100可包括服务提供方102、中间方以及用户106。中间方可包括一个商户104以及零个或更多个渠道方(如图1中的渠道方I 108-1和渠道方II 108-2)。在图1的示例中示出了存在两个渠道方的示例。距离服务提供方更近的中间方被称为较高级中间方,而距离用户更仅的中间方被称为较低级中间方。As shown in FIG. 1 , the
然而,应当理解,可存在一个或更多的渠道方,或者系统100可不包括渠道方。在系统100不包括渠道方时,商户104直接与服务提供方102对接交互。However, it should be understood that there may be one or more channel parties, or the
如图1所示,系统100可包括网关110。网关110将在隐私确权中发挥关键作用,如下文将详细介绍的。优选地,该网关110为可信网关。As shown in FIG. 1 ,
为了在用户的授权下(例如调用用户的隐私数据)来为用户提供服务,需要两个过程,即签约过程和确权调用过程。通过签约过程,信任链条上的各方依次签署服务协议并将签署事务上链;通过确权调用,确认中间方(此处为最低层级中间方,即商户)有权调用相关数据来提供服务。In order to provide services to the user under the user's authorization (for example, calling the user's private data), two processes are required, namely, the signing process and the rights confirmation calling process. Through the signing process, all parties in the trust chain sign the service agreement in turn and put the signed transaction on the chain; through the confirmation call, it is confirmed that the intermediary (here is the lowest-level intermediary, that is, the merchant) has the right to call relevant data to provide services.
在授权签约过程中,可存在多个签约共识,即:During the authorization signing process, there may be multiple signing consensuses, namely:
服务注册,其涉及服务提供方与网关的签约共识;Service registration, which involves the contract agreement between the service provider and the gateway;
中间方签约,其包括渠道方签约和商户签约,渠道方签约涉及渠道方与服务提供方或上级渠道方的签约共识,而商户签约涉及商户与渠道方的签约共识;以及The signing of the intermediary party includes the signing of the channel party and the signing of the merchant. The signing of the channel party involves the signing agreement between the channel party and the service provider or the superior channel party, and the signing of the merchant involves the signing agreement between the merchant and the channel party; and
用户签约,其涉及用户与商户的签约共识。User signing, which involves the signing consensus between the user and the merchant.
在不存在渠道方的情况下,商户与服务提供方直接签约共识,即:In the absence of a channel party, the merchant and the service provider directly sign a consensus, namely:
服务注册,其涉及服务提供方与网关的签约共识;Service registration, which involves the contract agreement between the service provider and the gateway;
商户签约,其涉及商户与服务提供方的签约共识;以及Merchant's contract, which involves the signing agreement between the merchant and the service provider; and
用户签约,其涉及用户与商户的签约共识。User signing, which involves the signing consensus between the user and the merchant.
在确权过程中,可存在确权共识,其涉及通过网关基于签约共识进行确权调用。In the right confirmation process, there may be a right confirmation consensus, which involves the right confirmation call through the gateway based on the signing consensus.
以上各个操作的过程将在下文更详细地描述。The process of each of the above operations will be described in more detail below.
根据具体场景,可存在更多或更少的实体,也可存在其他类型的实体。Depending on the scenario, there may be more or fewer entities, and other types of entities may also exist.
系统100将利用区块链120。优选地,该区块链120为可信链。可信链例如可为公有链或联盟链。
优选地,该区块链120可实现智能合约。智能合约例如可包括相关的执行逻辑和条件,例如以用于进行验证、认证、映射和/或确权等操作,如下文所介绍的。Preferably, the blockchain 120 can implement smart contracts. Smart contracts, for example, may include relevant execution logic and conditions, for example, for operations such as verification, authentication, mapping and/or confirmation of rights, as described below.
区块链通常可包括多个区块链节点。在下文中,有时将由区块链节点执行的操作,简称为由区块链来执行操作。A blockchain can typically include multiple blockchain nodes. Hereinafter, operations performed by blockchain nodes are sometimes simply referred to as operations performed by blockchains.
在本说明书实施例中,通过签约共识,可将多种可信键值对上链:In the embodiment of this specification, through signing consensus, various trusted key-value pairs can be uploaded to the chain:
·网关ID:服务代码·Gateway ID: service code
·服务令牌:网关ID· Service Token: Gateway ID
·渠道方ID:服务令牌Channel Party ID: Service Token
·渠道方令牌:渠道方IDChannel Party Token: Channel Party ID
·商户ID:渠道方令牌· Merchant ID: channel party token
·商户令牌:商户IDMerchant Token: Merchant ID
·用户主体:商户令牌User subject: Merchant token
·用户令牌:用户主体User Token: User Principal
在图1中示出了两个渠道方,因此还存在下级渠道方(渠道方II 108-2)与上级渠道方(渠道方I 108-1)之间的可信键值对,在此处省略。在本文中,可信键值对又可称为可信对。In Fig. 1, two channel parties are shown, so there is also a trusted key-value pair between the lower-level channel party (channel party II 108-2) and the upper-level channel party (channel party I 108-1), where omitted. In this article, trusted key-value pairs may also be referred to as trusted pairs.
可以看出,通过如上方式,能够实现链式的签约共识传递,从而能够保证每一实体均无法修改隐私协议的内容以及签约状态。It can be seen that through the above method, the chain signing consensus transmission can be realized, so as to ensure that each entity cannot modify the content of the privacy agreement and the signing status.
通过上述网关与区块链,就能够实现隐私确权。Through the above-mentioned gateway and blockchain, privacy confirmation can be realized.
在下文中,将逐级介绍每一级的签约共识上链过程以及隐私确权调用过程。In the following, we will introduce each level of signing consensus on-chain process and privacy confirmation call process step by step.
参见图2,其示出根据本说明书实施例的服务注册的示例过程的示意图。Referring to FIG. 2 , it shows a schematic diagram of an example process of service registration according to an embodiment of this specification.
如图2所示,服务注册过程涉及网关、服务提供方以及区块链三者。该服务提供方例如可通过应用编程接口(API)来提供对隐私数据的调用。具体而言,服务提供方注册到网关服务。服务注册过程中所传输的报文(例如在操作1.1中所传输的报文)的核心要素如下:As shown in Figure 2, the service registration process involves gateways, service providers, and blockchains. The service provider may, for example, provide calls to private data through an Application Programming Interface (API). Specifically, the service provider registers with the gateway service. The core elements of the message transmitted during the service registration process (such as the message transmitted in operation 1.1) are as follows:
服务能力例如可以使用服务代码来表示。服务能力例如可被用于账户风险评估、营销活动中的反作弊、企业信用评估等。可设计所需的其他服务能力。Service capabilities can be represented using service codes, for example. Service capabilities can be used, for example, for account risk assessment, anti-cheating in marketing activities, corporate credit assessment, etc. Additional service capabilities may be designed as required.
用户主体可以是指用来申明标识用户的方式,例如该用户的身份标识号、手机号码、用户名和/或其他标识信息(例如注册邮箱等)。通过该用户主体,在用户签约时,用户得以知晓其基于什么维度来进行隐私数据查询。The user subject may refer to the method used to declare and identify the user, such as the user's identification number, mobile phone number, user name and/or other identification information (such as registered email address, etc.). Through the user subject, when the user signs up, the user can know the dimension based on which the private data query is performed.
通常,隐私协议表示用户要同意商户使用的隐私的声明。在一些替代示例中,隐私协议可包括指向用户要签约授权的隐私协议的全文的链接。通常,在用户注册或用户请求使用服务时,将向用户展示该隐私协议。该隐私协议将在区块链上逐级签署,从而对该区块链上签约的各方构成授权和约束。Typically, a privacy agreement indicates that the user agrees to a statement of privacy used by the merchant. In some alternative examples, the privacy agreement may include a link to the full text of the privacy agreement that the user is signing up to authorize. Usually, this privacy agreement will be displayed to the user when the user registers or when the user requests to use the service. The privacy agreement will be signed step by step on the blockchain, thereby constituting authorization and constraints on the parties signed on the blockchain.
除此之外,授权合约还可包括其他相关信息,例如隐私协议的有效期、授权范围、授权费用中的一者或多者。In addition, the authorization contract may also include other relevant information, such as one or more of the validity period of the privacy agreement, authorization scope, and authorization fee.
参见图2,其示出根据本说明书实施例的服务能力注册操作的示意图。服务能力注册有时也可简称为服务注册。优选地,一个服务提供方可提供多个服务能力,和/或多个服务提供方可向同一网关注册服务能力。Referring to FIG. 2 , it shows a schematic diagram of a service capability registration operation according to an embodiment of this specification. A service capability registry is sometimes referred to simply as a service registry. Preferably, one service provider can provide multiple service capabilities, and/or multiple service providers can register service capabilities with the same gateway.
如图2所示,在操作1,由服务提供方可向网关传送服务注册请求,以便发起服务注册流程。例如,该服务注册请求可包括服务代码和服务协议。优选地,该服务注册请求通常还可包括用户主体。As shown in FIG. 2 , in operation 1, the service provider may transmit a service registration request to the gateway, so as to initiate a service registration process. For example, the service registration request may include a service code and a service agreement. Preferably, the service registration request can also generally include a user principal.
可选地,该服务注册请求还可包括其他相关信息,例如用户的权限、服务的描述、服务的价格、服务的使用限制等。Optionally, the service registration request may also include other relevant information, such as user rights, service description, service price, service usage restrictions, and the like.
基于该服务注册请求,可由网关将该服务能力注册到所述区块链。Based on the service registration request, the service capability can be registered to the block chain by the gateway.
具体而言,在操作1.1,在接收到服务注册请求后,网关可请求将该服务注册事务记录到区块链。如图1所示,该请求例如可包括网关ID和服务代码。优选地,该请求还可包括用户主体等信息。网关ID是指网关在该系统中所使用的标识符,用于标识该请求的来源。Specifically, in operation 1.1, after receiving the service registration request, the gateway may request to record the service registration transaction in the blockchain. As shown in FIG. 1, the request may include, for example, a gateway ID and a service code. Preferably, the request may also include information such as a user subject. The gateway ID refers to an identifier used by the gateway in the system to identify the source of the request.
在操作1.1.1,区块链(具体而言是区块链上的节点)可执行共识算法以记录该服务注册事务。其中,该区块链可对网关ID执行合法性校验。在合法性校验通过后,该区块链可完成网关ID和服务代码的映射,从而生成可信键值对{网关ID:服务代码}。利用该键值对,可以方便地从网关ID查询到对应的服务代码。In operation 1.1.1, the blockchain (specifically, the nodes on the blockchain) may execute a consensus algorithm to record the service registration transaction. Among them, the blockchain can perform legality verification on the gateway ID. After the legality check is passed, the blockchain can complete the mapping between the gateway ID and the service code, thereby generating a trusted key-value pair {gateway ID: service code}. Using this key-value pair, you can easily query the corresponding service code from the gateway ID.
在合法性校验通过后,区块链还可生成与该服务代码相对应的服务令牌。在生成服务令牌之后,可生成另一可信键值对{服务令牌:网关ID}。利用该键值对,可以方便地从服务令牌查询到对应的网关ID。After the legality check is passed, the blockchain can also generate a service token corresponding to the service code. After the service token is generated, another trusted key-value pair {service token: gateway ID} can be generated. Using this key-value pair, you can easily query the corresponding gateway ID from the service token.
在操作1.1.2,区块链可将服务令牌传送给网关。可选地,网关可将服务令牌存储在其本地,以供后续使用。在一些示例中,服务令牌的返回过程通常需要进行加密和签名等操作,以确保服务令牌的安全性和可靠性。优选地,服务令牌的返回过程还可以进行其他安全措施,例如访问控制、审计等,以确保服务能力的安全性和可靠性。At operation 1.1.2, the blockchain may transmit the service token to the gateway. Optionally, the gateway can store the service token locally for later use. In some examples, the return process of the service token usually requires operations such as encryption and signature to ensure the security and reliability of the service token. Preferably, other security measures, such as access control, auditing, etc., may be implemented in the return process of the service token, so as to ensure the security and reliability of the service capability.
在操作1.1.2.1,网关接收到服务令牌之后,确定服务注册成功,可将服务令牌传送给服务提供方。服务提供方可将所接收到的服务令牌存储在本地或其他位置,例如云存储等。In operation 1.1.2.1, after receiving the service token, the gateway determines that the service registration is successful, and may transmit the service token to the service provider. The service provider may store the received service token locally or in other locations, such as cloud storage.
在下文中,将介绍中间方签约操作的内容。如上文所述,中间方可包括0个、1个或多个渠道方以及商户。为了清楚、简洁,下文中重点介绍渠道方(最高层级渠道方,在不存在渠道方的情况下为商户)向网关的签约操作、商户(最低层级中间方)向渠道方(最低层级渠道方)的签约操作以及用户向商户(最低层级中间方)的签约操作,其他情形(例如低一层级渠道方向高一层级渠道方)可参考下文的介绍来理解。In the following, the content of the signing operation of the intermediate party will be introduced. As mentioned above, the middle party may include zero, one or more channel parties and merchants. For the sake of clarity and conciseness, the following will focus on the contracting operation from the channel party (the highest level channel party, or the merchant if there is no channel party) to the gateway, and from the merchant (the lowest level intermediate party) to the channel party (the lowest level channel party) The signing operation of the user and the signing operation of the user to the merchant (the lowest-level intermediary party), other situations (such as a lower-level channel to a higher-level channel party) can be understood by referring to the introduction below.
参见图3,其示出根据本说明书实施例的用于渠道方向网关的签约操作的示例过程的示意图。Referring to FIG. 3 , it shows a schematic diagram of an example process for a subscription operation of a channel-direction gateway according to an embodiment of the present specification.
具体而言,渠道方可基于服务令牌来签约服务。渠道方签约共识时所传输的报文(例如如在操作2.1.3.1所示)的核心要素如下:Specifically, channel parties can sign up for services based on service tokens. The core elements of the message transmitted by the channel party when signing the consensus (for example, as shown in operation 2.1.3.1) are as follows:
如图3所示,在操作2,由渠道方向网关请求服务令牌(service_token)。通过请求服务令牌,渠道方可向网关发起签约请求。例如,该签约请求可包括所选择的服务能力的服务代码。在一些实施例中,可信网关可存储由该数据服务提供方提供的一个或多个服务能力的信息,以供渠道方从中选择。在另一些实施例中,可信网关还可存储由其他数据服务提供方提供的服务能力的信息以供商户选择。网关可基于该服务代码来检索对应的服务令牌,如在前文的服务注册过程中所生成的。优选地,该签约请求还可包括渠道方ID。As shown in FIG. 3 , in operation 2, the channel requests a service token (service_token) from the gateway. pass To request a service token, the channel party can initiate a signing request to the gateway. For example, the subscription request may include a service code for the selected service capability. In some embodiments, the trusted gateway can store information about one or more service capabilities provided by the data service provider for the channel party to choose from. In other embodiments, the trusted gateway can also store information about service capabilities provided by other data service providers for merchants to choose. Based on the service code, the gateway can retrieve the corresponding service token, as generated during the service registration process above. Preferably, the signing request may also include channel party ID.
在操作2.1,网关可向渠道方返回该服务代码的服务令牌。优选地,可信网关可对渠道方ID进行校验,以确保只有授权的渠道方才能获得服务令牌来请求该服务能力。如果校验通过,则可信网关可生成或检索渠道方所请求的服务代码相对应的服务令牌,并将其返回给渠道方。In operation 2.1, the gateway may return the service token of the service code to the channel party. Preferably, the trusted gateway can verify the channel party ID to ensure that only authorized channel parties can obtain service tokens to request the service capability. If the verification is passed, the trusted gateway may generate or retrieve a service token corresponding to the service code requested by the channel party, and return it to the channel party.
在操作2.1.1,在接收到服务令牌之后,渠道方可使用服务令牌向区块链请求隐私协议。渠道方可向区块链发起对隐私协议的请求,该请求中可包括该服务令牌。该请求还可包括其他信息,例如渠道方ID等等。In operation 2.1.1, after receiving the service token, the channel party can use the service token to request the privacy agreement from the blockchain. The channel party may initiate a request to the blockchain for the privacy protocol, which may include the service token. The request may also include other information such as Channel Party ID and the like.
在操作2.1.2,区块链可向渠道方传送该隐私协议。优选地,在传送该隐私协议之前,区块链可首先验证服务令牌的合法性,且在验证通过后才传送该隐私协议。In operation 2.1.2, the blockchain may transmit the privacy agreement to the channel party. Preferably, before transmitting the privacy agreement, the block chain can first verify the legitimacy of the service token, and only transmit the privacy agreement after the verification is passed.
在操作2.1.3,渠道方可向网关签署隐私协议。在签署隐私协议之前,渠道方可首先审阅隐私协议的条款,以及其他信息(例如,有效期、授权范围、授权费用、自动续签、违约赔偿、争议解决等等)。例如,渠道方可使用其私钥来签署隐私协议,从而生成相应的经签名信息。该经签名信息例如可包括渠道方的公钥,隐私协议信息(例如其哈希值)和数字签名本身等等。在生成经签名信息后,渠道方可将该经签名信息传送到可信网关。In operation 2.1.3, the channel party can sign a privacy agreement with the gateway. Before signing the privacy agreement, the channel party can first review the terms of the privacy agreement, as well as other information (for example, validity period, scope of authorization, authorization fee, automatic renewal, compensation for breach of contract, dispute resolution, etc.). For example, a channel party can use its private key to sign a privacy agreement, thereby generating a corresponding signed message. The signed information may include, for example, the channel party's public key, privacy protocol information (such as its hash value), digital signature itself, and the like. After the signed information is generated, the channel can transmit the signed information to the trusted gateway.
在操作2.1.3.1,网关可将渠道方的该隐私协议签署事务传送到区块链。具体而言,网关可将经签名信息、服务令牌、渠道方ID等信息打包成事务,并将该事务传送至区块链网络中的节点。In operation 2.1.3.1, the gateway can transmit the privacy agreement signing transaction of the channel party to the blockchain. Specifically, the gateway can package information such as signed information, service tokens, and channel party IDs into transactions, and transmit the transactions to nodes in the blockchain network.
在操作2.1.3.1.1,区块链可执行共识算法以记录该服务协议签署事务。其中,区块链可校验渠道方ID和服务令牌合法性。在校验通过后,区块链可完成渠道方ID和服务令牌的映射,从而生成可信键值对{渠道方ID:服务令牌}。利用该键值对,可以方便地从渠道方ID查询到对应的服务令牌。In operation 2.1.3.1.1, the blockchain may execute a consensus algorithm to record the service agreement signing transaction. Among them, the blockchain can verify the legitimacy of channel party IDs and service tokens. After the verification is passed, the blockchain can complete the mapping between the channel party ID and the service token, thereby generating a trusted key-value pair {channel party ID: service token}. Using this key-value pair, the corresponding service token can be easily queried from the channel party ID.
在合法性校验通过后,区块链还可生成与该渠道方ID相对应的渠道方令牌(ds_token)。在生成渠道方令牌之后,可生成另一可信键值对{渠道方令牌:渠道方ID}。利用该键值对,可以方便地从渠道方令牌查询到对应的渠道方ID。After passing the legality check, the blockchain can also generate a channel party token (ds_token) corresponding to the channel party ID. After the channel party token is generated, another trusted key-value pair {channel party token: channel party ID} can be generated. Using this key-value pair, the corresponding channel party ID can be easily queried from the channel party token.
在操作2.1.3.1.2,区块链可将渠道方令牌传送给网关。可选地,网关可将服务令牌存储在其本地,以供后续使用。At operation 2.1.3.1.2, the blockchain may transmit the channel party token to the gateway. Optionally, the gateway can store the service token locally for later use.
在操作2.1.31.2.1,网关可将渠道方令牌传送给渠道方。渠道方可存储渠道方令牌(例如在本地或其他位置),以供后续使用。At operation 2.1.31.2.1, the Gateway may transmit the Channel Party Token to the Channel Party. Channel parties may store channel party tokens (eg, locally or elsewhere) for subsequent use.
至此,渠道方与可信网关的签署操作完成。So far, the signing operation between the channel party and the trusted gateway is completed.
参见图4,其示出根据本说明书实施例的用于商户向渠道方的签约操作的示例过程的示意图。商户与渠道方签约的具体流程与上文结合图3所描述的渠道方与网关的签约过程类似,其中图3中原本与渠道方相关的操作和信息被替代为与商户相关的操作和信息,而图3中原本与网关相关的操作和信息被替代为与渠道方相关的操作和信息。Referring to FIG. 4 , it shows a schematic diagram of an example process for a merchant to sign a contract with a channel party according to an embodiment of the present specification. The specific process of signing a contract between a merchant and a channel party is similar to the process of signing a contract between a channel party and a gateway described above in conjunction with Figure 3, in which the operations and information originally related to the channel party in Figure 3 are replaced by operations and information related to the merchant. In Figure 3, the operations and information originally related to the gateway are replaced by the operations and information related to the channel party.
具体而言,商户可基于渠道方令牌来签约服务。商户签约共识时所传输的报文的核心要素如下:Specifically, merchants can sign up for services based on channel party tokens. The core elements of the message transmitted by the merchant when signing the consensus are as follows:
如图4所示,在操作3,由商户向渠道方请求渠道方令牌(ds_token)。通过请求渠道方令牌,商户可向渠道方发起签约请求。优选地,该签约请求可包括所选择的服务能力的服务代码。该渠道方可能提供一个或多个服务提供方的多个服务能力,该签约请求可包括对要签约的服务能力的服务代码的选择。例如,该服务代码可对应于上文的由服务提供方提供的服务能力。优选地,该签约请求还可包括该商户的商户ID。As shown in Figure 4, in operation 3, the merchant requests the channel party token (ds_token) from the channel party. By requesting the channel party token, the merchant can initiate a signing request to the channel party. Preferably, the subscription request may include a service code of the selected service capability. The channel party may provide multiple service capabilities of one or more service providers, and the subscription request may include selection of the service code of the service capability to be contracted. For example, the service code may correspond to the above service capabilities provided by the service provider. Preferably, the signing request may also include the merchant ID of the merchant.
在操作3.1,渠道方可向商户返回该渠道方的渠道方令牌(ds_token)。优选地,渠道方可对商户ID进行校验,以确保只有授权的商户才能请求渠道方令牌。如果校验通过,则渠道方可将其自身的渠道方令牌返回给商户。In operation 3.1, the channel party may return the channel party's channel party token (ds_token) to the merchant. Preferably, the channel side can verify the merchant ID to ensure that only authorized merchants can request the channel side token. If the verification is passed, the channel party can return its own channel party token to the merchant.
在操作3.1.1,在接收到渠道方令牌之后,商户可使用渠道方令牌从区块链获取隐私协议。商户可向区块链发起对隐私协议的请求,该请求中可包括渠道方令牌。优选地,该请求中还可包括其他信息,例如商户ID等。In operation 3.1.1, after receiving the channel party token, the merchant can use the channel party token to obtain the privacy agreement from the blockchain. A merchant can initiate a request to the blockchain for a privacy protocol, which can include a channel party token. Preferably, the request may also include other information, such as merchant ID and so on.
在操作3.1.2,区块链可向商户传送该隐私协议。优选地,在传送该隐私协议之前,区块链可首先验证渠道方令牌的合法性,且在验证通过后才传送该隐私协议。At operation 3.1.2, the blockchain may transmit the privacy agreement to the merchant. Preferably, before transmitting the privacy agreement, the block chain can first verify the legitimacy of the channel party token, and transmit the privacy agreement after the verification is passed.
在操作3.1.3,商户可向渠道方签署隐私协议。在签署隐私协议之前,商户可首先审阅隐私协议的条款,以及其他信息(例如,有效期、授权范围、授权费用、自动续签、违约赔偿、争议解决等等)。例如,商户可使用其私钥来签署隐私协议,从而生成相应的经签名信息。该经签名信息例如可包括商户的公钥,隐私协议信息(例如其哈希值)和数字签名本身等等。在生成经签名信息后,商户可将该经签名信息传送到渠道方。In operation 3.1.3, the merchant can sign a privacy agreement with the channel party. Before signing a privacy agreement, merchants can first review the terms of the privacy agreement, as well as other information (for example, validity period, scope of authorization, authorization fee, automatic renewal, compensation for breach of contract, dispute resolution, etc.). For example, a merchant can use its private key to sign a privacy agreement, thereby generating a corresponding signed message. The signed information may include, for example, the merchant's public key, privacy protocol information (such as its hash value), the digital signature itself, and the like. After generating the signed information, the merchant can transmit the signed information to the channel party.
在操作3.1.3.1,渠道方可将商户的该隐私协议签署事务记录到区块链。具体而言,渠道方可将经签名信息、服务令牌、商户ID等信息打包成事务,并将该事务传送至区块链网络中的节点。In operation 3.1.3.1, the channel can record the signing transaction of the merchant's privacy agreement to the blockchain. Specifically, the channel side can package the signed information, service token, merchant ID and other information into a transaction, and transmit the transaction to the nodes in the blockchain network.
在操作3.1.3.1.1,区块链可执行共识算法以记录该服务协议签署事务。其中,区块链可校验商户ID、渠道方ID和渠道方令牌合法性。在校验通过后,区块链可完成商户ID和渠道方令牌的映射,从而生成可信键值对{商户ID:渠道方令牌}。利用该键值对,可以方便地从商户ID查询到对应的渠道方令牌。At operation 3.1.3.1.1, the blockchain may execute a consensus algorithm to record the service agreement signing transaction. Among them, the blockchain can verify the legitimacy of merchant ID, channel party ID and channel party token. After the verification is passed, the blockchain can complete the mapping of the merchant ID and the channel party token, thereby generating a trusted key-value pair {merchant ID: channel party token}. Using this key-value pair, you can easily query the corresponding channel party token from the merchant ID.
在合法性校验通过后,区块链还可生成与该商户ID相对应的商户令牌(ds_token)。在生成商户令牌之后,可生成另一可信键值对{商户令牌:商户ID}。利用该键值对,可以方便地从商户令牌查询到对应的商户ID。After the legality check is passed, the blockchain can also generate a merchant token (ds_token) corresponding to the merchant ID. After the merchant token is generated, another trusted key-value pair {merchant token: merchant ID} can be generated. Using this key-value pair, the corresponding merchant ID can be easily queried from the merchant token.
在操作3.1.3.1.2,区块链可将商户令牌传送给渠道方。At operation 3.1.3.1.2, the blockchain may transmit the merchant token to the channel party.
在操作3.1.31.2.1,渠道方可将商户令牌传送给商户。商户可存储商户令牌(例如在本地或其他位置),以供后续使用。In operation 3.1.31.2.1, the Channel Party may transmit the Merchant Token to the Merchant. The merchant may store the merchant token (eg, locally or elsewhere) for subsequent use.
至此,商户与渠道方的签署操作完成。So far, the signing operation between the merchant and the channel party is completed.
参见图5,其示出根据本说明书实施例的用于用户向商户的签约操作的示例过程的示意图。用户与商户签约的具体流程与上文结合图3和图4所描述的签约过程类似,仅仅是参与方不同。Referring to FIG. 5 , it shows a schematic diagram of an example process for a user to sign a contract with a merchant according to an embodiment of the present specification. The specific process of signing a contract between a user and a merchant is similar to the signing process described above in conjunction with Figure 3 and Figure 4, only the participants are different.
具体而言,用户可基于商户令牌来签约服务。用户签约共识时所传输的报文的核心要素如下:Specifically, users may sign up for services based on merchant tokens. The core elements of the message transmitted when the user signs the consensus are as follows:
如图5所示,在操作4,由用户向商户请求商户令牌(b_token)。通过请求商户令牌,用户可向商户发起签约请求。例如,在用户向商户注册时,或者在用户希望使用由数据服务提供方提供的数据由商户提供服务的其他时机,用户可与商户签署隐私协议。优选地,该签约请求还可包括该用户的用户主体。As shown in FIG. 5, in operation 4, the user requests a merchant token (b_token) from the merchant. By requesting the merchant token, the user can initiate a signing request to the merchant. For example, when the user registers with the merchant, or at other times when the user wishes to use the data provided by the data service provider to provide services to the merchant, the user can sign a privacy agreement with the merchant. Preferably, the subscription request may also include the user subject of the user.
在操作4.1,商户可向用户返回该商户的商户令牌(b_token)。优选地,商户可对用户主体进行校验,以确保只有授权的用户才能请求商户令牌。如果校验通过,则商户可将其商户令牌返回给用户。At operation 4.1, the merchant may return the merchant's merchant token (b_token) to the user. Preferably, the merchant can verify the user principal to ensure that only authorized users can request the merchant token. If the verification passes, the merchant can return its merchant token to the user.
在操作4.1.1,在接收到商户令牌之后,用户可使用商户令牌从区块链获取隐私协议。用户可向区块链发起对隐私协议的请求,该请求中可包括商户令牌。优选地,该请求中还可包括其他信息,例如用户主体等。At operation 4.1.1, after receiving the merchant token, the user may use the merchant token to obtain the privacy agreement from the blockchain. A user can initiate a request to the blockchain for a privacy protocol, which can include a merchant token. Preferably, the request may also include other information, such as a user subject and the like.
在操作4.1.2,区块链可向用户传送该隐私协议。优选地,在传送该隐私协议之前,区块链可首先验证商户令牌的合法性,且在验证通过后才传送该隐私协议。At operation 4.1.2, the blockchain may communicate the privacy agreement to the user. Preferably, before transmitting the privacy agreement, the blockchain can first verify the legitimacy of the merchant's token, and then transmit the privacy agreement after the verification is passed.
在操作4.1.3,用户可与商户签署隐私协议。在签署隐私协议之前,用户可首先审阅隐私协议的条款,以及其他信息(例如,有效期、授权范围、授权费用、自动续签、违约赔偿、争议解决等等)。例如,用户可使用其私钥来签署隐私协议,从而生成相应的经签名信息。该经签名信息例如可包括用户的公钥,隐私协议信息(例如其哈希值)和数字签名本身等等。在生成经签名信息后,用户可将该经签名信息传送到商户。In operation 4.1.3, the user may sign a privacy agreement with the merchant. Before signing a privacy agreement, users can first review the terms of the privacy agreement, as well as other information (for example, validity period, scope of authorization, authorization fee, automatic renewal, compensation for breach of contract, dispute resolution, etc.). For example, a user may use their private key to sign a privacy agreement, thereby generating a corresponding signed message. The signed information may include, for example, the user's public key, privacy protocol information (such as its hash value), the digital signature itself, and the like. After generating the signed information, the user may transmit the signed information to the merchant.
在操作4.1.3.1,商户可将用户的该隐私协议签署事务记录到区块链。具体而言,商户可将经签名信息、服务令牌、用户主体等信息打包成事务,并将该事务传送至区块链网络中的节点。In operation 4.1.3.1, the merchant can record the transaction of signing the privacy agreement of the user to the blockchain. Specifically, merchants can package information such as signed information, service tokens, and user subjects into transactions, and transmit the transactions to nodes in the blockchain network.
在操作4.1.3.1.1,区块链可执行共识算法以记录该服务协议签署事务。其中,区块链可校验用户主体、商户ID和商户令牌合法性。在校验通过后,区块链可完成用户主体和商户令牌的映射,从而生成可信键值对{用户主体:商户令牌}。利用该键值对,可以方便地从用户主体查询到对应的商户令牌。In operation 4.1.3.1.1, the blockchain may execute a consensus algorithm to record the service agreement signing transaction. Among them, the blockchain can verify the legitimacy of the user subject, merchant ID and merchant token. After the verification is passed, the blockchain can complete the mapping between the user subject and the merchant token, thereby generating a trusted key-value pair {user subject: merchant token}. Using this key-value pair, the corresponding merchant token can be easily queried from the user subject.
在合法性校验通过后,区块链还可生成与该用户主体相对应的用户令牌(c_token)。在生成用户令牌之后,可生成另一可信键值对{用户令牌:用户主体}。利用该键值对,可以方便地从用户令牌查询到对应的用户主体。After passing the legality verification, the blockchain can also generate a user token (c_token) corresponding to the user subject. After the user token is generated, another trusted key-value pair {user token: user principal} can be generated. Using this key-value pair, you can easily query the corresponding user principal from the user token.
至此,实现了链条式传递的键值对序列,从而能够基于用户令牌,依次获取用户主体(例如基于{用户令牌:用户主体}键值对)、商户令牌(例如基于{用户主体:商户令牌}键值对)、商户ID(例如基于{商户令牌:商户ID}键值对)、渠道方令牌(例如基于{商户ID:渠道方令牌}键值对)、渠道方ID(例如基于{渠道方令牌:渠道方ID}键值对)、服务令牌(例如基于{渠道方ID:服务令牌}键值对)、网关ID(例如基于{服务令牌:网关ID}键值对)、服务代码(例如基于{网关ID:服务代码}键值对)。So far, the sequence of key-value pairs passed in a chain has been realized, so that based on the user token, the user principal (for example, based on {user token: user principal} key-value pair), merchant token (for example, based on {user principal: Merchant Token} key-value pair), Merchant ID (for example, based on {Merchant Token: Merchant ID} key-value pair), Channel Party Token (for example, based on {Merchant ID: Channel Party Token} key-value pair), Channel Party ID (e.g. based on {channel party token: channel party ID} key-value pair), service token (e.g. based on { channel party ID: service token} key-value pair), gateway ID (e.g. based on { service token: gateway ID} key-value pair), service code (for example, based on {gateway ID: service code} key-value pair).
在操作4.1.3.1.2,区块链可将用户令牌传送给商户。At operation 4.1.3.1.2, the blockchain may transmit the user token to the merchant.
在操作4.1.31.2.1,商户可将用户令牌传送给用户。用户可存储用户令牌(例如在本地或其他位置),以供后续使用。At operation 4.1.31.2.1, the merchant may transmit the user token to the user. A user may store a user token (eg, locally or elsewhere) for subsequent use.
至此,用户与商户的签署操作完成。So far, the signing operation between the user and the merchant is completed.
通过上述操作,完成了数据服务提供方-中间方(一个或多个渠道方和商户)-用户的链条式的签约共识,从而使得商户能够使用由数据服务提供方提供的数据服务来向用户提供服务。Through the above operations, the data service provider-intermediary (one or more channel parties and merchants)-user chain signing consensus is completed, so that merchants can use the data services provided by the data service provider to provide users with Serve.
参见图6,其示出根据本说明书实施例的用于确权调用的示例过程的示意图。Referring to FIG. 6 , it shows a schematic diagram of an example process for right confirmation calling according to an embodiment of the present specification.
在操作5,用户可向商户请求使用服务。例如,用户可通过商户提供的渠道(包括但不限于网站、应用、小程序等)向商户发送服务请求。通常,该服务请求可包括用户主体和服务代码,其中用户主体标识请求服务的用户,服务代码可标识所请求的服务能力。优选地,该服务请求还可包括用户令牌。优选地,该服务请求还可包括服务期限和/或服务费用等附加信息。In operation 5, the user may request the merchant to use the service. For example, a user may send a service request to a merchant through channels provided by the merchant (including but not limited to websites, applications, applets, etc.). Typically, the service request may include a user principal and a service code, wherein the user principal identifies the user requesting the service, and the service code identifies the requested service capability. Preferably, the service request may also include a user token. Preferably, the service request may also include additional information such as service period and/or service fee.
在操作5.1,商户可向网关传送服务请求。优选地,商户收到服务请求后,可验证用户主体和/或服务代码的合法性。如果验证通过,则商户可向网关传送服务请求。该服务请求可包括用户主体、商户ID、用户令牌和服务代码。优选地,该服务请求还可包括其他附加信息。该商户ID可标识提供服务的商户。该用户令牌可来自从用户接收的服务请求,或者来自该商户本身的存储。At operation 5.1, the merchant may transmit a service request to the gateway. Preferably, after receiving the service request, the merchant can verify the legitimacy of the user principal and/or the service code. If the verification is passed, the merchant can send a service request to the gateway. The service request may include a user principal, merchant ID, user token, and service code. Preferably, the service request may also include other additional information. The merchant ID may identify the merchant providing the service. The user token may come from a service request received from the user, or from the merchant's own storage.
在操作5.1.1,基于该服务请求,网关可向区块链传送确权请求。网关可将商户的服务请求转换为确权请求,然后可向区块链发送该确权请求。确权请求例如可包括从商户接收的服务请求的内容。优选地,该确权请求还可包括网关ID。网关ID标识请求服务的网关。In operation 5.1.1, based on the service request, the gateway may transmit a confirmation request to the blockchain. The gateway can convert the merchant's service request into a right confirmation request, and then send the right confirmation request to the blockchain. The right confirmation request may include, for example, the content of a service request received from a merchant. Preferably, the right confirmation request may also include a gateway ID. The gateway ID identifies the gateway requesting the service.
在操作5.1.1.1,区块链可调用确权共识执行确权。In operation 5.1.1.1, the blockchain can call the right confirmation consensus to perform right confirmation.
具体而言,区块链可使用用户令牌基于映射来获取相关信息。所述映射例如可包括如上文所介绍的映射中的一者或多者。例如,如上文所述,可基于用户令牌,依次获取用户主体(例如基于{用户令牌:用户主体}键值对)、商户令牌(例如基于{用户主体:商户令牌}键值对)、商户ID(例如基于{商户令牌:商户ID}键值对)、渠道方令牌(例如基于{商户ID:渠道方令牌}键值对)、渠道方ID(例如基于{渠道方令牌:渠道方ID}键值对)、服务令牌(例如基于{渠道方ID:服务令牌}键值对)、网关ID(例如基于{服务令牌:网关ID}键值对)、服务代码(例如基于{网关ID:服务代码}键值对)。可以看出,通过先前在签约操作中建立的链条式的映射(或称键值对),能够从用户令牌得到服务代码。Specifically, the blockchain can use user tokens to obtain relevant information based on mappings. The mapping may, for example, include one or more of the mappings as introduced above. For example, as mentioned above, based on the user token, the user principal (for example, based on {user token: user principal} key-value pair), merchant token (for example, based on {user principal: merchant token} key-value pair ), merchant ID (e.g. based on {merchant token: merchant ID} key-value pair), channel party token (e.g. based on {merchant ID: channel party token} key-value pair), channel party ID (e.g. based on {channel party token: channel party ID} key-value pair), service token (for example based on {channel party ID: service token} key-value pair), gateway ID (for example based on {service token: gateway ID} key-value pair), Service code (e.g. based on {gateway ID: service code} key-value pair). It can be seen that the service code can be obtained from the user token through the chain mapping (or key-value pair) previously established in the signing operation.
随后,所述区块链可校验从所述映射获得的用户主体、商户ID、网关ID和服务代码中的一者或多者与确权请求中的对应项(即用户主体、商户ID、网关ID和服务代码中的一者或多者)是否匹配。如果所校验的各项全部匹配,则校验通过,所述区块链确权通过,否则确权失败。Subsequently, the block chain can check one or more of the user principal, merchant ID, gateway ID and service code obtained from the mapping with the corresponding items in the confirmation request (ie, user principal, merchant ID, One or more of the gateway ID and service code) match. If all the verified items match, the verification is passed, and the blockchain right confirmation is passed; otherwise, the right confirmation fails.
在操作5.1.1.2,区块链可向网关传送确权结果。如果在上述确权操作中确权通过,则区块链可向网关返回确权通过结果。该确权通过结果例如可包括确权通过ID。该确权通过结果还可包括一些其他的信息,例如服务期限、服务费用等。在一些示例中,如果确权失败,则区块链可返回确权失败结果以及可能的其他信息(例如失败原因等)。In operation 5.1.1.2, the blockchain can transmit the right confirmation result to the gateway. If the right is confirmed in the above right confirmation operation, the blockchain can return the result of the right confirmation to the gateway. The right confirmation result may include a right confirmation ID, for example. The right confirmation result may also include some other information, such as service period, service fee and so on. In some examples, if the right confirmation fails, the blockchain may return the result of the right confirmation failure and possibly other information (such as failure reasons, etc.).
在操作5.1.1.2.1,基于确权通过结果,网关可向服务提供方调用服务能力。例如,网关在接收到确权结果后,可根据该确权结果决定是否向服务提供方调用服务能力以获取服务数据。如果接收到确权通过结果,则网关可向服务提供方传送服务请求,以请求服务提供方提供服务数据,该服务数据与所请求的服务能力相对应。优选地,该数据服务请求可包括用户主体、商户ID、服务代码和服务期限中的一者或多者,用于标识服务请求的来源和类型。通过将确权结果通知给数据服务方,数据服务方将使用其服务能力来检索或生成服务数据。In operation 5.1.1.2.1, based on the confirmation result, the gateway can invoke the service capability to the service provider. For example, after receiving the right confirmation result, the gateway can decide whether to call the service capability to the service provider to obtain the service data according to the right confirmation result. If the confirmation result is received, the gateway may transmit a service request to the service provider to request the service provider to provide service data corresponding to the requested service capability. Preferably, the data service request may include one or more of the user subject, merchant ID, service code and service period, which are used to identify the source and type of the service request. By notifying the data service provider of the confirmation result, the data service provider will use its service capabilities to retrieve or generate service data.
在操作5.1.1.2.1.1,服务提供方可向网关传送服务数据。在生成服务数据后,服务提供方可将服务数据传送给网关。In operation 5.1.1.2.1.1, the service provider may transmit service data to the gateway. After generating the service data, the service provider can transmit the service data to the gateway.
优选地,在操作5.1.1.2.1.1.1,网关可将服务能力调用事务记录到区块链。此操作可在数据服务提供方提供数据服务之前或之后执行,以确保数据服务请求的可追溯性和不可篡改性。根据具体情形,也可不执行此操作。Preferably, in operation 5.1.1.2.1.1.1, the gateway can record the service capability invocation transaction to the blockchain. This operation can be performed before or after the data service provider provides the data service to ensure the traceability and non-tampering of the data service request. Depending on the situation, this action may or may not be performed.
在一个示例中,该数据服务调用事务可包括以下信息中的任何适当组合:用户主体、商户ID、服务代码。优选地,该数据服务调用事务还可包括以下信息:服务期限、数据服务提供方ID、数据服务调用时间等等。In one example, the data service call transaction may include any suitable combination of the following information: user principal, merchant ID, service code. Preferably, the data service invocation transaction may further include the following information: service period, data service provider ID, data service invocation time and so on.
数据服务提供方可确保数据服务调用事务的合法性和准确性,以避免不必要的数据泄露和服务误用。Data service providers can ensure the legitimacy and accuracy of data service call transactions to avoid unnecessary data leakage and service misuse.
优选地,数据服务提供方可以基于区块链上的数据服务调用事务进行数据服务质量评估和数据服务费用结算等操作。Preferably, the data service provider can perform operations such as data service quality assessment and data service fee settlement based on the data service invocation transaction on the blockchain.
在操作5.1.1.2.1.1.2,数据服务提供方可将服务数据转发给商户。该数据服务可与该用户主体相关联并且可与该服务代码相对应。例如,数据服务提供方可从其数据存储中检索与该用户相关联的、与该服务代码相关联的数据,并将该数据作为数据服务返回给所述商户。In operation 5.1.1.2.1.1.2, the data service provider may forward the service data to the merchant. The data service can be associated with the user principal and can correspond to the service code. For example, a data service provider may retrieve from its data store the data associated with the user associated with the service code and return that data to the merchant as a data service.
优选地,在提供数据服务同时或之后,数据服务提供方和商户之间可进行数据服务费用结算等操作,具体操作根据服务请求的类型和商户的要求而定。Preferably, operations such as data service fee settlement can be performed between the data service provider and the merchant while or after the data service is provided, and the specific operation depends on the type of service request and the requirements of the merchant.
在操作5.1.1.2.1.1.2.1,商户可使用服务数据向用户提供服务。例如,商户可对服务数据进行进一步处理,或者基于服务数据进行验证等其他操作,从而向用户提供服务内容。In operation 5.1.1.2.1.1.2.1, the merchant can use the service data to provide the service to the user. For example, merchants can further process service data, or perform other operations such as verification based on service data, so as to provide service content to users.
在本说明书实施例中,链路调用实时确权且开放:服务注册、渠道方签约、商户签约、用户签约、调用确权5个重要共识协议基于信任链(公链、联盟链),具备公域访问能力,进而服务隐私确权调用链路实时性,降低隐私风险。In the embodiment of this specification, link calls are confirmed and open in real time: five important consensus protocols, including service registration, channel party signing, merchant signing, user signing, and calling right confirmation, are based on trust chains (public chains, alliance chains), and have public Domain access capabilities, and then serve the real-time privacy confirmation call link, reducing privacy risks.
本说明书实施例利用了多层级传递机制,基于区块链可信机制确保每次签约是可信,利用可传递机制解决服务多层级授信问题,最终确保多层级隐私数据调用具备可信和传递性。The embodiment of this specification utilizes a multi-level transfer mechanism, based on the blockchain trusted mechanism to ensure that each contract is credible, uses the transferable mechanism to solve the problem of multi-level credit granting of services, and finally ensures that multi-level private data calls are credible and transferable.
本说明书实施例保障用户隐私授权合法调用与可信网关确权机制,用户数据不会在渠道方留存,减少了隐私泄露的风险。The embodiment of this specification guarantees the legitimate call of user privacy authorization and the trusted gateway confirmation mechanism, and the user data will not be retained on the channel side, reducing the risk of privacy leakage.
本说明书实施例基于区块链token机制签约机制与网关调用确权共识机制保障渠道方客户关系不泄露(数据服务提供方、网关等获取不到客户关系),从而保护了渠道方的商业机密。The embodiment of this specification is based on the block chain token mechanism signing mechanism and the gateway call right confirmation consensus mechanism to ensure that the customer relationship of the channel party is not leaked (the data service provider, the gateway, etc. cannot obtain the customer relationship), thereby protecting the commercial secrets of the channel party.
参见图7,其示出根据本说明书实施例的用于基于区块链的示例服务协议授权方法700的示意流程图。Referring to FIG. 7 , it shows a schematic flowchart of an example service
如图7所示,方法700可包括:服务能力注册操作702,其中由网关将服务提供方的服务能力注册到该区块链并获得服务令牌,其中该服务能力与服务协议相关联。优选地,该区块链可为信任链,且该网关为可信网关。As shown in FIG. 7 , the
具体而言,服务能力注册操作702可通过以下方式执行:Specifically, the service
可由该网关接收来自该服务提供方的服务注册请求,该服务注册请求包括用于标识该服务能力的服务代码和该服务协议;The gateway may receive a service registration request from the service provider, where the service registration request includes a service code for identifying the service capability and the service agreement;
可基于该服务注册请求,由该网关将该服务能力注册到该区块链,其中该区块链对该网关的网关ID执行合法性校验,并完成该网关ID与该服务代码的映射;以及Based on the service registration request, the gateway can register the service capability to the blockchain, wherein the blockchain performs a legality check on the gateway ID of the gateway, and completes the mapping between the gateway ID and the service code; as well as
可由该网关接收来自该区块链的服务令牌,并将该服务令牌传送给该服务提供方。A service token from the blockchain may be received by the gateway and communicated to the service provider.
服务能力注册操作的具体细节例如可参考上文针对图2的描述。For specific details of the service capability registration operation, for example, reference may be made to the above description for FIG. 2 .
方法700还可包括:中间方签约操作704,其中由中间方利用该服务令牌或上一级中间方的令牌从该区块链获取该服务协议并签署该服务协议,该中间方的服务协议签署事务由该网关或该上一级中间方记录到该区块链,并获得该中间方的令牌。The
优选地,中间方可包括多级中间方。例如中间方可包括一个商户以及0个、1个或多个渠道方,其中商户为最低层级中间方,而最接近网关(或服务提供方)的渠道方为最高层级中间方(在不存在渠道方时商户同时为最高层级中间方),在最高层级中间方和最低层级中间方之间可存在一个或多个级别的中间方。Preferably, the intermediaries may include multiple levels of intermediaries. For example, the intermediary may include a merchant and 0, 1 or more channel parties, among which the merchant is the lowest-level intermediary, and the channel closest to the gateway (or service provider) is the highest-level intermediary (if there is no channel When the merchant is also the highest-level intermediary), there may be one or more levels of intermediaries between the highest-level intermediary and the lowest-level intermediary.
在此情况下,中间方签约操作包括最高层级中间方向网关签约操作以及低一层级中间方向高一层级中间方签约操作,且该用户签约操作包括用户向最低层级中间方签约操作。In this case, the signing operation of the intermediate party includes the signing operation of the highest-level intermediate party to the gateway and the signing operation of the lower-level intermediate party towards the higher-level intermediate party, and the user signing operation includes the operation of the user signing with the lowest-level intermediate party.
其中,最高层级中间方向网关签约操作例如可包括:Among them, the highest-level intermediate direction gateway signing operation may include, for example:
由该最高层级中间方向该网关请求该服务令牌;requesting the service token from the highest-level intermediary to the gateway;
由该最高层级中间方基于该服务令牌从该区块链获取该服务协议;Obtain the service agreement from the blockchain based on the service token by the highest-level intermediary;
由该最高层级中间方向该网关签署该服务协议,并由该网关将该服务协议签署事务传送到该区块链;The highest-level intermediary signs the service agreement with the gateway, and the gateway transmits the service agreement signing transaction to the blockchain;
由该区块链执行共识算法以记录该服务协议签署事务,其中由该区块链校验该最高层级中间方ID和该服务令牌合法性,并完成该最高层级中间方ID与该服务令牌的映射;The block chain executes the consensus algorithm to record the service agreement signing transaction, wherein the block chain verifies the legality of the highest-level intermediary ID and the service token, and completes the highest-level intermediary ID and the service order Mapping of cards;
由该区块链生成该最高层级中间方的令牌并将其传送到该网关;以及A token for the highest-level intermediary is generated by the blockchain and communicated to the gateway; and
由该网关将该最高层级中间方的令牌传送到该最高层级中间方。The token of the top-level intermediary is passed by the gateway to the top-level intermediary.
优选地或替代地,低一层级中间方向高一层级中间方签约操作例如可包括:Preferably or alternatively, the contracting operation between a lower-level intermediary and a higher-level intermediary may include, for example:
由该低一层级中间方向该高一层级中间方请求该高一层级中间方的令牌;Requesting the token of the higher-level intermediary from the lower-level intermediary to the higher-level intermediary;
由该低一层级中间方基于该令牌从该区块链获取该服务协议;Obtain the service agreement from the blockchain based on the token by the lower-level intermediary;
由该低一层级中间方向该高一层级中间方签署该服务协议,并由该高一层级中间方将该服务协议签署事务传送到该区块链;The lower-level intermediary signs the service agreement with the higher-level intermediary, and the higher-level intermediary transmits the service agreement signing transaction to the blockchain;
由该区块链执行共识算法以记录该服务协议签署事务,其中由该区块链校验该低一层级中间方ID和该高一层级中间方的令牌的合法性,并完成该低一层级中间方ID与该高一层级中间方的令牌的映射;The blockchain executes the consensus algorithm to record the service agreement signing transaction, wherein the blockchain checks the legitimacy of the lower-level intermediary ID and the token of the higher-level intermediary, and completes the lower-level The mapping between the hierarchical intermediary ID and the token of the higher-level intermediary;
由该区块链生成该低一层级中间方的令牌;The token of the lower-level intermediary is generated by the blockchain;
由该区块链将该低一层级中间方的令牌传送到该高一层级中间方;以及transfer of the lower intermediary's token by the blockchain to the higher intermediary; and
由该高一层级中间方将该低一层级中间方的令牌传送到该低一层级中间方。The token of the lower-level intermediary is transmitted by the higher-level intermediary to the lower-level intermediary.
优选地,该服务协议为隐私协议。Preferably, the service agreement is a privacy agreement.
中间方签约操作的具体细节例如可参考上文针对图3和图4的描述。For specific details of the signing operation of the intermediate party, for example, reference may be made to the above descriptions for FIG. 3 and FIG. 4 .
方法700还可包括:用户签约操作706,其中由该用户利用中间方的令牌从该区块链获取该服务协议并签署该服务协议,该用户的服务协议签署事务由该中间方记录到该区块链,并获得该用户的令牌。The
用户签约操作例如可包括:User sign-up operations may include, for example:
由该用户向中间方请求该中间方的令牌,其中该中间方为最低层级中间方;The user requests the intermediary's token from the intermediary, where the intermediary is the lowest-level intermediary;
由该用户基于该令牌从该区块链获取该服务协议;The user obtains the service agreement from the blockchain based on the token;
由该用户向该中间方签署该服务协议,并由该中间方将该服务协议签署事务传送到该区块链;The user signs the service agreement to the intermediary, and the intermediary transmits the service agreement signing transaction to the blockchain;
由该区块链执行共识算法以记录该服务协议签署事务,其中由该区块链校验该用户主体和该中间方的令牌的合法性,并完成该用户主体与该中间方的令牌的映射;The block chain executes the consensus algorithm to record the service agreement signing transaction, wherein the block chain verifies the legitimacy of the user subject and the intermediate party's token, and completes the user subject and the intermediate party's token the mapping;
由该区块链生成该用户的令牌;The user's token is generated by the blockchain;
由该区块链将该用户的令牌传送到该中间方;以及transfer of the user's token by the blockchain to the intermediary; and
由该中间方将该用户的令牌传送到该用户。The user's token is transferred to the user by the intermediary.
用户签约操作的具体细节例如可参考上文针对图5的描述。For specific details of the user signing operation, for example, reference may be made to the above description for FIG. 5 .
优选地,方法700可进一步包括:确权调用操作708,其中由中间方使用该用户的令牌通过该网关请求该区块链确权,并基于确权的结果来从该服务提供方获取服务数据。Preferably, the
具体而言,确权调用操作708可包括:Specifically, the right
由中间方使用该用户的令牌向该网关传送服务请求;The intermediary uses the user's token to transmit a service request to the gateway;
基于该服务请求,由该网关向该区块链传送确权请求;Based on the service request, the gateway sends a confirmation request to the blockchain;
由该区块链调用确权共识执行确权,其中该区块链使用该用户的令牌基于签约操作中所完成的映射来获得该用户的用户主体、该中间方的中间方ID、该网关的网关ID以及该服务代码,以校验该用户的用户主体、该中间方的中间方ID、该网关的网关ID以及该服务代码与该确权请求中的对应项目是否匹配;The blockchain calls the right confirmation consensus to perform right confirmation, wherein the blockchain uses the user's token to obtain the user's user subject, the intermediary ID of the intermediary, and the gateway based on the mapping completed in the signing operation. gateway ID and the service code to check whether the user’s user subject, the intermediary party’s ID, the gateway’s gateway ID and the service code match the corresponding items in the right confirmation request;
该网关基于该确权的结果,向该服务提供方调用服务能力并将相关联的服务数据转发给该中间方;以及Based on the confirmation result, the gateway invokes the service capability to the service provider and forwards the associated service data to the intermediary; and
由该中间方使用该服务数据向该用户提供服务。The service data is provided by the intermediary to the user.
优选地,可由该网关将服务能力调用事务记录到该区块链。Preferably, the gateway can record the service capability invocation transaction to the block chain.
优选地,服务协议签署事务(包括各方的服务协议签署事务)的哈希值可在公域上公开。Preferably, the hash value of the service agreement signing transaction (including the service agreement signing transaction of each party) can be published on the public domain.
用户签约操作的具体细节例如可参考上文针对图6的描述。For specific details of the user's subscription operation, for example, refer to the above description for FIG. 6 .
参见图8,其示出根据本说明书实施例的用于基于区块链进行示例服务协议授权的系统800的示意流程图。Referring to FIG. 8 , it shows a schematic flowchart of a system 800 for authorization of an example service agreement based on blockchain according to an embodiment of the present specification.
如图8所示,系统800可包括:服务能力注册装置802,其中由网关将服务提供方的服务能力注册到该区块链并获得服务令牌,其中该服务能力与服务协议相关联。优选地,该区块链可为信任链,且该网关为可信网关。此装置的操作可参考上文对服务能力注册操作702的描述。As shown in FIG. 8 , the system 800 may include: a service capability registration device 802, wherein the gateway registers the service capability of the service provider to the blockchain and obtains a service token, wherein the service capability is associated with a service agreement. Preferably, the block chain can be a chain of trust, and the gateway is a trusted gateway. For the operation of this device, reference may be made to the description of the service
系统800还可包括:中间方签约装置804,其中由中间方利用该服务令牌或上一级中间方的令牌从该区块链获取该服务协议并签署该服务协议,该中间方的服务协议签署事务由该网关或该上一级中间方记录到该区块链,并获得该中间方的令牌。此装置的操作可参考上文对中间方签约操作704的描述。The system 800 may also include: an intermediary signing device 804, wherein the intermediary uses the service token or the token of the upper intermediary to obtain the service agreement from the block chain and sign the service agreement, the intermediary's service The agreement signing transaction is recorded by the gateway or the upper-level intermediary to the blockchain, and the intermediary's token is obtained. For the operation of this device, reference may be made to the description of the
系统800还可包括:用户签约装置806,其中由该用户利用中间方的令牌从该区块链获取该服务协议并签署该服务协议,该用户的服务协议签署事务由该中间方记录到该区块链,并获得该用户的令牌。此装置的操作可参考上文对用户签约操作706的描述。The system 800 may also include: a user signing device 806, wherein the user uses the intermediary's token to obtain the service agreement from the blockchain and signs the service agreement, and the user's service agreement signing transaction is recorded by the intermediary to the blockchain, and get the user's token. For the operation of this device, reference may be made to the description of the
优选地,系统800可进一步包括:确权调用装置808,其中由中间方使用该用户的令牌通过该网关请求该区块链确权,并基于确权的结果来从该服务提供方获取服务数据。此装置的操作可参考上文对用户签约操作708的描述。Preferably, the system 800 may further include: right confirmation calling means 808, wherein the intermediary uses the user's token to request the block chain right confirmation through the gateway, and obtains services from the service provider based on the right confirmation result data. For the operation of this device, reference may be made to the description of the
图9示出用于实现根据本说明书一个或多个实施例的方法的装置900的示意框图。该装置可用于实现例如本文描述的方法(例如方法700)或用于实现如本文描述的系统(例如系统800)。该装置还可被实现为本文描述的任何计算节点或计算节点集群(例如通过虚拟化等)。该装置可包括处理器910以及存储器915,该处理器被配置成执行如上所述的任何方法。该存储器可包括内存和/或持久存储。该存储器还可用于存储在方法的执行过程中可使用的任何指令、变量、中间数据等等。Fig. 9 shows a schematic block diagram of an
该装置900可包括网络连接元件925,例如可包括通过有线连接或无线连接来连接到其它设备的网络连接设备。该无线连接例如可以为WiFi连接、蓝牙连接、3G/4G/5G网络连接等。例如,可通过该网络连接元件连接到网络以获取相关数据、指令及其它各种数据。还可经由网络连接元件接收用户从其它设备所进行的输入或者将数据传送到其它设备以供显示。The
该装置还可选地包括其它外围元件920,例如输入装置(如键盘、鼠标)、输出装置(如显示器)等。例如,在基于用户输入的方法中,用户可经由输入装置执行输入操作。还可经由输出装置向用户输出相应的信息。The device also optionally includes other peripheral components 920, such as input devices (eg, keyboard, mouse), output devices (eg, display), and the like. For example, in a user input based method, a user may perform an input operation via an input device. Corresponding information can also be output to the user via the output device.
这些模块中的每一者可彼此直接或间接通信,例如,经由一条或多条总线(例如总线905)。Each of these modules may communicate with each other directly or indirectly, eg, via one or more buses (eg, bus 905).
而且,本申请还公开了一种包括存储于其上的计算机可执行指令的计算机可读存储介质,所述计算机可执行指令在被处理器执行时使得所述处理器执行本文所述的各实施例的方法。Furthermore, the present application discloses a computer-readable storage medium including stored thereon computer-executable instructions that, when executed by a processor, cause the processor to perform the various implementations described herein. example method.
此外,本申请还公开了一种装置,该装置包括处理器以及存储有计算机可执行指令的存储器,所述计算机可执行指令在被处理器执行时使得所述处理器执行本文所述的各实施例的方法。In addition, the present application discloses an apparatus comprising a processor and a memory storing computer-executable instructions that, when executed by the processor, cause the processor to perform various implementations described herein. example method.
此外,本申请还公开了一种系统,该系统包括用于实现本文所述的各实施例的方法的装置。In addition, the present application also discloses a system, which includes devices for implementing the methods of the various embodiments described herein.
可以理解,根据本说明书的一个或多个实施例的方法可以用软件、固件或其组合来实现。It can be understood that the method according to one or more embodiments of the present specification can be implemented by software, firmware or a combination thereof.
应该理解,本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同或相似的部分互相参考即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置和系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参考方法实施例的部分说明即可。It should be understood that each embodiment in this specification is described in a progressive manner, the same or similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments . In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for relevant parts, refer to the part of the description of the method embodiments.
应该理解,上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。It should be understood that the foregoing describes specific embodiments of the present specification. Other implementations are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. Multitasking and parallel processing are also possible or may be advantageous in certain embodiments.
应该理解,本文用单数形式描述或者在附图中仅显示一个的元件并不代表将该元件的数量限于一个。此外,本文中被描述或示出为分开的模块或元件可被组合为单个模块或元件,且本文中被描述或示出为单个的模块或元件可被拆分为多个模块或元件。It should be understood that describing an element herein in the singular or showing only one in a drawing does not mean limiting the number of that element to one. Furthermore, modules or elements described or illustrated herein as separate may be combined into a single module or element, and modules or elements described or illustrated herein as a single may be split into a plurality of modules or elements.
还应理解,本文采用的术语和表述方式只是用于描述,本说明书的一个或多个实施例并不应局限于这些术语和表述。使用这些术语和表述并不意味着排除任何示意和描述(或其中部分)的等效特征,应认识到可能存在的各种修改也应包含在权利要求范围内。其他修改、变化和替换也可能存在。相应的,权利要求应视为覆盖所有这些等效物。It should also be understood that the terms and expressions used herein are for description only, and one or more embodiments of this specification should not be limited to these terms and expressions. The use of these terms and expressions does not mean to exclude any equivalent features shown and described (or parts thereof), and it should be recognized that various modifications may also be included within the scope of the claims. Other modifications, changes and substitutions may also exist. Accordingly, the claims should be read to cover all such equivalents.
同样,需要指出的是,虽然已参考当前的具体实施例来描述,但是本技术领域中的普通技术人员应当认识到,以上的实施例仅是用来说明本说明书的一个或多个实施例,在没有脱离本发明精神的情况下还可做出各种等效的变化或替换,因此,只要在本发明的实质精神范围内对上述实施例的变化、变型都将落在本申请的权利要求书的范围内。Similarly, it should be pointed out that although the description has been made with reference to the current specific embodiments, those of ordinary skill in the art should recognize that the above embodiments are only used to illustrate one or more embodiments of this specification, Various equivalent changes or replacements can also be made without departing from the spirit of the present invention. Therefore, as long as the changes and modifications to the above-mentioned embodiments are within the scope of the spirit of the present invention, they will all fall within the claims of the present application. within the scope of the book.
Claims (15)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310452138.4A CN116303803A (en) | 2023-04-24 | 2023-04-24 | Blockchain-based service agreement authorization method, system and medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310452138.4A CN116303803A (en) | 2023-04-24 | 2023-04-24 | Blockchain-based service agreement authorization method, system and medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116303803A true CN116303803A (en) | 2023-06-23 |
Family
ID=86790749
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310452138.4A Pending CN116303803A (en) | 2023-04-24 | 2023-04-24 | Blockchain-based service agreement authorization method, system and medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116303803A (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110839030A (en) * | 2019-11-15 | 2020-02-25 | 内蒙古大学 | Authority transfer method in block chain access control |
| CN111279336A (en) * | 2017-05-04 | 2020-06-12 | 蒙蒂塞洛企业有限公司 | Offers cryptocurrency payments through a browser API |
| CN113141374A (en) * | 2015-12-30 | 2021-07-20 | 亚马逊科技有限公司 | Service authorization handshake |
| CN113572827A (en) * | 2021-07-13 | 2021-10-29 | 支付宝(杭州)信息技术有限公司 | Registration processing method and device |
| CN115968481A (en) * | 2020-04-15 | 2023-04-14 | 艾格斯有限责任公司 | Smart assertion tokens for authenticating and controlling network communications using distributed ledgers |
-
2023
- 2023-04-24 CN CN202310452138.4A patent/CN116303803A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113141374A (en) * | 2015-12-30 | 2021-07-20 | 亚马逊科技有限公司 | Service authorization handshake |
| CN111279336A (en) * | 2017-05-04 | 2020-06-12 | 蒙蒂塞洛企业有限公司 | Offers cryptocurrency payments through a browser API |
| CN110839030A (en) * | 2019-11-15 | 2020-02-25 | 内蒙古大学 | Authority transfer method in block chain access control |
| CN115968481A (en) * | 2020-04-15 | 2023-04-14 | 艾格斯有限责任公司 | Smart assertion tokens for authenticating and controlling network communications using distributed ledgers |
| CN113572827A (en) * | 2021-07-13 | 2021-10-29 | 支付宝(杭州)信息技术有限公司 | Registration processing method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12488341B2 (en) | Virtualization and secure processing of data | |
| CN113468602B (en) | Data inspection method, device and equipment | |
| US20230315904A1 (en) | Digital ledger based health data sharing and management | |
| KR101354898B1 (en) | Electronic commerce transactions over a peer-to-peer communications channel | |
| RU2705455C1 (en) | Method and system for collecting and generating authentication data reporting | |
| US11556959B2 (en) | Internet data usage control system | |
| KR20220011165A (en) | Computer-implemented systems and methods | |
| JP2018519562A (en) | Method and system for transaction security | |
| CN111902838B (en) | Internet Data Usage Control System | |
| CN108965228A (en) | Dispute relief system with KYC data mark of multiple keys and method thereof | |
| CN112767147B (en) | Creditor right information processing method and device | |
| CN114513373B (en) | Trusted data exchange method, device, system, electronic equipment and storage medium | |
| CN116303803A (en) | Blockchain-based service agreement authorization method, system and medium | |
| CN110504008A (en) | A medical information management method, system, computer equipment and storage medium | |
| CN118396624A (en) | Under-chain calculation transaction method, device, equipment and storage medium | |
| CN115470527A (en) | Evidence storage method, device and system based on block chain | |
| KR101581663B1 (en) | Authentication and non-repudiation method and system using trusted third party | |
| CN116109383A (en) | Payment order service method, system, electronic equipment and storage medium | |
| US12051048B2 (en) | Systems and methods for securely sharing public blockchain addresses | |
| US12175478B2 (en) | Internet data usage control system | |
| US20250200559A1 (en) | Blockchain enabled electronic agreements | |
| US20210358001A1 (en) | Secure referral transfer service | |
| WO2025038518A2 (en) | Apparatus and method for scoring digital identity attribute levels in a computer network with multiple enterprise participants | |
| CN118194329A (en) | Method, device, equipment and medium for accessing open bank page | |
| CN116366254A (en) | Cross-chain information generation method, cross-chain information verification method and cross-chain information verification system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |