WO2023109268A1 - Block chain message transmission method and device, client, and storage medium - Google Patents

Block chain message transmission method and device, client, and storage medium Download PDF

Info

Publication number
WO2023109268A1
WO2023109268A1 PCT/CN2022/124237 CN2022124237W WO2023109268A1 WO 2023109268 A1 WO2023109268 A1 WO 2023109268A1 CN 2022124237 W CN2022124237 W CN 2022124237W WO 2023109268 A1 WO2023109268 A1 WO 2023109268A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
client
topic
instruction
link
Prior art date
Application number
PCT/CN2022/124237
Other languages
French (fr)
Chinese (zh)
Inventor
储雨知
范瑞彬
张开翔
张龙
毛嘉宇
王越
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2023109268A1 publication Critical patent/WO2023109268A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present application provides a block chain message transmission method and device, a client, and a storage medium. The method comprises: generating a message publishing instruction by means of a first client, wherein the instruction carries an encrypted message to be sent, a return address corresponding to the first client, etc., and the address is determined according to a first link for receiving a return message by the first client; and then encrypting the instruction, and publishing the encrypted message according to a second link for publishing a message by the first client until a topic processing node receives a corresponding message, decrypts the corresponding message, obtains the instruction, and pushes the instruction, so that a second client obtains the message to be sent. The first client publishes the message by means of the second link; therefore, the topic processing node does not know the source of the message. The first client encrypts the message; therefore, a block chain node of the first client does not know the content of the message. Upon receipt of the message, the second client knows a first forwarding node of the return address at most. In this way, the security of anonymous information transmission on the block chain is improved.

Description

