Communication method, device, equipment and storage medium based on blockchain

By using a preset privacy encrypted area in the blockchain network to store communication messages and send message events with hash value and storage location, the problem of user privacy protection in blockchain communication is solved, and the privacy of the communication process is realized and security.

CN116132166BActive Publication Date: 2024-11-12NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202310109542.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-03
Publication Date
2024-11-12
Estimated Expiration
2043-02-03

AI Technical Summary

Technical Problem

The existing blockchain communication methods cannot effectively guarantee the privacy of communication users. Although the communication content is private, the communication behavior is open, resulting in the inability to protect user privacy.

Method used

Using a blockchain-based communication method, by receiving communication messages sent by the user equipment and storing them in a preset privacy encryption area (communication pool), message events are sent to all nodes of the blockchain network, and only the target address corresponds to The user equipment can obtain message content from the communication pool based on the hash value and storage location, ensuring that only the communication parties know the sending of the message.

Benefits of technology

In the blockchain network, other users cannot know the specific message content and sending target, which realizes privacy and message security in the user's communication process and improves the user's communication experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116132166B_ABST
    Figure CN116132166B_ABST
Patent Text Reader

Abstract

The present application provides a communication method, device, equipment and storage medium based on blockchain, which relates to the field of blockchain technology. The method includes: receiving a storage operation for a communication message sent by a first user device; wherein the communication message includes: a hash value of a target address and message content; storing the communication message in a preset communication pool; sending a message event to all blockchain nodes of the blockchain network; the message event includes: a hash value of the target address, and a storage location of the communication message in the preset communication pool, and the message event is used to enable the second user device corresponding to the target address to obtain the communication message from the preset communication pool based on the hash value of the target address and the storage location. Compared with the prior art, it avoids the problem of not being able to guarantee the privacy of communication users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and specifically, to a communication method, device, equipment and storage medium based on blockchain. Background Art

[0002] With the development of blockchain technology, while bringing new technical forms and businesses, it has also brought new development directions to various industries.

[0003] For example, in the communications industry, the original communication model based on the C / S architecture is an architecture that relies heavily on centralized servers. Once the server goes down or the service provider has problems, all communication services will be interrupted. In addition, all user data is in the hands of the service provider, and users cannot gain benefits from their own data. After the emergence of blockchain, decentralized services can also be applied to communication services, thereby achieving the decentralization of communication services.

[0004] However, although the existing communication methods on the blockchain can protect communication privacy through asymmetric encryption, since the data is public, the communication objects cannot be hidden. Therefore, although the communication content is private, the communication behavior is public, resulting in the problem of not being able to guarantee the privacy of communication users. Summary of the invention

[0005] The purpose of this application is to provide a blockchain-based communication method, device, equipment and storage medium to address the problem that the privacy of communication users cannot be guaranteed in the prior art.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides a communication method based on blockchain, using any blockchain node of a blockchain network, the method comprising:

[0008] Receiving a storage operation for a communication message sent by a first user device; wherein the communication message includes: a hash value of a target address and message content;

[0009] Storing the communication message in a preset communication pool;

[0010] Send a message event to all blockchain nodes of the blockchain network; the message event includes: a hash value of the target address, and a storage location of the communication message in the preset communication pool, and the message event is used to enable a second user device corresponding to the target address to obtain the communication message from the preset communication pool based on the hash value of the target address and the storage location.

[0011] In a second aspect, another embodiment of the present application provides a communication device based on blockchain, the device comprising: a receiving module, a storage module and a sending module, wherein:

[0012] The receiving module is used to receive a storage operation for a communication message sent by the first user equipment; wherein the communication message includes: a hash value of a target address and message content;

[0013] The storage module is used to store the communication message in a preset communication pool;

[0014] The sending module is used to send a message event to all blockchain nodes of the blockchain network; the message event includes: a hash value of the target address, and a storage location of the communication message in the preset communication pool, and the message event is used to enable a second user device corresponding to the target address to obtain the communication message from the preset communication pool based on the hash value of the target address and the storage location.

[0015] In the third aspect, another embodiment of the present application provides a blockchain-based communication device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the blockchain-based communication device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of any method described in the first aspect above.

[0016] In a fourth aspect, another embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any method described in the first aspect are executed.

