Transaction processing method and device, electronic equipment, storage medium and program product

By creating and subscribing to the first and second message queues in the blockchain relay, the centralization problem during the development of resource clients and blockchain relays is solved, enabling secure and convenient data transmission and resource reuse.

CN119003196APending Publication Date: 2024-11-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310573238.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-19
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In existing technologies, when the resource client and the blockchain relay are developed by the same company, the development workload is large and the message transmission is too centralized; when the resource client and the blockchain relay are developed by different companies, the login verification identity does not support connection reuse, resulting in a waste of blockchain relay resources.

Method used

By creating and subscribing to a first message queue and a second message queue in the blockchain relay, the first queue is created by the resource client and the second queue is created by the decentralized application, and data transmission is carried out using encrypted queue identifiers and decryption keys, ensuring security and resource reuse.

Benefits of technology

It improves the security of data transmission, reduces the possibility of information leakage, saves resources, supports message queue reuse for resource clients, and improves convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003196A_ABST
    Figure CN119003196A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a transaction processing method and device, electronic equipment and a computer readable storage medium, and relates to the field of block chains. The method comprises the steps that transaction information to be processed is sent to a first message queue in a block chain relay, so that a resource client bound with a decentralized application in advance obtains the transaction information from the first message queue, and a processing result of the transaction information is sent to a second message queue in the block chain relay; and obtaining a transaction processing result from the second message queue in the block chain relay according to the second queue identifier of the second message queue. According to the embodiment of the invention, the possibility of data transmission leakage is reduced, the message queue for one resource client can be reused, the message queue does not need to be reestablished when new transaction information is processed every time, the convenience is improved, the currently connected resource client can be effectively distinguished through the queue identifier, and resources are greatly saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology. Specifically, the present application relates to a transaction processing method, device, electronic device, computer-readable storage medium and computer program product. Background Art

[0002] In some related technologies, the resource client and blockchain relay are developed by the same company, which provides a software development kit (SDK) for decentralized application access. In this case, decentralized application developers must access a new SDK for each resource client they access, which is a large development workload, and the message transmission process is too centralized, with all aspects determined by the resource client developers.

[0003] In other related technologies, resource clients and blockchain relays are developed by different companies. The blockchain relay is only responsible for message forwarding and provides SDKs for centralized applications and resource clients to access. Both sides can communicate using the provided SDKs. In this case, users need to establish a connection before logging in, and identity verification is not supported when users log in. Connection reuse is not supported. Each time a decentralized application connects to a new resource client, a new connection must be created, which easily wastes resources of the blockchain relay. Summary of the invention

[0004] The embodiments of the present application provide a transaction processing method, device, electronic device, computer-readable storage medium and computer program product, which can solve the above-mentioned problems of the prior art. The technical solution is as follows:

[0005] According to a first aspect of an embodiment of the present application, a transaction processing method is provided, which is applied to a decentralized application, and the method includes:

[0006] Sending the transaction information to be processed to the first message queue in the blockchain relay, so that the resource client pre-bound to the decentralized application obtains the transaction information from the first message queue, and sends the processing result of the transaction information to the second message queue in the blockchain relay;

[0007] Obtaining a processing result of the transaction from the second message queue in the blockchain relay according to the second queue identifier of the second message queue;

[0008] The first message queue is created and subscribed by the resource client in the blockchain relay, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue;

[0009] The second message queue is created and subscribed by the decentralized application in the blockchain relay, the second queue identifier is notified to the resource client by the decentralized application through the blockchain relay after encryption, and the decryption key for decrypting the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay.

[0010] According to a second aspect of an embodiment of the present application, a transaction processing method is provided, which is applied to a resource client, and the method includes:

[0011] Obtaining transaction information to be processed from a first message queue in a blockchain relay, where the transaction information is sent by a decentralized application pre-bound to the resource client;

[0012] Processing the transaction information, and sending the processing result to a second message queue in the blockchain relay, so that the decentralized application obtains the processing result from the second message queue;

[0013] The first message queue is created and subscribed by the resource client in the blockchain relay, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue;

[0014] The second message queue is created and subscribed by the decentralized application in the blockchain relay, the second queue identifier of the second message queue is notified to the resource client by the resource client through the blockchain relay after encryption, and the decryption key for decrypting the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay.

[0015] According to a third aspect of an embodiment of the present application, a transaction processing system is provided, including a blockchain relay, a decentralized application executing the first aspect, and a resource client executing the second aspect.

[0016] According to a fourth aspect of an embodiment of the present application, a transaction processing device is provided, which is applied to a decentralized application, and the device includes:

[0017] A transaction information sending module, used to send the transaction information to be processed to the first message queue in the blockchain relay, so that the resource client pre-bound to the decentralized application obtains the transaction information from the first message queue, and sends the processing result of the transaction information to the second message queue in the blockchain relay;

[0018] a processing result receiving module, configured to obtain a processing result of the transaction from the second message queue in the blockchain relay according to the second queue identifier of the second message queue;

[0019] The first message queue is created and subscribed by the resource client in the blockchain relay, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue;

[0020] The second message queue is created and subscribed by the decentralized application in the blockchain relay, the second queue identifier is notified to the resource client by the decentralized application through the blockchain relay after encryption, and the decryption key for decrypting the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay.

[0021] According to a fifth aspect of an embodiment of the present application, a transaction processing device is provided, which is applied to a resource client, and the device includes:

[0022] A transaction information receiving module, used to obtain transaction information to be processed from a first message queue in a blockchain relay, wherein the transaction information is sent by a decentralized application pre-bound to the resource client;

[0023] A processing result sending module, used to process the transaction information and send the processing result to the second message queue in the blockchain relay, so that the decentralized application obtains the processing result from the second message queue;

[0024] The first message queue is created and subscribed by the resource client in the blockchain relay, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue;

[0025] The second message queue is created and subscribed by the decentralized application in the blockchain relay, the second queue identifier of the second message queue is notified to the resource client by the resource client through the blockchain relay after encryption, and the decryption key for decrypting the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay.

[0026] According to another aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the transaction processing method described in the first or second aspect.

[0027] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the transaction processing method described in the first or second aspect are implemented.

[0028] According to one aspect of an embodiment of the present application, a computer program product is provided, including a computer program, which implements the steps of the transaction processing method described in the first or second aspect when the computer program is executed by a processor.