区块链消息传输方法、装置、客户端及存储介质Blockchain message transmission method, device, client and storage medium
本申请要求于2021年12月15日提交中国专利局、申请号为CN202111538853.7、申请名称为“区块链消息传输方法、装置、客户端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the China Patent Office on December 15, 2021, with the application number CN202111538853.7 and the application title "Blockchain message transmission method, device, client and storage medium". The entire contents are incorporated by reference in this application.
技术领域technical field
本申请涉及金融科技(Fintech)的区块链技术,尤其涉及一种区块链消息传输方法、装置、客户端及存储介质。The present application relates to the block chain technology of financial technology (Fintech), and in particular to a block chain message transmission method, device, client and storage medium.
背景技术Background technique
随着计算机技术的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技转变,区块链技术也不例外,但由于金融行业的安全性、实时性要求,其对区块链技术提出更高的要求。With the development of computer technology, more and more technologies are applied in the financial field. The traditional financial industry is gradually transforming into financial technology, and blockchain technology is no exception. However, due to the security and real-time requirements of the financial industry, its Blockchain technology puts forward higher requirements.
当前分布式存储系统在金融行业中应用越来越广泛。区块链系统是一种多中心、防篡改、防抵赖的分布式存储系统,因此,区块链系统在金融行业中应用越来越多。在区块链系统中,以链上信使协议(Advanced Messages Onchain Protocol,AMOP)方案为例,消息是基于发布-订阅的,订阅者的客户端可以订阅某个话题,而发布者的客户端向某个话题发布消息的时候,区块链节点会将该消息路由给该话题的所有订阅者。其中,上述话题可以分为普通话题和私有话题。对于普通话题,订阅者可以直接订阅话题,没有任何准入限制、加密保护等。对于私有话题,其主要用于机构之间安全的点对点通信。在目前的方案中,订阅者订阅话题需要和发布者进行身份认证,认证通过后才能订阅成功。At present, distributed storage systems are more and more widely used in the financial industry. The blockchain system is a multi-center, tamper-proof, and non-repudiation distributed storage system. Therefore, the blockchain system is more and more used in the financial industry. In the blockchain system, taking the Advanced Messages Onchain Protocol (AMOP) scheme as an example, the message is based on publish-subscribe, the subscriber's client can subscribe to a topic, and the publisher's client sends When a topic publishes a message, the blockchain node will route the message to all subscribers of the topic. Wherein, the above topics can be divided into common topics and private topics. For common topics, subscribers can directly subscribe to topics without any access restrictions, encryption protection, etc. For private topics, it is mainly used for secure peer-to-peer communication between institutions. In the current solution, the subscriber needs to authenticate with the publisher when subscribing to the topic, and the subscription can only succeed after the authentication is passed.
然而,在上述方案中私有话题通过对订阅者和发布者进行身份认证来发布-订阅,使得私有话题存在一个缺陷,即安全性较差(例如在上述方案中,虽然订阅者和发布者的客户端无法再监听到私有话题 的消息了,但是订阅者和发布者对应的区块链节点仍然具有监听这个消息的能力)。这样可能会导致商业机密泄露,而且如果存在恶意节点,恶意监听消息,可能造成难以估量的损失。However, in the above scheme, the private topic publishes and subscribes by authenticating the subscriber and the publisher, which makes the private topic have a defect, that is, the security is poor (for example, in the above scheme, although the subscriber and the publisher's client The terminal can no longer listen to the message of the private topic, but the blockchain nodes corresponding to the subscriber and the publisher still have the ability to listen to this message). This may lead to the disclosure of business secrets, and if there are malicious nodes that maliciously monitor messages, it may cause incalculable losses.
发明内容Contents of the invention
为解决现有技术中存在的问题,本申请提供一种区块链消息传输方法、装置、客户端及存储介质。In order to solve the problems existing in the prior art, the present application provides a block chain message transmission method, device, client and storage medium.
第一方面,本申请实施例提供一种区块链消息传输方法,所述方法应用于第一客户端,所述第一客户端对应区块链系统中的一区块链节点,所述方法包括:In the first aspect, the embodiment of the present application provides a block chain message transmission method, the method is applied to the first client, and the first client corresponds to a block chain node in the block chain system, the method include:
根据待发布话题,生成发布消息指令,所述发布消息指令携带所述待发布话题的标识、已加密的待发送消息和所述第一客户端对应的返回地址,其中,所述第一客户端对应的返回地址根据所述第一客户端在所述区块链系统中接收返回消息的第一链路确定;According to the topic to be released, generate a message release instruction, the message release instruction carries the identifier of the topic to be released, the encrypted message to be sent, and the return address corresponding to the first client, wherein the first client The corresponding return address is determined according to the first link on which the first client receives the return message in the blockchain system;
利用所述区块链系统中的话题处理节点,对所述发布消息指令进行加密,获得第一消息;Using the topic processing node in the blockchain system to encrypt the message publishing instruction to obtain the first message;
基于所述第一客户端在所述区块链系统中发布消息的第二链路,对所述第一消息进行加密,获得第二消息;Encrypting the first message based on the second link of the first client publishing the message in the block chain system to obtain the second message;
在对应的区块链节点,根据所述第二链路,发布所述第二消息,直至所述话题处理节点接收到所述第一消息,并对所述第一消息进行解密,获得所述发布消息指令,根据所述待发布话题的标识,获得第二客户端对应的返回地址,并根据所述第二客户端对应的返回地址,推送所述发布消息指令,以使所述第二客户端基于对应的区块链节点,接收到所述发布消息指令,对所述已加密的待发送消息进行解密,获得所述待发送消息。At the corresponding block chain node, according to the second link, the second message is issued until the topic processing node receives the first message, and decrypts the first message to obtain the Publishing a message instruction, obtaining a return address corresponding to the second client according to the identifier of the topic to be published, and pushing the posting message instruction according to the return address corresponding to the second client, so that the second client Based on the corresponding block chain node, the terminal receives the message publishing instruction, decrypts the encrypted message to be sent, and obtains the message to be sent.
第二方面,本申请实施例提供另一种区块链消息传输方法,所述方法应用于第二客户端,所述第二客户端对应区块链系统中的一区块链节点,所述方法包括:In the second aspect, the embodiment of the present application provides another block chain message transmission method, the method is applied to the second client, and the second client corresponds to a block chain node in the block chain system, and the Methods include:
基于对应的区块链节点,接收所述区块链系统中的话题处理节点 推送的发布消息指令,所述发布消息指令为第一客户端根据待发布话题生成的,所述发布消息指令携带所述待发布话题的标识、已加密的待发送消息和所述第一客户端对应的返回地址,其中,所述第一客户端对应的返回地址根据所述第一客户端在所述区块链系统中接收返回消息的第一链路确定,所述发布消息指令为所述第一客户端利用所述话题处理节点,对所述发布消息指令进行加密,获得第一消息,并基于所述第一客户端在所述区块链系统中发布消息的第二链路,对所述第一消息进行加密,获得第二消息,根据所述第二链路,发布所述第二消息后,由所述话题处理节点接收到所述第一消息,并对所述第一消息进行解密后获得的;Based on the corresponding block chain node, receive the release message instruction pushed by the topic processing node in the block chain system, the release message instruction is generated by the first client according to the topic to be released, and the release message instruction carries the The identifier of the topic to be published, the encrypted message to be sent, and the return address corresponding to the first client, wherein, the return address corresponding to the first client is based on the The first link that receives the returned message in the system is determined, and the message publishing instruction is that the first client uses the topic processing node to encrypt the message publishing instruction to obtain a first message, and based on the second A client publishes a second link of a message in the blockchain system, encrypts the first message to obtain a second message, and according to the second link, after publishing the second message, the The topic processing node receives the first message and obtains it after decrypting the first message;
对所述已加密的待发送消息进行解密,获得所述待发送消息。The encrypted message to be sent is decrypted to obtain the message to be sent.
第三方面,本申请实施例提供一种区块链消息传输装置,所述装置应用于第一客户端,所述第一客户端对应区块链系统中的一区块链节点,所述装置包括:In the third aspect, the embodiment of the present application provides a block chain message transmission device, the device is applied to a first client, and the first client corresponds to a block chain node in the block chain system, the device include:
第一指令生成模块,用于根据待发布话题,生成发布消息指令,所述发布消息指令携带所述待发布话题的标识、已加密的待发送消息和所述第一客户端对应的返回地址,其中,所述第一客户端对应的返回地址根据所述第一客户端在所述区块链系统中接收返回消息的第一链路确定;The first instruction generation module is configured to generate a message release instruction according to the topic to be released, the message release instruction carries the identifier of the topic to be released, the encrypted message to be sent, and the return address corresponding to the first client, Wherein, the return address corresponding to the first client is determined according to the first link where the first client receives the return message in the blockchain system;
第一信息加密模块,用于利用所述区块链系统中的话题处理节点,对所述发布消息指令进行加密,获得第一消息;A first information encryption module, configured to use a topic processing node in the blockchain system to encrypt the instruction to issue a message to obtain a first message;
第二信息加密模块,用于基于所述第一客户端在所述区块链系统中发布消息的第二链路,对所述第一消息进行加密,获得第二消息;A second information encryption module, configured to encrypt the first message based on the second link in which the first client publishes a message in the blockchain system, to obtain a second message;
信息发布模块,用于在对应的区块链节点,根据所述第二链路,发布所述第二消息,直至所述话题处理节点接收到所述第一消息,并对所述第一消息进行解密,获得所述发布消息指令,根据所述待发布话题的标识,获得第二客户端对应的返回地址,并根据所述第二客户端对应的返回地址,推送所述发布消息指令,以使所述第二客户端基于对应的区块链节点,接收到所述发布消息指令,对所述已加密的待 发送消息进行解密,获得所述待发送消息。An information publishing module, configured to publish the second message on the corresponding block chain node according to the second link until the topic processing node receives the first message and responds to the first message performing decryption to obtain the posting message instruction, obtaining the return address corresponding to the second client according to the identifier of the topic to be published, and pushing the posting message instruction according to the return address corresponding to the second client, to Making the second client receive the message publishing instruction based on the corresponding block chain node, decrypt the encrypted message to be sent, and obtain the message to be sent.
第四方面,本申请实施例提供另一种区块链消息传输装置,所述装置应用于第二客户端,所述第二客户端对应区块链系统中的一区块链节点,所述装置包括:In the fourth aspect, the embodiment of the present application provides another block chain message transmission device, which is applied to a second client, and the second client corresponds to a block chain node in the block chain system. Devices include:
第一信息接收模块,用于基于对应的区块链节点,接收所述区块链系统中的话题处理节点推送的发布消息指令,所述发布消息指令为第一客户端根据待发布话题生成的,所述发布消息指令携带所述待发布话题的标识、已加密的待发送消息和所述第一客户端对应的返回地址,其中,所述第一客户端对应的返回地址根据所述第一客户端在所述区块链系统中接收返回消息的第一链路确定,所述发布消息指令为所述第一客户端利用所述话题处理节点,对所述发布消息指令进行加密,获得第一消息,并基于所述第一客户端在所述区块链系统中发布消息的第二链路,对所述第一消息进行加密,获得第二消息,根据所述第二链路,发布所述第二消息后,由所述话题处理节点接收到所述第一消息,并对所述第一消息进行解密后获得的;The first information receiving module is configured to receive, based on the corresponding block chain node, the release message instruction pushed by the topic processing node in the block chain system, the release message instruction is generated by the first client according to the topic to be released , the publish message instruction carries the identifier of the topic to be published, the encrypted message to be sent, and the return address corresponding to the first client, wherein the return address corresponding to the first client is based on the first The client receives the first link confirmation of the return message in the blockchain system, and the message publishing instruction is that the first client uses the topic processing node to encrypt the message publishing instruction to obtain the second A message, and based on the second link in which the first client publishes a message in the blockchain system, encrypt the first message to obtain a second message, and publish according to the second link After the second message, the topic processing node receives the first message and decrypts the first message;
信息处理模块,用于对所述已加密的待发送消息进行解密,获得所述待发送消息。An information processing module, configured to decrypt the encrypted message to be sent to obtain the message to be sent.
第五方面,本申请实施例提供一种客户端,包括:In the fifth aspect, the embodiment of the present application provides a client, including:
处理器;processor;
存储器;以及storage; and
计算机程序;Computer program;
其中,所述计算机程序被存储在所述存储器中,并且被配置为由所述处理器执行,所述计算机程序包括用于执行如第一方面或第二方面所述的方法的指令。Wherein, the computer program is stored in the memory and is configured to be executed by the processor, the computer program including instructions for executing the method as described in the first aspect or the second aspect.
第六方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序使得服务器执行第一方面或第二方面所述的方法。In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program causes a server to execute the method described in the first aspect or the second aspect.
第七方面,本申请实施例提供一种计算机程序产品,包括计算机指令,所述计算机指令被处理器执行第一方面或第二方面所述的方法。In a seventh aspect, an embodiment of the present application provides a computer program product, including computer instructions, and the computer instructions are used by a processor to execute the method described in the first aspect or the second aspect.
本申请实施例提供的区块链消息传输方法、装置、客户端及存储介质,该方法通过第一客户端(如发布者的客户端)生成发布消息指令,该发布消息指令携带待发布话题的标识、已加密的待发送消息和第一客户端对应的返回地址,其中,该返回地址根据第一客户端在区块链系统中接收返回消息的第一链路确定,进而,利用话题处理节点和第一客户端发布消息的第二链路,对上述发布消息指令进行加密,从而,根据第二链路,发布加密后的消息,直至话题处理节点接收到相应消息进行解密,获得上述发布消息指令,并根据上述待发布话题的标识,获得第二客户端(如订阅者的客户端)对应的返回地址,推送上述发布消息指令,以使第二客户端接收到上述发布消息指令,获得待发送消息。其中,由于第一客户端通过第二链路发布消息,话题处理节点是不知道消息的来源;第一客户端对应的区块链节点虽然知道发布者发送了一条消息,但由于第一客户端对消息进行了加密,其并不知道这条消息的内容是什么;第二客户端接收到了消息,最多知道返回地址的首个转发节点,但真正的发布人是谁,并不清楚,解决现有私有话题通过对订阅者和发布者进行身份认证来发布-订阅,存在安全性较差的问题,降低商业机密泄露的风险,减少相应的损失。The block chain message transmission method, device, client and storage medium provided by the embodiment of the present application, the method generates a message release command through the first client (such as the client of the publisher), and the message release command carries the information of the topic to be published ID, the encrypted message to be sent, and the return address corresponding to the first client, wherein the return address is determined according to the first link of the first client receiving the return message in the blockchain system, and then, using the topic processing node The second link that publishes the message with the first client encrypts the above-mentioned publishing message instruction, so that according to the second link, the encrypted message is published until the topic processing node receives the corresponding message and decrypts it to obtain the above-mentioned publishing message command, and according to the identification of the topic to be published, obtain the return address corresponding to the second client (such as the subscriber's client), and push the above-mentioned publishing message command, so that the second client receives the above-mentioned publishing message command, and obtains the pending Send a message. Among them, since the first client publishes a message through the second link, the topic processing node does not know the source of the message; although the block chain node corresponding to the first client knows that the publisher sent a message, because the first client The message is encrypted, and it does not know what the content of the message is; the second client receives the message, and at most knows the first forwarding node of the return address, but it is not clear who the real publisher is. Some private topics publish-subscribe by authenticating subscribers and publishers, which has poor security, reduces the risk of commercial secret leakage, and reduces corresponding losses.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without any creative effort.
图1为本申请实施例提供的一种AMOP方案中,区块链系统的结构示意图;FIG. 1 is a schematic structural diagram of a blockchain system in an AMOP scheme provided by an embodiment of the present application;
图2为本申请实施例提供的图1所示系统进行消息转发的示意图;FIG. 2 is a schematic diagram of message forwarding by the system shown in FIG. 1 provided in the embodiment of the present application;
图3为本申请实施例提供的一种区块链消息传输系统架构示意图;FIG. 3 is a schematic diagram of a block chain message transmission system architecture provided by the embodiment of the present application;
图4为本申请实施例提供的一种区块链消息传输方法的流程示意图;FIG. 4 is a schematic flow diagram of a blockchain message transmission method provided by an embodiment of the present application;
图5为本申请实施例提供的一种客户端发布消息的示意图;FIG. 5 is a schematic diagram of a client publishing a message provided by an embodiment of the present application;
图6为本申请实施例提供的一种发布者发布消息,订阅者接收信息的示意图;FIG. 6 is a schematic diagram of a publisher publishing a message and a subscriber receiving the message provided by the embodiment of the present application;
图7为本申请实施例提供的一种订阅者回复消息,接收者接收消息的示意图;FIG. 7 is a schematic diagram of a subscriber reply message provided by the embodiment of the present application, and the recipient receives the message;
图8为本申请实施例提供的另一种区块链消息传输方法的流程示意图;FIG. 8 is a schematic flow diagram of another blockchain message transmission method provided by the embodiment of the present application;
图9为本申请实施例提供的一种订阅者获得返回地址的示意图;FIG. 9 is a schematic diagram of a subscriber obtaining a return address provided by an embodiment of the present application;
图10为本申请实施例提供的一种区块链消息传输装置的结构示意图;FIG. 10 is a schematic structural diagram of a blockchain message transmission device provided by an embodiment of the present application;
图11为本申请实施例提供的另一种区块链消息传输装置的结构示意图;FIG. 11 is a schematic structural diagram of another blockchain message transmission device provided by the embodiment of the present application;
图12A示出了本申请客户端的一种可能的结构示意图;FIG. 12A shows a possible schematic structural diagram of a client of this application;
图12B示出了本申请客户端的一种可能的结构示意图。FIG. 12B shows a possible schematic structural diagram of the client of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”及“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含 了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and "fourth" (if any) in the specification and claims of this application and the above drawings are used to distinguish similar objects, and do not necessarily use Used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.
在区块链系统中,AMOP是一种借助区块链网络作为路由网络,使两个客户端直接进行通信的方案,用于解决分属两个不同内网的程序无法互相直连的问题。在AMOP方案中,系统的结构如图1所示,它是一个典型的联盟链架构,每个机构会部署一个节点,节点有一个编号组件成区块链网络。同时,每个机构(例如A,B,C…)还会有一个客户端(例如机构A客户端,机构B客户端,机构C客户端…)连接着各自机构的节点(例如机构A节点,机构B节点,机构C节点…),用以收发数据。当机构A的客户端要给机构B的客户端发送数据时,由于它们不处于同一个网段,无法直接建立连接,因此需要借助区块链网络本身作为路由网络。当某一机构,例如机构A发布一条消息,区块链网络会把该消息转发给对该消息感兴趣的机构,例如C和D,如图2所示。In the blockchain system, AMOP is a scheme that uses the blockchain network as a routing network to enable two clients to communicate directly, and is used to solve the problem that programs belonging to two different intranets cannot be directly connected to each other. In the AMOP scheme, the system structure is shown in Figure 1. It is a typical alliance chain architecture. Each organization will deploy a node, and the node has a numbered component to form a blockchain network. At the same time, each organization (such as A, B, C...) will also have a client (such as organization A client, organization B client, organization C client...) connected to the nodes of their respective organizations (such as organization A node, Organization B node, organization C node...), used to send and receive data. When the client of organization A wants to send data to the client of organization B, since they are not in the same network segment, they cannot directly establish a connection, so the blockchain network itself needs to be used as a routing network. When an organization, such as organization A, publishes a message, the blockchain network will forward the message to organizations that are interested in the message, such as C and D, as shown in Figure 2.
现有区块链系统中,以AMOP方案为例,消息是基于发布-订阅的,订阅者的客户端可以订阅某个话题,而发布者的客户端向某个话题发布消息的时候,区块链节点会将该消息路由给该话题的所有订阅者。其中,上述话题可以分为普通话题和私有话题。对于普通话题,订阅者可以直接订阅话题,没有任何准入限制、加密保护等。对于私有话题,其主要用于机构之间安全的点对点通信。在目前的方案中,订阅者订阅话题需要和发布者进行身份认证,认证通过后才能订阅成功。In the existing blockchain system, taking the AMOP scheme as an example, the message is based on publish-subscribe. The subscriber's client can subscribe to a certain topic, and when the publisher's client publishes a message to a certain topic, the block The chain node will route the message to all subscribers of the topic. Wherein, the above topics can be divided into common topics and private topics. For common topics, subscribers can directly subscribe to topics without any access restrictions, encryption protection, etc. For private topics, it is mainly used for secure peer-to-peer communication between institutions. In the current solution, the subscriber needs to authenticate with the publisher when subscribing to the topic, and the subscription can only succeed after the authentication is passed.
假如发布者(记为Alice)和订阅者(记为Bob)想建立一个私有话题A以交换一些商业数据例如订单。假定Alice和Bob都知道对方的公钥,那么二者建立私有话题、完成通信的流程可以如下:Suppose the publisher (marked as Alice) and the subscriber (marked as Bob) want to create a private topic A to exchange some business data such as orders. Assuming that both Alice and Bob know each other's public key, the process of establishing a private topic and completing communication between the two can be as follows:
1)发布者Alice请求在区块链上发布一个私有话题A,请求格式可以如下述示例:1) Alice, the publisher, requests to publish a private topic A on the blockchain. The request format can be as follows:
字段field value
发布人publisher AliceAlice
订阅人列表subscriber list [](目前还没有)[](not yet)
订阅人状态subscriber status [](目前还没有)[](not yet)
话题名称topic name AA
话题类型topic type 私有private
话题用途topic use 通信communication
2)区块链节点收到请求后,在自身的存储中创建私有话题记录,数据结构可以如下:2) After the blockchain node receives the request, it creates a private topic record in its own storage. The data structure can be as follows:
字段field value
发布人publisher AliceAlice
订阅人列表subscriber list [](目前还没有)[](not yet)
订阅人状态subscriber status [](目前还没有)[](not yet)
话题名称topic name AA
话题类型topic type 私有private
话题用途topic use 通信communication
3)区块链节点向其他节点广播话题信息,即上述记录,区块链网络中的其他节点也在自己内存中创建这样一条记录:3) Blockchain nodes broadcast topic information to other nodes, that is, the above records, and other nodes in the blockchain network also create such a record in their own memory:
字段field value
发布人publisher AliceAlice
订阅人列表subscriber list [](目前还没有)[](not yet)
订阅人状态subscriber status [](目前还没有)[](not yet)
话题名称topic name AA
话题类型topic type 私有private
话题用途topic use 通信communication
4)订阅者Bob请求在区块链上订阅同一个私有话题A,请求格式如下:4) Subscriber Bob requests to subscribe to the same private topic A on the blockchain, and the request format is as follows:
字段field value
订阅人subscriber BobBob
话题名称topic name AA
话题属性topic attribute 私有private
话题用途topic use 通信communication
5)区块链节点收到订阅请求后,广播该请求,每个收到请求的节点都在自己的内存中更新订阅信息如下:5) After the blockchain node receives the subscription request, it broadcasts the request, and each node that receives the request updates the subscription information in its own memory as follows:
字段field value
发布人publisher AliceAlice
订阅人列表subscriber list [Bob][Bob]
订阅人状态subscriber status [待认证][to be certified]
话题名称topic name AA
话题类型topic type 私有private
话题用途topic use 通信communication
6)创建一个普通话题B,用于认证话题A,即在自身存储中添加一条如下格式的记录:6) Create a common topic B for authenticating topic A, that is, add a record in the following format to its own storage:
字段field value
发布人publisher AliceAlice
订阅人subscriber BobBob
话题名称topic name BB
话题属性topic attribute 普通ordinary
话题用途topic use 认证ACertification A
7)区块链节点和其他节点广播话题B的信息,使区块链网络中的其他节点也在自己内存中创建这样一条记录:7) The blockchain node and other nodes broadcast the information of topic B, so that other nodes in the blockchain network also create such a record in their own memory:
字段field value
订阅人subscriber BobBob
话题名称topic name BB
话题属性topic attribute 普通ordinary
话题用途topic use 认证ACertification A
8)连接着发布者Alice的节点现在将该话题B传输给发布者Alice;同理,连接着订阅者Bob的节点现在将话题B传输给订阅者Bob。8) The node connected to the publisher Alice now transmits the topic B to the publisher Alice; similarly, the node connected to the subscriber Bob now transmits the topic B to the subscriber Bob.
9)发布者Alice创建随机数n,发往话题B,请求格式如下:9) Alice, the publisher, creates a random number n and sends it to topic B. The request format is as follows:
字段field value
发布人publisher AliceAlice
订阅人subscriber BobBob
话题名称topic name BB
消息内容Message content nno
10)区块链节点将该随机数路由转发给Bob(例如利用多播、泛洪等技术)。10) The blockchain node forwards the random number route to Bob (for example, using multicast, flooding and other technologies).
11)订阅者Bob用私钥对随机数进行签名,并将消息回复给话题B:11) Subscriber Bob signs the random number with the private key, and replies the message to topic B:
字段field value
发布人publisher BobBob
订阅人subscriber AliceAlice
话题名称topic name BB
消息内容Message content sig(n,Bob)sig(n, Bob)
12)区块链节点将该签名路由转发给Alice(例如利用多播、泛洪等技术)。Alice收到消息后,用Bob的公钥验证签名sig,将验证结果告知区块链节点,消息格式:12) The blockchain node forwards the signature route to Alice (for example, using technologies such as multicast and flooding). After Alice receives the message, she uses Bob's public key to verify the signature sig, and informs the blockchain node of the verification result. The message format is:
字段field value
订阅人subscriber BobBob
话题名称topic name BB
验证结果Validation results 成功success
13)如果验证成功,并广播给其他节点,每一个收到消息的区块链节点都在自身中修改Bob的认证状态:13) If the verification is successful and broadcast to other nodes, each blockchain node that receives the message modifies Bob's authentication status in itself:
字段field value
发布人publisher AliceAlice
订阅人列表subscriber list [Bob][Bob]
订阅人状态subscriber status [已认证][verified]
话题名称topic name AA
话题类型topic type 私有private
话题用途topic use 通信communication
14)接下来,Alice如果给话题A发消息,则区块链节点会将消息路由转发给订阅者Bob,反之亦然。14) Next, if Alice sends a message to topic A, the blockchain node will forward the message route to subscriber Bob, and vice versa.
但是,在上述方案中,私有话题存在一个缺陷,即安全性较差(例如在上述方案中,虽然订阅者和发布者的客户端无法再监听到私有话题的消息了,但是订阅者和发布者对应的区块链节点仍然具有监听这个消息的能力,如监听谁创建了什么话题,谁订阅了什么话题,谁给哪个话题发了什么消息,以及谁给谁回复了什么消息等)。这样可能会导致商业机密泄露,而且如果存在恶意节点,恶意监听消息,可能造成难以估量的损失。However, in the above scheme, there is a defect in the private topic, that is, the security is poor (for example, in the above scheme, although the clients of the subscriber and the publisher can no longer listen to the message of the private topic, the subscriber and the publisher The corresponding blockchain node still has the ability to monitor this message, such as who created what topic, who subscribed to what topic, who sent what message to which topic, and who replied to whom with what message, etc.). This may lead to the disclosure of business secrets, and if there are malicious nodes that maliciously monitor messages, it may cause incalculable losses.
因此,本申请实施例提出一种区块链消息传输方法,通过第一客户端(如发布者的客户端)生成发布消息指令,该发布消息指令携带待发布话题的标识、已加密的待发送消息和第一客户端对应的返回地址,其中,该返回地址根据第一客户端在区块链系统中接收返回消息 的第一链路确定,进而,利用话题处理节点,以及第一客户端发布消息的第二链路,对上述发布消息指令进行加密,从而,根据第二链路,发布加密后的消息,直至话题处理节点接收到相应消息进行解密,获得上述发布消息指令,并根据上述待发布话题的标识,获得第二客户端(如订阅者的客户端)对应的返回地址,推送上述发布消息指令,以使第二客户端接收到上述发布消息指令,获得待发送消息。其中,由于第一客户端通过第二链路发布消息,话题处理节点是不知道消息的来源;第一客户端对应的区块链节点虽然知道发布者发送了一条消息,但由于第一客户端对消息进行了加密,其并不知道这条消息的内容是什么;第二客户端接收到了消息,最多知道返回地址的首个转发节点,但真正的发布人是谁,并不清楚,提高区块链上消息匿名传输的安全性。Therefore, the embodiment of this application proposes a block chain message transmission method. The first client (such as the publisher's client) generates a message release instruction, and the message release instruction carries the identifier of the topic to be published, the encrypted message to be sent The return address corresponding to the message and the first client, wherein the return address is determined according to the first link of the first client receiving the return message in the blockchain system, and then, using the topic processing node and the first client to publish The second link of the message encrypts the above-mentioned release message instruction, so that, according to the second link, the encrypted message is released until the topic processing node receives the corresponding message for decryption, obtains the above-mentioned release message instruction, and according to the above-mentioned pending Publish the identifier of the topic, obtain the return address corresponding to the second client (such as the subscriber's client), push the above-mentioned publishing message instruction, so that the second client receives the above-mentioned publishing message instruction, and obtains the message to be sent. Among them, since the first client publishes a message through the second link, the topic processing node does not know the source of the message; although the block chain node corresponding to the first client knows that the publisher sent a message, because the first client The message is encrypted, and it does not know what the content of the message is; the second client receives the message, and at most knows the first forwarding node of the return address, but it is not clear who the real publisher is. The security of anonymous transmission of messages on the blockchain.
其中,客户端以传输层安全性协议(Transport Layer Security,TLS)的方式连接着所属机构或组织的区块链节点也可以被称为网关节点。话题处理节点为专门保存话题相关信息的节点。Among them, the client connects to the blockchain node of the institution or organization in the form of Transport Layer Security (TLS), which can also be called a gateway node. The topic processing node is a node dedicated to saving topic-related information.
可选地,本申请提供的一种区块链消息传输方法,可以适用于图3所示的区块链消息传输系统架构示意图,如图3所示,该系统可以包括第一客户端(如发布者的客户端)、第一客户端对应的区块链节点、第二客户端(如订阅者的客户端)、第二客户端对应的区块链节点,以及话题处理节点。其中,上述节点在同一区块链系统中。该区块链系统除包括上述节点外还可以包括其它节点,图3为了方便理解本申请不再示出。Optionally, a block chain message transmission method provided by the present application can be applied to the block chain message transmission system architecture schematic diagram shown in Figure 3, as shown in Figure 3, the system can include a first client (such as publisher’s client), the block chain node corresponding to the first client, the second client (such as the subscriber’s client), the block chain node corresponding to the second client, and the topic processing node. Among them, the above nodes are in the same blockchain system. The blockchain system may also include other nodes in addition to the nodes mentioned above, and FIG. 3 is not shown in this application for the convenience of understanding.
在具体实现过程中,第一客户端生成发布消息指令,该发布消息指令携带待发布话题的标识、已加密的待发送消息和第一客户端对应的返回地址,其中,该返回地址根据第一客户端在区块链系统中接收返回消息的第一链路确定。然后,第一客户端利用话题处理节点,以及第一客户端发布消息的第二链路,对上述发布消息指令进行加密,在对应的区块链节点,根据第二链路,发布加密后的消息。话题处理节点接收到相应消息后进行解密,获得上述发布消息指令,并根据上 述待发布话题的标识,获得第二客户端对应的返回地址,推送上述发布消息指令。第二客户端基于对应的区块链节点,接收到上述发布消息指令,进而获得待发送消息。其中,话题处理节点是不知道消息的来源,因此不知道消息的发送人是谁。客户端对应的区块链节点虽然知道发布者发送了一条消息,但并不知道这条消息的内容是什么。订阅者接收到了消息,但是最多知道返回地址的首个转发节点,真正的发布人是谁,并不清楚,解决现有私有话题通过对订阅者和发布者进行身份认证来发布-订阅,存在安全性较差的问题。In the specific implementation process, the first client generates an instruction to publish a message, and the instruction to issue a message carries the identifier of the topic to be published, the encrypted message to be sent, and the return address corresponding to the first client, wherein the return address is based on the first The client receives the first link confirmation of the return message in the block chain system. Then, the first client uses the topic processing node and the second link through which the first client publishes the message to encrypt the above message publishing instruction, and publishes the encrypted message on the corresponding blockchain node according to the second link. information. The topic processing node decrypts the corresponding message after receiving it, obtains the above-mentioned publishing message instruction, and obtains the corresponding return address of the second client according to the identification of the above-mentioned topic to be published, and pushes the above-mentioned publishing message instruction. Based on the corresponding blockchain node, the second client receives the above message publishing instruction, and then obtains the message to be sent. Among them, the topic processing node does not know the source of the message, so it does not know who the sender of the message is. Although the blockchain node corresponding to the client knows that the publisher has sent a message, it does not know what the content of the message is. The subscriber has received the message, but at most knows the first forwarding node of the return address. It is not clear who the real publisher is. Solve the existing private topic by authenticating the subscriber and the publisher to publish-subscribe, which is safe problem of poor sex.
应理解,上述第一客户端可以通过处理器读取存储器中的指令并执行指令的方式实现,也可以通过芯片电路实现。It should be understood that the above-mentioned first client may be implemented by a processor reading instructions in a memory and executing the instructions, or may be implemented by a chip circuit.
上述系统仅为一种示例性系统,具体实施时,可以根据应用需求设置。The above system is only an exemplary system, and can be set according to application requirements during specific implementation.
下面以几个实施例为例对本申请的技术方案进行描述,对于相同或相似的概念或过程可能在某些实施例不再赘述。The technical solutions of the present application are described below by taking several embodiments as examples, and the same or similar concepts or processes may not be repeated in some embodiments.
图4为本申请实施例提供的一种区块链消息传输方法的流程示意图,本实施例的执行主体可以为图3所示实施例中的第一客户端,具体可以根据实际情况确定。如图4所示,本申请实施例提供的区块链消息传输方法包括如下步骤:Fig. 4 is a schematic flow diagram of a blockchain message transmission method provided by the embodiment of the present application. The execution subject of this embodiment may be the first client in the embodiment shown in Fig. 3, and the details may be determined according to the actual situation. As shown in Figure 4, the blockchain message transmission method provided by the embodiment of the present application includes the following steps:
S401:根据待发布话题,生成发布消息指令,该发布消息指令携带上述待发布话题的标识、已加密的待发送消息和第一客户端对应的返回地址,其中,第一客户端对应的返回地址根据第一客户端在上述区块链系统中接收返回消息的第一链路确定。S401: Generate a message release instruction according to the topic to be released, the message release instruction carries the identifier of the topic to be released, the encrypted message to be sent, and the return address corresponding to the first client, wherein the return address corresponding to the first client It is determined according to the first link that the first client receives the return message in the blockchain system.
这里,第一客户端可以理解为发布者的客户端,第二客户端可以理解为订阅者的客户端。发布者和订阅者需要使用一个私有话题来进行通信。他们事先可以协商好这个话题的名称和一个对称密钥(也可以称为话题密钥)。Here, the first client can be understood as a publisher's client, and the second client can be understood as a subscriber's client. Publishers and subscribers need to use a private topic to communicate. They can negotiate the name of the topic and a symmetric key (also called a topic key) in advance.
第一客户端根据待发布话题生成发布消息指令可以如下所示:The instruction for the first client to generate a release message according to the topic to be released may be as follows:
字段field value
指令类型command type 发布消息make an announcement
话题名称topic name DemoTopicDemo Topic
消息information 已加密的待发送消息,已用话题密钥加密Encrypted message to send, encrypted with the topic key
第一客户端对应的返回地址The return address corresponding to the first client msgL|LmsgL|L
即上述发布消息指令可以包括待发布话题的标识(例如话题名称,如DemoTopic)、已加密的待发送消息(已用上述话题密钥加密)、第一客户端对应的返回地址(msgL|L)。That is, the above-mentioned publishing message instruction may include the identifier of the topic to be published (such as the topic name, such as DemoTopic), the encrypted message to be sent (encrypted with the above-mentioned topic key), and the return address corresponding to the first client (msgL|L) .
这里,上述第一客户端所在区块链系统可以有许多节点,例如有26个节点,为方便取数,可以分别记为ABCDE…XYZ。发布者(如Alice)需要和订阅者(如Bob)分属于不同机构,Alice和Bob各自连接着一个节点(如第一客户端连接节点L,第二客户端连接节点G)。如现在Alice需要和Bob交换订单数据,订单涉及到两家企业的商业机密和用户隐私,Alice和Bob决定使用一个私有话题来进行通信。其中,Alice和Bob均知道对方的公钥,而且知道网络中每个节点的公钥。Here, the blockchain system where the above-mentioned first client is located may have many nodes, for example, 26 nodes, which can be respectively recorded as ABCDE...XYZ for the convenience of fetching numbers. The publisher (such as Alice) needs to belong to different organizations from the subscriber (such as Bob), and Alice and Bob are each connected to a node (such as the first client connects to node L, and the second client connects to node G). For example, now Alice needs to exchange order data with Bob. The order involves the business secrets and user privacy of the two companies. Alice and Bob decide to use a private topic for communication. Among them, both Alice and Bob know each other's public key, and know the public key of each node in the network.
上述第一客户端可以获取上述第一链路中各个区块链节点的公钥和标识,进而,按照第一预设顺序,利用上述第一链路中各个区块链节点的公钥,对上述第一客户端的用户信息和第一链路中各个区块链节点的标识进行层层加密处理,获得上述第一客户端对应的返回地址。The above-mentioned first client can obtain the public key and identification of each block chain node in the above-mentioned first link, and then, according to the first preset order, use the public key of each block chain node in the above-mentioned first link to The user information of the above-mentioned first client and the identification of each block chain node in the first link are encrypted layer by layer to obtain the return address corresponding to the above-mentioned first client.
示例性的,上述第一客户端可以先从上述区块链系统中确定一条链路作为接收返回消息的第一链路,比如L,M,N,,即接收返回消息时,消息通过D->L->M->N的顺序路由到上述第一客户端。然后,上述第一客户端对上述第一链路进行处理,获得上述第一客户端对应的返回地址。如上述第一客户端首先将第一客户端的用户信息(例如证书里的身份等)用上述第一链路按倒序的第一区块链节点的公钥加密,例如用上述N的公钥加密,得到msgN。然后上述第一客户端将上述加密的信息和上述按倒序的第一区块链节点的标识拼接在一起,用上述第一链路按倒序的第二区块链节点的公钥加密,例如将上述给N的信息和N节点的身份标识号(Identity document,id)拼一起即msgN|N,用M的公钥加密得到msgM。后续同理,上述第一客户端 将加密后的信息和上述按倒序的第二区块链节点的标识拼接在一起,用上述第一链路按倒序的第三区块链节点的公钥加密,例如将上述给M的信息和M节点的id拼一起即msgM|M,用L的公钥加密,得到msgL。最后,上述第一客户端将加密后的信息与上述按倒序的第三区块链节点的标识拼在一起,直至上述第一链路的最后一个节点,例如把上述给L的信息和L节点的id拼在一起,得到msgL|L,这就是返回地址。Exemplarily, the above-mentioned first client can first determine a link from the above-mentioned blockchain system as the first link to receive the return message, such as L, M, N, that is, when receiving the return message, the message passes through D- The order of >L->M->N is routed to the above-mentioned first client. Then, the first client processes the first link to obtain a return address corresponding to the first client. For example, the above-mentioned first client first encrypts the user information of the first client (such as the identity in the certificate, etc.) with the public key of the first blockchain node in reverse order of the above-mentioned first link, for example, encrypts with the public key of N above , get msgN. Then the above-mentioned first client splices the above-mentioned encrypted information and the identification of the above-mentioned first blockchain node in reverse order, and encrypts with the public key of the second blockchain node in reverse order of the above-mentioned first link, for example, The above information for N and the identity document (id) of node N are put together to form msgN|N, and msgM is obtained by encrypting with M's public key. In the same way, the above-mentioned first client splices the encrypted information and the identity of the above-mentioned second blockchain node in reverse order, and encrypts it with the public key of the above-mentioned first link in reverse order of the third blockchain node , For example, put together the above-mentioned information for M and the id of M node, that is, msgM|M, and encrypt it with the public key of L to obtain msgL. Finally, the above-mentioned first client puts together the encrypted information and the above-mentioned identification of the third blockchain node in reverse order, until the last node of the above-mentioned first link, for example, the above-mentioned information for L and L node The ids are put together to get msgL|L, which is the return address.
另外,上述第一客户端在上述根据待发布话题,生成发布消息指令之前,还可以生成创建话题指令,该创建话题指令携带上述待发布话题的标识,进而,利用上述话题处理节点,对上述创建话题指令进行加密,获得第三消息,基于第一客户端在上述区块链系统中发布消息的第三链路,对上述第三消息进行加密,获得第四消息,在对应的区块链节点,根据上述第三链路,发布上述第四消息,直至上述话题处理节点接收到上述第三消息,并对上述第三消息进行解密,获得上述创建话题指令,根据上述待发布话题的标识进行话题发布记录。In addition, before the above-mentioned first client generates the message release instruction based on the topic to be released, it may also generate a topic creation instruction, the topic creation instruction carries the identifier of the topic to be released, and then uses the topic processing node to create a new topic. The topic command is encrypted to obtain the third message, based on the third link of the first client publishing the message in the above blockchain system, the above third message is encrypted to obtain the fourth message, and the corresponding blockchain node , according to the above-mentioned third link, release the above-mentioned fourth message until the above-mentioned topic processing node receives the above-mentioned third message, and decrypts the above-mentioned third message, obtains the above-mentioned creation topic instruction, and executes the topic according to the above-mentioned identification of the topic to be released Publish records.
示例性的,上述第一客户端生成的发布消息指令可以如下所示:Exemplarily, the publishing message instruction generated by the above-mentioned first client may be as follows:
字段field value
指令类型command type 创建话题create topic
话题名称topic name DemoTopicDemo Topic
上述第一客户端利用上述话题处理节点,对上述创建话题指令进行加密,获得第三消息,即上述第一客户端可以把上述创建话题指令用D节点的公钥加密,作为后续递交给D的消息,其中,指令加密的过程可以为:The above-mentioned first client uses the above-mentioned topic processing node to encrypt the above-mentioned command to create a topic to obtain a third message, that is, the above-mentioned first client can encrypt the above-mentioned command to create a topic with the public key of node D, as a subsequent submission to D message, wherein, the process of instruction encryption can be:
上述第一客户端先将上一步的指令序列化为json或二进制,例如json方式的话会得到下面字符串:The above-mentioned first client first serializes the instruction in the previous step into json or binary. For example, in json mode, the following string will be obtained:
Figure PCTCN2022124237-appb-000001
Figure PCTCN2022124237-appb-000001
然后上述第一客户端使用D节点的公钥对该数据加密,得到 msgD。Then the above-mentioned first client uses the public key of node D to encrypt the data to obtain msgD.
上述第一客户端可以先确定一条路由链路作为第一客户端在上述区块链系统中发布消息的第三链路,按预设方式,例如倒序的方式,使用第三链路中各个区块链节点的公钥层层加密。该层层加密可以理解为:假设选择的链路是A,B,C(A作为第一个节点),那么进行如下加密:The above-mentioned first client can first determine a routing link as the third link for the first client to publish messages in the above-mentioned blockchain system, and use each area in the third link in a preset way, such as in reverse order. The public key of the block chain node is encrypted layer by layer. This layer-by-layer encryption can be understood as: Assuming that the selected links are A, B, and C (A is the first node), then the following encryption is performed:
把上述第三消息和上述话题处理节点的标识拼在一起,用上述第三链路按倒序的第一区块链节点的公钥加密,例如把前述递交给D的消息msgD和D节点id字符串拼接拼一起,即msgD|D,然后对该消息使用C的公钥加密,得到msgC;Put together the third message above and the identification of the topic processing node, and encrypt it with the public key of the first blockchain node in the reverse order of the third link, for example, the message msgD and the node id character of D submitted to D above The strings are spliced together, that is, msgD|D, and then the message is encrypted with C's public key to obtain msgC;
把加密后的消息和上述按倒序的第一区块链节点的标识拼在一起,用上述第三链路按倒序的第二区块链节点的公钥加密,例如把上述递交给C的消息msgC和C节点id拼一起,即msgC|C,然后对该消息用B的公钥加密,得到msgB;Put together the encrypted message and the identity of the above-mentioned first blockchain node in reverse order, and encrypt with the public key of the second blockchain node in reverse order of the above-mentioned third link, for example, the above-mentioned message submitted to C Put msgC and C node id together, that is, msgC|C, and then encrypt the message with B's public key to get msgB;
同理,把加密后的消息和上述按倒序的第二区块链节点的标识拼在一起,用上述第三链路按倒序的第三区块链节点的公钥加密,重复上述操作,直至上述第三链路按倒序的最后一个区块链节点,得到第四消息,例如把上述递交给B的消息msgB和B节点id拼一起,即msgB|B,然后对该消息用A的公钥加密,得到msgA。In the same way, put together the encrypted message and the identity of the above-mentioned second blockchain node in reverse order, encrypt with the public key of the third blockchain node in reverse order on the above-mentioned third link, and repeat the above operations until The last blockchain node of the above third link in reverse order obtains the fourth message, for example, put together the above message msgB submitted to B and the B node id, that is, msgB|B, and then use A’s public key for the message Encrypt to get msgA.
上述第一客户端在对应的区块链节点,根据上述第三链路,发布上述第四消息,直至上述话题处理节点接收到上述第三消息,即上述第一客户端将msgA消息递交给A,A节点用自己的私钥解密msgA,根据前文,将得到以下信息:msgB和B。然后,A节点将msgB转给B,B做类似的事情,以此类推,直到D节点接收消息到msgD,具体处理过程如图5所示。The above-mentioned first client publishes the above-mentioned fourth message on the corresponding blockchain node according to the above-mentioned third link until the above-mentioned topic processing node receives the above-mentioned third message, that is, the above-mentioned first client submits the msgA message to A , Node A decrypts msgA with its own private key. According to the above, the following information will be obtained: msgB and B. Then, node A transfers msgB to B, and B does similar things, and so on, until node D receives the message and sends it to msgD. The specific process is shown in Figure 5.
上述话题处理节点接收到上述第三消息后,可以对上述第三消息进行解密,获得上述创建话题指令,并根据上述待发布话题的标识进行话题发布记录,例如在话题表中添加话题记录。如果解密消息后,话题不存在,则上述话题处理节点可以在话题表中添加一个话题记录:After the topic processing node receives the third message, it can decrypt the third message to obtain the topic creation instruction, and record the topic release according to the identifier of the topic to be released, for example, add a topic record in the topic table. If the topic does not exist after decrypting the message, the above topic processing node can add a topic record in the topic table:
话题topic 订阅者subscriber
DemoTopicDemoTopic Null(空)Null
上述话题处理节点还可以将订阅表通过泛洪等现有技术同步给网络其他节点,保证冗余等。The above-mentioned topic processing node can also synchronize the subscription table to other nodes in the network through existing technologies such as flooding to ensure redundancy.
在本申请实施例中,就话题创建而言,由于第一客户端通过第三链路发布消息,话题处理节点是不知道消息的来源,因此保证了不知道话题的发送人是谁。第一客户端对应的区块链节点虽然知道创建者发送了一条消息,但由于第一客户端对消息进行了加密,其并不知道这条消息的内容是什么,甚至连它的类型都不知道,无法区分是话题创建、话题订阅、消息发布等,解决现有私有话题通过对订阅者和发布者进行身份认证来发布-订阅,存在安全性较差的问题,降低商业机密泄露的风险。In this embodiment of the application, as far as topic creation is concerned, since the first client publishes a message through the third link, the topic processing node does not know the source of the message, so it is guaranteed not to know who the sender of the topic is. Although the blockchain node corresponding to the first client knows that the creator sent a message, because the first client encrypts the message, it does not know what the content of the message is, or even its type. Knowing that it is impossible to distinguish between topic creation, topic subscription, message publishing, etc., solve the problem of poor security and reduce the risk of commercial secret leakage by solving the problem of publishing-subscribing for existing private topics through identity authentication of subscribers and publishers.
S402:利用上述区块链系统中的话题处理节点,对上述发布消息指令进行加密,获得第一消息。S402: Utilize the topic processing node in the above-mentioned blockchain system to encrypt the above-mentioned message publishing instruction to obtain the first message.
其中,上述第一客户端可以根据上述待发布话题,在上述区块链系统中确定话题处理节点。例如,上述第一客户端据话题名称字符串(比如DemoTopic),执行安全散列算法(Secure Hash Algorithm,SHA)256哈希,得到一个256位的大整数,再使用得到的大整数,对系统中的节点数目(如上述26个节点)求余数,得到的余数对应到的节点,就是话题处理节点,类似于:余数为0,话题节点为A;余数为1,话题节点为B;…。在本申请实施例中,假定得到的话题处理节点是D节点。Wherein, the first client may determine a topic processing node in the blockchain system according to the topic to be published. For example, the above-mentioned first client executes the Secure Hash Algorithm (SHA) 256 hash according to the topic name string (such as DemoTopic) to obtain a 256-bit large integer, and then uses the obtained large integer to update the system The number of nodes in (such as the above 26 nodes) calculates the remainder, and the node corresponding to the obtained remainder is the topic processing node, similar to: if the remainder is 0, the topic node is A; if the remainder is 1, the topic node is B;  …. In the embodiment of this application, it is assumed that the obtained topic processing node is a D node.
这里,上述第一客户端可以利用上述区块链系统中的话题处理节点的公钥,对上述发布消息指令进行加密,获得第一消息,如把上述发布消息指令用D节点公钥加密,得到消息msgD。Here, the above-mentioned first client can use the public key of the topic processing node in the above-mentioned blockchain system to encrypt the above-mentioned publishing message command to obtain the first message. For example, encrypt the above-mentioned message publishing command with the D node public key to obtain message msgD.
S403:基于第一客户端在上述区块链系统中发布消息的第二链路,对上述第一消息进行加密,获得第二消息。S403: Encrypt the above-mentioned first message based on the second link through which the first client publishes a message in the above-mentioned blockchain system, to obtain a second message.
示例性的,上述第一客户端可以按照第二预设顺序,利用上述第二链路中各个区块链节点的公钥,对上述第一消息进行层层加密处理, 获得上述第二消息。例如,上述第一客户端可以首先确定一条发布链路作为第一客户端在上述区块链系统中发布消息的第二链路,然后按倒序的方式,使用公钥层层加密,如下所示,假设选择的链路是L,B,C,进行如下加密:Exemplarily, the above-mentioned first client may perform layer-by-layer encryption processing on the above-mentioned first message by using the public keys of each blockchain node in the above-mentioned second link according to a second preset order to obtain the above-mentioned second message. For example, the above-mentioned first client can first determine a release link as the second link for the first client to publish messages in the above-mentioned blockchain system, and then use the public key layer-by-layer encryption in reverse order, as shown below , assuming that the selected link is L, B, C, encrypt as follows:
把上述第一消息和上述话题处理节点的标识拼在一起,用上述第二链路按倒序的第一区块链节点的公钥加密,例如把给D的消息和D节点id拼一起即msgD,用C的公钥加密得到msgC;Put together the first message above and the ID of the topic processing node above, and encrypt it with the public key of the first blockchain node in the reverse order of the second link above, for example, put together the message for D and the node ID of D, that is msgD , use C's public key to encrypt to get msgC;
把加密后的消息和上述按倒序的第一区块链节点的标识拼在一起,用上述第二链路按倒序的第二区块链节点的公钥加密,例如把上述递交给C的消息和C节点id拼一起即msgC|C,用B的公钥加密得到msgB;Put together the encrypted message and the identity of the above-mentioned first blockchain node in reverse order, and encrypt it with the public key of the second blockchain node in reverse order on the above-mentioned second link, for example, the above-mentioned message submitted to C Combined with the C node id, it is msgC|C, and encrypted with B's public key to obtain msgB;
同理,把加密后的消息和上述按倒序的第二区块链节点的标识拼在一起,用上述第二链路按倒序的第三区块链节点的公钥加密,重复上述操作,直至上述第二链路按倒序的最后一个区块链节点,得到第二消息,例如把上述递交给B的消息和B节点id拼一起即msgB|B,用L节点的公钥加密得到msgL。In the same way, put together the encrypted message and the identity of the second blockchain node in reverse order above, encrypt with the public key of the third blockchain node in reverse order on the second link above, and repeat the above operations until The second link is the last blockchain node in reverse order to obtain the second message. For example, put together the above message submitted to B and the B node id to form msgB|B, and encrypt it with the public key of L node to obtain msgL.
S404:在对应的区块链节点,根据上述第二链路,发布上述第二消息,直至上述话题处理节点接收到上述第一消息,并对上述第一消息进行解密,获得上述发布消息指令,根据上述待发布话题的标识,获得第二客户端对应的返回地址,并根据第二客户端对应的返回地址,推送上述发布消息指令,以使第二客户端基于对应的区块链节点,接收到上述发布消息指令,对上述已加密的待发送消息进行解密,获得上述待发送消息。S404: At the corresponding blockchain node, publish the above-mentioned second message according to the above-mentioned second link until the above-mentioned topic processing node receives the above-mentioned first message, decrypts the above-mentioned first message, and obtains the above-mentioned release message instruction, Obtain the return address corresponding to the second client according to the identification of the topic to be published above, and push the above message publishing instruction according to the return address corresponding to the second client, so that the second client can receive To the above-mentioned publishing message instruction, the above-mentioned encrypted message to be sent is decrypted to obtain the above-mentioned message to be sent.
这里,上述处理装置在获得上述第二消息后,可以在对应的区块链节点,根据上述第二链路,发布上述第二消息,直至上述话题处理节点接收到上述第一消息,例如上述处理装置在对应的区块链节点,将上述第二消息交给L,L节点用自己的私钥解密,得到以下信息:msgB和B。然后,L转发给节点B,以此类推,直到D节点接收消息。D节点此时拿到了完整的发送话题请求,包括:话题名称、已用 话题密钥加密的消息内容和第一客户端返回地址(发布人返回地址)。Here, after the above-mentioned processing device obtains the above-mentioned second message, it can publish the above-mentioned second message on the corresponding block chain node according to the above-mentioned second link until the above-mentioned topic processing node receives the above-mentioned first message, for example, the above-mentioned processing The device is on the corresponding blockchain node, and the above-mentioned second message is given to L, and L node decrypts it with its own private key, and obtains the following information: msgB and B. Then, L forwards to node B, and so on until node D receives the message. Node D has obtained the complete sending topic request at this time, including: topic name, message content encrypted with the topic key and the return address of the first client (publisher return address).
上述话题处理节点可以根据上述待发布话题的标识,获得第二客户端对应的返回地址,例如D节点取出话题名称字段,如果话题存在,则提取每一个订阅者的返回地址。上述话题处理节点可以进一步根据上述第二客户端对应的返回地址,推送上述发布消息指令,以使第二客户端基于对应的区块链节点,接收到上述发布消息指令。例如D节点构造消息中转请求,包括:发送话题请求(话题名称、已加密的消息内容和发布人返回地址)和订阅人返回地址。D节点取出内层订阅地址和路由节点,发现是交给F节点的,于是将内层订阅地址,替换到中转请求中,并递交给F节点。F节点用私钥解密订阅人返回地址,类似于前文做法,取出内层订阅地址和路由节点,发现应继续递交给E,于是将内层订阅地址替换到中转请求中的订阅人返回地址,然后路由给E。E节点用私钥解密订阅人返回地址,类似于前文做法,取出内层订阅地址和路由节点,发现应继续递交给G,于是将内层订阅地址替换到中转请求中的订阅人返回地址,然后路由给E。G节点收到消息后,根据里面记录的订阅者信息,推送给第二客户端(即订阅者的客户端),具体过程如图6所示。The above-mentioned topic processing node can obtain the corresponding return address of the second client according to the identification of the above-mentioned topic to be published. For example, the D node extracts the topic name field, and if the topic exists, extracts the return address of each subscriber. The topic processing node may further push the message publishing instruction according to the return address corresponding to the second client, so that the second client receives the message publishing instruction based on the corresponding blockchain node. For example, node D constructs a message transfer request, including: sending a topic request (topic name, encrypted message content, and publisher's return address) and a subscriber's return address. Node D takes out the inner layer subscription address and routing node and finds that it is handed over to node F, so it replaces the inner layer subscription address with the transfer request and submits it to node F. Node F decrypts the subscriber’s return address with its private key. Similar to the previous method, it takes out the inner subscription address and routing node, and finds that it should continue to be submitted to E, so it replaces the inner subscription address with the subscriber’s return address in the transit request, and then route to E. Node E decrypts the subscriber’s return address with the private key. Similar to the previous method, it takes out the inner subscription address and routing node, and finds that it should continue to be submitted to G, so it replaces the inner subscription address with the subscriber’s return address in the transit request, and then route to E. After the G node receives the message, it pushes it to the second client (ie, the client of the subscriber) according to the subscriber information recorded therein. The specific process is shown in FIG. 6 .
进一步地,上述第二客户端对上述已加密的待发送消息进行解密,获得待发送消息。Further, the second client decrypts the encrypted message to be sent to obtain the message to be sent.
另外,上述第一客户端根据上述第二链路,发布上述第二消息之后,还可以基于对应的区块链节点,接收上述第二客户端根据上述第一客户端对应的返回地址返回的回复消息,该回复消息携带已加密的回复内容,进而,对上述已加密的回复内容进行解密,获得上述第二客户端的回复内容。In addition, after the above-mentioned first client publishes the above-mentioned second message according to the above-mentioned second link, it can also receive the reply returned by the above-mentioned second client according to the return address corresponding to the above-mentioned first client based on the corresponding blockchain node message, the reply message carries encrypted reply content, and then decrypts the encrypted reply content to obtain the reply content of the second client.
示例性的,上述第二客户端在获得上述待发送消息后可以根据第一客户端返回地址(发布人返回地址),构造回复消息指令,由以下内容构成:回复内容,已用话题密钥加密和第一客户端返回地址(发布人返回地址)。Exemplarily, after obtaining the above-mentioned message to be sent, the second client can construct a reply message instruction according to the return address of the first client (return address of the issuer), which consists of the following content: reply content, which has been encrypted with a topic key and the return address of the first client (publisher return address).
上述第二客户端根据第一客户端返回地址返回上述回复消息,第 一客户端接收上述回复消息,对上述已加密的回复内容进行解密,获得上述第二客户端的回复内容。例如第二客户端(订阅人的客户端)将回复消息交给网关G,网关G根据发布人返回地址,取出内层返回地址,替换到发布人返回地址,然后提交给L节点,类似于前文,不再赘述。L节点用私钥解密发布人返回地址,发现是一个应投递给M的返回地址,因此取出内层返回地址并替换发布人返回地址后,递交给M。反复上述过程,直到N收到消息。N解密开后,发现是给发布人信息的,如果第一客户端(发布者的客户端)还在线,就直接发给发布者的客户端。发布者的客户端用话题密钥解密,至此,对话完成。其中,具体过程参见图7。The second client returns the reply message according to the return address of the first client, and the first client receives the reply message, decrypts the encrypted reply content, and obtains the reply content of the second client. For example, the second client (subscriber's client) sends the reply message to the gateway G, and the gateway G takes out the inner return address according to the return address of the publisher, replaces it with the return address of the publisher, and then submits it to the L node, similar to the above ,No longer. Node L decrypts the return address of the publisher with the private key, and finds that it is a return address that should be delivered to M, so it takes out the inner return address and replaces the return address of the publisher, and then submits it to M. Repeat the above process until N receives the message. After N decrypts it, it is found that it is for the publisher's information. If the first client (the publisher's client) is still online, it will be directly sent to the publisher's client. The publisher's client decrypts with the topic key, and at this point, the conversation is complete. Wherein, refer to FIG. 7 for the specific process.
这里,就消息回复而言,链路上的任何一个节点(除了第一客户端对应的区块链节点)只知道下一个转发地址,却不知道最终要转发到哪里;而网关并不知道真正的消息内容是什么,因为已经被话题密钥加密。Here, as far as message reply is concerned, any node on the link (except the blockchain node corresponding to the first client) only knows the next forwarding address, but does not know where it will be forwarded to; and the gateway does not know the real What is the content of the message, because it has been encrypted by the topic key.
本申请实施例,通过第一客户端(如发布者的客户端)生成发布消息指令,该发布消息指令携带待发布话题的标识、已加密的待发送消息和第一客户端对应的返回地址,其中,该返回地址根据第一客户端在区块链系统中接收返回消息的第一链路确定,进而,利用话题处理节点和第一客户端发布消息的第二链路,对上述发布消息指令进行加密,从而,根据第二链路,发布加密后的消息,直至话题处理节点接收到相应消息进行解密,获得上述发布消息指令,并根据上述待发布话题的标识,获得第二客户端(如订阅者的客户端)对应的返回地址,推送上述发布消息指令,以使第二客户端接收到上述发布消息指令,获得待发送消息。其中,由于第一客户端通过第二链路发布消息,话题处理节点是不知道消息的来源;第一客户端对应的区块链节点虽然知道发布者发送了一条消息,但由于第一客户端对消息进行了加密,其并不知道这条消息的内容是什么;订阅者接收到了消息,最多知道返回地址的首个转发节点,但真正的发布人是谁,并不清楚,解决现有私有话题通过对订阅者和发布者进行身份认证来发布-订阅,存在 安全性较差的问题,降低商业机密泄露的风险,减少相应的损失。In this embodiment of the present application, the first client (such as the publisher's client) generates an instruction to publish a message, and the instruction to issue a message carries the identifier of the topic to be published, the encrypted message to be sent, and the return address corresponding to the first client, Wherein, the return address is determined according to the first link through which the first client receives the return message in the blockchain system, and then, using the topic processing node and the second link through which the first client publishes the message, the above-mentioned publishing instruction Encrypt, thereby, according to the second link, release the encrypted message, until the topic processing node receives the corresponding message to decrypt, obtain the above-mentioned publishing message instruction, and according to the identification of the above-mentioned topic to be released, obtain the second client (such as The return address corresponding to the subscriber's client terminal) pushes the above message publishing instruction, so that the second client receives the above message publishing instruction and obtains the message to be sent. Among them, since the first client publishes a message through the second link, the topic processing node does not know the source of the message; although the block chain node corresponding to the first client knows that the publisher sent a message, because the first client The message is encrypted, and it does not know what the content of the message is; the subscriber receives the message, and at most knows the first forwarding node of the return address, but it is not clear who the real publisher is. Topics publish-subscribe by authenticating subscribers and publishers, which has poor security, reduces the risk of commercial secret leakage, and reduces corresponding losses.
另外,图8为本申请实施例提供的另一种区块链消息传输方法的流程示意图,本实施例的执行主体可以为图3所示实施例中的第二客户端,具体可根据实际情况确定。如图8所示,本申请实施例提供的区块链消息传输方法包括如下步骤:In addition, FIG. 8 is a schematic flowchart of another blockchain message transmission method provided by the embodiment of the present application. The execution subject of this embodiment may be the second client in the embodiment shown in FIG. Sure. As shown in Figure 8, the blockchain message transmission method provided by the embodiment of the present application includes the following steps:
S801:基于对应的区块链节点,接收上述区块链系统中的话题处理节点推送的发布消息指令,该发布消息指令为第一客户端根据待发布话题生成的,上述发布消息指令携带上述待发布话题的标识、已加密的待发送消息和第一客户端对应的返回地址,其中,第一客户端对应的返回地址根据第一客户端在所述区块链系统中接收返回消息的第一链路确定,上述发布消息指令为第一客户端利用上述话题处理节点,对上述发布消息指令进行加密,获得第一消息,并基于第一客户端在上述区块链系统中发布消息的第二链路,对上述第一消息进行加密,获得第二消息,根据上述第二链路,发布上述第二消息后,由上述话题处理节点接收到上述第一消息,并对上述第一消息进行解密后获得的。S801: Based on the corresponding blockchain node, receive a message release instruction pushed by the topic processing node in the above blockchain system. The message release instruction is generated by the first client according to the topic to be released. Publish the identifier of the topic, the encrypted message to be sent, and the return address corresponding to the first client, wherein the return address corresponding to the first client is based on the first client receiving the return message in the blockchain system The link is confirmed, and the above-mentioned publishing message instruction is that the first client uses the above-mentioned topic processing node to encrypt the above-mentioned publishing message instruction to obtain the first message, and based on the second link, encrypting the above-mentioned first message to obtain a second message, according to the above-mentioned second link, after publishing the above-mentioned second message, the above-mentioned topic processing node receives the above-mentioned first message, and decrypts the above-mentioned first message acquired afterwards.
其中,上述第二客户端在接收上述区块链系统中的话题处理节点推送的发布消息指令之前,还可以生成订阅话题指令,该订阅话题指令携带上述待发布话题的标识和第二客户端对应的返回地址,其中,第二客户端对应的返回地址根据第二客户端在上述区块链系统中接收返回消息的第四链路确定,进而,利用上述话题处理节点,对上述订阅话题指令进行加密,获得第五消息,基于第二客户端在上述区块链系统中发布消息的第五链路,对上述第五消息进行加密,获得第六消息,最后,在对应的区块链节点,根据上述第五链路,发布上述第六消息,直至上述话题处理节点接收到上述第五消息,并对上述第五消息进行解密,获得上述订阅话题指令,根据上述待发布话题的标识和第二客户端对应的返回地址,进行话题订阅记录。Wherein, before the second client receives the message release instruction pushed by the topic processing node in the blockchain system, it may also generate a topic subscription instruction, and the topic subscription instruction carries the identifier of the topic to be published and corresponds to the second client. The return address of the second client, wherein the return address corresponding to the second client is determined according to the fourth link of the second client receiving the return message in the above-mentioned blockchain system, and then, using the above-mentioned topic processing node to execute the above-mentioned subscribing topic instruction Encrypt to obtain the fifth message, based on the fifth link of the second client publishing the message in the above blockchain system, encrypt the above fifth message to obtain the sixth message, and finally, at the corresponding blockchain node, According to the above-mentioned fifth link, publish the above-mentioned sixth message until the above-mentioned topic processing node receives the above-mentioned fifth message, and decrypts the above-mentioned fifth message to obtain the above-mentioned subscribing topic command, according to the above-mentioned identification of the topic to be published and the second The corresponding return address of the client, and record the topic subscription.
这里,上述第二客户端在生成订阅话题指令之前,还可以获取上述第四链路中各个区块链节点的公钥和标识,然后,按照第三预设顺 序,利用上述第四链路中各个区块链节点的公钥,对上述第二客户端的用户信息和上述第四链路中各个区块链节点的标识进行层层加密处理,获得第二客户端对应的返回地址。Here, before the above-mentioned second client generates the command to subscribe to the topic, it can also obtain the public key and identification of each blockchain node in the above-mentioned fourth link, and then, according to the third preset order, use the The public key of each block chain node performs layer-by-layer encryption processing on the user information of the second client and the identification of each block chain node in the fourth link to obtain the return address corresponding to the second client.
另外,上述第二客户端还可以按照第四预设顺序,利用上述第五链路中各个区块链节点的公钥,对上述第五消息进行层层加密处理,获得上述第六消息。In addition, the above-mentioned second client can also use the public key of each blockchain node in the above-mentioned fifth link to perform layer-by-layer encryption processing on the above-mentioned fifth message according to the fourth preset sequence to obtain the above-mentioned sixth message.
示例性的,上述第二客户端(订阅者的客户端)可以先选择一条链路作为在上述区块链系统中接收返回消息的第四链路,比如选择,F,E,G,希望接收消息的时候,消息通过D->F->E->G的顺序路由到订阅者。G节点作为链路末端,上述第二客户端连接着G节点。上述第二客户端将上述链路进行加密,得到返回地址,步骤可以如下:Exemplarily, the above-mentioned second client (subscriber's client) can first select a link as the fourth link to receive the return message in the above-mentioned blockchain system, for example, select, F, E, G, hope to receive When receiving a message, the message is routed to the subscriber in the order of D->F->E->G. The G node is used as the end of the link, and the above-mentioned second client is connected to the G node. The above-mentioned second client encrypts the above-mentioned link to obtain the return address, and the steps can be as follows:
首先将第二客户端的用户信息,即订阅者的信息,用上述第四链路按照倒序的第一个区块链节点的公钥加密,若用G的公钥加密,得到msgG。然后将加密的信息和上述按照倒序的第一个区块链节点的标识拼在一起,用上述第四链路按照倒序的第二个区块链节点的公钥加密,如将上述G的信息和G节点的id拼一起,即msgG|G,用E的公钥加密,得到msgE。同理,再将加密的信息和上述按照倒序的第二个区块链节点的标识拼在一起,用上述第四链路按照倒序的第三个区块链节点的公钥加密,重复执行上述步骤,直至上述第四链路的最后一个区块链节点,如将上述给E的信息和E节点的id拼一起,即msgE|E,用F的公钥加密,得到msgF,把上述给F的信息和F节点的id拼在一起,即msgF|F,获得第二客户端对应的返回地址(订阅者的返回地址)。例如如图9所示,一个持有该返回地址的消息是如何返回给第二客户端的(订阅者的客户端)。First, the user information of the second client, that is, the subscriber information, is encrypted with the public key of the first blockchain node in the reverse order of the fourth link above. If encrypted with the public key of G, msgG is obtained. Then put together the encrypted information and the identification of the first blockchain node in reverse order above, and encrypt with the public key of the second blockchain node in reverse order on the fourth link above, such as the information of G above Put it together with the id of node G, that is, msgG|G, and encrypt it with the public key of E to get msgE. In the same way, put the encrypted information together with the identity of the second blockchain node in reverse order above, encrypt with the public key of the third blockchain node in reverse order on the fourth link above, and repeat the above Step, until the last block chain node of the fourth link above, if the above information for E is put together with the id of the E node, that is, msgE|E, encrypted with the public key of F to obtain msgF, and the above information for F The information of and the id of the F node are put together, that is, msgF|F, to obtain the return address corresponding to the second client (subscriber's return address). For example, as shown in FIG. 9 , how a message holding the return address is returned to the second client (subscriber's client).
上述第二客户端生成的订阅话题指令可以如下所示,该订阅话题指令携带上述待发布话题的标识和第二客户端对应的返回地址:The subscription topic instruction generated by the above-mentioned second client can be as follows, the subscription topic instruction carries the identifier of the above-mentioned topic to be published and the corresponding return address of the second client:
字段field value
指令类型command type 订阅话题subscribe topic
话题名称topic name DemoTopicDemo Topic
返回地址return address msgF|FmsgF|F
上述第二客户端可以利用上述话题处理节点的公钥,对上述订阅话题指令进行加密,获得第五消息,即把订阅话题指令用D的公钥加密,得到msgD。The second client may use the public key of the topic processing node to encrypt the command to subscribe to the topic to obtain the fifth message, that is, encrypt the command to subscribe to the topic with the public key of D to obtain msgD.
进一步地,上述第二客户端可以先选择一条发送链路作为第二客户端在上述区块链系统中发布消息的第五链路,比如G,Y,Z,按照层层加密的方式,把订阅话题指令加密,如下:Further, the above-mentioned second client can first select a sending link as the fifth link for the second client to publish a message in the above-mentioned blockchain system, such as G, Y, Z, according to the layer-by-layer encryption method, the Subscribe topic command encryption, as follows:
把第五消息和上述话题处理节点的标识(如D节点id)拼一起,得到msgD|D,按倒序方式用上述第五链路的第一区块链节点的公钥加密,如用Z的公钥加密,得到msgZ。然后,把加密信息和上述第五链路的第一区块链节点的标识拼一起,按倒序方式用上述第五链路的第二区块链节点的公钥加密,如把上述递交给Z的消息和Z节点id拼一起,得到msgZ|Z,用Y的公钥加密后得到msgY。同理,再把加密信息和上述第五链路的第二区块链节点的标识拼一起,按倒序方式用上述第五链路的第三区块链节点的公钥加密,重复执行上述操作直至上述第五链路的最后一个区块链节点,如把上述递交给Y的消息和Y节点id拼一起,得到msgY|Y,用G节点的公钥加密后得到msgG,获得第六消息。Combine the fifth message with the identification of the above-mentioned topic processing node (such as D node id) to obtain msgD|D, and encrypt it with the public key of the first blockchain node of the above-mentioned fifth link in reverse order, such as using Z's Encrypt with the public key to get msgZ. Then, put together the encrypted information and the identification of the first blockchain node of the fifth link, and encrypt it with the public key of the second blockchain node of the fifth link in reverse order, such as submitting the above to Z The message and Z node id are put together to get msgZ|Z, and msgY is obtained after encrypting with Y's public key. In the same way, put together the encrypted information and the identification of the second blockchain node of the above-mentioned fifth link, encrypt with the public key of the third blockchain node of the above-mentioned fifth link in reverse order, and repeat the above operations Up to the last blockchain node of the fifth link above, if the above message submitted to Y is put together with the Y node id, msgY|Y is obtained, and msgG is obtained after encrypting with the public key of G node, and the sixth message is obtained.
在对应的区块链节点,上述第二客户端根据上述第五链路,发布上述第六消息,直至上述话题处理节点接收到上述第五消息。如上述第二客户端把msgG发送给G,G解密后得到msgY和Y,于是转发给Y,依此类推,直到D收到消息。At the corresponding blockchain node, the second client publishes the sixth message according to the fifth link until the topic processing node receives the fifth message. For example, the second client above sends msgG to G, and G decrypts to get msgY and Y, then forwards it to Y, and so on, until D receives the message.
上述话题处理节点对上述第五消息进行解密,获得上述订阅话题指令,并根据上述待发布话题的标识和第二客户端对应的返回地址,进行话题订阅记录。如D节点取出消息里的指令,在自己的话题表中记录订阅者信息:The above-mentioned topic processing node decrypts the above-mentioned fifth message, obtains the above-mentioned subscribing topic instruction, and records the topic subscription according to the identifier of the above-mentioned topic to be published and the corresponding return address of the second client. For example, the D node takes out the instructions in the message and records the subscriber information in its own topic table:
话题topic 订阅者subscriber
DemoTopicDemo Topic 返回链路msgF|Freturn link msgF|F
D节点还可以将订阅表通过泛洪等同步给网络其他节点,保证冗余等。Node D can also synchronize the subscription table to other nodes in the network through flooding to ensure redundancy.
在本申请实施例中,就话题订阅而言,由于第二客户端通过第五链路发布消息,话题处理节点并不知道消息的来源,而且里面是订阅人的返回地址,只记录了转发节点的信息,却不知道订阅人自身的信息,因此保证了订阅人对话题处理节点,乃至任何节点的隐匿性。订阅者的区块链节点虽然知道订阅者发送了一条消息,但由于第二客户端对消息进行了加密,其不知道这条消息的内容是什么,甚至连它的类型都不知道,无法区分是话题创建、话题订阅、消息发布等,解决现有私有话题通过对订阅者和发布者进行身份认证来发布-订阅,存在安全性较差的问题,降低商业机密泄露的风险。In the embodiment of this application, as far as topic subscription is concerned, since the second client publishes a message through the fifth link, the topic processing node does not know the source of the message, and it contains the return address of the subscriber, and only the forwarding node is recorded information, but does not know the information of the subscriber itself, thus ensuring the concealment of the subscriber to the topic processing node, or even any node. Although the subscriber's blockchain node knows that the subscriber has sent a message, because the second client encrypts the message, it does not know what the content of the message is, or even its type, and cannot distinguish It is topic creation, topic subscription, message publishing, etc., which solves the problem of poor security and reduces the risk of commercial secret leakage by authenticating subscribers and publishers to publish-subscribe existing private topics.
S802:对上述已加密的待发送消息进行解密,获得上述待发送消息。S802: Decrypt the encrypted message to be sent to obtain the message to be sent.
这里,上述第二客户端在对上述已加密的待发送消息进行解密,获得所述待发送消息之后,还可以生成回复消息指令,该回复消息指令携带已加密的回复内容和第一客户端对应的返回地址,进而,在对应的区块链节点,根据第一客户端对应的返回地址,返回上述已加密的回复内容至第一客户端,以使第一客户端对上述已加密的回复内容进行解密,获得上述第二客户端的回复内容。Here, after the second client decrypts the encrypted message to be sent and obtains the message to be sent, it may also generate a reply message instruction, the reply message instruction carries the encrypted reply content corresponding to the first client. return address, and then, at the corresponding block chain node, return the above-mentioned encrypted reply content to the first client according to the corresponding return address of the first client, so that the first client can respond to the above-mentioned encrypted reply content Decrypt to obtain the reply content of the second client.
本申请实施例通过第二客户端(如订阅者的客户端)基于对应的区块链节点,接收区块链系统中的话题处理节点推送的发布消息指令,该发布消息指令为第一客户端(如发布者的客户端)根据待发布话题生成的,该发布消息指令携带待发布话题的标识、已加密的待发送消息和第一客户端对应的返回地址,其中,第一客户端对应的返回地址根据第一客户端在区块链系统中接收返回消息的第一链路确定,上述发布消息指令为第一客户端利用上述话题处理节点和第一客户端在区块链系统中发布消息的第二链路,对上述发布消息指令进行加密,根据第二链路,发布加密消息后,由话题处理节点接收到相应消息,并进行解密后获得的,进而,第二客户端对上述已加密的待发送消息进行解密,获得上述待发送消息。其中,由于第一客户端通过第二链路发布消息,话题处理节点是不知道消息的来源;第一客户端对应的 区块链节点虽然知道发布者发送了一条消息,但由于第一客户端对消息进行了加密,其并不知道这条消息的内容是什么;订阅者接收到了消息,最多知道返回地址的首个转发节点,但真正的发布人是谁,并不清楚,提高区块链上消息匿名传输的安全性,降低商业机密泄露的风险,减少相应的损失。In the embodiment of the present application, the second client (such as a subscriber's client) receives the message publishing instruction pushed by the topic processing node in the blockchain system based on the corresponding blockchain node. The message publishing instruction is the first client (such as the publisher's client) generated according to the topic to be published, the message release instruction carries the identifier of the topic to be published, the encrypted message to be sent and the return address corresponding to the first client, wherein the corresponding return address of the first client The return address is determined according to the first link on which the first client receives the return message in the blockchain system, and the above message publishing instruction is for the first client to use the above topic processing node and the first client to publish a message in the blockchain system The second link of the above-mentioned publishing message instruction is encrypted. According to the second link, after publishing the encrypted message, the topic processing node receives the corresponding message and decrypts it. The encrypted message to be sent is decrypted to obtain the above message to be sent. Among them, since the first client publishes a message through the second link, the topic processing node does not know the source of the message; although the block chain node corresponding to the first client knows that the publisher sent a message, because the first client The message is encrypted, and it does not know what the content of the message is; the subscriber receives the message, and at most knows the first forwarding node of the return address, but it is not clear who the real publisher is. The security of anonymous transmission of online messages reduces the risk of commercial secret leakage and corresponding losses.
对应于上文实施例的区块链消息传输方法,图10为本申请实施例提供的区块链消息传输装置的结构示意图。为了便于说明,仅示出了与本申请实施例相关的部分。图10为本申请实施例提供的一种区块链消息传输装置的结构示意图,该区块链消息传输装置100包括:第一指令生成模块1001、第一信息加密模块1002、第二信息加密模块1003以及信息发布模块1004。这里的区块链消息传输装置可以是上述第一客户端本身,或者是实现第一客户端的功能的芯片或者集成电路。这里需要说明的是,第一指令生成模块、第一信息加密模块、第二信息加密模块以及信息发布模块的划分只是一种逻辑功能的划分,物理上两者可以是集成的,也可以是独立的。Corresponding to the blockchain message transmission method in the above embodiment, FIG. 10 is a schematic structural diagram of a blockchain message transmission device provided in the embodiment of the present application. For ease of description, only the parts related to the embodiment of the present application are shown. Fig. 10 is a schematic structural diagram of a blockchain message transmission device provided by an embodiment of the present application. The blockchain message transmission device 100 includes: a first instruction generation module 1001, a first information encryption module 1002, and a second information encryption module 1003 and an information publishing module 1004. The block chain message transmission device here may be the above-mentioned first client itself, or a chip or an integrated circuit that realizes the function of the first client. What needs to be explained here is that the division of the first instruction generation module, the first information encryption module, the second information encryption module and the information release module is only a division of logical functions. Physically, the two can be integrated or independent. of.
其中,第一指令生成模块1001,用于根据待发布话题,生成发布消息指令,所述发布消息指令携带所述待发布话题的标识、已加密的待发送消息和所述第一客户端对应的返回地址,其中,所述第一客户端对应的返回地址根据所述第一客户端在所述区块链系统中接收返回消息的第一链路确定。Wherein, the first instruction generating module 1001 is configured to generate an instruction to issue a message according to a topic to be issued, and the instruction to issue a message carries the identifier of the topic to be issued, the encrypted message to be sent, and the message corresponding to the first client. A return address, wherein the return address corresponding to the first client is determined according to the first link through which the first client receives the return message in the blockchain system.
第一信息加密模块1002,用于利用所述区块链系统中的话题处理节点,对所述发布消息指令进行加密,获得第一消息。The first information encryption module 1002 is configured to use the topic processing node in the blockchain system to encrypt the instruction to issue a message to obtain a first message.
第二信息加密模块1003,用于基于所述第一客户端在所述区块链系统中发布消息的第二链路,对所述第一消息进行加密,获得第二消息。The second information encryption module 1003 is configured to encrypt the first message based on the second link of the first client publishing the message in the blockchain system to obtain a second message.
信息发布模块1004,用于在对应的区块链节点,根据所述第二链路,发布所述第二消息,直至所述话题处理节点接收到所述第一消息,并对所述第一消息进行解密,获得所述发布消息指令,根据所述待发布话题的标识,获得第二客户端对应的返回地址,并根据所述第 二客户端对应的返回地址,推送所述发布消息指令,以使所述第二客户端基于对应的区块链节点,接收到所述发布消息指令,对所述已加密的待发送消息进行解密,获得所述待发送消息。The information publishing module 1004 is configured to publish the second message on the corresponding block chain node according to the second link until the topic processing node receives the first message, and Decrypting the message to obtain the message publishing instruction, obtaining the return address corresponding to the second client according to the identifier of the topic to be published, and pushing the message publishing instruction according to the return address corresponding to the second client, The second client receives the message publishing instruction based on the corresponding block chain node, decrypts the encrypted message to be sent, and obtains the message to be sent.
在一种可能的设计中,所述第一指令生成模块1001,还用于:In a possible design, the first instruction generating module 1001 is further configured to:
获取所述第一链路中各个区块链节点的公钥和标识;Obtain the public key and identification of each block chain node in the first link;
按照第一预设顺序,利用所述第一链路中各个区块链节点的公钥,对所述第一客户端的用户信息和所述第一链路中各个区块链节点的标识进行层层加密处理,获得所述第一客户端对应的返回地址。According to the first preset sequence, using the public key of each block chain node in the first link, layering the user information of the first client and the identification of each block chain node in the first link Layer encryption processing to obtain the return address corresponding to the first client.
在一种可能的实现方式中,所述第二信息加密模块1003,具体用于:In a possible implementation manner, the second information encryption module 1003 is specifically configured to:
按照第二预设顺序,利用所述第二链路中各个区块链节点的公钥,对所述第一消息进行层层加密处理,获得所述第二消息。According to a second preset sequence, the first message is encrypted layer by layer by using the public key of each blockchain node in the second link to obtain the second message.
另外,在一种可能的实现方式中,所述装置还包括第二指令生成模块1005,用于在所述第一指令生成模块1001根据待发布话题,生成发布消息指令之前,生成创建话题指令,所述创建话题指令携带所述待发布话题的标识;利用所述话题处理节点,对所述创建话题指令进行加密,获得第三消息;基于所述第一客户端在所述区块链系统中发布消息的第三链路,对所述第三消息进行加密,获得第四消息;在对应的区块链节点,根据所述第三链路,发布所述第四消息,直至所述话题处理节点接收到所述第三消息,并对所述第三消息进行解密,获得所述创建话题指令,根据所述待发布话题的标识进行话题发布记录。In addition, in a possible implementation manner, the device further includes a second instruction generation module 1005, configured to generate a topic creation instruction before the first instruction generation module 1001 generates a message publishing instruction according to a topic to be published, The creating topic instruction carries the identifier of the topic to be published; using the topic processing node, encrypting the creating topic instruction to obtain a third message; based on the first client in the block chain system Publish the third link of the message, encrypt the third message to obtain the fourth message; at the corresponding blockchain node, publish the fourth message according to the third link until the topic is processed The node receives the third message, decrypts the third message, obtains the instruction for creating a topic, and performs a topic publishing record according to the identifier of the topic to be published.
在一种可能的实现方式中,所述装置还包括第二信息接收模块1006,用于在所述信息发布模块1004根据所述第二链路,发布所述第二消息之后,基于对应的区块链节点,接收所述第二客户端根据所述第一客户端对应的返回地址返回的回复消息,所述回复消息携带已加密的回复内容;对所述已加密的回复内容进行解密,获得所述第二客户端的回复内容。In a possible implementation manner, the device further includes a second information receiving module 1006, configured to, after the information publishing module 1004 publishes the second message according to the second link, based on the corresponding area The block chain node receives the reply message returned by the second client according to the return address corresponding to the first client, and the reply message carries encrypted reply content; decrypts the encrypted reply content to obtain Reply content of the second client.
本申请实施例提供的装置,可用于执行上述图4所述方法实施例 的技术方案,其实现原理和技术效果类似,本申请实施例此处不再赘述。The device provided by the embodiment of this application can be used to implement the technical solution of the method embodiment described in Figure 4 above, and its implementation principle and technical effect are similar, so the embodiments of this application will not repeat them here.
图11为本申请实施例提供的另一种区块链消息传输装置的结构示意图,该区块链消息传输装置110包括:第一信息接收模块1101以及信息处理模块1102。这里的区块链消息传输装置可以是上述第二客户端本身,或者是实现第二客户端的功能的芯片或者集成电路。这里需要说明的是,第一信息接收模块以及信息处理模块的划分只是一种逻辑功能的划分,物理上两者可以是集成的,也可以是独立的。FIG. 11 is a schematic structural diagram of another blockchain message transmission device provided by the embodiment of the present application. The blockchain message transmission device 110 includes: a first information receiving module 1101 and an information processing module 1102 . The block chain message transmission device here may be the above-mentioned second client itself, or a chip or an integrated circuit that realizes the function of the second client. What needs to be explained here is that the division of the first information receiving module and the information processing module is only a division of logical functions, and physically the two may be integrated or independent.
其中,第一信息接收模块1101,用于基于对应的区块链节点,接收所述区块链系统中的话题处理节点推送的发布消息指令,所述发布消息指令为第一客户端根据待发布话题生成的,所述发布消息指令携带所述待发布话题的标识、已加密的待发送消息和所述第一客户端对应的返回地址,其中,所述第一客户端对应的返回地址根据所述第一客户端在所述区块链系统中接收返回消息的第一链路确定,所述发布消息指令为所述第一客户端利用所述话题处理节点,对所述发布消息指令进行加密,获得第一消息,并基于所述第一客户端在所述区块链系统中发布消息的第二链路,对所述第一消息进行加密,获得第二消息,根据所述第二链路,发布所述第二消息后,由所述话题处理节点接收到所述第一消息,并对所述第一消息进行解密后获得的。Wherein, the first information receiving module 1101 is configured to receive, based on the corresponding block chain node, the release message instruction pushed by the topic processing node in the block chain system, and the release message instruction is based on the information to be released by the first client. topic generation, the publish message instruction carries the identifier of the topic to be published, the encrypted message to be sent, and the return address corresponding to the first client, wherein the return address corresponding to the first client is based on the The first client receives the first link confirmation of the return message in the blockchain system, and the message publishing instruction is that the first client uses the topic processing node to encrypt the message publishing instruction , obtain the first message, and encrypt the first message based on the second link of the first client publishing the message in the blockchain system to obtain the second message, according to the second link The path is obtained after the topic processing node receives the first message after publishing the second message and decrypts the first message.
信息处理模块1102,用于对所述已加密的待发送消息进行解密,获得所述待发送消息。The information processing module 1102 is configured to decrypt the encrypted message to be sent to obtain the message to be sent.
在一种可能的实现方式中,所述装置还包括第三指令生成模块1103,用于在所述第一信息接收模块1101接收所述区块链系统中的话题处理节点推送的发布消息指令之前,生成订阅话题指令,所述订阅话题指令携带所述待发布话题的标识和所述第二客户端对应的返回地址,其中,所述第二客户端对应的返回地址根据所述第二客户端在所述区块链系统中接收返回消息的第四链路确定;利用所述话题处理节点,对所述订阅话题指令进行加密,获得第五消息;基于所述第二客户端在所述区块链系统中发布消息的第五链路,对所述第五消息 进行加密,获得第六消息;在对应的区块链节点,根据所述第五链路,发布所述第六消息,直至所述话题处理节点接收到所述第五消息,并对所述第五消息进行解密,获得所述订阅话题指令,根据所述待发布话题的标识和所述第二客户端对应的返回地址,进行话题订阅记录。In a possible implementation manner, the device further includes a third instruction generating module 1103, configured to receive the message publishing instruction pushed by the topic processing node in the blockchain system before the first information receiving module 1101 , generate a subscribe topic instruction, the subscribe topic instruction carries the identifier of the topic to be published and the return address corresponding to the second client, wherein the return address corresponding to the second client is based on the The fourth link of receiving the return message in the block chain system is determined; using the topic processing node to encrypt the subscription topic instruction to obtain the fifth message; based on the second client in the area In the block chain system, the fifth link that publishes the message encrypts the fifth message to obtain the sixth message; at the corresponding block chain node, according to the fifth link, the sixth message is released until The topic processing node receives the fifth message, decrypts the fifth message, obtains the subscription topic instruction, and according to the identifier of the topic to be published and the return address corresponding to the second client, Make topic subscription records.
在一种可能的实现方式中,所述第三指令生成模块1103,还用于:In a possible implementation manner, the third instruction generation module 1103 is further configured to:
获取所述第四链路中各个区块链节点的公钥和标识;按照第三预设顺序,利用所述第四链路中各个区块链节点的公钥,对所述第二客户端的用户信息和所述第四链路中各个区块链节点的标识进行层层加密处理,获得所述第二客户端对应的返回地址。Acquiring the public key and identification of each block chain node in the fourth link; according to the third preset order, using the public key of each block chain node in the fourth link, to the second client The user information and the identification of each blockchain node in the fourth link are encrypted layer by layer to obtain the return address corresponding to the second client.
在一种可能的实现方式中,所述第三指令生成模块1103,具体用于:In a possible implementation manner, the third instruction generating module 1103 is specifically configured to:
按照第四预设顺序,利用所述第五链路中各个区块链节点的公钥,对所述第五消息进行层层加密处理,获得所述第六消息。According to a fourth preset sequence, the fifth message is encrypted layer by layer by using the public key of each blockchain node in the fifth link to obtain the sixth message.
在一种可能的实现方式中,所述装置还包括第四指令生成模块1104,用于在所述信息处理模块1102对所述已加密的待发送消息进行解密,获得所述待发送消息之后,生成回复消息指令,所述回复消息指令携带已加密的回复内容和所述第一客户端对应的返回地址;在对应的区块链节点,根据所述第一客户端对应的返回地址,返回所述已加密的回复内容至所述第一客户端,以使所述第一客户端对所述已加密的回复内容进行解密,获得所述第二客户端的回复内容。In a possible implementation manner, the device further includes a fourth instruction generation module 1104, configured to decrypt the encrypted message to be sent by the information processing module 1102 to obtain the message to be sent, Generate a reply message instruction, the reply message instruction carries the encrypted reply content and the return address corresponding to the first client; at the corresponding block chain node, according to the return address corresponding to the first client, return the The encrypted reply content is sent to the first client, so that the first client decrypts the encrypted reply content to obtain the reply content of the second client.
本申请实施例提供的装置,可用于执行上述图8所述方法实施例的技术方案,其实现原理和技术效果类似,本申请实施例此处不再赘述。The device provided by the embodiment of the present application can be used to implement the technical solution of the method embodiment described in FIG. 8 above, and its implementation principle and technical effect are similar, so the embodiments of the present application will not repeat them here.
可选地,图12A和12B示意性地提供本申请所述客户端的一种可能的基本硬件架构示意图。Optionally, FIGS. 12A and 12B schematically provide a schematic diagram of a possible basic hardware architecture of the client described in this application.
参见图12A和12B,客户端1200包括至少一个处理器1201以及通信接口1203。进一步可选的,还可以包括存储器1202和总线1204。Referring to FIGS. 12A and 12B , the client 1200 includes at least one processor 1201 and a communication interface 1203 . Further optionally, a memory 1202 and a bus 1204 may also be included.
其中,客户端1200中,处理器1201的数量可以是一个或多个, 图12A和12B仅示意了其中一个处理器1201。可选地,处理器1201,可以是中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)或者数字信号处理器(digital signal processor,DSP)。如果客户端1200具有多个处理器1201,多个处理器1201的类型可以不同,或者可以相同。可选地,客户端1200的多个处理器1201还可以集成为多核处理器。Wherein, in the client 1200, the number of processors 1201 may be one or more, and FIGS. 12A and 12B only illustrate one of the processors 1201 . Optionally, the processor 1201 may be a central processing unit (central processing unit, CPU), a graphics processing unit (graphics processing unit, GPU) or a digital signal processor (digital signal processor, DSP). If the client 1200 has multiple processors 1201, the types of the multiple processors 1201 may be different, or may be the same. Optionally, multiple processors 1201 of the client 1200 may also be integrated into a multi-core processor.
存储器1202存储计算机指令和数据;存储器1202可以存储实现本申请提供的上述区域管理方法所需的计算机指令和数据,例如,存储器1202存储用于实现上述区域管理方法的步骤的指令。存储器1202可以是以下存储介质的任一种或任一种组合:非易失性存储器(例如只读存储器(Read-Only Memory,ROM)、固态硬盘(Solid State Disk,SSD)、硬盘(Hard-Disk Drive,HDD)、光盘),易失性存储器。The memory 1202 stores computer instructions and data; the memory 1202 may store computer instructions and data required to implement the above-mentioned area management method provided in this application, for example, the memory 1202 stores instructions for implementing the steps of the above-mentioned area management method. The memory 1202 can be any one or any combination of the following storage media: non-volatile memory (such as read-only memory (Read-Only Memory, ROM), solid state disk (Solid State Disk, SSD), hard disk (Hard- Disk Drive, HDD), optical disc), volatile memory.
通信接口1203可以为所述至少一个处理器提供信息输入/输出。也可以包括以下器件的任一种或任一种组合:网络接口(例如以太网接口)、无线网卡等具有网络接入功能的器件。The communication interface 1203 may provide information input/output for the at least one processor. Any one or any combination of the following components may also be included: a network interface (such as an Ethernet interface), a wireless network card and other devices with network access functions.
可选的,通信接口1203还可以用于客户端1200与其它计算设备或者终端进行数据通信。Optionally, the communication interface 1203 may also be used for the client 1200 to perform data communication with other computing devices or terminals.
进一步可选的,图12A和12B用一条粗线表示总线1204。总线1204可以将处理器1201与存储器1202和通信接口1203连接。这样,通过总线1204,处理器1201可以访问存储器1202,还可以利用通信接口1203与其它计算设备或者终端进行数据交互。Further optionally, a thick line represents the bus 1204 in FIGS. 12A and 12B . The bus 1204 can connect the processor 1201 with the memory 1202 and the communication interface 1203 . In this way, the processor 1201 can access the memory 1202 through the bus 1204 , and can also use the communication interface 1203 to perform data interaction with other computing devices or terminals.
在本申请中,客户端1200执行存储器1202中的计算机指令,使得客户端1200实现本申请提供的上述区域管理方法,或者使得客户端1200部署上述的区域管理装置。In this application, the client 1200 executes the computer instructions in the memory 1202, so that the client 1200 implements the above-mentioned area management method provided in this application, or makes the client 1200 deploy the above-mentioned area management device.
从逻辑功能划分来看,示例性的,如图12A所示,存储器1202中可以包括第一指令生成模块1001、第一信息加密模块1002、第二信息加密模块1003、信息发布模块1004、第二指令生成模块1005以及第二信息接收模块1006。这里的包括仅仅涉及存储器中所存储的 指令被执行时可以分别实现第一指令生成模块1001、第一信息加密模块1002、第二信息加密模块1003、信息发布模块1004、第二指令生成模块1005以及第二信息接收模块1006的功能,而不限定是物理上的结构。From the perspective of logical function division, for example, as shown in Figure 12A, the memory 1202 may include a first instruction generation module 1001, a first information encryption module 1002, a second information encryption module 1003, an information publishing module 1004, a second An instruction generating module 1005 and a second information receiving module 1006 . The inclusion here only refers to the first instruction generation module 1001, the first information encryption module 1002, the second information encryption module 1003, the information issuance module 1004, the second instruction generation module 1005 and The function of the second information receiving module 1006 is not limited to the physical structure.
示例性的,如图12B所示,存储器1202中可以包括第一信息接收模块1101、信息处理模块1102、第三指令生成模块1103和第四指令生成模块1104。这里的包括仅仅涉及存储器中所存储的指令被执行时可以实现第一信息接收模块1101、信息处理模块1102、第三指令生成模块1103和第四指令生成模块1104的功能,而不限定是物理上的结构。Exemplarily, as shown in FIG. 12B , the memory 1202 may include a first information receiving module 1101 , an information processing module 1102 , a third instruction generating module 1103 and a fourth instruction generating module 1104 . The inclusion here only refers to the functions of the first information receiving module 1101, the information processing module 1102, the third instruction generating module 1103 and the fourth instruction generating module 1104 that can be realized when the instructions stored in the memory are executed, and are not limited to physical Structure.
另外,上述的客户端除了可以像上述图12A和12B通过软件实现外,也可以作为硬件模块,或者作为电路单元,通过硬件实现。In addition, besides being implemented by software as in the above-mentioned Figures 12A and 12B, the above client can also be implemented by hardware as a hardware module or as a circuit unit.
本申请提供一种计算机可读存储介质,所述计算机程序产品包括计算机指令,所述计算机指令指示计算设备执行本申请提供的上述区块链消息传输方法。The present application provides a computer-readable storage medium, the computer program product includes computer instructions, and the computer instructions instruct a computing device to execute the above-mentioned block chain message transmission method provided in the present application.
本申请提供一种芯片,包括至少一个处理器和通信接口,所述通信接口为所述至少一个处理器提供信息输入和/或输出。进一步,所述芯片还可以包含至少一个存储器,所述存储器用于存储计算机指令。所述至少一个处理器用于调用并运行该计算机指令,以执行本申请提供的上述区块链消息传输方法。The present application provides a chip, including at least one processor and a communication interface, and the communication interface provides information input and/or output for the at least one processor. Further, the chip may further include at least one memory, and the memory is used to store computer instructions. The at least one processor is used to invoke and execute the computer instructions to execute the above-mentioned block chain message transmission method provided by this application.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分 开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.

Claims (15)

  1. 一种区块链消息传输方法,其特征在于,所述方法应用于第一客户端,所述第一客户端对应区块链系统中的一区块链节点,所述方法包括:A block chain message transmission method, characterized in that the method is applied to a first client, and the first client corresponds to a block chain node in the block chain system, and the method includes:
    根据待发布话题,生成发布消息指令,所述发布消息指令携带所述待发布话题的标识、已加密的待发送消息和所述第一客户端对应的返回地址,其中,所述第一客户端对应的返回地址根据所述第一客户端在所述区块链系统中接收返回消息的第一链路确定;According to the topic to be released, generate a message release instruction, the message release instruction carries the identifier of the topic to be released, the encrypted message to be sent, and the return address corresponding to the first client, wherein the first client The corresponding return address is determined according to the first link on which the first client receives the return message in the blockchain system;
    利用所述区块链系统中的话题处理节点,对所述发布消息指令进行加密,获得第一消息;Using the topic processing node in the blockchain system to encrypt the message publishing instruction to obtain the first message;
    基于所述第一客户端在所述区块链系统中发布消息的第二链路,对所述第一消息进行加密,获得第二消息;Encrypting the first message based on the second link of the first client publishing the message in the block chain system to obtain the second message;
    在对应的区块链节点,根据所述第二链路,发布所述第二消息,直至所述话题处理节点接收到所述第一消息,并对所述第一消息进行解密,获得所述发布消息指令,根据所述待发布话题的标识,获得第二客户端对应的返回地址,并根据所述第二客户端对应的返回地址,推送所述发布消息指令,以使所述第二客户端基于对应的区块链节点,接收到所述发布消息指令,对所述已加密的待发送消息进行解密,获得所述待发送消息。At the corresponding block chain node, according to the second link, the second message is issued until the topic processing node receives the first message, and decrypts the first message to obtain the Publishing a message instruction, obtaining a return address corresponding to the second client according to the identifier of the topic to be published, and pushing the posting message instruction according to the return address corresponding to the second client, so that the second client Based on the corresponding block chain node, the terminal receives the message publishing instruction, decrypts the encrypted message to be sent, and obtains the message to be sent.
  2. 根据权利要求1所述的方法,其特征在于,在所述根据待发布话题,生成发布消息指令之前,还包括:The method according to claim 1, characterized in that, before generating the message instruction according to the topic to be released, further comprising:
    获取所述第一链路中各个区块链节点的公钥和标识;Obtain the public key and identification of each block chain node in the first link;
    按照第一预设顺序,利用所述第一链路中各个区块链节点的公钥,对所述第一客户端的用户信息和所述第一链路中各个区块链节点的标识进行层层加密处理,获得所述第一客户端对应的返回地址。According to the first preset sequence, using the public key of each block chain node in the first link, layering the user information of the first client and the identification of each block chain node in the first link Layer encryption processing to obtain the return address corresponding to the first client.
  3. 根据权利要求1或2所述的方法,其特征在于,所述基于所述第一客户端在所述区块链系统中发布消息的第二链路,对所述第一消息进行加密,获得第二消息,包括:The method according to claim 1 or 2, wherein the first message is encrypted based on the second link of the first client publishing a message in the blockchain system to obtain Second message, including:
    按照第二预设顺序,利用所述第二链路中各个区块链节点的公钥,对所述第一消息进行层层加密处理,获得所述第二消息。According to a second preset sequence, the first message is encrypted layer by layer by using the public key of each blockchain node in the second link to obtain the second message.
  4. 根据权利要求1或2所述的方法,其特征在于,在所述根据待发布话题,生成发布消息指令之前,还包括:The method according to claim 1 or 2, further comprising:
    生成创建话题指令,所述创建话题指令携带所述待发布话题的标识;Generate a topic creation instruction, the topic creation instruction carries the identifier of the topic to be published;
    利用所述话题处理节点,对所述创建话题指令进行加密,获得第三消息;Using the topic processing node to encrypt the topic creation command to obtain a third message;
    基于所述第一客户端在所述区块链系统中发布消息的第三链路,对所述第三消息进行加密,获得第四消息;Encrypting the third message based on the third link of the first client publishing the message in the blockchain system to obtain a fourth message;
    在对应的区块链节点,根据所述第三链路,发布所述第四消息,直至所述话题处理节点接收到所述第三消息,并对所述第三消息进行解密,获得所述创建话题指令,根据所述待发布话题的标识进行话题发布记录。At the corresponding block chain node, according to the third link, the fourth message is issued until the topic processing node receives the third message, and decrypts the third message to obtain the A topic instruction is created, and a topic release record is performed according to the identifier of the topic to be released.
  5. 根据权利要求1或2所述的方法,其特征在于,在所述根据所述第二链路,发布所述第二消息之后,还包括:The method according to claim 1 or 2, further comprising: after publishing the second message according to the second link:
    基于对应的区块链节点,接收所述第二客户端根据所述第一客户端对应的返回地址返回的回复消息,所述回复消息携带已加密的回复内容;Based on the corresponding block chain node, receiving the reply message returned by the second client according to the return address corresponding to the first client, the reply message carrying the encrypted reply content;
    对所述已加密的回复内容进行解密,获得所述第二客户端的回复内容。Decrypt the encrypted reply content to obtain the reply content of the second client.
  6. 一种区块链消息传输方法,其特征在于,所述方法应用于第二客户端,所述第二客户端对应区块链系统中的一区块链节点,所述方法包括:A block chain message transmission method, characterized in that the method is applied to a second client, and the second client corresponds to a block chain node in the block chain system, and the method includes:
    基于对应的区块链节点,接收所述区块链系统中的话题处理节点推送的发布消息指令,所述发布消息指令为第一客户端根据待发布话题生成的,所述发布消息指令携带所述待发布话题的标识、已加密的待发送消息和所述第一客户端对应的返回地址,其中,所述第一客户端对应的返回地址根据所述第一客户端在所述区块链系统中接收返 回消息的第一链路确定,所述发布消息指令为所述第一客户端利用所述话题处理节点,对所述发布消息指令进行加密,获得第一消息,并基于所述第一客户端在所述区块链系统中发布消息的第二链路,对所述第一消息进行加密,获得第二消息,根据所述第二链路,发布所述第二消息后,由所述话题处理节点接收到所述第一消息,并对所述第一消息进行解密后获得的;Based on the corresponding block chain node, receive the release message instruction pushed by the topic processing node in the block chain system, the release message instruction is generated by the first client according to the topic to be released, and the release message instruction carries the The identifier of the topic to be published, the encrypted message to be sent, and the return address corresponding to the first client, wherein, the return address corresponding to the first client is based on the The first link that receives the returned message in the system is determined, and the message publishing instruction is that the first client uses the topic processing node to encrypt the message publishing instruction to obtain a first message, and based on the second A client publishes a second link of a message in the blockchain system, encrypts the first message to obtain a second message, and according to the second link, after publishing the second message, the The topic processing node receives the first message and obtains it after decrypting the first message;
    对所述已加密的待发送消息进行解密,获得所述待发送消息。The encrypted message to be sent is decrypted to obtain the message to be sent.
  7. 根据权利要求6所述的方法,其特征在于,在所述接收所述区块链系统中的话题处理节点推送的发布消息指令之前,还包括:The method according to claim 6, characterized in that, before receiving the posting message instruction pushed by the topic processing node in the blockchain system, further comprising:
    生成订阅话题指令,所述订阅话题指令携带所述待发布话题的标识和所述第二客户端对应的返回地址,其中,所述第二客户端对应的返回地址根据所述第二客户端在所述区块链系统中接收返回消息的第四链路确定;Generate a subscribe topic instruction, the subscribe topic instruction carries the identifier of the topic to be published and the return address corresponding to the second client, wherein the return address corresponding to the second client is based on the status of the second client in The fourth link receiving the return message in the block chain system is determined;
    利用所述话题处理节点,对所述订阅话题指令进行加密,获得第五消息;using the topic processing node to encrypt the subscribe topic instruction to obtain a fifth message;
    基于所述第二客户端在所述区块链系统中发布消息的第五链路,对所述第五消息进行加密,获得第六消息;Encrypting the fifth message based on the fifth link of the second client publishing the message in the blockchain system to obtain a sixth message;
    在对应的区块链节点,根据所述第五链路,发布所述第六消息,直至所述话题处理节点接收到所述第五消息,并对所述第五消息进行解密,获得所述订阅话题指令,根据所述待发布话题的标识和所述第二客户端对应的返回地址,进行话题订阅记录。At the corresponding block chain node, according to the fifth link, the sixth message is issued until the topic processing node receives the fifth message, and decrypts the fifth message to obtain the The topic subscription instruction is used to perform topic subscription records according to the identifier of the topic to be published and the return address corresponding to the second client.
  8. 根据权利要求7所述的方法,其特征在于,在所述生成订阅话题指令之前,还包括:The method according to claim 7, further comprising:
    获取所述第四链路中各个区块链节点的公钥和标识;Obtain the public key and identification of each block chain node in the fourth link;
    按照第三预设顺序,利用所述第四链路中各个区块链节点的公钥,对所述第二客户端的用户信息和所述第四链路中各个区块链节点的标识进行层层加密处理,获得所述第二客户端对应的返回地址。According to the third preset sequence, using the public key of each block chain node in the fourth link, layering the user information of the second client and the identification of each block chain node in the fourth link Layer encryption processing to obtain the return address corresponding to the second client.
  9. 根据权利要求7或8所述的方法,其特征在于,所述基于所述第二客户端在所述区块链系统中发布消息的第五链路,对所述第五 消息进行加密,获得第六消息,包括:The method according to claim 7 or 8, wherein, based on the fifth link in which the second client publishes a message in the blockchain system, the fifth message is encrypted to obtain Sixth message, including:
    按照第四预设顺序,利用所述第五链路中各个区块链节点的公钥,对所述第五消息进行层层加密处理,获得所述第六消息。According to a fourth preset sequence, the fifth message is encrypted layer by layer by using the public key of each blockchain node in the fifth link to obtain the sixth message.
  10. 根据权利要求6至8中任一项所述的方法,其特征在于,在对所述已加密的待发送消息进行解密,获得所述待发送消息之后,还包括:The method according to any one of claims 6 to 8, wherein after decrypting the encrypted message to be sent and obtaining the message to be sent, further comprising:
    生成回复消息指令,所述回复消息指令携带已加密的回复内容和所述第一客户端对应的返回地址;generating a reply message instruction, the reply message instruction carrying the encrypted reply content and the return address corresponding to the first client;
    在对应的区块链节点,根据所述第一客户端对应的返回地址,返回所述已加密的回复内容至所述第一客户端,以使所述第一客户端对所述已加密的回复内容进行解密,获得所述第二客户端的回复内容。At the corresponding block chain node, according to the return address corresponding to the first client, return the encrypted reply content to the first client, so that the first client can The reply content is decrypted to obtain the reply content of the second client.
  11. 一种区块链消息传输装置,其特征在于,所述装置应用于第一客户端,所述第一客户端对应区块链系统中的一区块链节点,所述装置包括:A block chain message transmission device, characterized in that the device is applied to a first client, and the first client corresponds to a block chain node in the block chain system, and the device includes:
    第一指令生成模块,用于根据待发布话题,生成发布消息指令,所述发布消息指令携带所述待发布话题的标识、已加密的待发送消息和所述第一客户端对应的返回地址,其中,所述第一客户端对应的返回地址根据所述第一客户端在所述区块链系统中接收返回消息的第一链路确定;The first instruction generation module is configured to generate a message release instruction according to the topic to be released, the message release instruction carries the identifier of the topic to be released, the encrypted message to be sent, and the return address corresponding to the first client, Wherein, the return address corresponding to the first client is determined according to the first link where the first client receives the return message in the blockchain system;
    第一信息加密模块,用于利用所述区块链系统中的话题处理节点,对所述发布消息指令进行加密,获得第一消息;A first information encryption module, configured to use a topic processing node in the blockchain system to encrypt the instruction to issue a message to obtain a first message;
    第二信息加密模块,用于基于所述第一客户端在所述区块链系统中发布消息的第二链路,对所述第一消息进行加密,获得第二消息;A second information encryption module, configured to encrypt the first message based on the second link in which the first client publishes a message in the blockchain system, to obtain a second message;
    信息发布模块,用于在对应的区块链节点,根据所述第二链路,发布所述第二消息,直至所述话题处理节点接收到所述第一消息,并对所述第一消息进行解密,获得所述发布消息指令,根据所述待发布话题的标识,获得第二客户端对应的返回地址,并根据所述第二客户端对应的返回地址,推送所述发布消息指令,以使所述第二客户端基于对应的区块链节点,接收到所述发布消息指令,对所述已加密的待 发送消息进行解密,获得所述待发送消息。An information publishing module, configured to publish the second message on the corresponding block chain node according to the second link until the topic processing node receives the first message and responds to the first message performing decryption to obtain the posting message instruction, obtaining the return address corresponding to the second client according to the identifier of the topic to be published, and pushing the posting message instruction according to the return address corresponding to the second client, to Making the second client receive the message publishing instruction based on the corresponding block chain node, decrypt the encrypted message to be sent, and obtain the message to be sent.
  12. 一种区块链消息传输装置,其特征在于,所述装置应用于第二客户端,所述第二客户端对应区块链系统中的一区块链节点,所述装置包括:A block chain message transmission device, characterized in that the device is applied to a second client, and the second client corresponds to a block chain node in the block chain system, and the device includes:
    第一信息接收模块,用于基于对应的区块链节点,接收所述区块链系统中的话题处理节点推送的发布消息指令,所述发布消息指令为第一客户端根据待发布话题生成的,所述发布消息指令携带所述待发布话题的标识、已加密的待发送消息和所述第一客户端对应的返回地址,其中,所述第一客户端对应的返回地址根据所述第一客户端在所述区块链系统中接收返回消息的第一链路确定,所述发布消息指令为所述第一客户端利用所述话题处理节点,对所述发布消息指令进行加密,获得第一消息,并基于所述第一客户端在所述区块链系统中发布消息的第二链路,对所述第一消息进行加密,获得第二消息,根据所述第二链路,发布所述第二消息后,由所述话题处理节点接收到所述第一消息,并对所述第一消息进行解密后获得的;The first information receiving module is configured to receive, based on the corresponding block chain node, the release message instruction pushed by the topic processing node in the block chain system, the release message instruction is generated by the first client according to the topic to be released , the publish message instruction carries the identifier of the topic to be published, the encrypted message to be sent, and the return address corresponding to the first client, wherein the return address corresponding to the first client is based on the first The client receives the first link confirmation of the return message in the blockchain system, and the message publishing instruction is that the first client uses the topic processing node to encrypt the message publishing instruction to obtain the second A message, and based on the second link in which the first client publishes a message in the blockchain system, encrypt the first message to obtain a second message, and publish according to the second link After the second message, the topic processing node receives the first message and decrypts the first message;
    信息处理模块,用于对所述已加密的待发送消息进行解密,获得所述待发送消息。An information processing module, configured to decrypt the encrypted message to be sent to obtain the message to be sent.
  13. 一种客户端,其特征在于,包括:A client, characterized in that, comprising:
    处理器;processor;
    存储器;以及storage; and
    计算机程序;Computer program;
    其中,所述计算机程序被存储在所述存储器中,并且被配置为由所述处理器执行,所述计算机程序包括用于执行如权利要求1-5任一项,或者如权利要求6-10任一项所述的方法的指令。Wherein, the computer program is stored in the memory and is configured to be executed by the processor, and the computer program includes a method for performing any one of claims 1-5, or any one of claims 6-10. Instructions for any of the described methods.
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序使得服务器执行权利要求1-5任一项,或者如权利要求6-10任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and the computer program enables the server to execute any one of claims 1-5, or any one of claims 6-10 the method described.
  15. 一种计算机程序产品,其特征在于,包括计算机指令,所述计算机指令被处理器执行权利要求1-5任一项,或者如权利要求6-10 任一项所述的方法。A computer program product, characterized by comprising computer instructions, the computer instructions are executed by a processor according to any one of claims 1-5, or the method according to any one of claims 6-10.
PCT/CN2022/124237 2021-12-15 2022-10-10 Block chain message transmission method and device, client, and storage medium WO2023109268A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111538853.7A CN114205093B (en) 2021-12-15 2021-12-15 Block chain message transmission method, device, client and storage medium
CN202111538853.7 2021-12-15

Publications (1)

Publication Number Publication Date
WO2023109268A1 true WO2023109268A1 (en) 2023-06-22

Family

ID=80654258

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/124237 WO2023109268A1 (en) 2021-12-15 2022-10-10 Block chain message transmission method and device, client, and storage medium

Country Status (2)

Country Link
CN (1) CN114205093B (en)
WO (1) WO2023109268A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205093B (en) * 2021-12-15 2023-04-07 深圳前海微众银行股份有限公司 Block chain message transmission method, device, client and storage medium
CN114912856B (en) * 2022-07-19 2022-09-30 安胜(天津)飞行模拟系统有限公司 Flight simulator maintenance method based on block chain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109743185A (en) * 2019-03-19 2019-05-10 全链通有限公司 Group communication method, block chain node and medium based on domain name block chain
CN109981641A (en) * 2019-03-26 2019-07-05 北京邮电大学 A kind of safe distribution subscription system and distribution subscription method based on block chain technology
CN111464494A (en) * 2020-02-26 2020-07-28 北京十安赛恩科技有限公司 E-mail encryption method, first client and block chain system
US20210160227A1 (en) * 2018-11-12 2021-05-27 Advanced New Technologies Co., Ltd. Blockchain-based service data encryption methods and apparatuses
CN114205093A (en) * 2021-12-15 2022-03-18 深圳前海微众银行股份有限公司 Block chain message transmission method, device, client and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109711174A (en) * 2018-11-30 2019-05-03 深圳灵图慧视科技有限公司 Data capture method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210160227A1 (en) * 2018-11-12 2021-05-27 Advanced New Technologies Co., Ltd. Blockchain-based service data encryption methods and apparatuses
CN109743185A (en) * 2019-03-19 2019-05-10 全链通有限公司 Group communication method, block chain node and medium based on domain name block chain
CN109981641A (en) * 2019-03-26 2019-07-05 北京邮电大学 A kind of safe distribution subscription system and distribution subscription method based on block chain technology
CN111464494A (en) * 2020-02-26 2020-07-28 北京十安赛恩科技有限公司 E-mail encryption method, first client and block chain system
CN114205093A (en) * 2021-12-15 2022-03-18 深圳前海微众银行股份有限公司 Block chain message transmission method, device, client and storage medium

Also Published As

Publication number Publication date
CN114205093B (en) 2023-04-07
CN114205093A (en) 2022-03-18

Similar Documents

Publication Publication Date Title
US10824763B2 (en) Integrity of communications between blockchain networks and external data sources
CN108600227B (en) Medical data sharing method and device based on block chain
WO2023109268A1 (en) Block chain message transmission method and device, client, and storage medium
US8281125B1 (en) System and method for providing secure remote email access
CN103959706B (en) The content of certification is migrated through towards content consumer
US8850191B2 (en) Scalable groups of authenticated entities
CN110601816B (en) Lightweight node control method and device in block chain system
CN111786812B (en) Node management method, device, computer equipment and storage medium
CN108028834B (en) Apparatus and method for secure file transfer
JP2009534940A (en) Peer-to-peer contact information exchange
CN111404950B (en) Information sharing method and device based on block chain network and related equipment
CN106464496A (en) Method and system for creating a certificate to authenticate a user identity
US11368288B2 (en) Apparatus and method of lightweight communication protocols between multiple blockchains
JP2019083447A (en) Data transmission/reception system and data transmission/reception method
US11569989B2 (en) Blockchain system for hardening quantum computing security
CN113255014B (en) Data processing method based on block chain and related equipment
US20200175505A1 (en) System and method for creating a secure mesh network utilizing the blockchain
CN114244851B (en) Block chain-based data distribution method
CN111915302B (en) Associated data processing method and device, electronic equipment and computer readable medium
CN110784318B (en) Group key updating method, device, electronic equipment, storage medium and communication system
JP2022545809A (en) Secure environment for cryptographic key generation
US11411744B2 (en) Encryption communication method, information processing apparatus, and program
KR102191111B1 (en) System and method of providing anonymity message service using block chain
TW202304172A (en) Location-key encryption system
CN111756743B (en) Resource transfer method and device based on block chain, computer equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22906020

Country of ref document: EP

Kind code of ref document: A1