[0017] The beneficial effect of the present application is as follows: by adopting the blockchain-based communication method provided by the present application, when the first user sends a message to the second user, the message is not sent directly to the second user, but the communication message is stored in a preset communication pool, and a message event is sent to all blockchain nodes in the blockchain network. The user device corresponding to each blockchain node in the message event is received, and determines whether it is the second user device corresponding to the target address according to the hash value of the target address in the message event. Only the second user device corresponding to the target address can obtain the communication message from the preset communication pool based on the hash value and storage location of the target address. Such a setting makes it possible that in the blockchain network, other users can only see that the first user device has sent a message to other user devices, but other users cannot know the specific message content in the sent message and to which user device the first user device specifically sends the message, thereby ensuring the communication privacy during the user communication process. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 A flowchart of a blockchain-based communication method provided in one embodiment of the present application;

[0020] Figure 2 A flowchart of a blockchain-based communication method provided in another embodiment of the present application;

[0021] Figure 3 A flowchart of a blockchain-based communication method provided in another embodiment of the present application;

[0022] Figure 4 A schematic diagram of the structure of a blockchain-based communication device provided in one embodiment of the present application;

[0023] Figure 5 A schematic diagram of the structure of a blockchain-based communication device provided in another embodiment of the present application;

[0024] Figure 6 A schematic diagram of the structure of a blockchain-based communication device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0026] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0027] In addition, the flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of order, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of this application, and can also remove one or more operations from the flowchart.

[0028] Before introducing the embodiments of the present application, two communication methods on the blockchain are described:

[0029] 1. Communication based on the native blockchain. This communication method and communication-related operations are all at the blockchain chain level, and communication is achieved by calling the remote procedure call interface RPC API.

[0030] 2. Establish an encrypted communication contract based on the blockchain. This communication method and communication-related operations, such as sending and receiving, are all implemented based on calling the communication contract.

[0031] The blockchain-based communication method provided by the present application is not limited by the above two communication implementation methods. For the convenience of explanation, the following embodiments of the present application are explained and illustrated by establishing an encrypted communication contract based on the blockchain. A privacy encryption area (communication pool) is pre-established in the communication contract. All messages sent by users will be stored in the communication pool. The communication pool is a public communication pool. However, using the method provided by the present application, the communication messages stored in the communication pool will not be known by other users except the two users participating in the communication. The communication behavior between the two users participating in the communication.

[0032] The following is an explanation of a blockchain-based communication method provided in an embodiment of the present application in combination with a number of specific application examples. Figure 1 A flowchart of a communication method based on blockchain provided in one embodiment of the present application is provided, and any blockchain node of the blockchain network is applied, such as Figure 1 As shown, the method includes:

[0033] S101: receiving a storage operation for a communication message sent by a first user equipment.

[0034] In an embodiment of the present application, both the first user device and the second user device are user devices installed with preset communication software, and the communication between the first user device and the second user device is achieved by sending communication messages on the preset communication software. When the first user device wants to send a message to the second user device, it can send a message storage operation to any blockchain node of the blockchain network by calling a message sending interface based on the preset communication software, wherein the communication message includes: a hash value of the target address and the message content.

[0035] S102: Storing the communication message in a preset communication pool.

[0036] In an embodiment of the present application, the preset communication pool is a preset privacy encryption area, which is a public communication pool. The communication pool is established based on a preset location, and its establishment location can be saved in the blockchain communication contract. In an embodiment of the present application, for example, the address of the preset communication pool can be stored at the hash(0) location of the blockchain communication contract. During the message transmission process, the user can directly determine the preset communication pool for storing communication messages based on the blockchain communication contract, and store the communication messages in the preset communication pool.

[0037] For example, in some possible embodiments, taking the second user device as B as an example, the storage method of the communication message can be, for example, stored in a preset format: Sendmessage(dstAddrHash, msg), where msg is the message content, dstAddrHash = hash(addressB); because hash is a one-way hash function and cannot be reversed, it is impossible to determine the real address of the second user device according to the hash address after obtaining the hash address. Only after the second user device hashes according to its own real address and successfully matches the hash address, can it obtain the message content corresponding to the hash address.

[0038] That is, the method of storing only the hash address of the second user device ensures that the message content can only be obtained by the second user device. Even if other user devices except the second user device know the dstAddrHash in the communication message, they cannot reversely obtain addressB based on dstAddrHash. In other words, only the second user device B can know that this message is sent to the second user device B, and other user devices can only know that the first user device A has sent a communication message, but the communication target (second user device B) and the message content of the communication message are unknown, thereby ensuring the privacy of the user's communication when sending a communication message and avoiding the leakage of the communication object and communication content.