[0029] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0030] By sending the transaction information to be processed to the first message queue in the blockchain relay, the first message queue is created and subscribed by the resource client, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue. Since the resource client has subscribed to the first message queue, it can obtain the transaction information from the first message queue and process it, and send the processing result of the transaction information to the second message queue in the blockchain relay. The second message queue is created and subscribed by the decentralized application, so when the resource client sends the processing result to the second message queue, the decentralized application can obtain the processing result. The second queue identifier of the second message queue is notified to the resource client by the decentralized application through the blockchain relay after encryption, which can improve the security of the second message queue, and the decryption key used to decrypt the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay, which can effectively prevent the blockchain relay from knowing the plaintext of the second queue identifier, further ensuring security. In this scheme, the message queue used by the decentralized application to send data (transaction information) is created by the resource client, and the message queue used to receive data (the processing result of the transaction information) is created by the decentralized application itself. On the one hand, different message queues are used for sending and receiving data. On the other hand, the two message queues are created by the decentralized application and the resource client respectively, which reduces the possibility of data transmission leakage. At the same time, the message queue for a resource client can be reused, and there is no need to re-establish the message queue every time new transaction information is processed, which improves convenience. At the same time, the queue identifier can effectively distinguish the currently connected resource client, which greatly saves resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in describing the embodiments of the present application.

[0032] Figure 1 A schematic diagram of the structure of a transaction processing system provided in an embodiment of the present application.

[0033] Figure 2 A flowchart of a transaction processing method provided in an embodiment of the present application;

[0034] Figure 3 An interactive schematic diagram of a transaction processing method provided in an embodiment of the present application;

[0035] Figure 4 A flowchart of a transaction processing method performed by a decentralized application provided in an embodiment of the present application;

[0036] Figure 5 A schematic diagram of an interactive process of a transaction processing method according to another embodiment of the present application;

[0037] Figure 6a to Figure 6d A schematic diagram of an interface of a decentralized application provided in an embodiment of the present application;

[0038] Figure 7 A flowchart of a transaction processing method provided in an embodiment of the present application;

[0039] Figure 8 A schematic diagram of an implementation environment of the present application embodiment applied to a digital collection management scenario;

[0040] Fig. 9 This is an interactive diagram of a transaction processing system according to an embodiment of the present application;

[0041] Fig.10 A schematic diagram of the structure of a transaction processing device provided in an embodiment of the present application;

[0042] Fig.11 A schematic diagram of the structure of a transaction processing device provided in an embodiment of the present application;

[0043] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0045] It is understood that, unless specifically stated, the singular forms "one", "an" and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we call an element "connected" or "coupled" to another element, the one element can be directly connected or coupled to the other element, or it can refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used here can include wireless connection or wireless coupling. The term "and / or" used here indicates at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or as "B", or as "A and B".

[0046] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0047] First, several terms involved in this application are introduced and explained:

[0048] DAPP: Decentralized application, composed of front-end interface and smart contract. The demander of blockchain transaction (hereinafter referred to as demander) usually does not interact with the blockchain directly, but operates through the application interface of DAPP, applies for resource client to sign the transaction, and forwards the data on the chain by calling the smart contract in the background. For example, a DAPP application that sells digital collections will deploy a smart contract on the blockchain, and the contract will manage the digital collections. The demander can call the private key in the resource client to sign a transaction to purchase the digital collection. Common front-end applications are web pages or APPs. In web3, the demander logs in to the decentralized application through the resource client authorization, unlike web2, which uses mobile phone numbers, QQ, WeChat, etc. to log in.

[0049] Resource client: can be used to implement resource management business functions, and based on the resource management business functions, realize the communication connection with the decentralized application client.

[0050] A resource client is a tool for managing and storing digital resources. For example, digital resources can be transferred to other accounts based on the resource client, and digital resources transferred from other accounts can be received based on the resource client. The resource client can be a hardware device or a software program. In this application, the resource client of the target object can establish a communication connection with the decentralized application client to implement related operations such as authorized login of the target object.

[0051] It is understandable that with the widespread deployment of various decentralized applications on the blockchain, the activities of demanders on the blockchain have increased. Generally, when using decentralized applications, demanders can use blockchain key management tools to log in. The address in the blockchain key management tool corresponds to a demander on the blockchain. The decentralized application can obtain the address from the key management tool through some interfaces, in order to solve the problem that the Dapp background cannot trust the address used when logging in to the decentralized application.

[0052] The resource client can keep the private key of the demander's account on the blockchain. The demander's identity is identified by the private key on the blockchain, and the demander's assets are managed by the private key. For operations such as transfer, destruction, and transfer, only the private key can be used to sign and confirm the operation. The signed transaction can be sent directly to the blockchain node by the resource client or DAPP. Only the correct transaction blockchain will be executed, and the forged signature blockchain will be rejected and prompted to fail.

[0053] In some related technologies, the resource client and blockchain relay are developed by the same company, which provides a software development kit (SDK) for decentralized application access. In this case, decentralized application developers must access a new SDK for each resource client they access, which is a large development workload, and the message transmission process is too centralized, with all aspects determined by the resource client developers.

[0054] In other related technologies, resource clients and blockchain relays are developed by different companies. The blockchain relay is only responsible for message forwarding. It provides an SDK for centralized applications and resource clients to access. Both sides can communicate using the provided SDK. In this case, users need to establish a connection before logging in, and identity verification is not supported when users log in. Connection reuse is not supported. Every time a decentralized application connects to a new resource client, it has to create a new connection, which easily causes a waste of blockchain relay resources. In addition, since the blockchain relay is simply forwarding messages in this way, it is difficult to gain benefits from it, and there is a lack of research and development motivation for blockchain relay developers. Moreover, when applying to log in to the blockchain key management tool in this way, the address obtained from the resource client is not credible because it does not have a signature, and a subsequent signature is required to verify the identity, and the transaction process is cumbersome.

[0055] The transaction processing method, device, electronic device, computer-readable storage medium and computer program product provided in this application are intended to solve the above technical problems in the prior art.

[0056] It should be noted that in the specific implementation of this application, relevant data such as information of the demander is involved. When the following embodiments of this application are applied to specific products or technologies, the permission or consent of the demander is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0057] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to or be combined with each other, and the same terms, similar features, and similar implementation steps in different embodiments will not be described repeatedly.

[0058] Figure 1 The structure diagram of a transaction processing system provided by an embodiment of the present application is exemplarily shown. Figure 1 As shown, the transaction processing system 100 may be a blockchain-based system, which is not limited in the embodiments of the present application.

[0059] The transaction processing system 100 includes: a terminal 120 and a blockchain network 140. The terminal 120 may be a mobile phone, a tablet computer, an e-book reader, smart glasses, a smart watch, an MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image compression standard audio layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, dynamic image compression standard audio layer 4), a notebook computer, a laptop, a vehicle-mounted terminal, a desktop computer, and the like.

