Cross-chain event subscription processing method and device, equipment and readable storage medium
By implementing authorization authentication and authorization subscription mechanisms in the cross-chain gateway, the problem of being unable to subscribe to cross-chain events between blockchain organizations is solved, cross-organizational data interaction is realized, and the flexibility and security of data interaction are improved.
Patent Information
- Application Number
- CN202310384043.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-06
- Publication Date
- 2024-10-15
AI Technical Summary
In the existing technology, cross-chain events between blockchain organizations cannot be subscribed across organizations, which limits data interaction between blockchain organizations.
By implementing the authorization authentication and authorization subscription mechanism in the cross-chain gateway, cross-chain event subscriptions between different business organizations are allowed, authorized cross-chain event sets are generated, and subscriber identity verification and authorization processing are performed based on digital certificates.
It realizes cross-chain event subscription between blockchain organizations, reduces data sharing restrictions, improves the flexibility and applicability of data interaction, and ensures information security.
Smart Images

Figure CN118784258A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method, device, equipment and readable storage medium for processing cross-chain event subscription. Background Art
[0002] Blockchain technology is a technology based on a decentralized peer-to-peer network. It combines cryptographic principles with consensus mechanisms to ensure the data consistency and continuity of distributed nodes, thereby achieving the purpose of instant verification, traceability, difficulty in tampering and unshielding of information, thereby creating a set of privacy, efficiency and security shared value system. With the continuous development of blockchain technology, data interaction between blockchains can be achieved through cross-chain technology. Among them, cross-chain technology refers to the secure and reliable transfer of data on one blockchain to another blockchain.
[0003] The inventor of this application discovered during the research and practice that in the prior art, in order to meet business needs, multiple enterprises or institutions can form a business organization as multiple organizational members, and multiple members of the business organization can participate in multiple blockchains through corresponding blockchain nodes. Since the blockchain node of any member in the business organization can only subscribe to cross-chain events of other blockchains belonging to the same business organization, but cannot subscribe to cross-chain events of blockchains of other business organizations, cross-chain events cannot be subscribed across organizations, which limits the data interaction between different blockchain organizations. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, device, and readable storage medium for processing cross-chain event subscription, which can realize the subscription of cross-chain events between different business organizations, expand the data interaction between blockchain organizations, and have high applicability.
[0005] In a first aspect, the present application provides a method for processing cross-chain event subscription, the method comprising:
[0006] When receiving the authorization application request sent by the authorized subscriber of the second business chain, the cross-chain gateway of the first business chain performs authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request, wherein the authorization application request is used to request the cross-chain gateway to authorize subscription to the cross-chain events of the first business chain;
[0007] When the authorized subscriber passes the authorization authentication, the cross-chain gateway generates an authorized cross-chain event set for the authorized subscriber, and the authorized cross-chain event set includes multiple authorized cross-chain events that the authorized subscriber is authorized to subscribe to;
[0008] When receiving a first subscription request sent by any subscriber and determining that any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request, the cross-chain gateway determines the event subscription processing result of the first subscription request based on the multiple authorized cross-chain events included in the authorized cross-chain event set and the first identifier carried in the first subscription request, wherein the first subscription request is used to request subscription to the first cross-chain event of the first business chain, and the first identifier is the identifier of the first cross-chain event;
[0009] The cross-chain gateway returns the event subscription processing result to any of the subscribers, wherein the event subscription processing result includes event data indicating that the first cross-chain event subscription is successful, or indication information indicating that the first cross-chain event subscription fails.
[0010] In a possible implementation, the cross-chain gateway of the first service chain performs authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request, including:
[0011] The cross-chain gateway of the first business chain obtains the first root certificate of the authorized subscriber based on the digital certificate in the authorization application request, and the first root certificate is used to issue the digital certificate of the authorized subscriber;
[0012] The cross-chain gateway obtains the root certificate trust set of the first business chain, where the root certificate trust set includes multiple root certificates authorized and trusted by the first business chain;
[0013] When there is a root certificate matching the first root certificate in the root certificate trust set, the cross-chain gateway determines that the authorization authentication of the authorized subscriber is passed to complete the authorization authentication of the authorized subscriber.
[0014] In a possible implementation, after the cross-chain gateway obtains the root certificate trust set of the first service chain, the method further includes:
[0015] When there is no root certificate matching the first root certificate in the root certificate trust set, the cross-chain gateway determines that the authorization authentication of the authorized subscriber fails, and sends an indication of the authorization authentication failure to the authorized subscriber to complete the authorization authentication of the authorized subscriber.
[0016] In a possible implementation, the cross-chain gateway generates the authorized cross-chain event set of the authorized subscriber, including:
[0017] The cross-chain gateway obtains a cross-chain event set of the first business chain and a business agreement between the first business chain and the second business chain. The cross-chain event set includes multiple cross-chain events of the first business chain managed by the cross-chain gateway, and the business agreement includes multiple authorized business types authorized by the first business chain to open to the second business chain.
[0018] The cross-chain gateway determines the multiple cross-chain events in the cross-chain event set that match the authorized business type in the business agreement as the multiple authorized cross-chain events authorized for the authorized subscriber to subscribe to, and generates the authorized cross-chain event set of the authorized subscriber based on the multiple authorized cross-chain events.
[0019] In a possible implementation, after the authorized subscriber passes the authorization authentication, the method further includes:
[0020] The cross-chain gateway obtains the first identity identifier of the authorized subscriber based on the digital certificate of the authorized subscriber, where the first identity identifier is the unique identifier of the authorized subscriber;
[0021] The above-mentioned cross-chain gateway adds the first identity identifier of the above-mentioned authorized subscriber to the authorized subscriber identification set of the above-mentioned cross-chain gateway to determine that the above-mentioned authorized subscriber is a subscriber who has passed the authorization authentication. The above-mentioned authorized subscriber identification set includes multiple identity identifiers of multiple subscribers that have been authorized and authenticated by the above-mentioned cross-chain gateway.
[0022] In a possible implementation, after the cross-chain gateway generates the authorized cross-chain event set of the authorized subscriber, the method further includes:
[0023] When receiving a first subscription request sent by any subscriber, the cross-chain gateway obtains a second identity identifier of any subscriber based on the digital certificate of any subscriber carried in the first subscription request;
[0024] When there is an identity identifier in the above-mentioned authorized subscriber identification set that matches the above-mentioned second identity identifier, the above-mentioned cross-chain gateway determines that any of the above-mentioned subscribers is the above-mentioned authorized subscriber that has been authorized and authenticated.
[0025] In a possible implementation, the cross-chain gateway determines the event subscription processing result of the first subscription request based on the multiple authorized cross-chain events included in the authorized cross-chain event set and the first identifier carried in the first subscription request, including:
[0026] The cross-chain gateway obtains multiple authorized cross-chain event identifiers of multiple authorized cross-chain events in the authorized cross-chain event, wherein one authorized cross-chain event identifier corresponds to one authorized cross-chain event;
[0027] When there is an authorized cross-chain event identifier in the authorized cross-chain event set that matches the first identifier, the cross-chain gateway determines that any one of the subscribers has successfully subscribed to the first cross-chain event, and determines the event data of the first cross-chain event as the event subscription processing result of the first subscription request.
[0028] In a possible implementation, after the cross-chain gateway obtains multiple authorized cross-chain event identifiers of multiple authorized cross-chain events in the authorized cross-chain event, the method further includes:
[0029] When there is no authorized cross-chain event identifier in the authorized cross-chain event set that matches the first identifier of the first cross-chain event, the cross-chain gateway determines that any of the subscribers has failed to subscribe to the first cross-chain event, and determines the indication information of the failure to subscribe to the first cross-chain event as the event subscription processing result of the first subscription request.
[0030] In a possible implementation, the cross-chain gateway returns the event subscription processing result to any of the subscribers, including:
[0031] When the first business chain initiates a contract event, the cross-chain gateway determines that the contract event is the first cross-chain event initiated to any business chain. The cross-chain gateway triggers the first business chain to initiate a cross-chain transaction to any business chain based on the first cross-chain event, and sends event data of successful subscription to the first cross-chain event to at least one subscriber who has successfully subscribed to the first cross-chain event.
[0032] In a second aspect, the present application also provides a method for processing cross-chain event subscription, the method comprising:
[0033] The authorized subscriber of the second business chain sends an authorization application request to the cross-chain gateway of the first business chain, triggering the cross-chain gateway to authenticate the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request; wherein the authorization application request is used to request the cross-chain gateway to authorize the subscription of the cross-chain event of the first business chain;
[0034] The authorized subscriber sends a first subscription request to the cross-chain gateway, and based on the first subscription request, requests the cross-chain gateway to subscribe to the first cross-chain event of the first business chain, wherein the first subscription request carries the digital certificate of the authorized subscriber and the first identifier of the first cross-chain event;
[0035] The authorized subscriber obtains the event subscription processing result of the first subscription request returned based on the first identifier when the cross-chain gateway determines that the authorized subscriber is an authorized subscriber based on the digital certificate, and the event subscription processing result includes event data of successful subscription to the first cross-chain event, or indication information of failure of subscription to the first cross-chain event.
[0036] In a third aspect, the present application further provides a cross-chain event subscription processing device, which is applicable to the cross-chain gateway of the first business chain, and includes:
[0037] An authorization module is used to, upon receiving an authorization application request sent by an authorized subscriber of the second business chain, authenticate the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request, wherein the authorization application request is used to request the cross-chain gateway to authorize subscription to the cross-chain events of the first business chain;
[0038] A cross-chain event set determination module, used to generate an authorized cross-chain event set of the authorized subscriber when the authorized subscriber passes the authorization authentication, wherein the authorized cross-chain event set includes multiple authorized cross-chain events that the authorized subscriber is authorized to subscribe to;
[0039] A subscription processing module, configured to, upon receiving a first subscription request sent by any subscriber and determining that any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request, determine an event subscription processing result of the first subscription request based on multiple authorized cross-chain events included in the authorized cross-chain event set and the first identifier carried in the first subscription request, wherein the first subscription request is used to request subscription to the first cross-chain event of the first business chain, and the first identifier is an identifier of the first cross-chain event;
[0040] A sending module is used to return the event subscription processing result to any of the above subscribers, wherein the event subscription processing result includes event data of successful subscription to the above first cross-chain event, or indication information of failure of subscription to the above first cross-chain event.
[0041] The authorization module includes:
[0042] A root certificate acquisition unit, used to acquire the first root certificate of the authorized subscriber based on the digital certificate in the authorization application request, wherein the first root certificate is used to issue the digital certificate of the authorized subscriber;
[0043] A root certificate trust set acquisition unit, configured to acquire a root certificate trust set of the first service chain, wherein the root certificate trust set includes a plurality of root certificates authorized and trusted by the first service chain;
[0044] The authorization authentication unit is used to determine that the authorization authentication of the authorized subscriber is passed when there is a root certificate matching the first root certificate in the root certificate trust set, so as to complete the authorization authentication of the authorized subscriber.
[0045] The authorization authentication unit is also used for:
[0046] When there is no root certificate matching the first root certificate in the root certificate trust set, it is determined that the authorization authentication of the authorized subscriber fails, and an indication message of the authorization authentication failure is sent to the authorized subscriber to complete the authorization authentication of the authorized subscriber.
[0047] Among them, the above cross-chain event set determination module includes:
[0048] A business agreement acquisition unit, used to acquire a cross-chain event set of a first business chain and a business agreement between the first business chain and the second business chain, wherein the cross-chain event set includes multiple cross-chain events of the first business chain managed by the cross-chain gateway, and the business agreement includes multiple authorized business types authorized by the first business chain to open to the second business chain;
[0049] A cross-chain event set generating unit is used to determine multiple cross-chain events in the above-mentioned cross-chain event set that match the authorized business type in the above-mentioned business agreement as the above-mentioned multiple authorized cross-chain events authorized for the above-mentioned authorized subscriber to subscribe to, and generate the authorized cross-chain event set of the above-mentioned authorized subscriber based on the above-mentioned multiple authorized cross-chain events.
[0050] Among them, the above cross-chain event set determination module also includes:
[0051] An identity obtaining unit, configured to obtain a first identity of the authorized subscriber based on the digital certificate of the authorized subscriber, wherein the first identity is a unique identifier of the authorized subscriber;
[0052] An identification set acquisition unit is used to add the first identity identification of the above-mentioned authorized subscriber to the authorized subscriber identification set of the above-mentioned cross-chain gateway to determine that the above-mentioned authorized subscriber is a subscriber who has passed the authorization authentication. The above-mentioned authorized subscriber identification set includes multiple identity identifications of multiple subscribers who have been authorized and authenticated by the above-mentioned cross-chain gateway.
[0053] The subscription processing module includes:
[0054] A subscriber identification acquisition unit, configured to, upon receiving a first subscription request sent by any subscriber, acquire a second identity of any subscriber based on the digital certificate of any subscriber carried in the first subscription request;
[0055] The authorized subscriber determination unit is used to determine that any of the subscribers is the authorized subscriber that has passed the authorization authentication when there is an identity in the authorized subscriber identification set that matches the second identity.
[0056] The subscription processing module further includes:
[0057] An authorization event identifier acquisition unit, used to acquire multiple authorization cross-chain event identifiers of multiple authorization cross-chain events in the above-mentioned authorization cross-chain event, wherein one authorization cross-chain event identifier corresponds to one authorization cross-chain event;
[0058] The subscription processing unit is used to determine that any of the subscribers has successfully subscribed to the first cross-chain event when there is an authorized cross-chain event identifier in the authorized cross-chain event set that matches the first identifier, and determine the event data of the first cross-chain event as the event subscription processing result of the first subscription request.
[0059] The subscription processing unit is further used for:
[0060] When there is no authorized cross-chain event identifier in the authorized cross-chain event set that matches the first identifier of the first cross-chain event, it is determined that any of the subscribers has failed to subscribe to the first cross-chain event, and the indication information of the failure to subscribe to the first cross-chain event is determined as the event subscription processing result of the first subscription request.
[0061] The sending module is also used for:
[0062] When the first business chain initiates a contract event, it is determined that the contract event is the first cross-chain event initiated to any business chain, and based on the first cross-chain event, the first business chain is triggered to initiate a cross-chain transaction to any of the business chains, and event data indicating successful subscription to the first cross-chain event is sent to at least one subscriber who has successfully subscribed to the first cross-chain event.
[0063] In a fourth aspect, the present application further provides a cross-chain event subscription processing device, which is applicable to the authorized subscriber of the second business chain, and includes:
[0064] An authorization application module is used to send an authorization application request to the cross-chain gateway of the first business chain, triggering the cross-chain gateway to authenticate the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request; wherein the authorization application request is used to request the cross-chain gateway to authorize the subscription of the cross-chain events of the first business chain;
[0065] A subscription request module, configured to send a first subscription request to the cross-chain gateway, and based on the first subscription request, request the cross-chain gateway to subscribe to a first cross-chain event of the first business chain, wherein the first subscription request carries the digital certificate of the authorized subscriber and the first identifier of the first cross-chain event;
[0066] A subscription result acquisition module is used to obtain the event subscription processing result of the first subscription request returned based on the first identifier when the cross-chain gateway determines that the authorized subscriber is an authorized subscriber based on the digital certificate, and the event subscription processing result includes event data of the successful subscription of the first cross-chain event, or indication information of the failure of the subscription of the first cross-chain event.
[0067] In a fifth aspect, the present application further provides a computer device, including: a processor, a memory, and a network interface;
[0068] The above-mentioned processor is connected to the memory and the network interface, wherein the network interface is used to provide data communication function, the above-mentioned memory is used to store program code, and the above-mentioned processor is used to call the above-mentioned program code to execute the method provided in the first aspect of this application.
[0069] In a sixth aspect, the present application further provides a computer device, the computer device comprising: a processor, a memory, and a network interface;
[0070] The above-mentioned processor is connected to the memory and the network interface, wherein the network interface is used to provide data communication function, the above-mentioned memory is used to store program code, and the above-mentioned processor is used to call the above-mentioned program code to execute the method provided in the second aspect of this application.
[0071] In a seventh aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the processor executes the program instructions, the method provided in the first aspect of the present application is executed.
[0072] In an eighth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the processor executes the program instructions, the method provided in the second aspect of the present application is executed.
[0073] In the ninth aspect, the present application also provides a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; the processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the first and second aspects of the present application.
[0074] In the method for processing cross-chain events provided in the embodiment of the present application, the authorized subscriber of the second business chain may send an authorization application request to the cross-chain gateway of the first business chain before requesting to subscribe to the cross-chain event, so as to request the cross-chain gateway to perform authorization authentication on the authorized subscriber. Specifically, the cross-chain gateway of the first business chain may perform authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request sent by the authorized subscriber, wherein the authorization application request is used to request the cross-chain gateway to authorize the subscription to the cross-chain event of the first business chain. When the authorization authentication of the authorized subscriber passes, the cross-chain gateway generates an authorized cross-chain event set of the authorized subscriber, and the authorized cross-chain event set includes multiple authorized cross-chain events authorized to be subscribed by the authorized subscriber. When the authorization authentication of the authorized subscriber fails, the cross-chain gateway may generate an indication of authorization failure and return it to the authorized subscriber. Further, after receiving the first subscription request sent by any subscriber, the cross-chain gateway of the first business chain can determine whether any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request in order to determine whether the subscriber is an authorized subscriber. Further, when the cross-chain gateway determines that any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request, the cross-chain gateway can determine the event subscription processing result of the first subscription request based on the multiple authorized cross-chain events included in the authorized cross-chain event set and the first identifier carried in the first subscription request. Among them, the first subscription request is used to request to subscribe to the first cross-chain event of the first business chain, and the first identifier is the identifier of the first cross-chain event. It can be understood that the cross-chain gateway returns the event subscription processing result to any subscriber, wherein the event subscription processing result includes the event data of the successful subscription of the first cross-chain event, or the indication information of the failure of the subscription of the first cross-chain event. The cross-chain event subscription processing method provided in the embodiment of the present application can realize the subscription of cross-chain events between business organizations under the premise of ensuring information security, reduce the data sharing restrictions between different business organizations, and because the business organization can control the authorization scope of cross-chain events and subscribers, the authorized subscribers and the event types of cross-chain events that can be subscribed can be adjusted according to the needs of actual applications, which is highly flexible and applicable. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0076] Figure 1 This is a schematic diagram of an application architecture provided by an embodiment of the present application;
[0077] Figure 2 This is another application framework schematic diagram provided by an embodiment of the present application;
[0078] Figure 3 It is a schematic diagram of a system architecture provided by an embodiment of the present application;
[0079] Figure 4 It is a flowchart of a method for processing cross-chain event subscription provided in an embodiment of the present application;
[0080] Figure 5 It is a schematic diagram of a framework of a method for processing cross-chain event subscription provided in an embodiment of the present application;
[0081] Figure 6 It is another framework schematic diagram of the processing method of cross-chain event subscription provided in the embodiment of the present application;
[0082] Figure 7 It is another framework schematic diagram of the processing method of cross-chain event subscription provided in the embodiment of the present application;
[0083] Figure 8 This is another flow chart of a cross-chain event subscription device provided in an embodiment of the present application;
[0084] Fig. 9 It is a structural diagram of a cross-chain event subscription processing device provided in an embodiment of the present application;
[0085] Fig.10 This is another structural schematic diagram of a cross-chain event subscription processing device provided in an embodiment of the present application;
[0086] Fig.11 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0087] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0088] The solution provided in the embodiment of the present application involves cloud technology and blockchain technology, which are briefly described below to facilitate understanding by those skilled in the art.
[0089] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0090] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operation management. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining the generation of public and private keys (account management), key management, and the maintenance of the correspondence between the user's real identity and the blockchain address (authority management), etc., and, under authorization, supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records valid requests to storage after consensus is reached. For a new business request, the basic service first adapts the interface for parsing and authentication (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for the registration and issuance of contracts, as well as contract triggering and contract execution. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the key or other events are called to trigger the execution and complete the contract logic. It also provides the function of contract upgrade and cancellation. The operation management module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarm, network management, and node equipment health status management.
[0091] The platform product service layer provides the basic capabilities and implementation framework of typical applications. Developers can superimpose business features based on these basic capabilities to complete the blockchain implementation of business logic. The application service layer provides application services based on blockchain solutions for business participants to use.
[0092] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.
[0093] Cloud computing refers to the delivery and use model of IT infrastructure, which means obtaining required resources through the network in an on-demand and easily scalable manner; in a broad sense, cloud computing refers to the delivery and use model of services, which means obtaining required services through the network in an on-demand and easily scalable manner. This service can be related to IT and software, the Internet, or other services. Cloud computing is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.
[0094] Blockchain can be divided into three types: public blockchain, private blockchain and consortium blockchain. In addition, there can also be a combination of the above types, such as private blockchain + consortium blockchain, consortium blockchain + public blockchain, etc.
[0095] Among them, the public chain has the highest degree of decentralization. Participants who join the public chain (also called nodes in the blockchain) can read data records on the chain, participate in transactions, and compete for the right to record new blocks. Moreover, each node can freely join or exit the network and perform related operations.
[0096] On the contrary, the private chain has a network whose write permission is controlled by a certain organization or institution, and the data read permission is regulated by the organization. In simple terms, a private chain can be a weakly centralized system with strict restrictions on nodes and a small number of nodes. This type of blockchain is more suitable for use within a specific institution.
[0097] A consortium chain is a blockchain between a public chain and a private chain, which can achieve "partial decentralization". Each node in a consortium chain usually has a corresponding entity or organization; nodes join the network through authorization and form a stakeholder alliance to jointly maintain the operation of the blockchain. The implementation methods provided in this specification can be implemented in any suitable type of blockchain network.
[0098] In practical applications, whether it is a public chain, a private chain or a consortium chain, they can all provide the function of smart contracts. Smart contracts are contracts deployed on the blockchain that can be triggered by transactions and can be defined in the form of code. Specifically, smart contracts are a special protocol designed to provide, verify and execute contracts, which can allow traceable, irreversible and secure transactions to be executed without the need for a third party. Smart contracts contain all the information about the transaction and will only execute the resulting operations after the requirements are met. The difference between smart contracts and traditional paper contracts is that smart contracts are computer-generated, so the code itself explains the relevant obligations of the participants. For example, the participants of the blockchain can transfer digital resources from the blockchain where the participants are located to another blockchain through the relay chain system when the predefined requirements of the smart contract are met, so as to realize cross-chain transactions between the two blockchains.
[0099] It should be understood that the relay chain system is a blockchain system that can be connected to multiple blockchains in the business chain system through a bridge interface, and based on the implemented data transfer logic, complete the cross-chain data synchronization between multiple blockchains in the business chain system. Among them, the business chain system refers to the blockchain system responsible for specific business applications, and different blockchains in the business chain system can perform cross-chain transactions. The cross-chain technology used to implement the above-mentioned cross-chain data relay is not specifically limited in this specification; for example, in actual applications, multiple blockchains can be connected through cross-chain mechanisms such as side chain technology and notary technology. After multiple blockchains are connected through the relay chain system, the blockchains can read and authenticate the data on other blockchains, and can also call smart contracts deployed on other blockchains through the relay chain system to realize the verification of cross-chain transactions.
[0100] It should be noted that the relay chain system is only used to transfer data between multiple blockchains, and does not need to store the transferred data persistently, nor does it need to maintain the data status of the transferred data. In actual applications, the relay chain system can be configured on devices, nodes, or platforms other than the multiple blockchains it is connected to, or on node devices of the multiple blockchains it is connected to, and is not specifically limited in this specification.
[0101] It should be understood that the cross-chain gateway can be understood as a device for collecting and disseminating cross-chain transactions between the business chain system and the relay chain system. The cross-chain gateway can capture cross-chain transactions generated by the business chain system and submit cross-chain transactions to the relay chain system. Alternatively, the cross-chain gateway can receive cross-chain transactions verified by the relay chain system and submit cross-chain transactions to the business chain system. Specifically, each blockchain in the business chain system interacts with a corresponding cross-chain gateway. The cross-chain gateway can determine whether the contract event is a cross-chain event by detecting the contract event on the blockchain that meets the predefined requirements of the smart contract, and initiate a cross-chain transaction when the contract event meets the triggering conditions of the cross-chain event.
[0102] It should be understood that as the alliance chain application business matures, the data in the alliance chain is becoming more and more abundant. The abundant data not only provides a strong guarantee for the normal operation of the business, but also its data value is increasingly prominent. However, since the alliance chain is a business chain system that requires authorized access, its account book data is only accessible to members within the business chain system, and its data can only be used within the entire alliance chain, resulting in data islands. For example, any blockchain in the alliance chain can only conduct the above-mentioned cross-chain transactions with other blockchains in the alliance chain through the above-mentioned cross-chain technology, but cannot conduct cross-chain transactions with blockchains of other alliance chains, and the interaction of cross-chain data is restricted. In addition, if in order to utilize the data value of the blockchain, members of other alliance chains are invited to join without restriction, on the one hand, it will cause data privacy leakage to the alliance parties in the business chain system, causing certain harm to the rights and interests of the alliance parties. On the other hand, the introduction of other alliance chain businesses will also violate the original agreement to create the alliance, causing data confusion within the alliance chain and making it difficult to manage.
[0103] In some feasible implementations, it can be seen from the above content that the above-mentioned first business chain system may include multiple business chains, and each business chain may include multiple nodes, wherein a node can be understood as a server in a region, or a computer in a blockchain network, that is, any computer connected to a blockchain network can be called a node. For example, in the Internet area, all the running data of an enterprise are stored in a server of the enterprise, and the server is a node of the enterprise participating in the blockchain. Further, multiple nodes in the business chain system may belong to multiple members in a business organization, and members may be understood as representing a specific entity identity, such as the above-mentioned enterprise or company, social group, etc. In addition, the above-mentioned business organization can be understood as a collection domain of multiple members formed to implement a specific business. In general, entity identities such as enterprises or companies, corporate groups, etc. participate in the blockchain through computers, and further constitute a business chain system for implementing a specific business as multiple nodes of the blockchain, wherein multiple enterprises corresponding to multiple nodes belong to a business organization. For ease of understanding, the present application embodiment briefly illustrates the process of cross-chain transactions between different business chain systems in the following content.
[0104] See also Figure 1 , Figure 1 It is a schematic diagram of an application framework provided by an embodiment of the present application. As can be seen from the above content, Figure 1 The first business organization shown may include multiple members. It is assumed that the members of the first business organization are deployed on the first business chain in the form of nodes as participants of the first business chain. The first business chain interacts with the corresponding first cross-chain gateway, so that cross-chain transactions between members on the first business chain and other business chains can be realized. Similarly, Figure 1The second business organization shown may include multiple members. It is assumed that the members of the second business organization are deployed on the second business chain in the form of nodes as participants of the second business chain. The second business chain interacts with the corresponding second cross-chain gateway, so that cross-chain transactions between members on the second business chain and other business chains can be realized. Further, when members of the first business organization on the first business chain conduct cross-chain transactions with members of the second business organization on the second business chain, such as when members of the first business organization transfer digital resources (such as funds or downloading and uploading data during the interaction process) to members of the second business organization, members of the first business organization can send cross-chain transaction requests to the first cross-chain gateway through the corresponding nodes on the first business chain. The cross-chain transaction request can be understood as a request to transfer digital resources to members of the second business organization. After receiving the cross-chain transaction request, the first cross-chain gateway can call the stored smart contract and generate a cross-chain transaction information. On the one hand, the first cross-chain gateway can reduce the digital resource data of the member node that initiated the cross-chain transaction based on the cross-chain transaction information and update the stored data. On the other hand, the first cross-chain gateway can send the cross-chain transaction information to the relay gateway of the above-mentioned relay chain system for transaction verification, wherein the relay gateway of the relay chain system is used to schedule each stage of the cross-chain transaction by interacting with the cross-chain management contract of the relay chain, thereby providing a transaction verification function. After the relay gateway verifies the cross-chain transaction information sent by the first cross-chain gateway, it can forward the cross-chain transaction information to the corresponding second cross-chain gateway. The second cross-chain gateway can increase the digital resource data of the target member node based on the cross-chain transaction information and update the stored data based on the smart contract. Further, the second cross-chain gateway can also send the cross-chain transaction information to the corresponding member node on the second business chain to update the block data of the member node. In general, members between the first business chain and the second business chain can realize cross-chain transactions through the cross-chain gateway and the relay gateway.
[0105] In some feasible implementations, multiple members of the first business organization can be deployed on multiple nodes of the first business chain, or multiple members of the first business organization can be deployed on multiple nodes of multiple business chains. Similarly, multiple members of the second business organization can be deployed on multiple nodes of the second business chain, or multiple members of the second business organization can be deployed on multiple nodes of multiple business chains. For ease of understanding, the embodiments of the present application are described in the following content by taking multiple members of the first business organization deployed on the nodes of the first business chain and multiple members of the second business organization deployed on the nodes of the second business chain as an example. It can be seen from the above that the first cross-chain gateway interacting with the first business chain can determine whether the contract event is a cross-chain event when a contract event occurs on the first business chain, and trigger a cross-chain transaction when the contract event is a cross-chain event. Among them, a cross-chain event can be understood as a contract event that occurs between different business chains. For example, the transfer of digital resources from the first business chain to the second business chain is a cross-chain event between the first cross-chain gateway and the second cross-chain gateway. Furthermore, in order to facilitate the management and maintenance of the blockchain information of each member in the first business organization, each member of the first business organization can subscribe to the cross-chain events on the first cross-chain gateway to obtain the blockchain information changes of the nodes on the first business chain. Similarly, in order to facilitate the management and maintenance of the blockchain information of each member in the second business organization, each member of the second business organization can subscribe to the cross-chain events on the second cross-chain gateway to obtain the blockchain information changes of the nodes on the second business chain.
[0106] In some feasible implementations, at least one member of the first business organization is deployed on a node of the first business chain, and the members of the first business organization can subscribe to the cross-chain event of the first cross-chain gateway to obtain the information of the cross-chain transaction when the node of the first business chain performs a cross-chain transaction. For example, assuming that the first business organization includes multiple universities as a university alliance: University A, University B, and University C, the data servers of the three universities participate in the first business chain as nodes, wherein the node of University A in the first business chain is node a, the node of University B in the first business chain is node b, and the node of University C in the first business chain is node c. Students of any university can download thesis articles in the thesis database or upload thesis articles to the thesis database through the school's terminal. Since the thesis database is usually deployed on other business chains, when students of any university need to download or upload thesis articles, the node on the first business chain corresponding to the university can initiate a cross-chain transaction request to the first cross-chain gateway to request the business chain where the thesis database is located to obtain the corresponding blockchain information (download thesis articles or upload thesis articles). At this time, the first cross-chain gateway can detect that the first business chain and the business chain where the thesis database is located have a cross-chain event. In order to enable the three universities in the first business organization to share the download of papers and articles, the three universities in the first business organization can subscribe to the cross-chain event on the first cross-chain gateway. At this time, the cross-chain event can be understood as the contract event of the node of the first business chain to download the paper across the chain. Specifically, for example, when a student of university A downloads a paper, node a of university A can send a cross-chain download request to the first cross-chain gateway, and the cross-chain download request can be understood as a request to download the paper from the paper database. After receiving the cross-chain download request, the first cross-chain gateway can determine that the contract event requested to be executed by the cross-chain download request is a cross-chain event (cross-chain download), thereby triggering a cross-chain download transaction. At the same time, since universities B and C of the first business organization have subscribed to the cross-chain event of the first cross-chain gateway, the first cross-chain gateway can synchronously forward the cross-chain event of node a of university A requesting a cross-chain download of a paper to node b of university B and node c of university C. It can be understood that universities B and university C can obtain the statistical data of paper downloads of university A in the same university alliance, and the three universities in the university alliance can realize information sharing.
[0107] In some feasible implementations, at least one member of the second business organization is deployed on a node of the second business chain, and the members of the second business organization can subscribe to the cross-chain event of the second cross-chain gateway to obtain the information of the cross-chain transaction when the node of the second business chain performs a cross-chain transaction. For example, assuming that the second business organization includes multiple universities as a university alliance: University D, University E, and University F, the data servers of the three universities participate in the second business chain as nodes, wherein the node of University D in the second business chain is node d, the node of University E in the second business chain is node e, and the node of University F in the second business chain is node f. Students of any university can access the paper articles in the paper database through the school's terminal and score the paper articles. As can be seen from the above content, since the paper database is usually deployed on other business chains, when the students of the university in the second business organization access the paper database and score the paper articles, the node on the second business chain corresponding to the university can initiate a cross-chain scoring request to the second cross-chain gateway to send scoring information to the business chain where the paper database is located. At this time, the second cross-chain gateway can detect that a cross-chain event occurs between the second business chain and the business chain where the paper database is located. In order to enable the three universities in the second business organization to share the situation of paper article scoring, the three universities can subscribe to the cross-chain events on the second cross-chain gateway respectively. At this time, the cross-chain event can be understood as the contract event of the node of the second business chain performing cross-chain scoring. Specifically, for example, when a student of university D visits a paper article and scores the paper article, the node d of university D can send a cross-chain scoring request to the second cross-chain gateway. The cross-chain scoring request can be understood as sending scoring information to the paper database and requesting to update the score of the paper article in the paper database. After receiving the cross-chain scoring request, the second cross-chain gateway can determine that the contract event requested to be executed by the cross-chain scoring request is a cross-chain event (cross-chain scoring), thereby triggering a cross-chain scoring transaction. At the same time, since universities E and F in the second business organization have subscribed to the cross-chain events of the second cross-chain gateway, the second cross-chain gateway can synchronously forward the cross-chain event of node d of university D scoring a paper article to node e of university E and node f of university F. It is understandable that universities E and F can obtain the statistical data of paper article scores of university D within the second business organization, and the three universities in the second business organization can realize information sharing.
[0108] In some feasible implementations, in order to avoid information leakage, the first cross-chain gateway may only allow members within the first business organization to subscribe to the cross-chain events of the first cross-chain gateway, that is, only colleges A, B, and C within the first business organization can obtain the paper download statistics of colleges A, B, and C. Specifically, the first business chain can register the chain resources of the first business chain in the first cross-chain gateway, which includes the information of different college nodes on the first business chain. Therefore, when the node on the first business chain requests to subscribe to the cross-chain event from the first cross-chain gateway, the first cross-chain gateway can authorize the subscription request of the node on the first business chain based on the chain resources registered by the first business chain. Similarly, the second cross-chain gateway may only allow members within the second business organization to subscribe to the cross-chain events of the second cross-chain gateway, that is, only colleges D, E, and F within the second business organization can obtain the paper scoring statistics of colleges D, E, and F. Specifically, the second business chain can register the chain resources of the second business chain in the second cross-chain gateway, which includes the information of different university nodes on the second business chain. Therefore, when the node on the second business chain requests the second cross-chain gateway to subscribe to the cross-chain event, the second cross-chain gateway can authorize the subscription request of the node on the second business chain based on the chain resources registered by the second business chain. It can be understood that since the universities A, B, and C of the first business organization do not belong to the second business organization, and at the same time, the node a of university A, the node b of university B, and the node c of university C are not on the second business chain, therefore, when the universities A, B, and C of the first business organization want to subscribe to the cross-chain events of the second cross-chain gateway, since the second cross-chain gateway has not registered the node information of the first business organization, the second cross-chain gateway will not authorize universities A, B, and C to subscribe to the cross-chain events of the second cross-chain gateway, that is, the universities in the first business organization cannot obtain the scoring data of the papers and articles in the paper database of the universities in the second business organization. Similarly, the universities in the second business organization cannot obtain the download data of the papers and articles in the paper database of the universities in the first business organization.
[0109] In general, see Figure 2 , Figure 2 This is another application framework schematic diagram provided in an embodiment of the present application. Figure 2 At least one member of the first business organization is deployed on the first business chain. Since the first business chain registers the member information of the first business organization when registering chain resources with the first cross-chain gateway, the members of the first business organization can subscribe to the cross-chain events of the first cross-chain gateway. Figure 2At least one member of the second business organization is deployed on the second business chain. Since the second business chain registers the member information of the second business organization when registering the chain resource with the second cross-chain gateway, the members of the second business organization can subscribe to the cross-chain events of the second cross-chain gateway. Further, the first business organization and the second business organization are deployed on different business chains respectively, and the first cross-chain gateway does not register the member information of the second business organization, that is, the cross-chain events of the first cross-chain gateway can only be subscribed by the members of the first business organization that have been registered, and the members of the second business organization are not allowed to subscribe. Similarly, the second cross-chain gateway does not register the member information of the first business organization. The cross-chain events of the second cross-chain gateway can only be subscribed by the members of the second business organization that have been registered, and the members of the first business organization are not allowed to subscribe, thereby limiting the subscription scope of the cross-chain event and affecting the data interaction between different business chains. For example, in the above-mentioned university alliance, the universities in the first business organization cannot obtain the paper scoring data of the universities in the second business organization, and the universities in the second business organization cannot obtain the paper download data of the universities in the first business organization, which limits the information sharing between universities.
[0110] In order to solve this problem, the embodiment of the present application proposes a processing method for cross-chain event subscription, in which the authorized subscriber of the second business chain can send an authorization application request to the cross-chain gateway of the first business chain before requesting to subscribe to the cross-chain event, so as to request the cross-chain gateway to perform authorization authentication on the authorized subscriber. Specifically, the cross-chain gateway of the first business chain can perform authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request sent by the authorized subscriber, wherein the authorization application request is used to request the cross-chain gateway to authorize the subscription of the cross-chain event of the first business chain. When the authorization authentication of the authorized subscriber passes, the cross-chain gateway generates the authorized cross-chain event set of the authorized subscriber, and the authorized cross-chain event set includes multiple authorized cross-chain events authorized to be subscribed by the authorized subscriber. When the authorization authentication of the authorized subscriber fails, the cross-chain gateway can generate an indication of authorization failure and return it to the authorized subscriber. Further, after receiving the first subscription request sent by any subscriber, the cross-chain gateway of the first business chain can determine whether any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request in order to determine whether the subscriber is an authorized subscriber. Further, when the cross-chain gateway determines that any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request, the cross-chain gateway can determine the event subscription processing result of the first subscription request based on the multiple authorized cross-chain events included in the authorized cross-chain event set and the first identifier carried in the first subscription request. Among them, the first subscription request is used to request to subscribe to the first cross-chain event of the first business chain, and the first identifier is the identifier of the first cross-chain event. It can be understood that the cross-chain gateway returns the event subscription processing result to any subscriber, wherein the event subscription processing result includes the event data of the successful subscription of the first cross-chain event, or the indication information of the failure of the subscription of the first cross-chain event. The cross-chain event subscription processing method provided in the embodiment of the present application can realize the subscription of cross-chain events between business organizations under the premise of ensuring information security, reduce the data sharing restrictions between different business organizations, and because the business organization can control the authorization scope of cross-chain events and subscribers, the authorized subscribers and the event types of cross-chain events that can be subscribed can be adjusted according to the needs of actual applications, which is highly flexible and applicable.
[0111] The solution provided in the embodiments of this application involves technologies such as blockchain and cloud computing, which are specifically described by the following embodiments. Figure 3 , Figure 3 Schematic diagram of a system architecture provided by an embodiment of the present application. Figure 3As shown, the system architecture may include a business server 100 and a terminal cluster, and the terminal cluster may include: terminal devices 200a, terminal devices 200b, terminal devices 200c, ..., terminal devices 200n and the like. Among them, the above-mentioned business server 100 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud database, cloud service, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform. The terminal device (including terminal device 200a, terminal device 200b, terminal device 200c, ..., terminal device 200n) may be a handheld computer, a smart phone, a laptop computer, a desktop computer, a tablet computer, a mobile internet device (mobile internet device, MID), a wearable device (such as a smart watch, a smart bracelet, etc.), a smart computer, a smart car and the like, but is not limited thereto.
[0112] Among them, the business server 100 can establish a communication connection with each terminal device in the terminal cluster, and a communication connection can also be established between each terminal device in the terminal cluster. In other words, the business server 100 can establish a communication connection with each terminal device in the terminal device 200a, terminal device 200b, terminal device 200c, ..., terminal device 200n. For example, a communication connection can be established between the terminal device 200a and the business server 100. A communication connection can be established between the terminal device 200a and the terminal device 200b, and a communication connection can also be established between the terminal device 200a and the terminal device 200c. Among them, the above-mentioned communication connection does not limit the connection method, and can be directly or indirectly connected through a wired communication method, or can be directly or indirectly connected through a wireless communication method, etc., which can be determined according to the actual application scenario, and this application is not limited here.
[0113] It should be understood that Figure 3 Each terminal device in the terminal cluster shown in the figure may be installed with an application client. When the application client runs in each terminal device, it can be respectively connected to the above Figure 3The business servers 100 shown in the figure interact with each other so that the business server 100 can receive business data from each terminal device, or the business server 100 can push business data to each terminal device. Among them, the above-mentioned application client can be a browser application, news application, learning application, social application, instant messaging application, live broadcast application, short video application, video application, music application, shopping application, novel application, payment application and other application clients with cross-chain event subscription functions, which can be determined according to the actual application scenario requirements and are not limited here. Among them, the application client can be an independent client or an embedded sub-client integrated in a client (such as a browser client, a social client, etc.), which can be determined according to the actual application scenario and are not limited here.
[0114] It is understandable that in the specific implementation of this application, related data such as object information is involved. When the embodiments of this application are applied to specific products or technologies, it is necessary to obtain the object's permission or consent, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0115] It is understandable that the processing method for cross-chain event subscription provided in the embodiment of the present application can be implemented as follows: Figure 3 The service server 100 shown in the figure may also be executed by a terminal device (such as Figure 3 The example of the present invention can be executed by any one of the terminal devices 200a, 200b, ..., 200n shown in the figure), or by the terminal device and the service server together. The specific implementation can be determined according to the actual application scenario and is not limited here. To facilitate subsequent understanding and explanation, the embodiment of the present application can be performed in Figure 3 A terminal device is selected from the terminal device cluster as a target terminal device, for example, the terminal device 200b is selected as the target terminal device.
[0116] It should be understood that the application client integrated in each terminal device may correspond to a storage database in the terminal device, and the storage database of the application client may participate in the blockchain as a node. The above-mentioned business server 100 may also serve as a cross-chain gateway corresponding to a blockchain, and perform data interaction with each terminal device corresponding to each node on the blockchain. For example, Figure 3 The service server 100 may be the above Figure 1 The first cross-chain gateway of the first business chain in Figure 3 The terminal device 200a, the terminal device 200b, the terminal device 200c, ..., the terminal device 200n in the embodiment may be participants of the first service chain, that is, members of the first service organization. Figure 3 The service server 100 in the embodiment may also be the above Figure 1The second cross-chain gateway of the second business chain in Figure 3 The terminal devices 200a, 200b, 200c, ..., 200n in the second service chain may be participants, that is, members of the second service organization. It is understandable that the operation object may register and log in on the application client to join the service chain as a member of the service organization.
[0117] For further information, see Figure 4 , Figure 4 This is a flow chart of a method for processing cross-chain event subscription provided by an embodiment of the present application. Figure 1 The terminal device 200a is a participant in the first business chain, and the business server 100 is a second cross-chain gateway for interacting with the second business chain. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, cloud storage, etc. Figure 4 In the processing method of cross-chain event subscription shown in the figure, the steps of subscription processing can be Figure 1 The terminal device 200a and the service server 100 are used to perform, for example Figure 4 As shown, the cross-chain event subscription processing method may at least include the following steps S101-S105.
[0118] Step S101: When receiving an authorization application request sent by an authorized subscriber of the second business chain, the cross-chain gateway of the first business chain performs authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request.
[0119] In some feasible implementations, it can be seen from the above content that at least one member of the first business organization can join the first business chain with a terminal device as a node, the first business chain interacts with the first cross-chain gateway, and the chain resources of the first business chain are registered with the first cross-chain gateway. At the same time, at least one member of the second business organization can join the second business chain with a terminal device as a node, the second business chain interacts with the second cross-chain gateway, and the chain resources of the second business chain are registered with the second cross-chain gateway. In order to enable members of the second business organization to subscribe to the cross-chain events of the first cross-chain gateway to realize cross-organization subscription of cross-chain events, the cross-chain event subscription processing method provided in the embodiment of the present application can authorize members of the second business chain before members of the second business organization request to subscribe to cross-chain events of the second cross-chain gateway. Specifically, first, the authorized subscriber of the second business chain can generate an authorization application request. The authorized subscriber can be understood as any member in the second business chain that requests authorization from the first cross-chain gateway. For example, university D in the above-mentioned second business organization can generate an authorization application request and send it to the first cross-chain gateway to subscribe to the cross-chain events of the first cross-chain gateway. Then university D is the authorized subscriber of the second business chain. In addition, the authorization application request generated by the above-mentioned authorized subscriber can be understood as a request for the first cross-chain gateway to authorize the authorized subscriber to subscribe to the cross-chain events of the above-mentioned first business chain. Furthermore, the authorized subscriber of the second business chain can send the authorization application request to the first cross-chain gateway corresponding to the first business chain, and the first cross-chain gateway can perform authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request.
[0120] In some feasible implementations, when any member participates in the blockchain (business chain) as a node, each member is registered with a corresponding digital certificate, that is, each node of the blockchain corresponds to a digital certificate. Among them, a digital certificate refers to an electronic document, which is a more authoritative and fair certificate issued by the Electronic Commerce Certification Center (Certificate Authority, CA), hereinafter referred to as the CA Certification Center. The CA Certification Center can be understood as a server that is used to undertake online secure electronic transaction certification services, can issue digital certificates, and confirm the identity of the user. In the blockchain, a node or member with an entity identity is bound to a digital certificate, and members can use digital certificates to prove their identities and identify each other's identities. In other words, each member's digital certificate can be understood as a member's unique identity, and different members or nodes can be distinguished by digital certificates. It can be understood that in some application scenarios, while expanding cross-chain event subscriptions between different business organizations, it is also necessary to ensure the information security of the business organization and avoid information leakage. For this reason, when members of other business chains request to subscribe to cross-chain events on a business chain, the cross-chain gateway corresponding to the business chain can confirm the identity of the member requesting subscription to prevent illegal users from stealing the blockchain information of the business organization. Specifically, when the authorized subscriber of the second business chain generates an authorization application request, the authorization application request will carry the digital certificate of the authorized subscriber. After receiving the authorization application request, the first cross-chain gateway can extract the digital certificate of the authorized subscriber carried in the authorization application request. Since the digital certificate is the unique identifier of the blockchain node, the first cross-chain gateway can determine the identity of the authorized subscriber who sent the authorization application request through the digital certificate, and perform authorization authentication on the authorized subscriber. Among them, the first cross-chain gateway can pass the authorization authentication of the authorized subscriber when the identity of the authorized subscriber meets the authorization requirements of the first cross-chain gateway, that is, authorize the authorized subscriber, and the authorized subscriber after authorization can obtain the permission to request to subscribe to the cross-chain events on the first business chain. On the contrary, the first cross-chain gateway can also fail to authorize the authorized subscriber when the identity of the authorized subscriber does not meet the authorization requirements of the first cross-chain gateway, that is, refuse to authorize the authorized subscriber, and the unauthorized authorized subscriber does not have the permission to request to subscribe to the cross-chain events on the first business chain. In addition, the authorization requirements of the above-mentioned first cross-chain gateway for different authorized subscribers can be adjusted according to the actual application scenario, and this application is not limited here.
[0121] In some feasible implementations, for ease of understanding, the embodiments of the present application are illustrated in the following content. Assuming that the member of the first business organization is the bank headquarters, the business server of the bank headquarters participates in the first business chain as a node, and at the same time, the management server of the bank headquarters can interact with the first business chain as a first cross-chain gateway. In addition, the bank branch of the bank headquarters is a member of the second business organization, and the business server of the bank branch participates in the second business chain as a node. It is understandable that the business server of the bank headquarters can conduct cross-chain transactions with other business chains through the first cross-chain gateway, such as digital resource transfer. In order to obtain the digital resource transfer data of the bank headquarters, the bank branch can request the first cross-chain gateway of the bank headquarters to subscribe to the cross-chain event of the first business chain, so that when the cross-chain event of digital resource transfer occurs on the business server of the bank headquarters, the first cross-chain gateway forwards the cross-chain event of digital resource transfer to the bank branch. Further, before the bank branch requests to subscribe to the cross-chain event, the bank branch can send an authorization application request to the first cross-chain gateway of the bank headquarters to apply for authorization authentication. Specifically, the authorization application request sent by the bank branch carries the digital certificate of the bank branch. After receiving the authorization application request sent by the bank branch, the first cross-chain gateway of the bank headquarters can extract the digital certificate of the bank branch and confirm that the digital certificate is legal and valid. Since the bank branch is a subsidiary of the bank headquarters, the bank headquarters can trust the bank branch. Therefore, when confirming that the authorized subscriber who sent the authorization application request is a legal and valid bank branch, the first cross-chain gateway can authorize and authenticate the bank branch. In addition, if the bank headquarters does not trust the bank branch, the first cross-chain gateway can refuse to authorize the bank branch to avoid the leakage of the digital resource transfer data of the bank headquarters to the untrusted bank branch. It can be understood that in some application scenarios, some illegal users can disguise themselves as bank branches and request the bank headquarters to subscribe to cross-chain events. Since the processing method of cross-chain event subscription in the embodiment of the present application can be judged by obtaining the digital certificate of the authorized subscriber, the digital certificate of the illegal user can be identified as illegal, thereby refusing to authorize and authenticate the illegal user, ensuring information security.
[0122] In some feasible implementations, for ease of understanding, the embodiment of the present application describes the specific process of the first cross-chain gateway authorizing and authenticating the authorized subscriber in the following content. Specifically, in order for the first cross-chain gateway to obtain the digital certificate of the authorized subscriber with authority and fairness, after receiving the above-mentioned authorization application request and extracting the digital certificate of the authorized subscriber, the first cross-chain gateway can further obtain the first root certificate of the above-mentioned authorized subscriber based on the digital certificate in the above-mentioned authorization application request, and the above-mentioned first root certificate is used to issue the digital certificate of the above-mentioned authorized subscriber. Among them, any root certificate (such as the first root certificate) is a certificate issued by the CA certification center to itself, which is the starting point of the trust chain. The installation of the root certificate by any server or terminal device means trust in the CA certification center. The root certificate is a special digital certificate that can be used to identify the unsigned public key certificate or self-signed certificate of the root certificate issuing authority. Any digital certificate must be supported by the root certificate that issues the digital certificate to support its legitimacy. Only with the support of the root certificate can it be shown that the digital certificate is valid and can be trusted. To this end, after obtaining the digital certificate of the authorized subscriber, the first cross-chain gateway can obtain the first root certificate of the authorized subscriber based on the digital certificate in the above authorization application request, and determine whether the authorized subscriber is a legitimate blockchain participant by verifying whether the first root certificate is legal and valid.
[0123] In some feasible implementations, if the first cross-chain gateway verifies that the first root certificate is a legal and valid root certificate, it can be determined that the authorized subscriber is a legal blockchain participant, not an illegal user. Further, the first cross-chain gateway can also verify whether the authorized subscriber can be trusted. Specifically, in some application scenarios, assuming that the first business organization and the second business organization are business competitors, in order to ensure information security, the first business organization can keep the blockchain information of the first business chain confidential and not disclose it to the second business organization. At this time, when the authorized subscriber of the second business chain sends an authorization application request to the first cross-chain gateway, although the authorized subscriber of the second business chain is a legal blockchain participant, since the first business chain does not trust the second business organization, the first cross-chain gateway can determine whether to trust the authorized subscriber after verifying the legitimacy of the authorized subscriber to avoid leakage of blockchain information. Specifically, the first cross-chain gateway can obtain the root certificate trust set of the above-mentioned first business chain, and the above-mentioned root certificate trust set can be understood as including multiple root certificates authorized and trusted by the above-mentioned first business chain. The first cross-chain gateway may determine that the authorization authentication of the authorized subscriber passes when there is a root certificate matching the first root certificate in the root certificate trust set, so as to complete the authorization authentication of the authorized subscriber.
[0124] In some feasible implementations, it is assumed that the bank headquarters is a member of the first business organization, the business server of the bank headquarters participates in the first business chain as a node, and the management server of the bank headquarters interacts with the first business chain as a first cross-chain gateway. At the same time, multiple bank branches of the bank headquarters are multiple members of the second business organization, and the business servers of multiple bank branches participate in the second business chain as nodes. The bank headquarters can obtain the root certificate trust set of the first business chain, which may include multiple root certificates of multiple bank branches of the bank headquarters, that is, the bank headquarters only trusts its own multiple bank branches, but does not trust other banks or financial institutions. When any bank branch of the second business organization sends an authorization application request to the first cross-chain gateway as the above-mentioned authorized subscriber, the first cross-chain gateway can obtain the root certificate of the authorized subscriber based on the digital certificate carried in the authorization application request. Further, the first cross-chain gateway can search for a root certificate consistent with the root certificate of the authorized subscriber in the root certificate trust set of the first business chain to determine whether the authorized subscriber is a bank branch of the bank headquarters. It can be understood that when there is a root certificate in the root certificate trust set whose root certificate is consistent with the root certificate of the authorized subscriber, the first cross-chain gateway can determine that the authorized subscriber is a bank branch of the bank headquarters. Therefore, the first cross-chain gateway can authorize and authenticate the authorized subscriber.
[0125] In some feasible implementations, when there is no root certificate matching the above-mentioned first root certificate in the above-mentioned root certificate trust set, the first cross-chain gateway can determine that the authorized subscriber is not a bank branch of the bank headquarters. Since the bank headquarters does not trust authorized subscribers other than its own bank branches, the first cross-chain gateway can determine that the above-mentioned authorized subscriber authorization authentication fails, and sends an indication message of authorization authentication failure to the above-mentioned authorized subscriber to complete the authorization authentication of the above-mentioned authorized subscriber. It can be understood that the indication message of authorization authentication failure can be understood as indicating that the authorization authentication failure of the authorized subscriber requesting the first business chain has failed, that is, the first business chain refuses to authorize the authorized subscriber. After receiving the indication message of authorization authentication failure returned by the first cross-chain gateway, the authorized subscriber will no longer further request the first cross-chain gateway to subscribe to cross-chain events.
[0126] In some feasible implementations, for ease of understanding, the embodiments of the present application are illustrated in the following content. For example, when other financial institutions send authorization application requests to the first cross-chain gateway as the above-mentioned authorized subscriber, the first cross-chain gateway can obtain the root certificate of the authorized subscriber based on the digital certificate carried in the authorization application request. Furthermore, the first cross-chain gateway can search for a root certificate consistent with the root certificate of the authorized subscriber in the root certificate trust set of the first business chain to determine whether the authorized subscriber is a bank branch of the bank headquarters. It is understandable that since the bank headquarters does not trust the financial institution, there is no root certificate in the root certificate trust set whose root certificate is consistent with the root certificate of the authorized subscriber. The first cross-chain gateway can determine that the authorized subscriber is not a bank branch of the bank headquarters, and therefore, the first cross-chain gateway may not pass the authorization authentication of the authorized subscriber.
[0127] In some feasible implementations, for ease of understanding, the present application embodiments are illustrated in the following content. Figure 5 , Figure 5 It is a framework diagram of a method for processing cross-chain event subscription provided in an embodiment of the present application. Figure 5 The client shown can be Figure 3 The application client running in the terminal device 200a shown in the figure may be a member of the second business organization, and the client may participate in the second business chain as a node through the database on the terminal device. Figure 5 The server shown can be Figure 3The service server 100 shown, the service end can be the first cross-chain gateway corresponding to the first service chain. Specifically, before the client requests authorization from the service end (i.e., the first cross-chain gateway) as the above-mentioned authorization subscription direction, the client can obtain the client's digital certificate based on the first root certificate CA1 assigned by the CA certification center, and generate an authorization application request based on the digital certificate and send it to the service end to request the service end to authorize and authenticate the client. Further, after receiving the authorization application request, the service end can review the authorization application request to authorize and authenticate the client. Specifically, first, the service end can obtain the root certificate trust set of the first service chain, and the above-mentioned root certificate trust set can be understood as including multiple root certificates authorized and trusted by the above-mentioned first service chain. At the same time, the service end can parse the first root certificate CA1 of the digital certificate based on the digital certificate of the client carried in the authorization application request sent by the client. In order to determine whether the first root certificate CA1 of the client is a legitimate root certificate trusted by the server, the server end can search in its root certificate trust set to determine whether there is a root certificate that is consistent with the first root certificate of the client. For example, assuming that the root certificate trust set includes multiple root certificates: CA1, CA2, CA3, the server can determine that there is a root certificate CA1 among the multiple root certificates that is consistent with the client's first root certificate CA1, then the server can authorize and authenticate the client so that the client can perform subsequent cross-chain event subscriptions. It is understandable that, assuming that the root certificate trust set includes multiple root certificates: CA4, CA2, CA3, the server can determine that there is no root certificate among the multiple root certificates that is consistent with the client's first root certificate CA1, therefore, the server can not authorize and authenticate the client, and the client does not obtain the right to subscribe to cross-chain events.
[0128] Step S102: When the authorized subscriber passes the authorization authentication, the cross-chain gateway generates an authorized cross-chain event set for the authorized subscriber.
[0129] In some feasible implementations, when the first cross-chain gateway passes the authorization authentication of the authorized subscriber, it indicates that the first business chain trusts the authorized subscriber, and further, the authorized subscriber can be authorized to subscribe to the cross-chain events of the first business chain. However, in some application scenarios, since the business chain includes rich and complex blockchain information, the first business chain may have blockchain information that can be shared with other business chains, or blockchain information that cannot be shared and has a high degree of confidentiality. To this end, the first business chain can determine whether to authorize the subscription based on the event type of the cross-chain event that the authorized subscriber requests to subscribe to. Specifically, after the first cross-chain gateway passes the authorization authentication of the authorized subscriber, further, the first cross-chain gateway can generate an authorized cross-chain event set of the authorized subscriber, wherein the above-mentioned authorized cross-chain event set includes multiple authorized cross-chain events authorized to be subscribed by the above-mentioned authorized subscriber. When the authorized subscriber who has passed the authorization authentication requests the first cross-chain gateway to subscribe to the first cross-chain event, the first cross-chain gateway can determine whether the first cross-chain event is an authorized cross-chain event authorized to be subscribed by the above-mentioned authorized subscriber based on the multiple authorized cross-chain events in the above-mentioned authorized cross-chain event set.
[0130] In some feasible implementations, for ease of understanding, the present application implements the following content to describe the specific process of the first cross-chain gateway generating the authorized cross-chain event set of the authorized subscriber. First, the first cross-chain gateway can obtain the cross-chain event set of the first business chain, and the above cross-chain event set includes multiple cross-chain events of the above first business chain managed by the above cross-chain gateway. Among them, the above multiple cross-chain events can be understood as multiple events that can be executed by the first business chain. For example, the first business chain can execute cross-chain events of multiple event types: save events, query events, delete events, update events, etc., then the first cross-chain gateway can obtain multiple cross-chain events such as save events, query events, delete events, update events, etc. and determine them as the cross-chain event set of the first business chain. Further, it can be seen from the above content that although the first business chain can execute cross-chain events of multiple different event types through the first cross-chain gateway, for security reasons, the first business chain can choose to only authorize the authorized subscriber to subscribe to some of the cross-chain events, and does not allow the authorized subscriber to subscribe to other more important cross-chain events that need to be kept confidential. To this end, in addition to obtaining the cross-chain event set of the first business chain, the first cross-chain gateway can also obtain the business agreement between the first business chain and the second business chain, and the business agreement includes multiple authorized business types authorized by the first business chain to open to the second business chain. Specifically, the authorized business type can be understood as the blockchain business type that the first business chain and the second business chain agree through the business agreement that the first business chain can authorize the nodes of the second business chain to participate in. For example, when the first business chain and the second business chain agree through the business agreement that the second business chain can obtain the event update status of the first business chain, the business agreement can include the authorized business type: authorize the second business chain to obtain the event update status of the first business chain.
[0131] In some feasible implementations, after obtaining the cross-chain event set of the first business chain and the business agreement between the first business chain and the second business chain, in order to obtain the multiple authorized cross-chain events that the first business chain can authorize the authorized subscriber of the second business chain to subscribe to, the first cross-chain gateway can match the above-mentioned cross-chain event set with the authorized business type in the above-mentioned business agreement, and determine the multiple cross-chain events in the cross-chain event set that match the authorized business type in the above-mentioned business agreement as the above-mentioned multiple authorized cross-chain events authorized for the above-mentioned authorized subscriber to subscribe.
[0132] In some feasible implementations, it is assumed that the first cross-chain gateway obtains the cross-chain event set of the first business chain, and the cross-chain event set includes: multiple cross-chain events such as save events, query events, delete events, and update events, that is, the first business chain can execute the above-mentioned save events, query events, delete events, update events, and multiple cross-chain events through the first cross-chain gateway. At the same time, the first cross-chain gateway obtains the business agreement between the first business chain and the above-mentioned second business chain, and the business agreement includes: the first business chain authorizes the second business chain to obtain the data saved by the first business chain. When the first cross-chain gateway receives the authorization application request sent by the authorized subscriber of the second business chain, the first cross-chain gateway can authorize and authenticate the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request, and according to the business agreement between the above-mentioned first business chain and the above-mentioned second business chain, filter out the cross-chain events that match the authorized business type included in the business agreement from the cross-chain event set of the first business chain. Specifically, since the above business agreement includes the authorized business type: the first business chain authorizes the second business chain to obtain the data saved by the first business chain, and the authorized business type matches the saved event in the above cross-chain event set, the first cross-chain gateway can determine the saved event in the cross-chain event set as the authorized cross-chain event of the authorized subscriber, that is, the event type of the cross-chain event subscribed by the first cross-chain gateway to the above authorized subscriber is the saved event. When the authorized subscriber of the second business chain requests the first cross-chain gateway to subscribe to the saved event of the first business chain, since the saved event is the authorized cross-chain event authorized to be subscribed by the first cross-chain gateway, the first cross-chain gateway can subscribe to the saved event through the authorized subscriber. It can be understood that in actual applications, the first business chain can also implement cross-chain events of multiple other event types. At the same time, the first business chain and the second business chain can adjust the number and type of authorized business types in the business agreement according to the actual application scenario, and this application is not limited here. In general, the first cross-chain gateway can determine multiple authorized cross-chain events subscribed to by the authorized subscriber of the second business chain based on the cross-chain event set of the first business chain and the business agreement of the first business chain and the second business chain, and generate the authorized cross-chain event set of the authorized subscriber based on the above multiple authorized cross-chain events.
[0133] In some feasible implementations, it can be seen from the above content that after the first cross-chain gateway receives the authorization application request sent by the authorized subscriber of the second business chain, the first cross-chain gateway can authorize and authenticate the above authorized subscriber based on the digital certificate carried in the authorization application request. The first cross-chain gateway can also determine the multiple authorized cross-chain events subscribed by the authorized subscriber of the second business chain based on the cross-chain event set of the first business chain and the business agreement of the first business chain and the second business chain after the authorization and authentication of the authorized subscriber, thereby completing the authorization and authentication process for the authorized subscriber. Further, in order to enable the first cross-chain gateway to determine whether any subscriber is a subscriber that has passed the authorization and authentication of the first cross-chain gateway when any subscriber requests to subscribe to a cross-chain event from the first cross-chain gateway, the embodiment of the present application can also add the authorized subscriber that has passed the authorization and authentication to the authorized subscriber identification set of the first cross-chain gateway after the authorization and authentication of the above authorized subscriber is passed. Among them, the authorized subscriber identification set includes multiple identity identifiers of multiple subscribers that have passed the authorization and authentication of the first cross-chain gateway, and each subscriber corresponds to an identity identifier. It is understandable that only when there is an identity in the authorized subscriber identification set that is consistent with the identity of the subscriber requesting to subscribe to the cross-chain event, it indicates that the subscriber requesting to subscribe to the cross-chain event is a subscriber that has been authorized and authenticated by the first cross-chain gateway. On the contrary, if there is no identity in the authorized subscriber identification set that is consistent with the identity of the subscriber requesting to subscribe to the cross-chain event, it indicates that the subscriber requesting to subscribe to the cross-chain event is not a subscriber that has been authorized and authenticated by the first cross-chain gateway, and the first cross-chain gateway can refuse to authorize the subscriber who has not been authorized and authenticated to subscribe to the cross-chain event.
[0134] In some feasible implementations, for ease of understanding, the present application embodiment describes the detailed process of obtaining the authorized subscriber identification set of the first cross-chain gateway in the following content. First, the first cross-chain gateway can obtain the first identity of the authorized subscriber based on the digital certificate of the authorized subscriber, and the first identity is the unique identifier of the authorized subscriber. It can be seen from the above content that a subscriber with an entity identity is bound to a digital certificate, and any subscriber can prove its identity and identify the identity of the other party through a digital certificate. In other words, the digital certificate of each subscriber can be understood as a unique identity of a subscriber, and different subscribers can be distinguished by a digital certificate. The digital certificate of any subscriber can be issued by the root certificate of the subscriber or the business chain deployed by the subscriber. The digital certificate contains the basic information of the subscriber, the public key information, the validity period of the key, etc., and can also include relevant information signed by the CA certification center. Among them, the basic information of the subscriber included in the digital certificate can be understood as the name, address and other information of the holder of the digital certificate, that is, the identity information of the subscriber. It can be understood that the first cross-chain gateway can obtain the first identity of the subscriber based on the identity information of the authorized subscriber in the digital certificate by parsing the digital certificate of the authorized subscriber, and the first identity can be understood as the unique identifier of the authorized subscriber. After the first cross-chain gateway passes the authorization authentication of the above-mentioned authorized subscriber, it can parse the digital certificate of the authorized subscriber to obtain the first identity of the authorized subscriber, and add the first identity to the authorized subscriber identification set of the first cross-chain gateway, so as to determine that the above-mentioned authorized subscriber is a subscriber that has passed the authorization authentication. Further, the first cross-chain gateway can receive authorization application requests from multiple subscribers, and authorize and authenticate some subscribers based on the above content. After obtaining the identity of multiple subscribers that have passed the authorization authentication, the first cross-chain gateway can add multiple identity identifiers of multiple subscribers that have passed the authorization authentication to the authorized subscriber identification set, so as to store the identity identifiers of multiple subscribers that have passed the authorization authentication in the first cross-chain gateway, so as to facilitate the subsequent steps to determine whether the subscriber requesting to subscribe to the cross-chain event has been authorized and authenticated.
[0135] Step S103: receiving a first subscription request sent by any subscriber, and determining that any subscriber is an authorized subscriber based on the digital certificate carried in the first subscription request.
[0136] In some feasible implementations, the first cross-chain gateway may receive a first subscription request sent by any subscriber, and the first subscription request may be understood as a request for the first cross-chain gateway to authorize the subscriber to subscribe to the first cross-chain event of the first business chain. As can be seen from the above content, in order to ensure information security, the first business chain can only authorize trusted legal nodes to subscribe to the cross-chain events of the first business chain. To this end, any subscriber may first send an authorization application request to the first cross-chain gateway before sending the first subscription request to obtain the authorization authentication of the first cross-chain gateway. It can be understood that only subscribers who have passed the authorization authentication can subscribe to the cross-chain events of the first business chain. To this end, in the embodiment of the present application, when the first cross-chain gateway receives the first subscription request sent by any of the above subscribers, it can first determine whether the subscriber is an authorized subscriber who has passed the authorization authentication based on the digital certificate carried in the first subscription request.
[0137] In some feasible implementations, for ease of understanding, the embodiment of the present application describes in the following content the detailed process of the first cross-chain gateway determining whether the subscriber is an authorized subscriber that has passed the authorization authentication. First, after the first cross-chain gateway generates the above-mentioned authorized subscriber identification set, when the first cross-chain gateway receives the first subscription request sent by any subscriber, the above-mentioned first cross-chain gateway can obtain the second identity of any of the above-mentioned subscribers based on the digital certificate of any of the above-mentioned subscribers carried by the above-mentioned first subscription request. Specifically, it can be seen from the above content that the first cross-chain gateway can parse the second identity of the subscriber based on the digital certificate of any of the subscribers, wherein the second identity can be understood as the unique identifier of any of the above-mentioned subscribers, and the identity information of the subscriber can be determined by the second identity of the subscriber. Furthermore, after the above-mentioned authorized subscriber sends an authorization application request to the first cross-chain gateway to request authorization authentication, and the authorization authentication is passed by the first cross-chain gateway, the first identity of the authorized subscriber can be added to the authorized subscriber identification set of the first cross-chain gateway. To this end, after obtaining the second identity identifier of any subscriber based on the first subscription request sent by the subscriber, the first cross-chain gateway can search the authorized subscriber identification set of the first cross-chain gateway based on the second identity identifier of the subscriber to determine whether the subscriber is an authorized subscriber who has been authorized and authenticated.
[0138] In some feasible implementations, if there is an identity in the above-mentioned authorized subscriber identification set that matches the second identity of the above-mentioned subscriber, the first cross-chain gateway can determine that any of the above-mentioned subscribers is an authorized subscriber that has been authorized and authenticated, that is, before the subscriber sends the first subscription request to the first cross-chain gateway, the subscriber has sent an authorization application request to the first cross-chain gateway to request the first cross-chain gateway to authorize and authenticate, and the first cross-chain gateway determines that the subscriber is a trustworthy legal node based on the digital certificate of the subscriber carried in the authorization application request. The first cross-chain gateway authorizes and authenticates the subscriber, and adds the second identity of the subscriber to the authorized subscriber identification set to complete the authorization and authentication process for the subscriber. Therefore, when the first cross-chain gateway receives the first subscription request from the subscriber, the first cross-chain gateway can find an identity consistent with the second identity of the subscriber in the above-mentioned authorized subscriber identification set, indicating that the subscriber is an authorized subscriber that has been authorized and authenticated by the first cross-chain gateway.
[0139] In some feasible implementations, if there is no identity identifier in the authorized subscriber identification set that matches the second identity identifier of the subscriber, the first cross-chain gateway can determine that any of the above subscribers is a subscriber that has not been authorized and authenticated by the first cross-chain gateway, that is, before the subscriber sends the first subscription request to the first cross-chain gateway, the subscriber does not send an authorization application request to the first cross-chain gateway to request the first cross-chain gateway to authorize and authenticate, or the subscriber is not a subscriber trusted by the first cross-chain gateway. In general, since there is no identity identifier that matches the second identity identifier of the subscriber in the authorized subscriber identification set of the first cross-chain gateway, it can be determined that the subscriber has not been authorized and authenticated, and the first cross-chain gateway can reject the first subscription request of the subscriber and return an indication of the failure of the cross-chain event subscription to the subscriber.
[0140] Step S104: The cross-chain gateway determines the event subscription processing result of the first subscription request based on the multiple authorized cross-chain events included in the authorized cross-chain event set and the first identifier carried in the first subscription request.
[0141] In some feasible implementations, when the first cross-chain gateway determines that the subscriber is an authorized subscriber that has passed the authorization authentication of the first cross-chain gateway based on the second identity of any subscriber and the authorized subscriber identification set, the first cross-chain gateway can trust the subscriber and authorize the subscriber to subscribe to the cross-chain events on the first business chain. However, as can be seen from the above content, in some application scenarios, since the business chain includes rich and complex blockchain information, the first business chain may have blockchain information that can be shared with other business chains, or blockchain information that cannot be shared and has a high degree of confidentiality. Therefore, for security reasons, the first business chain can choose to only authorize the authorized subscriber to subscribe to some of the cross-chain events, and not allow the authorized subscriber to subscribe to other more important cross-chain events that need to be kept confidential. As can be seen from the above content, after the first cross-chain gateway passes the authorization authentication of the authorized subscriber, the first cross-chain gateway can obtain multiple authorized cross-chain events of the authorized subscriber based on the cross-chain event set of the first business chain and the business agreement between the first business chain and the second business chain. The above multiple authorized cross-chain events are multiple cross-chain events that the first cross-chain gateway can authorize the authorized subscriber to subscribe to. It is understandable that after the first cross-chain gateway obtains the first subscription request sent by the authorized subscriber, the first cross-chain gateway can obtain the first identifier of the first cross-chain event based on the first subscription request. The first subscription request is used to request subscription to the first cross-chain event of the first business chain, and the first identifier is the identifier of the first cross-chain event. At the same time, any cross-chain event can correspond to an identifier, and cross-chain events of different event types can be distinguished by the identifier of the cross-chain event.
[0142] In some feasible implementations, after the first cross-chain gateway obtains the first identifier of the first cross-chain event carried in the first subscription request sent by the authorized subscriber, the first cross-chain gateway may determine the event subscription processing result of the first subscription request based on the first identifier of the first cross-chain event and multiple authorized cross-chain events of the authorized subscriber. The event subscription processing result of the first subscription request can be understood as the first cross-chain gateway authorizing the subscription to the first cross-chain event, or the first cross-chain gateway not authorizing the subscription to the first cross-chain event. That is, the first cross-chain gateway may determine whether to authorize the subscription to the first cross-chain event based on the first identifier of the first cross-chain event and multiple authorized cross-chain events of the authorized subscriber.
[0143] In some feasible implementations, for ease of understanding, the embodiment of the present application describes in detail the process of determining the event subscription processing result of the first subscription request in the following content. Specifically, the first cross-chain gateway can search the above-mentioned authorized cross-chain set to see whether there is an authorized cross-chain event that matches the first cross-chain event. If there is an authorized cross-chain event that matches the first cross-chain event in the above-mentioned authorized cross-chain set, it indicates that the first cross-chain event is a cross-chain event that the first cross-chain gateway can authorize to subscribe to, then the first cross-chain gateway can determine that any of the above-mentioned subscribers has successfully subscribed to the above-mentioned first cross-chain event, and the event subscription processing result of the first subscription request is the event data of the first cross-chain event. On the contrary, if there is no authorized cross-chain event that matches the first cross-chain event in the above-mentioned authorized cross-chain set, it indicates that the first cross-chain event is not a cross-chain event that the first cross-chain gateway can authorize to subscribe to, then the first cross-chain gateway can determine that any of the above-mentioned subscribers has failed to subscribe to the above-mentioned first cross-chain event, and the event subscription processing result of the first subscription request is the indication information of the failure of the subscription to the first cross-chain event.
[0144] In some feasible implementations, in order to determine whether there is an authorized cross-chain event matching the first cross-chain event among the above-mentioned multiple authorized cross-chain events, first, the first cross-chain gateway can obtain multiple authorized cross-chain event identifiers of multiple authorized cross-chain events in the above-mentioned authorized cross-chain events, wherein one authorized cross-chain event identifier corresponds to one authorized cross-chain event. As can be seen from the above content, any cross-chain event can correspond to an identifier, and cross-chain events of different event types can be distinguished by the identifier of the cross-chain event. It can be understood that after the first cross-chain gateway obtains multiple authorized cross-chain event identifiers of multiple authorized cross-chain events, when the first cross-chain gateway receives the first subscription request for the first cross-chain event, the first cross-chain gateway can search for the above-mentioned multiple authorized cross-chain event identifiers based on the first identifier of the first cross-chain event, and when there is an authorized cross-chain event identifier in the above-mentioned multiple authorized cross-chain event identifiers that is consistent with the first identifier, the first cross-chain gateway can determine that the first cross-chain event is a cross-chain event authorized to subscribe by the first cross-chain gateway. Furthermore, the first cross-chain gateway determines that any of the above subscribers has successfully subscribed to the above first cross-chain event, and determines the event data of the above first cross-chain event as the event subscription processing result of the above first subscription request.
[0145] In some feasible implementations, when there is no authorized cross-chain event identifier in the authorized cross-chain event set that matches the first identifier of the first cross-chain event, indicating that the first cross-chain event is not a cross-chain event authorized for subscription by the first cross-chain gateway, the cross-chain gateway may determine that any of the subscribers has failed to subscribe to the first cross-chain event, and determine the indication information of the failure to subscribe to the first cross-chain event as the event subscription processing result of the first subscription request.
[0146] In some feasible implementations, for ease of understanding, the present application embodiments are illustrated in the following content. Figure 6 , Figure 6 This is another framework diagram of the cross-chain event subscription processing method provided in an embodiment of the present application. Figure 6 The client shown can be Figure 3 The application client running in the terminal device 200a shown in the figure may be a member of the second business organization, and the client may participate in the second business chain as a node through the database on the terminal device. Figure 6 The server shown can be Figure 3 In the business server 100 shown, the server can be the first cross-chain gateway corresponding to the first business chain. Specifically, after the client requests authorization from the server (i.e., the first cross-chain gateway) as the above-mentioned authorized subscriber, and the server passes the authorization authentication to the client, the client can generate a first subscription request to request the server to subscribe to the first cross-chain event, wherein the identifier of the first cross-chain event is the first identifier event1, and the first identity identifier of the client is A1. The client sends the first subscription request to the server, and after receiving the first subscription request, the server can review the authorization application request. Specifically, first, the server can obtain the first identity identifier of the client as A1, and search the authorized subscriber identifier set according to the first identity identifier A1. The above-mentioned authorized subscriber identifier set can be understood as including the identifiers of multiple subscribers that have passed the authorization authentication of the above-mentioned server. In order to determine whether the client is a subscriber that has passed the authorization authentication of the server, the server can search in its authorized subscriber identifier set to determine whether there is an authorized subscriber identifier that is consistent with the first identity identifier of the client. For example, assuming that the authorized subscriber identification set includes multiple authorized subscriber identifications: A1, A2, A3, the server can determine that there is an authorized subscriber identification A1 among the multiple authorized subscriber identifications that is consistent with the first identity identification A1 of the client, then the server can determine that the client is an authorized subscriber that has passed the authorization authentication. It is understandable that, assuming that the authorized subscriber identification set includes multiple authorized subscriber identifications: A4, A2, A3, the server can determine that there is no authorized subscriber identification among the multiple authorized subscriber identifications that is consistent with the first identity identification A1 of the client, therefore, the server can determine that the client is not authorized and cannot obtain the right to subscribe to cross-chain events.
[0147] In some feasible implementations, after the first cross-chain gateway determines that the client is an authorized subscriber that has been authorized and authenticated, the first cross-chain gateway can obtain the first identifier event1 of the first cross-chain event carried in the first subscription request, and search the authorized cross-chain event set of the client according to the first identifier event1. The above-mentioned authorized cross-chain event set can be understood as a plurality of authorized cross-chain event identifiers including the multiple cross-chain events that the above-mentioned server authorizes the client to subscribe to. In order to determine whether the first cross-chain event is a cross-chain event that the server authorizes the client to subscribe to, the server can search in its authorized cross-chain event set to determine whether there is an authorized cross-chain event identifier that is consistent with the first identifier of the first cross-chain event. For example, assuming that the cross-chain event set includes multiple authorized cross-chain event identifiers: event1, event2, event3, the server can determine that there is an authorized cross-chain event identifier event1 in the multiple authorized cross-chain event identifiers that is consistent with the first identifier event1 of the first cross-chain event, then the server can determine that the first cross-chain event is a cross-chain event that the server authorizes the client to subscribe to. It can be understood that, assuming that the authorized cross-chain event set includes multiple authorized cross-chain event identifiers: event 4, event 2, and event 3, the server can determine that there is no authorized cross-chain event identifier among the multiple authorized cross-chain event identifiers that is consistent with event 1 of the first cross-chain event. Therefore, the server can determine that the first cross-chain event is not a cross-chain event that the server authorizes the client to subscribe to, that is, the client cannot obtain the right to subscribe to the first cross-chain event.
[0148] Step S105: The cross-chain gateway returns the event subscription processing result to any subscriber.
[0149] In some feasible implementations, after determining the event subscription processing result of any subscriber, the first cross-chain gateway may return the event subscription processing result to the subscriber. The event subscription processing result includes the event data of the successful subscription of the first cross-chain event, or the indication information of the failure of the subscription of the first cross-chain event.
[0150] For some possible implementations, see Figure 7 , Figure 7 It is another schematic diagram of the processing method of cross-chain event subscription provided by the embodiment of the present application. It can be understood that after the authorized subscriber successfully subscribes to the first cross-chain event, Figure 7 As shown, the authorized subscriber, as the first member of the first business organization, can subscribe to cross-chain events within the first business organization, and can also subscribe to cross-chain events of the second business organization, thereby realizing the scope of cross-chain event subscription between different business organizations, expanding data interaction between different business chains, and making full use of blockchain information.
[0151] In some feasible implementations, after the authorized subscriber successfully subscribes to the first cross-chain event of the first business chain, when the first business chain initiates a contract event, the first cross-chain gateway can determine that the contract event is the first cross-chain event initiated to any business chain. Further, the first cross-chain gateway can trigger the first business chain to initiate a cross-chain transaction to any of the business chains based on the first cross-chain event. At the same time, in order to make full use of blockchain information, the first cross-chain gateway can send the event data of the successful subscription of the first cross-chain event to the authorized subscriber who successfully subscribes to the first cross-chain event, thereby completing the processing of the cross-chain event subscription.
[0152] In the method for processing cross-chain events provided in the embodiment of the present application, the authorized subscriber of the second business chain may send an authorization application request to the cross-chain gateway of the first business chain before requesting to subscribe to the cross-chain event, so as to request the cross-chain gateway to perform authorization authentication on the authorized subscriber. Specifically, the cross-chain gateway of the first business chain may perform authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request sent by the authorized subscriber, wherein the authorization application request is used to request the cross-chain gateway to authorize the subscription to the cross-chain event of the first business chain. When the authorization authentication of the authorized subscriber passes, the cross-chain gateway generates an authorized cross-chain event set of the authorized subscriber, and the authorized cross-chain event set includes multiple authorized cross-chain events authorized to be subscribed by the authorized subscriber. When the authorization authentication of the authorized subscriber fails, the cross-chain gateway may generate an indication of authorization failure and return it to the authorized subscriber. Further, after receiving the first subscription request sent by any subscriber, the cross-chain gateway of the first business chain can determine whether any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request in order to determine whether the subscriber is an authorized subscriber. Further, when the cross-chain gateway determines that any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request, the cross-chain gateway can determine the event subscription processing result of the first subscription request based on the multiple authorized cross-chain events included in the authorized cross-chain event set and the first identifier carried in the first subscription request. Among them, the first subscription request is used to request to subscribe to the first cross-chain event of the first business chain, and the first identifier is the identifier of the first cross-chain event. It can be understood that the cross-chain gateway returns the event subscription processing result to any subscriber, wherein the event subscription processing result includes the event data of the successful subscription of the first cross-chain event, or the indication information of the failure of the subscription of the first cross-chain event. The cross-chain event subscription processing method provided in the embodiment of the present application can realize the subscription of cross-chain events between business organizations under the premise of ensuring information security, reduce the data sharing restrictions between different business organizations, and because the business organization can control the authorization scope of cross-chain events and subscribers, the authorized subscribers and the event types of cross-chain events that can be subscribed can be adjusted according to the needs of actual applications, which is highly flexible and applicable.
[0153] See also Figure 8 , Figure 8 FIG. 1 is another flow chart of the processing method of cross-chain event subscription provided by the embodiment of the present application. Figure 8 As shown, the data processing method may at least include the following steps S201 to S203.
[0154] Step S201: The authorized subscriber of the second business chain sends an authorization application request to the cross-chain gateway of the first business chain, triggering the cross-chain gateway to perform authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request.
[0155] In some feasible implementations, the authorization application request is used to request the cross-chain gateway to authorize the subscription of the cross-chain events of the first business chain. Specifically, the authorized subscriber of the second business chain sends an authorization application request to the cross-chain gateway of the first business chain, triggering the cross-chain gateway to perform authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request. The specific implementation method can refer to the description of step S101 above, and this application will not be repeated here.
[0156] Step S202: The authorized subscriber sends a first subscription request to the cross-chain gateway, and based on the first subscription request, requests the cross-chain gateway to subscribe to the first cross-chain event of the first business chain.
[0157] In some feasible implementations, the first subscription request carries the digital certificate of the authorized subscriber and the first identifier of the first cross-chain event. Specifically, the authorized subscriber sends the first subscription request to the cross-chain gateway, and based on the first subscription request, the cross-chain gateway is requested to subscribe to the first cross-chain event of the first business chain. The specific implementation method can refer to the description of the above steps S102-S104, which will not be repeated in this application.
[0158] Step S203: The authorized subscriber obtains the event subscription processing result of the first subscription request returned based on the first identifier when the cross-chain gateway determines that the authorized subscriber is an authorized subscriber based on the digital certificate.
[0159] In some feasible implementations, the event subscription processing result includes the event data of the successful subscription of the first cross-chain event, or the indication information of the failure of the subscription of the first cross-chain event. Specifically, the specific implementation method of the event subscription processing result of the first subscription request returned based on the first identifier when the cross-chain gateway determines that the authorized subscriber is an authorized subscriber based on the digital certificate can refer to the description of the above step S105, and this application will not repeat it here.
[0160] Based on the description of the above cross-chain event subscription processing method embodiment, the present application embodiment also discloses a cross-chain event subscription processing device. The cross-chain event subscription processing device can be applied to Figures 1 to 8 In the processing method of cross-chain event subscription in the illustrated embodiment, the steps in the processing method of cross-chain event subscription are used to execute. The processing device of cross-chain event subscription here can be the above Figures 1 to 8The service server or terminal device in the embodiment shown, that is, the processing device for the cross-chain event subscription, can be the above-mentioned Figures 1 to 8 The execution subject of the processing method of cross-chain event subscription in the embodiment shown. Please refer to Fig. 9 , Fig. 9 It is a structural diagram of a processing device for cross-chain event subscription provided in an embodiment of the present application. In an embodiment of the present application, the device 1 can run the following modules:
[0161] The authorization module 11 is used to, upon receiving an authorization application request sent by an authorized subscriber of the second business chain, authenticate the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request, wherein the authorization application request is used to request the cross-chain gateway to authorize the subscription of the cross-chain event of the first business chain;
[0162] The cross-chain event set determination module 12 is used to generate an authorized cross-chain event set of the authorized subscriber when the authorized subscriber passes the authorization authentication, wherein the authorized cross-chain event set includes multiple authorized cross-chain events that the authorized subscriber is authorized to subscribe to;
[0163] The subscription processing module 13 is used to determine the event subscription processing result of the first subscription request based on the multiple authorized cross-chain events included in the authorized cross-chain event set and the first identifier carried in the first subscription request when receiving the first subscription request sent by any subscriber and determining that any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request, wherein the first subscription request is used to request subscription to the first cross-chain event of the first business chain, and the first identifier is the identifier of the first cross-chain event;
[0164] The sending module 14 is used to return the event subscription processing result to any of the above subscribers, wherein the event subscription processing result includes the event data of the successful subscription to the above first cross-chain event, or the indication information of the failure of the subscription to the above first cross-chain event.
[0165] The authorization module 11 includes:
[0166] A root certificate obtaining unit 111 is used to obtain a first root certificate of the authorized subscriber based on the digital certificate in the authorization application request, where the first root certificate is used to issue a digital certificate of the authorized subscriber;
[0167] A root certificate trust set acquisition unit 112 is used to acquire a root certificate trust set of the first service chain, wherein the root certificate trust set includes multiple root certificates authorized and trusted by the first service chain;
[0168] The authorization authentication unit 113 is used to determine that the authorization authentication of the authorized subscriber is passed when there is a root certificate matching the first root certificate in the root certificate trust set, so as to complete the authorization authentication of the authorized subscriber.
[0169] The authorization authentication unit 113 is also used for:
[0170] When there is no root certificate matching the first root certificate in the root certificate trust set, it is determined that the authorization authentication of the authorized subscriber fails, and an indication message of the authorization authentication failure is sent to the authorized subscriber to complete the authorization authentication of the authorized subscriber.
[0171] The cross-chain event set determination module 12 includes:
[0172] The business agreement acquisition unit 121 is used to acquire a cross-chain event set of the first business chain and a business agreement between the first business chain and the second business chain, wherein the cross-chain event set includes multiple cross-chain events of the first business chain managed by the cross-chain gateway, and the business agreement includes multiple authorized business types authorized by the first business chain to open to the second business chain;
[0173] The cross-chain event set generating unit 122 is used to determine the multiple cross-chain events in the above-mentioned cross-chain event set that match the authorized business type in the above-mentioned business agreement as the above-mentioned multiple authorized cross-chain events authorized for the above-mentioned authorized subscriber to subscribe to, and generate the authorized cross-chain event set of the above-mentioned authorized subscriber based on the above-mentioned multiple authorized cross-chain events.
[0174] The cross-chain event set determination module 12 further includes:
[0175] An identity obtaining unit 123 is used to obtain a first identity of the authorized subscriber based on the digital certificate of the authorized subscriber, where the first identity is a unique identifier of the authorized subscriber;
[0176] The identification set acquisition unit 124 is used to add the first identity identification of the above-mentioned authorized subscriber to the authorized subscriber identification set of the above-mentioned cross-chain gateway to determine that the above-mentioned authorized subscriber is a subscriber who has passed the authorization authentication. The above-mentioned authorized subscriber identification set includes multiple identity identifications of multiple subscribers that have been authorized and authenticated by the above-mentioned cross-chain gateway.
[0177] The subscription processing module 13 includes:
[0178] The subscriber identification acquisition unit 131 is used to acquire the second identity of any subscriber based on the digital certificate of any subscriber carried in the first subscription request when receiving the first subscription request sent by any subscriber;
[0179] The authorized subscriber determining unit 132 is configured to determine that any of the subscribers is the authorized subscriber that has passed the authorization authentication when there is an identity in the authorized subscriber identification set that matches the second identity.
[0180] The subscription processing module 13 further includes:
[0181] The authorization event identifier acquisition unit 133 is used to acquire multiple authorization cross-chain event identifiers of multiple authorization cross-chain events in the above-mentioned authorization cross-chain event, wherein one authorization cross-chain event identifier corresponds to one authorization cross-chain event;
[0182] The subscription processing unit 134 is used to determine that any of the subscribers has successfully subscribed to the first cross-chain event when there is an authorized cross-chain event identifier in the authorized cross-chain event set that matches the first identifier, and determine the event data of the first cross-chain event as the event subscription processing result of the first subscription request.
[0183] The subscription processing unit 134 is further used for:
[0184] When there is no authorized cross-chain event identifier in the authorized cross-chain event set that matches the first identifier of the first cross-chain event, it is determined that any of the subscribers has failed to subscribe to the first cross-chain event, and the indication information of the failure to subscribe to the first cross-chain event is determined as the event subscription processing result of the first subscription request.
[0185] The sending module 14 is also used for:
[0186] When the first business chain initiates a contract event, it is determined that the contract event is the first cross-chain event initiated to any business chain, and based on the first cross-chain event, the first business chain is triggered to initiate a cross-chain transaction to any of the business chains, and event data indicating successful subscription to the first cross-chain event is sent to at least one subscriber who has successfully subscribed to the first cross-chain event.
[0187] In an embodiment of the present application, each module in the device shown in the above figure can be separately or all merged into one or several other modules to constitute, or a certain module (or modules) thereof can also be split into multiple smaller modules in function to constitute, which can achieve the same operation without affecting the realization of the technical effect of the embodiment of the present application. The above modules are divided based on logical functions. In practical applications, the function of a module can also be realized by multiple modules, or the function of multiple modules is realized by one module. In other feasible implementations of the present application, the above device can also include other modules. In practical applications, these functions can also be implemented with the assistance of other modules, and can be implemented by the collaboration of multiple modules, which is not limited here.
[0188] In the cross-chain event processing device provided in the embodiment of the present application, the authorized subscriber of the second business chain can send an authorization application request to the cross-chain gateway of the first business chain before requesting to subscribe to the cross-chain event, so as to request the cross-chain gateway to perform authorization authentication on the authorized subscriber. Specifically, the cross-chain gateway of the first business chain can perform authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request sent by the authorized subscriber, wherein the authorization application request is used to request the cross-chain gateway to authorize the subscription of the cross-chain event of the first business chain. When the authorization authentication of the authorized subscriber passes, the cross-chain gateway generates an authorized cross-chain event set of the authorized subscriber, and the authorized cross-chain event set includes multiple authorized cross-chain events authorized to be subscribed by the authorized subscriber. When the authorization authentication of the authorized subscriber fails, the cross-chain gateway can generate an indication of authorization failure and return it to the authorized subscriber. Further, after receiving the first subscription request sent by any subscriber, the cross-chain gateway of the first business chain can determine whether any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request in order to determine whether the subscriber is an authorized subscriber. Further, when the cross-chain gateway determines that any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request, the cross-chain gateway can determine the event subscription processing result of the first subscription request based on the multiple authorized cross-chain events included in the authorized cross-chain event set and the first identifier carried in the first subscription request. Among them, the first subscription request is used to request to subscribe to the first cross-chain event of the first business chain, and the first identifier is the identifier of the first cross-chain event. It can be understood that the cross-chain gateway returns the event subscription processing result to any subscriber, wherein the event subscription processing result includes the event data of the successful subscription of the first cross-chain event, or the indication information of the failure of the subscription of the first cross-chain event. The cross-chain event subscription processing method provided in the embodiment of the present application can realize the subscription of cross-chain events between business organizations under the premise of ensuring information security, reduce the data sharing restrictions between different business organizations, and because the business organization can control the authorization scope of cross-chain events and subscribers, the authorized subscribers and the event types of cross-chain events that can be subscribed can be adjusted according to the needs of actual applications, which is highly flexible and applicable.
[0189] For further information, see Fig.10 , Fig.10 This is another structural diagram of the cross-chain event subscription processing device provided in the embodiment of the present application. The above-mentioned cross-chain event subscription processing device can be a computer program (including program code) running in a computer device. For example, the cross-chain event subscription processing device is an application software; the device can be used to execute the corresponding steps of the method provided in the embodiment of the present application. Fig.10 As shown, the above device 2 comprises:
[0190] The authorization application module 21 is used to send an authorization application request to the cross-chain gateway of the first business chain, triggering the cross-chain gateway to authenticate the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request; wherein the authorization application request is used to request the cross-chain gateway to authorize the subscription of the cross-chain event of the first business chain;
[0191] A subscription request module 22 is used to send a first subscription request to the cross-chain gateway, and based on the first subscription request, request the cross-chain gateway to subscribe to the first cross-chain event of the first business chain, wherein the first subscription request carries the digital certificate of the authorized subscriber and the first identifier of the first cross-chain event;
[0192] The subscription result acquisition module 23 is used to obtain the event subscription processing result of the first subscription request returned based on the first identifier when the cross-chain gateway determines that the authorized subscriber is an authorized subscriber based on the digital certificate, and the event subscription processing result includes the event data of the successful subscription of the first cross-chain event, or the indication information of the failure of the subscription of the first cross-chain event.
[0193] The cross-chain event subscription processing device provided in the embodiment of the present application can realize the subscription of cross-chain events between business organizations under the premise of ensuring information security, reduce the data sharing restrictions between different business organizations, and because the business organization can control the authorization scope of cross-chain events and subscribers, the authorized subscribers and the event types of cross-chain events that can be subscribed can be adjusted according to the needs of actual applications, with high flexibility and strong applicability.
[0194] See also Fig.11 , Fig.11 Schematic diagram of a computer device provided in an embodiment of the present application. Fig.11 As shown, the computer device 1000 may be the above Figure 1-Figure 8The terminal device in the corresponding embodiment. The computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. Fig.11 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.
[0195] The network interface 1004 in the computer device 1000 can also be connected to the above Figure 3 The terminal 200b in the corresponding embodiment is connected to the network, and the optional user interface 1003 may also include a display screen (Display) and a keyboard (Keyboard). Fig.11 In the computer device 1000 shown in the figure, the network interface 1004 can provide a network communication function; the user interface 1003 is mainly used to provide an input interface for developers; and the processor 1001 can be used to call the device control application stored in the memory 1005 to implement the above Figure 4 The processing method of cross-chain event subscription in the corresponding embodiment.
[0196] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 4 The description of the processing method for cross-chain event subscription in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here.
[0197] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, Figure 4 For details on the cross-chain event subscription processing methods provided in each step, please refer to the above Figure 4 The implementation methods provided by each step will not be repeated here.
[0198] The computer-readable storage medium may be a subscription device for cross-chain events provided in any of the aforementioned embodiments or an internal storage unit of the computer device, such as a hard disk or memory of a computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both an internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0199] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other step units inherent to these processes, methods, devices, products, or equipment.
[0200] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0201] The method and related apparatus provided by the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided by the embodiment of the present application. Specifically, each process and / or box in the method flow chart and / or structural diagram, as well as the combination of the processes and / or boxes in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable cross-chain event subscription device to generate a machine, so that the instructions executed by the processor of the computer or other programmable cross-chain event subscription device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable cross-chain event subscription device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the function specified in the process Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be loaded onto a computer or other programmable cross-chain event subscription device, so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A flow or multiple flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.
[0202] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A method for processing cross-chain event subscription, characterized in that: The method comprises: When receiving an authorization application request sent by an authorized subscriber of the second business chain, the cross-chain gateway of the first business chain performs authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request, wherein the authorization application request is used to request the cross-chain gateway to authorize subscription to cross-chain events of the first business chain; When the authorized subscriber passes the authorization authentication, the cross-chain gateway generates an authorized cross-chain event set for the authorized subscriber, and the authorized cross-chain event set includes multiple authorized cross-chain events that the authorized subscriber is authorized to subscribe to; When receiving a first subscription request sent by any subscriber and determining that any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request, the cross-chain gateway determines the event subscription processing result of the first subscription request based on the multiple authorized cross-chain events included in the authorized cross-chain event set and the first identifier carried in the first subscription request, wherein the first subscription request is used to request subscription to the first cross-chain event of the first business chain, and the first identifier is the identifier of the first cross-chain event; The cross-chain gateway returns the event subscription processing result to any subscriber, wherein the event subscription processing result includes event data indicating that the first cross-chain event subscription is successful, or indication information indicating that the first cross-chain event subscription fails.
2. The method according to claim 1, characterized in that The cross-chain gateway of the first business chain performs authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request, including: The cross-chain gateway of the first business chain obtains the first root certificate of the authorized subscriber based on the digital certificate in the authorization application request, where the first root certificate is used to issue the digital certificate of the authorized subscriber; The cross-chain gateway obtains a root certificate trust set of the first business chain, where the root certificate trust set includes multiple root certificates authorized and trusted by the first business chain; When there is a root certificate matching the first root certificate in the root certificate trust set, the cross-chain gateway determines that the authorization authentication of the authorized subscriber is passed to complete the authorization authentication of the authorized subscriber.
3. The method according to claim 2, characterized in that After the cross-chain gateway obtains the root certificate trust set of the first business chain, the method further includes: When there is no root certificate matching the first root certificate in the root certificate trust set, the cross-chain gateway determines that the authorization authentication of the authorized subscriber fails, and sends an indication of the authorization authentication failure to the authorized subscriber to complete the authorization authentication of the authorized subscriber.
4. The method according to claim 3, characterized in that The cross-chain gateway generates the authorized cross-chain event set for the authorized subscriber, including: The cross-chain gateway obtains a cross-chain event set of the first business chain and a business agreement between the first business chain and the second business chain, wherein the cross-chain event set includes multiple cross-chain events of the first business chain managed by the cross-chain gateway, and the business agreement includes multiple authorized business types authorized by the first business chain to open to the second business chain; The cross-chain gateway determines multiple cross-chain events in the cross-chain event set that match the authorized business type in the business agreement as the multiple authorized cross-chain events authorized for the authorized subscriber to subscribe to, and generates an authorized cross-chain event set for the authorized subscriber based on the multiple authorized cross-chain events.
5. The method according to claim 2, characterized in that: After the authorized subscriber passes the authorization authentication, the method further includes: The cross-chain gateway obtains a first identity identifier of the authorized subscriber based on the digital certificate of the authorized subscriber, where the first identity identifier is a unique identifier of the authorized subscriber; The cross-chain gateway adds the first identity identifier of the authorized subscriber to the authorized subscriber identification set of the cross-chain gateway to determine that the authorized subscriber is a subscriber that has passed the authorization authentication, and the authorized subscriber identification set includes multiple identity identifiers of multiple subscribers that have been authorized and authenticated by the cross-chain gateway.
6. The method according to claim 5, characterized in that After the cross-chain gateway generates the authorized cross-chain event set of the authorized subscriber, the method further includes: When receiving a first subscription request sent by any subscriber, the cross-chain gateway obtains a second identity identifier of any subscriber based on the digital certificate of any subscriber carried in the first subscription request; When there is an identity in the authorized subscriber identification set that matches the second identity, the cross-chain gateway determines that any one of the subscribers is the authorized subscriber that has been authorized and authenticated.
7. The method according to any one of claims 1 to 6, characterized in that: The cross-chain gateway determines an event subscription processing result of the first subscription request based on the multiple authorized cross-chain events included in the authorized cross-chain event set and the first identifier carried in the first subscription request, including: The cross-chain gateway obtains multiple authorized cross-chain event identifiers of multiple authorized cross-chain events in the authorized cross-chain event, wherein one authorized cross-chain event identifier corresponds to one authorized cross-chain event; When there is an authorized cross-chain event identifier in the authorized cross-chain event set that matches the first identifier, the cross-chain gateway determines that any subscriber has successfully subscribed to the first cross-chain event, and determines the event data of the first cross-chain event as the event subscription processing result of the first subscription request.
8. The method according to claim 7, characterized in that After the cross-chain gateway obtains multiple authorized cross-chain event identifiers of multiple authorized cross-chain events in the authorized cross-chain event, the method further includes: When there is no authorized cross-chain event identifier in the authorized cross-chain event set that matches the first identifier of the first cross-chain event, the cross-chain gateway determines that any subscriber fails to subscribe to the first cross-chain event, and determines the indication information of the failure to subscribe to the first cross-chain event as the event subscription processing result of the first subscription request.
9. The method according to claim 7, characterized in that: The cross-chain gateway returns the event subscription processing result to any subscriber, including: When the first business chain initiates a contract event, the cross-chain gateway determines that the contract event is the first cross-chain event initiated to any business chain, triggers the first business chain to initiate a cross-chain transaction to any business chain based on the first cross-chain event, and sends event data of successful subscription to the first cross-chain event to at least one subscriber who has successfully subscribed to the first cross-chain event.
10. A method for processing cross-chain event subscription, characterized in that: include: The authorized subscriber of the second business chain sends an authorization application request to the cross-chain gateway of the first business chain, triggering the cross-chain gateway to authenticate the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request; wherein the authorization application request is used to request the cross-chain gateway to authorize subscription to the cross-chain events of the first business chain; The authorized subscriber sends a first subscription request to the cross-chain gateway, and based on the first subscription request, requests the cross-chain gateway to subscribe to a first cross-chain event of the first business chain, where the first subscription request carries the digital certificate of the authorized subscriber and the first identifier of the first cross-chain event; The authorized subscriber obtains the event subscription processing result of the first subscription request returned based on the first identifier when the cross-chain gateway determines that the authorized subscriber is an authorized subscriber based on the digital certificate, and the event subscription processing result includes event data of the success of the first cross-chain event subscription, or indication information of the failure of the first cross-chain event subscription.
11. A cross-chain event subscription processing device, characterized in that: The device is applicable to a cross-chain gateway of a first service chain, and the device includes: An authorization module is used to, upon receiving an authorization application request sent by an authorized subscriber of the second business chain, authenticate the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request, wherein the authorization application request is used to request the cross-chain gateway to authorize subscription to cross-chain events of the first business chain; A cross-chain event set determination module, used to generate an authorized cross-chain event set of the authorized subscriber when the authorized subscriber passes the authorization authentication, wherein the authorized cross-chain event set includes a plurality of authorized cross-chain events that the authorized subscriber is authorized to subscribe to; A subscription processing module, configured to, upon receiving a first subscription request sent by any subscriber and determining that any subscriber is the authorized subscriber based on the digital certificate carried in the first subscription request, determine an event subscription processing result of the first subscription request based on a plurality of authorized cross-chain events included in the authorized cross-chain event set and a first identifier carried in the first subscription request, wherein the first subscription request is used to request subscription to a first cross-chain event of the first business chain, and the first identifier is an identifier of the first cross-chain event; A sending module is used to return the event subscription processing result to any subscriber, wherein the event subscription processing result includes event data indicating that the first cross-chain event subscription is successful, or indication information indicating that the first cross-chain event subscription fails.
12. A cross-chain event subscription processing device, characterized in that: The device is applicable to an authorized subscriber of a second service chain, and includes: An authorization application module is used to send an authorization application request to the cross-chain gateway of the first business chain, triggering the cross-chain gateway to perform authorization authentication on the authorized subscriber based on the digital certificate of the authorized subscriber carried in the authorization application request; wherein the authorization application request is used to request the cross-chain gateway to authorize subscription to the cross-chain events of the first business chain; A subscription request module, configured to send a first subscription request to the cross-chain gateway, and based on the first subscription request, request the cross-chain gateway to subscribe to a first cross-chain event of the first business chain, wherein the first subscription request carries the digital certificate of the authorized subscriber and the first identifier of the first cross-chain event; A subscription result acquisition module is used to obtain the event subscription processing result of the first subscription request returned based on the first identifier when the cross-chain gateway determines that the authorized subscriber is an authorized subscriber based on the digital certificate, and the event subscription processing result includes event data of the first cross-chain event subscription success, or indication information of the first cross-chain event subscription failure.
13. A computer device, characterized in that: include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a data communication function, the memory is used to store program code, and the processor is used to call the program code to execute the steps of the method described in any one of claims 1 to 9.
14. A computer device, characterized in that: include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a data communication function, the memory is used to store program code, and the processor is used to call the program code to execute the steps of the method according to claim 10.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 10 are executed.