[0039] Among them, in an embodiment of the present application, in order to further ensure the privacy of user message content, the message content in the communication messages stored in the communication pool are all encrypted message contents. When the second user device subsequently receives the encrypted message content, it can decrypt the encrypted message content and read it according to a preset decryption method.

[0040] For example, in some possible embodiments, the encryption method of the message content may be: encrypting the message content through an asymmetric encryption algorithm, for example, the first user device may encrypt the message content through the private key of the first user and the public key of the second user, and after the second user obtains the encrypted message content, the encrypted message content is decrypted according to the private key of the second user and the public key of the first user, so as to obtain the original message content information; or, in some other possible embodiments, for example, the encryption method may also be to encrypt the message content according to a password pre-agreed by the first user device and the second user device; it should be understood that the above embodiments are only exemplary descriptions, and the specific method of encrypting the message content can be flexibly adjusted according to user needs, and is not limited to the above embodiments.

[0041] S103: Send a message event to all blockchain nodes in the blockchain network.

[0042] Among them, after each communication message storage operation is successfully executed, a message event corresponding to the communication message storage operation will be sent to all blockchain nodes in the blockchain network, so that user devices can query whether there are communication messages they need to receive. All user devices can query the message event through the message event, but only the user device corresponding to the hash value of the target address in the message event can know the message content in the message event and the sending target of the communication message.

[0043] In an embodiment of the present application, if the communication message is stored successfully, that is, if the communication message is correctly stored in the communication pool, a message event is sent to all blockchain nodes of the blockchain network to notify other user devices that a new communication message is currently stored in the communication pool. Other user devices can go to the communication pool to try to obtain the communication message to determine whether the communication message is a communication message sent to themselves.

[0044] In some possible embodiments, if the communication message storage fails, a communication message storage failure instruction can be sent to the first user device, and the first user can choose to give up sending the communication message or try to resend the communication message. It should be understood that the above embodiments are only exemplary descriptions and can be flexibly adjusted according to user needs, and are not limited to the above embodiments.

[0045] In an embodiment of the present application, the message event includes: the hash value of the target address, and the storage location slot* of the communication message in the preset communication pool. For example, if the slot where the current communication message is stored in the communication pool is slot1, then slot1 is the storage location corresponding to the communication message.

[0046] In some possible embodiments, the communication messages may be stored in a preset communication pool in sequence according to the time when the communication messages are received; that is, the communication messages are stored in a privacy communication area (communication pool) in sequence according to the time of the communication messages. It should be understood that the above embodiments are only exemplary descriptions, and the basis for storing communication messages in a specific communication pool can be flexibly adjusted according to user needs and is not limited to the above embodiments.

[0047] That is, after the communication message is successfully stored, the format and content of the message event sent to all blockchain nodes is event(dstAddrHash, slot1). The message event is used to enable the second user device corresponding to the target address to obtain the message content in the communication message from the preset communication pool based on the hash value and storage location of the target address.

[0048] With this message sending method, since the communication message is successfully stored in the preset communication pool before the message event is sent to the blockchain node, and the message event only includes the hash value of the target address and the storage location of the communication message in the preset communication pool, even if other user devices obtain the message event through the blockchain node, they cannot determine the message content in the message event based on the message event, nor can they determine to which user device the message event is sent, thereby ensuring the privacy of the message content when the user sends the message, as well as the privacy of the message object.

[0049] For example, 100 communication messages were sent between the first user device A and the second user device B at 3 a.m. If the existing technology is used, although any user device on the blockchain will not obtain the specific communication content between A and B, any user device on the blockchain can know when and how much communication the first user device A and the second user device B have carried out. That is, any user device can know that the first user device A and the second user device B have carried out a communication process with 100 communication records at 3 a.m., thereby exposing the communication process between the first user device A and the second user device B.

[0050] However, by using the method provided by the present application, other user devices except the second user device B can only know that the first user device A has sent a communication message, but the recipient of the communication message sent by the first user device A and the specific content of the communication message sent by the first user device A cannot be known, that is, other users cannot obtain the communication process between the first user device A and the second user device B, thereby ensuring the privacy of user communication. Except for the two communicating parties, no other users will know the communication behavior of the two communicating parties.

[0051] By adopting the blockchain-based communication method provided by the present application, when the first user sends a message to the second user, the message is not sent directly to the second user, but the communication message is stored in a preset communication pool, and a message event is sent to all blockchain nodes in the blockchain network. The user device corresponding to each blockchain node in the message event receives the message, and determines whether it is the second user device corresponding to the target address according to the target address in the message event. Only the second user device corresponding to the target address can obtain the communication message from the preset communication pool based on the hash value and storage location of the target address. This setting method enables other users in the blockchain network to only see that the first user device has sent messages to other user devices, but other users cannot know the specific message content in the sent message and to which user device the first user device specifically sends the message, thereby ensuring the communication privacy during the user communication process.