[0060] The terminal 120 can install and run a decentralized application and a resource management client. The decentralized application can be used to manage digital collections, and the resource client can keep the private key of the demander's account on the blockchain.

[0061] It should be understood that the number of the above terminals may be more or less. For example, the above terminal may be only one, or the above terminals may be dozens or hundreds, or more, in which case the above transaction processing system also includes other terminals 160. The embodiment of the present application does not limit the number of terminals and device types.

[0062] The blockchain network 140 includes a distributed system formed by connecting multiple nodes 110 through network communication, wherein the node 110 can be any form of computing device (such as a server, user terminal, etc.) connected to the network.

[0063] The blockchain network 140 is connected to several decentralized applications. Specifically, the nodes in the blockchain network can communicate with the servers corresponding to the decentralized applications. The client in the terminal communicates with other nodes 110 in the blockchain network, and then logs in to the decentralized applications of the blockchain network through the blockchain network 140.

[0064] In one embodiment, the node 110 may also include an application operator node, which is a computer device where the operator is located. The application operator publishes a decentralized application based on a client in the computer device and logs into the blockchain network. Publishing a decentralized application in the blockchain network is to connect the decentralized application to the blockchain network. Thus, the client where the demander is located can log in to the connected decentralized application after logging into the blockchain network.

[0065] In one embodiment, node 110 may also be a server of a decentralized application. That is to say, the server of the decentralized application, on the one hand, acts as a node in the blockchain network to control the demander's login to the decentralized application, and on the other hand, can also provide services to the client after the demander logs in to the decentralized application.

[0066] In one embodiment, the node 110 may also include a resource node, which is a computer device that stores the virtual resources of the demander. After logging into the blockchain network, the resource client of the demander can manage its own virtual resources, such as completing transactions created by the demander on a decentralized application.

[0067] The nodes 110 form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP). In this system, any machine such as a server or a terminal can join and become a node. The node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer. The terminal 120 can be connected to the blockchain network 140 through a communication network. Optionally, the communication network can be a wireless network or a wired network.

[0068] Optionally, the wireless network or wired network that the terminal 120 is connected to the blockchain network uses standard communication technology and / or protocols. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or any combination of a virtual private network). In some embodiments, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.

[0069] The present application embodiment provides a transaction processing method, such as Figure 2 As shown, applied to decentralized applications, the method includes:

[0070] S101. Send the transaction information to be processed to the first message queue in the blockchain relay, so that the resource client pre-bound to the decentralized application obtains the transaction information from the first message queue, and sends the processing result of the transaction information to the second message queue in the blockchain relay.

[0071] A message queue can be understood as a channel for two objects to transmit data through a blockchain relay. In an embodiment of the present application, a message queue can be created in a blockchain relay by a decentralized application or by a resource client.

[0072] When a message queue is created, it will get the corresponding queue identifier. Only when an object obtains the queue identifier and subscribes to the message queue based on the queue identifier can it obtain the messages sent in the message queue by the creator of the message queue or other objects subscribing to the message queue, thereby ensuring the security of data transmission to a certain extent.

[0073] The first message queue of the embodiment of the present application is created and subscribed by the resource client in the blockchain relay. By subscribing to the first message queue, when there is data sent by other subscribers in the first message queue, the resource client can obtain the data in a timely manner. In addition, since the first message queue itself is created by the resource client, if the resource client wants to obtain data from the first message queue, it needs to send the first queue identifier of the first message queue to other objects, that is, decentralized applications.

[0074] The first queue identifier in the embodiment of the present application may be randomly generated.

[0075] The first queue identifier of the first message queue in the embodiment of the present application is notified to the decentralized application by the resource client through the second message queue.

[0076] The second message queue is created and subscribed by the decentralized application in the blockchain relay. By subscribing to the second message queue, the decentralized application can obtain the data from the second message queue in a timely manner when other objects, such as resource clients, send data in the second message queue.

[0077] The second queue identifier in this embodiment of the present application may be randomly generated.

[0078] The second queue identifier is notified to the resource client by the decentralized application through the blockchain relay after encryption, that is, the decentralized application notifies the resource client of the encrypted second queue identifier through the blockchain relay. At the same time, the decryption key used to decrypt the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay. The decryption key is notified to the resource client in a manner other than the blockchain relay, which can prevent the blockchain relay from knowing the plain text of the second queue identifier, thereby ensuring the security of the transaction.

[0079] In one embodiment, the embodiment of the present application can use a symmetric encryption key for encryption and decryption, that is, the encryption key for encryption and the decryption key for decryption are the same.

[0080] It should be understood that when the decentralized application informs the resource client of the decryption key and obtains the encrypted second queue identifier in a manner other than blockchain relay, the encrypted second queue identifier can be decrypted using the decryption key to obtain the second queue identifier. After the resource client processes the transaction information, the processing result can be sent to the second message queue.

[0081] S102. Obtain a processing result of the transaction from the second message queue in the blockchain relay according to the second queue identifier of the second message queue.

[0082] The decentralized application subscribes to the second message queue. When the resource client processes the transaction information and sends the processing result to the second message queue, the decentralized application can obtain the processing result from the second message queue immediately.

[0083] See also Figure 3 , which exemplarily shows an interactive schematic diagram of a transaction processing method according to an embodiment of the present application, as shown in the figure, including:

[0084] a. The decentralized application sends the pending transaction information to the first message queue pre-created in the blockchain relay;

[0085] b. The resource client obtains transaction information from the subscribed first message queue;

[0086] c. The resource client returns a response message to the blockchain relay, indicating that the transaction information has been obtained;

[0087] d. The resource client sends the result of the transaction information processing, which can be the signed transaction information or the signature rejection information, to the second message queue pre-created in the blockchain relay;

[0088] e. The decentralized application obtains the processing result from the subscribed second message queue;

[0089] f. The decentralized application returns a response message to the blockchain relay, indicating that the processing result has been obtained.

[0090] The transaction processing method of the embodiment of the present application is applied to a decentralized application, by sending the transaction information to be processed to the first message queue in the blockchain relay, the first message queue is created and subscribed by the resource client, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue. Since the resource client has subscribed to the first message queue, it can obtain the transaction information from the first message queue and process it, and send the processing result of the transaction information to the second message queue in the blockchain relay. The second message queue is created and subscribed by the decentralized application, so when the resource client sends the processing result to the second message queue, the decentralized application can obtain the processing result. The second queue identifier of the second message queue is notified to the resource client by the decentralized application through the blockchain relay after encryption, which can improve the security of the second message queue, and the decryption key used to decrypt the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay, which can effectively prevent the blockchain relay from knowing the plaintext of the second queue identifier, further ensuring security. In this scheme, the message queue used by the decentralized application to send data (transaction information) is created by the resource client, and the message queue used to receive data (the processing result of the transaction information) is created by the decentralized application itself. On the one hand, different message queues are used for sending and receiving data. On the other hand, the two message queues are created by the decentralized application and the resource client respectively, which reduces the possibility of information leakage in data transmission. At the same time, the message queue for a resource client can be reused, and there is no need to re-establish the message queue every time new transaction information is processed, which improves convenience. At the same time, the queue identifier can effectively distinguish the currently connected resource client, which greatly saves resources.

[0091] Based on the above embodiments, as an optional embodiment, the transaction to be processed is sent to the first message queue in the blockchain relay, and the process also includes:

[0092] S201, connecting to the blockchain relay, creating the second message queue and the third message queue in the blockchain relay, and subscribing to the second message queue;

[0093] S202, obtaining encrypted information, and sending the encrypted information to the third message queue, wherein the encrypted information includes the encrypted second queue identifier;

[0094] S203. The third queue identifier of the third message queue and the decryption key of the encrypted information are informed to the resource client in a manner other than the blockchain relay, so that the resource client subscribes to the third message queue in the blockchain relay according to the third queue identifier, decrypts the encrypted information in the third message queue according to the decryption key, and determines to send data to the decentralized application through the second message queue.

[0095] Before sending the transaction information to be processed, the embodiment of the present application also needs to inform the resource client of the second queue identifier of the second message queue. Specifically, after connecting to the blockchain relay, the decentralized application of the present application creates two message queues in the blockchain intermediary: the second message queue and the third message queue. By creating the third message queue, the second queue identifier is sent to the third message queue, so that the resource client obtains the second queue identifier from the third message queue by subscribing to the third message queue.

[0096] The third queue identifier in this embodiment of the present application can be randomly generated.

[0097] It should be noted that in order to improve the security of data transmission, in the embodiment of the present application, the third queue identifier and decryption key of the third message queue are notified to the resource client in a manner other than the blockchain relay, which can prevent the blockchain relay from obtaining the plaintext of the third queue identifier and improve security.

[0098] See also Figure 4 , which exemplarily shows a flow chart of a transaction processing method executed by a decentralized application in an embodiment of the present application, as shown in the figure, including:

[0099] S301. The decentralized application connects to the blockchain relay, creates the second message queue and the third message queue in the blockchain relay, and subscribes to the second message queue.

[0100] S302: The decentralized application obtains encrypted information, where the encrypted information includes an encrypted second queue identifier.

[0101] S303: The decentralized application sends the encrypted information to the third message queue.

[0102] S304. The decentralized application informs the resource client of the third queue identifier of the third message queue and the decryption key of the encrypted information in a manner other than the blockchain relay.

[0103] It should be noted that step S303 may be executed before step S304, or after step S304, or simultaneously with step S304, which is not specifically limited in the embodiments of the present application.

[0104] The resource client subscribes to the third message queue in the blockchain relay according to the third queue identifier, decrypts the encrypted information in the third message queue according to the decryption key, and determines to send data to the decentralized application through the second message queue.

[0105] The embodiment of the present application implements the decentralized application notifying the resource client of the second message identifier, laying the foundation for the subsequent resource client to send data to the decentralized application based on the second message queue.

[0106] On the basis of the above embodiments, as an optional embodiment, the encrypted information also includes an encrypted text to be signed, and the text to be signed includes information of the decentralized application (such as the website, application name, user account information, etc.) and a randomly generated signature string. If the resource client signs the text to be signed (specifically, it can sign the signature string), it means that a binding relationship is established with the decentralized application, and subsequent transactions on the decentralized application can be paid (that is, processed) by the resource client.

[0107] That is to say, the resource client of the embodiment of the present application is also used to sign the text to be signed obtained by decryption, create and subscribe to the first message queue in the blockchain relay, and send the first queue identifier and the signed text to the second message queue.

[0108] The resource client sends the first queue identifier and the signed text to the second message queue, so that only the decentralized application of the embodiment of the present application can obtain the first queue identifier and the signed text, thereby ensuring the security of data transmission.

[0109] In the embodiment of the present application, the third queue identifier of the third message queue and the decryption key corresponding to the encrypted information are notified to the resource client in a manner other than the blockchain relay, and then the following steps are further included:

[0110] The signed text is verified through the decentralized application background, and if the verification passes, it is determined to be bound to the resource client.

[0111] The decentralized application of the embodiment of the present application subscribes to the second message queue. When the resource client transmits the first queue identifier and the signed text in the second message queue, the first queue identifier and the signed text can be obtained. The decentralized application sends the signed text to the decentralized application background, and the decentralized application background verifies the signed text. If the verification passes, it is determined to be bound to the resource client, and subsequent transaction information can be sent to the resource client through the first message queue.

[0112] See also Figure 5, which exemplarily shows an interactive flow diagram of a transaction processing method according to another embodiment of the present application, as shown in the figure, including:

[0113] S401. The decentralized application connects to the blockchain relay, creates the second message queue and the third message queue in the blockchain relay, and subscribes to the second message queue.

[0114] S402: The decentralized application obtains encrypted information, where the encrypted information includes an encrypted second queue identifier and an encrypted text to be signed.

[0115] S403: The decentralized application sends the encrypted information to the third message queue.

[0116] S404. The decentralized application informs the resource client of the third queue identifier of the third message queue and the decryption key of the encrypted information in a manner other than blockchain relay.

[0117] S405. The resource client subscribes to the third message queue in the blockchain relay according to the third queue identifier, decrypts the encrypted information in the third message queue according to the decryption key, and obtains the second queue identifier and the text to be signed.

[0118] S406: The resource client signs the text to be signed to obtain the signed text;

[0119] S407: The resource client creates and subscribes to the first message queue in the blockchain relay, and sends the first queue identifier and the signed text to the second message queue;

[0120] S408: The decentralized application obtains the first queue identifier and the signed text from the second message queue, and determines to subsequently transmit the transaction information to the first message queue for receipt by the resource client;

[0121] S409: The decentralized application verifies the signed text through the decentralized application background. If the verification passes, it is determined to be bound to the resource client.

[0122] On the basis of the above embodiments, the embodiment of the present application notifies the resource client of the decryption key in a manner including:

[0123] 1) Generate graphic code information, wherein the graphic code includes the decryption key.

[0124] The graphic coding information in the embodiment of the present application may be a QR code, that is, a decryption key is written in the QR code, and the resource client obtains the decryption key by scanning the QR code.

[0125] For example, when the resource client and the graphic coding information are in the same terminal, after the decentralized application generates a QR code including a decryption key, the resource client saves the QR code locally in the terminal. When the resource client has permission to read the storage space of the terminal, the resource client can obtain the QR code from the local terminal and obtain the decryption key by parsing the QR code.