[0052] Optionally, based on the above embodiment, the embodiment of the present application may also provide a blockchain-based communication method. The implementation process of the above method is illustrated below in combination with the accompanying drawings. Figure 2 A flowchart of a blockchain-based communication method provided in another embodiment of the present application is shown in FIG. Figure 2 As shown, the method may also include:

[0053] S111: Receive a message extraction instruction sent by a second user equipment.

[0054] In an embodiment of the present application, the sending method of the message extraction instruction sent by the second user device may, for example, include the following two situations: if the preset communication software on the second user device is running in real time, the message on the communication contract can be subscribed to, thereby realizing real-time reception of message events sent by the blockchain node, and sending message extraction instructions in time according to the message events; or, if the preset communication software is not running in real time, the message event sent by the blockchain node can be received after the second user goes online, that is, after the second user logs in to the communication software, and the message extraction instruction is sent according to the received message event. It should be understood that the above embodiment is only an exemplary description, and the specific sending method of the message extraction instruction sent by the second user device and the receiving method of the received message event can be flexibly adjusted according to user needs, and are not limited to those given in the above embodiment.

[0055] The message extraction instruction includes: the hash value and storage location of the target address; since each user device has its own unique corresponding address information, the user device uniquely corresponding to the address information can be directly determined based on the address information, and after performing a hash transformation on the address information of the user device, the hash value of the address information corresponding to the user device can be obtained.

[0056] After receiving the message event sent by the blockchain node, when the second user device needs to extract the message sent to it by the first user device, it can send a message extraction instruction including the hash value of the target address to the blockchain node: still taking the storage address of the communication message as slot1 as an example, after the second user device receives the message event event(dstAddrHash, slot1) sent by the blockchain node, it needs to take out the message according to slot1 in the message event, where slot1 is the storage location of the communication message in the communication pool. At this time, the blockchain node needs to determine whether there is a message content corresponding to the hash value of the target address in the communication pool corresponding to the storage location based on the hash value of the target address; if so, it is determined that the current second user device has the message content to be extracted.

[0057] S112: Based on the hash value and storage location of the target address, obtain the message content in the communication message from the preset communication pool.

[0058] In an embodiment of the present application, before executing S112, it is also necessary to determine whether the second user device has the authority to extract the message extraction instruction. The determination method may, for example, be: determining whether the hash value of the target address in the communication message stored in the storage location is the same as the hash value corresponding to the address of the second user device. If they are the same, it is determined that the second user device has the authority to extract the message instruction, and the corresponding message content in the storage location can be extracted at this time; if the second user device does not have the authority to extract the message instruction, that is, it is determined that the hash value of the target address in the communication message stored in the storage location is different from the hash value corresponding to the address of the second user device, then it is determined that the second user device does not have the authority to extract the message instruction, and at this time an extraction failure instruction is returned to the second user device.

[0059] S113: Return the message content to the second user equipment.

[0060] When the second user device has the authority to extract the message instruction, the extracted message content is returned to the second user device, thereby completing the communication between the first user device and the second user device. In this communication method, other user devices can only know that the first user device has sent a message, but the recipient of the communication message sent by the first user device and the specific message content in the communication message cannot be known by other user devices except the second user device, the recipient of the message. This message sending method realizes private communication between users, ensures the privacy of users in the communication process and the security of messages, thereby improving the user's communication experience.

[0061] Optionally, based on the above embodiment, the embodiment of the present application may also provide a blockchain-based communication method. The implementation process of the above method is illustrated below in combination with the accompanying drawings. Figure 3A flowchart of a blockchain-based communication method provided in another embodiment of the present application is shown in FIG. Figure 3 As shown, before S101, the method may further include:

[0062] S121: Establish a preset communication pool based on the preset location.

[0063] In an embodiment of the present application, the preset communication pool can be established at a location with a hash address of hash(0), for example. It should be understood that the above embodiment is only an exemplary description, and the preset location of the specific preset communication pool can be flexibly adjusted according to user needs and is not limited to the above embodiment.

[0064] In the embodiments of the present application, the communication between blockchain nodes is on-chain communication based on a preset contract, which stipulates the communication method between each blockchain node and stores the location information of the communication pool.