[0126] When the resource client and the graphic coding information are in different terminals, the decentralized application can generate a QR code including a decryption key and display it. When the resource client has the authority to call the terminal's camera, the resource client can scan the QR code, parse the QR code, and obtain the decryption key.

[0127] 2) If it is determined that the user has the authority to call the resource client, the user calls the resource client and sends the decryption key as a calling parameter to the resource client.

[0128] When the resource client and the decentralized application are in the same terminal, the decryption key can also be sent to the resource client based on the calling mechanism of the application. Specifically, when the decentralized application determines that it has the authority to call the resource client, it calls the resource client and sends the decryption key to the resource client as a calling parameter.

[0129] See also Figure 6a , which exemplarily shows a schematic diagram of the first interface of the decentralized application of the embodiment of the present application. As shown in the figure, the first interface 601 displays some digital collections 6011 that can be purchased, and each digital collection displays price information 6012. When the demander clicks on the price information, the decentralized application connects to the blockchain relay and generates a QR code including a decryption key, such as Figure 6b As shown, the interface is a second interface 602 generated in response to clicking on the price information. In addition to the QR code 6021 generated by the decentralized application, the second interface also displays various resource clients 6022 that can be called in the terminal. When the demander selects one of the resource clients, the resource client is connected to the blockchain relay, and a pop-up window on the terminal prompts the demander that a signature is required to verify the identity, such as Figure 6cAs shown, the interface is a third interface 603 generated in response to selecting a resource client. The third interface 603 includes a pop-up window 6031, which prompts the demander that the decentralized application is not currently bound to the resource client and needs to obtain a signature to verify the identity. When the demander clicks the consent control 6032, the decentralized application sends the text to be signed to the resource client through the above method of the embodiment of the present application. The resource client returns the signed text to the decentralized application through the blockchain relay. The decentralized application sends the signed text to the decentralized application background to verify the signed text. After the verification is passed, the identity is confirmed clearly, as shown in FIG. Figure 6d As shown, this interface is the fourth interface 604 generated after the verification is passed. The fourth interface shows that the decentralized application and the resource client are in a bound state, and the connection established through the blockchain relay will remain unbroken unless one party (the resource client or the decentralized application) actively shuts it down.

[0130] Based on the above embodiments, as an optional embodiment, if it is determined that the user has the authority to call the resource client, calling the resource client includes:

[0131] If it is determined that the authority to call multiple candidate resource clients is available, a target resource client is determined from the multiple candidate resource clients based on a predetermined rule, and the target resource client is called.

[0132] That is to say, when a decentralized application and multiple resource clients are installed on a terminal of an embodiment of the present application, and the decentralized application has the authority to call multiple candidate resource clients, some rules for determining the target resource client can be pre-configured so that the target resource client can stand out from multiple candidate resource clients, and then a binding between the decentralized application and the target resource client is established to improve the exposure rate of the target resource client.

[0133] In some embodiments, bids from various resource clients may be obtained in advance, and the resource client with the highest bid among the candidate resource clients may be used as the target resource client.

[0134] Based on the above embodiments, as an optional embodiment, obtaining the first queue identifier and the signed text from the second message queue further includes:

[0135] The third message queue is closed in the blockchain relay.

[0136] The third message queue of the embodiment of the present application is used to inform the resource client of encrypted information, that is, the encrypted second queue identifier and the text to be signed, and because the decryption key is notified to the resource client by means other than blockchain relay, it is possible that multiple resource clients obtain the decryption key. Therefore, after obtaining the first message queue and the signed text from the second message queue, the present application closes the third message queue in time to avoid binding multiple resource clients and decentralized applications.

[0137] On the basis of the above embodiments, when the decentralized application wants to bind other resource clients, the first message queue and the second message queue for data transmission with the bound resource client will continue to be maintained, and the connection established between the decentralized application and the blockchain relay will continue to be reused, except that the fourth message queue corresponding to the first message queue in the above embodiment, the fifth message queue corresponding to the second message queue in the above embodiment, and the sixth message queue corresponding to the third message queue in the above embodiment will be regenerated. Connection reuse can reduce the resource loss of the blockchain relay.

[0138] The present application also provides a transaction processing method, such as Figure 7 As shown, it is applied to the resource client and includes:

[0139] S501. Obtain transaction information to be processed from a first message queue in a blockchain relay, where the transaction information is sent by a decentralized application pre-bound to the resource client.

[0140] A message queue can be understood as a channel for two objects to transmit data through a blockchain relay. In an embodiment of the present application, a message queue can be created in a blockchain relay by a decentralized application or by a resource client.

[0141] When a message queue is created, it will get the corresponding queue identifier. Only when an object obtains the queue identifier and subscribes to the message queue based on the queue identifier can it obtain the messages sent in the message queue by the creator of the message queue or other objects subscribing to the message queue, thereby ensuring the security of data transmission to a certain extent.

[0142] The first message queue of the embodiment of the present application is created and subscribed by the resource client in the blockchain relay. By subscribing to the first message queue, when there is data sent by other subscribers in the first message queue, the resource client can obtain the data in a timely manner. In addition, since the first message queue itself is created by the resource client, if the resource client wants to obtain data from the first message queue, it needs to send the first queue identifier of the first message queue to other objects, that is, decentralized applications.

[0143] The first queue identifier of the first message queue in the embodiment of the present application is notified to the decentralized application by the resource client through the second message queue.

[0144] The second message queue is created and subscribed by the decentralized application in the blockchain relay. By subscribing to the second message queue, the decentralized application can obtain the data from the second message queue in a timely manner when other objects, such as resource clients, send data in the second message queue.

[0145] The second queue identifier is notified to the resource client by the decentralized application through the blockchain relay after encryption, that is, the decentralized application notifies the resource client of the encrypted second queue identifier through the blockchain relay. At the same time, the decryption key used to decrypt the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay. The decryption key is notified to the resource client in a manner other than the blockchain relay, which can prevent the blockchain relay from knowing the plain text of the second queue identifier, thereby ensuring the security of the transaction.

[0146] It should be understood that when the decentralized application informs the resource client of the decryption key and obtains the encrypted second queue identifier in a manner other than blockchain relay, the encrypted second queue identifier can be decrypted using the decryption key to obtain the second queue identifier. After the resource client processes the transaction information, the processing result can be sent to the second message queue.

[0147] S502: Process the transaction information, and send the processing result to the second message queue in the blockchain relay, so that the decentralized application obtains the processing result from the second message queue.

[0148] The decentralized application subscribes to the second message queue. When the resource client processes the transaction information and sends the processing result to the second message queue, the decentralized application can obtain the processing result from the second message queue immediately.

[0149] The transaction processing method of the embodiment of the present application is applied to the resource client, by obtaining the transaction information to be processed from the first message queue in the blockchain relay, the transaction information is sent by the decentralized application pre-bound to the resource client, the first message queue is created and subscribed by the resource client, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue. Since the resource client subscribes to the first message queue, it can obtain the transaction information from the first message queue and process it, and send the processing result of the transaction information to the second message queue in the blockchain relay. The second message queue is created and subscribed by the decentralized application, so when the resource client sends the processing result to the second message queue, the decentralized application can obtain the processing result. The second queue identifier of the second message queue is notified to the resource client by the decentralized application through the blockchain relay after encryption, which can improve the security of the second message queue, and the decryption key used to decrypt the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay, which can effectively prevent the blockchain relay from knowing the plaintext of the second queue identifier, further ensuring security. In this scheme, the message queue used by the decentralized application to send data (transaction information) is created by the resource client, and the message queue used to receive data (the processing result of the transaction information) is created by the decentralized application itself. On the one hand, different message queues are used for sending and receiving data. On the other hand, the two message queues are created by the decentralized application and the resource client respectively, which reduces the possibility of information leakage in data transmission. At the same time, the message queue for a resource client can be reused, and there is no need to re-establish the message queue every time new transaction information is processed, which improves convenience. At the same time, the queue identifier can effectively distinguish the currently connected resource client, which greatly saves resources.

[0150] Based on the above embodiments, as an optional embodiment, the transaction to be processed is obtained from the first message queue in the blockchain relay, and the process also includes:

[0151] Obtaining a third queue identifier and a decryption key of a third message queue in a manner other than the blockchain relay; the third message queue is created by the decentralized application in the blockchain relay, the third message queue includes encrypted information of the decentralized application, and the encrypted information includes the encrypted second queue identifier;

[0152] Subscribe to the third message queue in the blockchain relay according to the third queue identifier, decrypt the encrypted information in the third message queue, and determine the second message queue for sending data to the decentralized application according to the second queue identifier obtained by decryption.

[0153] Before obtaining the transaction information to be processed, the embodiment of the present application also needs to obtain the second queue identifier of the second message queue notified by the decentralized application. Specifically, after connecting to the blockchain relay, the decentralized application of the present application creates two message queues in the blockchain intermediary: the second message queue and the third message queue. By creating the third message queue, the second queue identifier is sent to the third message queue, so that the resource client obtains the second queue identifier from the third message queue by subscribing to the third message queue.

[0154] It should be noted that in order to improve the security of data transmission, in the embodiment of the present application, the third queue identifier and decryption key of the third message queue are notified to the resource client in a manner other than the blockchain relay, which can prevent the blockchain relay from obtaining the plaintext of the third queue identifier and improve security.

[0155] The embodiment of the present application implements the decentralized application notifying the resource client of the second message identifier, laying the foundation for the subsequent resource client to send data to the decentralized application based on the second message queue.

[0156] Based on the above embodiments, as an optional embodiment, the encrypted information also includes an encrypted text to be signed; the text to be signed includes information of the decentralized application (such as the website, application name, user account information, etc.). If the resource client signs the text to be signed, it means that a binding relationship is established with the decentralized application, and subsequent transactions on the decentralized application can be paid (i.e. processed) by the resource client.

[0157] Decrypting the encrypted information in the third message queue, and then further comprising:

[0158] Obtaining the text to be signed;

[0159] Signing the text to be signed to obtain a signed text;

[0160] Create and subscribe to the first message queue in the blockchain relay, and send the first queue identifier and the signed text to the second message queue.

[0161] That is to say, the resource client of the embodiment of the present application is also used to sign the text to be signed obtained by decryption, create and subscribe to the first message queue in the blockchain relay, and send the first queue identifier and the signed text to the second message queue.

[0162] The resource client sends the first queue identifier and the signed text to the second message queue, so that only the decentralized application of the embodiment of the present application can obtain the first queue identifier and the signed text, thereby ensuring the security of data transmission.

[0163] Figure 8801 is a schematic diagram of an implementation environment for a digital collection management scenario provided by an embodiment of the present invention. The implementation environment includes: a server 801 and multiple terminals 802.

[0164] Among them, multiple servers 801 can be configured with the same blockchain, that is, the multiple servers 801 can form a blockchain system, and each server 801 is a blockchain node in the blockchain system. The system may include servers of various institutions in the alliance. For example, the multiple servers 801 can be nodes corresponding to digital collection merchants in the blockchain system, and the multiple terminals 802 can establish communication connections with the multiple servers 801 through the private network purchased by the digital collection merchant in the blockchain system.

[0165] The multiple servers 801 can provide account management services for the demander, which may specifically include account registration services, account recharge services, and digital collection transaction services. Taking terminal 802 as an example, when the demander needs to register an account, the terminal 802 can send a registration request to the multiple servers 801, which will verify the demander based on the registration request, and return the account identifier to the terminal 802 after the verification, so that the demander can log in to the account based on the account identifier. When the demander needs to recharge the account, the terminal 802 can send a recharge request to the multiple servers 801, and the multiple servers 801 deduct the amount of the corresponding value of the account bound to the account identifier based on the target resource value of the virtual resource to be recharged. When the demander's account and other accounts need to trade digital collections, the terminal 802 (or other terminals where the demander is located) can also send a digital collection transaction request to the multiple servers 801, and the multiple servers 801 transfer the ownership of digital collections and virtual resources between the two demander accounts based on the digital collection transaction request.

[0166] At the same time, when executing the above-mentioned account registration, account recharge and digital collection transaction process, the multiple servers 801 can also store the account information and transaction records involved in the account registration, account recharge and digital collection transaction in the blocks of the blockchain respectively. The subsequent demander can also recover the stolen account and trace the transaction records based on the block, thereby ensuring the reliability and security of account registration, account recharge and digital collection transaction.

[0167] It should be noted that the transaction processing method of the embodiment of the present application can be applied to the blockchain node of the blockchain system, which can be the node corresponding to the digital collection merchant in the blockchain system, and is used to provide the above-mentioned account registration service, account recharge service and digital collection transaction service to the demand side.

[0168] In an embodiment of the present application, the demander logs in to the decentralized application 8021 and the resource client 8022 based on the terminal 702, and the server 801 includes a server serving as a blockchain relay for the decentralized application 8021 and the resource client 8022 to subscribe to and create a message queue.