[0065] Among them, after the preset communication pool is established based on the preset position, when the second user device extracts the communication message, the message extraction instruction includes, in addition to the hash value and storage location of the target address, the establishment location of the preset communication pool. That is, the second user device can extract the message content in the following way: first, according to the communication pool location information in the message extraction instruction of the target blockchain, determine the preset communication pool corresponding to the communication pool location information; then, according to the communication message location information in the message extraction instruction of the target blockchain, extract the corresponding communication message content from the storage location corresponding to the communication message location information in the preset communication pool.

[0066] For example, the second user device retrieves the message content through a message extraction instruction including slot1+hash(0), where slot1 is the storage location of the communication message in the communication pool, and hash(0) is the preset location of the communication pool. That is, slot1+hash(0) is used to instruct the second user device to go to the communication pool with the preset location hash(0) and extract the message content of the communication message corresponding to the slot1 location in the communication pool.

[0067] By adopting the method provided by the present application, based on a communication pool established at a preset position in the blockchain, all communication messages sent by all users during the communication process are sequentially stored in the communication pool, wherein the storage format of each communication message in the communication pool is the hash value of the target address and the message content. In this storage method, when other users receive messages, they need to extract the communication messages from the communication pool. During the extraction process, only the recipient of the communication message can obtain the message content of the corresponding storage location according to the hash value corresponding to its address. That is, except for the two parties participating in the communication, no other user can know the communication behavior of the two parties, thereby ensuring the privacy of the user during communication.

[0068] The following is an explanation of the blockchain-based communication device provided by the present application in conjunction with the accompanying drawings. The blockchain-based communication device can perform the above Figure 1-Figure 4 The specific implementation and beneficial effects of any blockchain-based communication method are as described above and will not be repeated below.

[0069] Figure 4 A schematic diagram of the structure of a blockchain-based communication device provided in one embodiment of the present application is shown in FIG. Figure 4 As shown, the device includes: a receiving module 201, a storage module 202 and a sending module 203, wherein:

[0070] The receiving module 201 is used to receive a storage operation for a communication message sent by a first user equipment; wherein the communication message includes: a hash value of a target address and message content;

[0071] The storage module 202 is used to store the communication message in a preset communication pool;

[0072] The sending module 203 is used to send a message event to all blockchain nodes of the blockchain network; the message event includes: a hash value of the target address, and a storage location of the communication message in a preset communication pool, and the message event is used to enable the second user device corresponding to the target address to obtain the communication message from the preset communication pool based on the hash value and storage location of the target address.

[0073] Optionally, based on the above embodiment, the present application embodiment may also provide a communication device based on blockchain, as shown below in conjunction with the accompanying drawings. Figure 4 The implementation process of the given device is described by way of example. Figure 5 A schematic diagram of the structure of a blockchain-based communication device provided in another embodiment of the present application is shown in FIG. Figure 5 As shown, the device further includes: an acquisition module 204, wherein:

[0074] The receiving module 201 is specifically configured to receive a message extraction instruction sent by a second user equipment, wherein the message extraction instruction includes: a hash value and a storage location of a target address;

[0075] The acquisition module 204 is used to acquire the message content in the communication message from the preset communication pool based on the hash value and storage location of the target address;

[0076] The sending module 203 is specifically configured to return the message content to the second user equipment.

[0077] like Figure 5 As shown, the device may further include: a storage module 202, configured to store the communication message in a preset communication pool according to the time when the communication message is received.

[0078] Optionally, the sending module 203 is specifically used to send a message event to all blockchain nodes in the blockchain network if the communication message is successfully stored.

[0079] like Figure 5 As shown, the device may further include: an establishing module 205, configured to establish a preset communication pool based on a preset location.

[0080] like Figure 5 As shown, the device may further include: a determination module 206, configured to determine a preset communication pool corresponding to the communication pool location information according to the communication pool location information in the message extraction instruction of the target blockchain;

[0081] The acquisition module 204 is specifically used to extract the corresponding communication message content from the storage location corresponding to the communication message location information in the preset communication pool according to the communication message location information in the message extraction instruction of the target blockchain.

[0082] Optionally, the sending module 203 is specifically configured to determine whether the second user equipment has the authority to extract the message extraction instruction; if not, returning an extraction failure instruction to the second user equipment.

[0083] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0084] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0085] Figure 6 A schematic diagram of the structure of a blockchain-based communication device provided in one embodiment of the present application. The blockchain-based communication device can be integrated into a terminal device or a chip of a terminal device.