[0169] For example, a certain decentralized application 8021 logged in by the demander based on the terminal 802 can be used to manage digital collections. The decentralized application 8021 obtains the latest and tradable digital collections from the server 801 and displays them to the demander, and obtains the digital collections that the demander already owns from the server 801 and displays them to the demander. The demander selects the digital collection to be purchased on the decentralized application 8021, and the decentralized application 8021 generates transaction information to be processed, which includes the collection information of the digital collection to be purchased and the account of the demander. The decentralized application 8021 sends the transaction information to be processed to the first message queue in the blockchain relay, and the resource client 8022 pre-bound to the decentralized application 8021 obtains the transaction information from the first message queue, and sends the processing result of the transaction information to the second message queue in the blockchain relay. The decentralized application 8021 obtains the processing result of the transaction from the second message queue in the blockchain relay according to the second queue identifier of the second message queue. For example, if the processing result is a successful transaction, the demander is reminded on the terminal 802 that he has successfully owned the digital collection.

[0170] See also Fig. 9 , which exemplarily shows an interactive schematic diagram of a transaction processing system according to an embodiment of the present application, as shown in the figure,

[0171] S601, the decentralized application connects to the blockchain relay, creates the second message queue and the third message queue in the blockchain relay, and subscribes to the second message queue, where the second queue identifier and the third queue identifier are both randomly generated;

[0172] S602: The decentralized application obtains encrypted information, where the encrypted information includes an encrypted second queue identifier and an encrypted text to be signed, where the text to be signed includes information of the decentralized application and a randomly generated signature string;

[0173] S603, the decentralized application sends the encrypted information to the third message queue;

[0174] S604: The decentralized application generates a QR code, which includes a third queue identifier of the third message queue and a decryption key for the encrypted information. The resource client scans the QR code to obtain the third queue identifier and the decryption key for the encrypted information.

[0175] S605: The resource client subscribes to the third message queue in the blockchain relay according to the third queue identifier, decrypts the encrypted information in the third message queue according to the decryption key, and obtains the second queue identifier and the text to be signed;

[0176] S606. The resource client returns a response message to the blockchain relay, indicating that the data in the third message queue has been obtained;

[0177] S607: Display a prompt message in the interface of the decentralized application, requesting the application user to confirm whether to establish a connection between the resource client and the decentralized application;

[0178] S608: In response to determining to establish a connection between the resource client and the decentralized application, the resource client signs the text to be signed;

[0179] S609: The resource client creates and subscribes to the first message queue in the blockchain relay, and sends the first queue identifier and the signed text to the second message queue;

[0180] S610, the decentralized application obtains the first queue identifier and the signed text from the second message queue;

[0181] S611, the decentralized application returns a response message to the blockchain relay, indicating that the data in the second message queue is obtained;

[0182] S612: Verify the signed text through the decentralized application background, and if the verification passes, determine to bind with the resource client;

[0183] S613, the decentralized application sends the transaction information to be processed to the first message queue in the blockchain relay;

[0184] S614: The resource client obtains transaction information from the subscribed first message queue;

[0185] S615. The resource client sends the result of the transaction information processing, which may be the signed transaction information or the signature rejection information, to the second message queue pre-created in the blockchain relay.

[0186] S616: The decentralized application obtains the processing result from the subscribed second message queue.

[0187] The present application embodiment provides a transaction processing device, such as Fig.10 As shown, the transaction processing device is applied to a decentralized application and may include: a transaction information sending module 1001 and a processing result receiving module 1002, wherein:

[0188] The transaction information sending module 1001 is used to send the transaction information to be processed to the first message queue in the blockchain relay, so that the resource client pre-bound to the decentralized application obtains the transaction information from the first message queue, and sends the processing result of the transaction information to the second message queue in the blockchain relay;

[0189] A processing result receiving module 1002 is used to obtain a processing result of the transaction from the second message queue in the blockchain relay according to the second queue identifier of the second message queue;

[0190] The first message queue is created and subscribed by the resource client in the blockchain relay, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue;

[0191] The second message queue is created and subscribed by the decentralized application in the blockchain relay, the second queue identifier is notified to the resource client by the decentralized application through the blockchain relay after encryption, and the decryption key for decrypting the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay.

[0192] The device of the embodiment of the present application can execute the transaction processing method on the decentralized application side provided by the embodiment of the present application. The implementation principle is similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the transaction processing method on the decentralized application side of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0193] The present application embodiment provides a transaction processing device, such as Fig.11 As shown, the transaction processing device is applied to a resource client and may include: a transaction information receiving module 1101 and a processing result sending module 1102, wherein:

[0194] The transaction information receiving module 1101 is used to obtain the transaction information to be processed from the first message queue in the blockchain relay, where the transaction information is sent by the decentralized application pre-bound to the resource client;

[0195] A processing result sending module 1102 is used to process the transaction information and send the processing result to the second message queue in the blockchain relay, so that the decentralized application obtains the processing result from the second message queue;

[0196] The first message queue is created and subscribed by the resource client in the blockchain relay, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue;

[0197] The second message queue is created and subscribed by the decentralized application in the blockchain relay, the second queue identifier of the second message queue is notified to the resource client by the resource client through the blockchain relay after encryption, and the decryption key for decrypting the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay.

[0198] The device of the embodiment of the present application can execute the transaction processing method on the resource client side provided by the embodiment of the present application. The implementation principle is similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the transaction processing method on the resource client side of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0199] An electronic device is provided in an embodiment of the present application, including a memory, a processor, and a computer program stored in the memory, the processor executes the above-mentioned computer program to implement the steps of the transaction processing method, which can be implemented compared with the related art: by sending the transaction information to be processed to a first message queue in the blockchain relay, the first message queue is created and subscribed by the resource client, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue. Since the resource client subscribes to the first message queue, it can obtain the transaction information from the first message queue and process it, and send the processing result of the transaction information to the second message queue in the blockchain relay. The second message queue is created and subscribed by the decentralized application, so when the resource client sends the processing result to the second message queue, the decentralized application can obtain the processing result. The second queue identifier of the second message queue is notified to the resource client by the decentralized application through the blockchain relay after encryption, which can improve the security of the second message queue, and the decryption key used to decrypt the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay, which can effectively prevent the blockchain relay from knowing the plaintext of the second queue identifier, further ensuring security. In this scheme, the message queue used by the decentralized application to send data (transaction information) is created by the resource client, and the message queue used to receive data (the processing result of the transaction information) is created by the decentralized application itself. On the one hand, different message queues are used for sending and receiving data. On the other hand, the two message queues are created by the decentralized application and the resource client respectively, which reduces the possibility of information leakage in data transmission. At the same time, the message queue for a resource client can be reused, and there is no need to re-establish the message queue every time new transaction information is processed, which improves convenience. At the same time, the queue identifier can effectively distinguish the currently connected resource client, which greatly saves resources.