[0086] like Figure 6 As shown, the blockchain-based communication device includes: a processor 501, a bus 502 and a storage medium 503.

[0087] The processor 501 is used to store programs. The processor 501 calls the program stored in the storage medium 503 to execute the above Figure 1-Figure 4 The corresponding method embodiment has similar specific implementation methods and technical effects, which will not be described here.

[0088] Optionally, the present application also provides a program product, such as a storage medium, on which a computer program is stored, including a program that, when executed by a processor, executes an embodiment corresponding to the above method.

[0089] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0090] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0091] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0092] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, referred to as: ROM), random access memory (English: Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.

Claims

1. A communication method based on blockchain, characterized in that: Using any blockchain node of a blockchain network, the method comprises: Receiving a storage operation for a communication message sent by a first user device; wherein the communication message includes: a hash value of a target address and message content; Storing the communication message in a preset communication pool; Sending a message event to all blockchain nodes of the blockchain network; the message event includes: a hash value of the target address, and a storage location of the communication message in the preset communication pool, and the message event is used to enable the second user device corresponding to the target address to obtain the communication message from the preset communication pool based on the hash value of the target address and the storage location; The storing the communication message in a preset communication pool includes: Determine the preset communication pool for storing the communication message based on the blockchain communication contract, and store the communication message in the preset communication pool; The method further comprises: receiving a message extraction instruction sent by the second user equipment, wherein the message extraction instruction includes: a hash value of the target address and the storage location; Based on the hash value of the target address and the storage location, obtaining the message content in the communication message from the preset communication pool; The message content is returned to the second user equipment.

2. The method according to claim 1, characterized in that The storing the communication message in a preset communication pool includes: The communication message is stored in the preset communication pool according to the time when the communication message is received.

3. The method according to claim 1, characterized in that The sending of a message event to all blockchain nodes of the blockchain network includes: If the communication message is stored successfully, the message event is sent to all blockchain nodes of the blockchain network.

4. The method according to claim 1, characterized in that Before receiving the storage operation for the communication message sent by the first user equipment, the method further includes: The preset communication pool is established based on a preset location.

5. The method according to claim 1, characterized in that The acquiring the message content in the communication message from the preset communication pool based on the hash value of the target address and the storage location includes: Determine, according to the communication pool location information in the message extraction instruction of the target blockchain, a preset communication pool corresponding to the communication pool location information; According to the communication message location information in the message extraction instruction of the target blockchain, the corresponding communication message content is extracted from the storage location corresponding to the communication message location information in the preset communication pool.

6. The method according to claim 1, characterized in that Before obtaining the message content in the communication message from the preset communication pool based on the hash value of the target address and the storage location, the method further includes: Determining whether the second user equipment has permission to extract the message extraction instruction; If not, an extraction failure instruction is returned to the second user equipment.

7. A communication device based on blockchain, characterized in that: Any blockchain node of the blockchain network is used, and the device includes: a receiving module, a storage module and a sending module, wherein: The receiving module is used to receive a storage operation for a communication message sent by the first user equipment; wherein the communication message includes: a hash value of a target address and message content; The storage module is used to store the communication message in a preset communication pool; The sending module is used to send a message event to all blockchain nodes of the blockchain network; the message event includes: a hash value of the target address, and a storage location of the communication message in the preset communication pool, and the message event is used to enable the second user device corresponding to the target address to obtain the communication message from the preset communication pool based on the hash value of the target address and the storage location; The storage module is specifically used to determine the preset communication pool for storing the communication message based on the blockchain communication contract, and store the communication message in the preset communication pool; The device also includes: an acquisition module; The receiving module is further configured to receive a message extraction instruction sent by the second user equipment, wherein the message extraction instruction includes: a hash value of the target address and the storage location; The acquisition module is used to acquire the message content in the communication message from the preset communication pool based on the hash value of the target address and the storage location; The sending module is further used to return the message content to the second user equipment.

8. A communication device based on blockchain, characterized in that: The device includes: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the blockchain-based communication device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to execute the method described in any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is executed.

Citation Information

Patent Citations

  • Data storage state detecting method and device and computer readable storage medium

    CN107391298A

  • Data backup method and equipment and computer readable storage medium

    CN110351363A

  • Page access method and device for decentralized application, equipment and storage medium

    CN111309808A

  • Ciphertext sharing method based on blockchain smart contract

    CN111950026A

  • Method and device for supervising trader address information and electronic equipment

    CN112235278A