[0200] In an alternative embodiment, an electronic device is provided, such as Fig.12 As shown, Fig.12 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0201] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0202] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0203] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.

[0204] The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.

[0205] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.

[0206] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.

[0207] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.

[0208] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.

[0209] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical concept of the present application also fall within the protection scope of the embodiments of the present application.

Claims

1. A transaction processing method, It is characterized in that Applied to decentralized applications, including: Sending the transaction information to be processed to the first message queue in the blockchain relay, so that the resource client pre-bound to the decentralized application obtains the transaction information from the first message queue, and sends the processing result of the transaction information to the second message queue in the blockchain relay; Obtaining a processing result of the transaction from the second message queue in the blockchain relay according to the second queue identifier of the second message queue; The first message queue is created and subscribed by the resource client in the blockchain relay, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue; The second message queue is created and subscribed by the decentralized application in the blockchain relay, the second queue identifier is notified to the resource client by the decentralized application through the blockchain relay after encryption, and the decryption key for decrypting the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay.

2. The method according to claim 1, It is characterized in that The sending of the pending transaction to the first message queue in the blockchain relay also includes: Connecting to the blockchain relay, creating the second message queue and the third message queue in the blockchain relay, and subscribing to the second message queue; Obtaining encrypted information, the encrypted information including the encrypted second queue identifier, and sending the encrypted information to the third message queue; The third queue identifier of the third message queue and the decryption key of the encrypted information are informed to the resource client in a manner other than the blockchain relay, so that the resource client subscribes to the third message queue in the blockchain relay according to the third queue identifier, decrypts the encrypted information in the third message queue according to the decryption key, and determines to send data to the decentralized application through the second message queue.

3. The method according to claim 2, It is characterized in that The encrypted information also includes the encrypted text to be signed; The resource client is further used to sign the to-be-signed text obtained by decryption, create and subscribe to the first message queue in the blockchain relay, and send the first queue identifier and the signed text to the second message queue; The third queue identifier of the third message queue and the decryption key corresponding to the encrypted information are notified to the resource client in a manner other than the blockchain relay, and then the method further includes: Obtaining the first queue identifier and the signed text from the second message queue, and determining to send data to the resource client through the first message queue; The signed text is verified through the decentralized application background, and if the verification passes, it is determined to be bound to the resource client.

4. The method according to claim 1, It is characterized in that The method of informing the resource client of the decryption key includes: generating graphic code information, wherein the graphic code includes the decryption key; or If it is determined that the authority to call the resource client is available, the resource client is called, and the decryption key is sent to the resource client as a calling parameter.

5. The method according to claim 4, It is characterized in that If it is determined that the user has the authority to call the resource client, calling the resource client includes: If it is determined that the authority to call multiple candidate resource clients is available, a target resource client is determined from the multiple candidate resource clients based on a predetermined rule, and the target resource client is called.

6. The method according to claim 3, It is characterized in that The step of obtaining the first queue identifier and the signed text from the second message queue further comprises: The third message queue is closed in the blockchain relay.

7. A transaction processing method, It is characterized in that Applicable to resource clients, including: Obtaining transaction information to be processed from a first message queue in a blockchain relay, where the transaction information is sent by a decentralized application pre-bound to the resource client; Processing the transaction information, and sending the processing result to a second message queue in the blockchain relay, so that the decentralized application obtains the processing result from the second message queue; The first message queue is created and subscribed by the resource client in the blockchain relay, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue; The second message queue is created and subscribed by the decentralized application in the blockchain relay, the second queue identifier of the second message queue is notified to the resource client by the resource client through the blockchain relay after encryption, and the decryption key for decrypting the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay.

8. The method according to claim 7, It is characterized in that The method of obtaining a transaction to be processed from a first message queue in a blockchain relay also includes: Obtaining a third queue identifier and a decryption key of a third message queue in a manner other than the blockchain relay; the third message queue is created by the decentralized application in the blockchain relay, the third message queue includes encrypted information of the decentralized application, and the encrypted information includes the encrypted second queue identifier; Subscribe to the third message queue in the blockchain relay according to the third queue identifier, decrypt the encrypted information in the third message queue, and determine the second message queue for sending data to the decentralized application according to the second queue identifier obtained by decryption.

9. The method according to claim 8, It is characterized in that The encrypted information also includes the encrypted text to be signed; The step of decrypting the encrypted information in the third message queue further includes: Obtaining the text to be signed; Signing the text to be signed to obtain a signed text; Create and subscribe to the first message queue in the blockchain relay, and send the first queue identifier and the signed text to the second message queue.

10. A transaction processing system, It is characterized in that It includes a blockchain relay, a decentralized application executing any one of claims 1-6, and a resource client executing any one of claims 7-9.

11. A transaction processing device, It is characterized in that Applied to decentralized applications, the device includes: A transaction information sending module, used to send the transaction information to be processed to the first message queue in the blockchain relay, so that the resource client pre-bound to the decentralized application obtains the transaction information from the first message queue, and sends the processing result of the transaction information to the second message queue in the blockchain relay; a processing result receiving module, configured to obtain a processing result of the transaction from the second message queue in the blockchain relay according to the second queue identifier of the second message queue; The first message queue is created and subscribed by the resource client in the blockchain relay, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue; The second message queue is created and subscribed by the decentralized application in the blockchain relay, the second queue identifier is notified to the resource client by the decentralized application through the blockchain relay after encryption, and the decryption key for decrypting the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay.

12. A transaction processing device, It is characterized in that Applied to a resource client, the device comprises: A transaction information receiving module, used to obtain transaction information to be processed from a first message queue in a blockchain relay, wherein the transaction information is sent by a decentralized application pre-bound to the resource client; A processing result sending module, used to process the transaction information and send the processing result to the second message queue in the blockchain relay, so that the decentralized application obtains the processing result from the second message queue; The first message queue is created and subscribed by the resource client in the blockchain relay, and the first queue identifier of the first message queue is notified to the decentralized application by the resource client through the second message queue; The second message queue is created and subscribed by the decentralized application in the blockchain relay, the second queue identifier of the second message queue is notified to the resource client by the resource client through the blockchain relay after encryption, and the decryption key for decrypting the encrypted second queue identifier is notified to the resource client by the decentralized application in a manner other than the blockchain relay.

13. An electronic device comprising a memory, a processor and a computer program stored in the memory, It is characterized in that The processor executes the computer program to implement the steps of the transaction processing method according to any one of claims 1 to 9.

14. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the transaction processing method according to any one of claims 1 to 9 are implemented.

15. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the transaction processing method according to any one of claims 1 to 9 are implemented.