[go: up one dir, main page]

CN116132166B - Communication method, device, equipment and storage medium based on blockchain - Google Patents

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

Info

Publication number
CN116132166B
CN116132166B CN202310109542.1A CN202310109542A CN116132166B CN 116132166 B CN116132166 B CN 116132166B CN 202310109542 A CN202310109542 A CN 202310109542A CN 116132166 B CN116132166 B CN 116132166B
Authority
CN
China
Prior art keywords
communication
message
blockchain
pool
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310109542.1A
Other languages
Chinese (zh)
Other versions
CN116132166A (en
Inventor
苏羽
曹崇瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202310109542.1A priority Critical patent/CN116132166B/en
Publication of CN116132166A publication Critical patent/CN116132166A/en
Application granted granted Critical
Publication of CN116132166B publication Critical patent/CN116132166B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/0407Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden
    • H04L63/0414Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden during transmission, i.e. party's identity is protected against eavesdropping, e.g. by using temporary identifiers, but is known to the other party or parties involved in the communication
    • 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
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Telephonic Communication Services (AREA)
  • Telephone Function (AREA)
  • Information Transfer Between Computers (AREA)

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.

Description

Communication method, device, equipment and storage medium based on block chain
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a communication method, apparatus, device and storage medium based on a blockchain.
Background
With the development of the blockchain technology, new technical forms and services are brought, and meanwhile, new development is brought to various industries.
For example, in the communication industry, the original communication mode based on the C/S architecture is an architecture which relies on a centralized server, and once the server is down or the server has a problem, all communication services are interrupted, and in addition, all user data are in the hands of the server, so that the user cannot obtain benefits from own data. After the occurrence of the blockchain, the de-centralized service may also be applied to the communication service. Thereby realizing the decentralization of the communication service.
However, in the existing communication method on the blockchain, although the communication privacy can be protected by asymmetric encryption, since the data is public and the communication object cannot be hidden, the communication behavior is public although the communication content is private, and the problem that the privacy of the communication user cannot be guaranteed is caused.
Disclosure of Invention
The application aims to provide a communication method, a device, equipment and a storage medium based on a blockchain aiming at the defects in the prior art so as to solve the problem that the privacy of a communication user cannot be ensured in the prior art.
In order to achieve the above purpose, the technical scheme adopted by the embodiment of the application is as follows:
in a first aspect, an embodiment of the present application provides a blockchain-based communication method, applying any blockchain node of a blockchain network, the method including:
receiving a storage operation for a communication message sent by first user equipment; wherein the communication message includes: hash value of 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: the message event is used for enabling the second user equipment corresponding to the target address to acquire the communication message from the preset communication pool based on the hash value of the target address and the storage position.
In a second aspect, another embodiment of the present application provides a blockchain-based communication device, the device comprising: the device comprises a receiving module, a storage module and a sending module, wherein:
The receiving module is used for receiving a storage operation for the communication message sent by the first user equipment; wherein the communication message includes: hash value of target address and message content;
the storage module is used for storing the communication message in a preset communication pool;
The sending module is used for sending message events to all the block chain nodes of the block chain network; the message event includes: the message event is used for enabling the second user equipment corresponding to the target address to acquire the communication message from the preset communication pool based on the hash value of the target address and the storage position.
In a third aspect, another embodiment of the present application provides a blockchain-based communication device, comprising: a processor, a storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over a bus when the blockchain-based communication device is operating, the processor executing the machine-readable instructions to perform the steps of the method as in any of the first aspects above.
In a fourth aspect, another embodiment of the application provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of the first aspects described above.
The beneficial effects of the application are as follows: by adopting the communication method based on the blockchain, when a first user sends a message to a second user, the communication message is not directly sent to the second user, but is stored in the preset communication pool, a message event is sent to all the blockchain links in the blockchain network, user equipment corresponding to each blockchain link point in the message event is received, whether the user equipment is second user equipment corresponding to the target address is determined according to the hash value of the target address in the message event, and only the second user equipment corresponding to the target address can acquire the communication message from the preset communication pool based on the hash value and the storage position of the target address.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a block chain based communication method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a blockchain-based communication method according to another embodiment of the present application;
FIG. 3 is a flowchart illustrating a blockchain-based communication method according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a block chain based communication device according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a block chain based communication device according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of a blockchain-based communication device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application.
The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
Additionally, flowcharts used in this disclosure illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
Before describing embodiments of the present application, two communication modes on a blockchain will be described:
1. The communication established on the native blockchain is such that the communication-related operations are blockchain-level communications implemented by invoking the remote procedure call interface rpc api.
2. The encryption communication contract is established based on the block chain, and the communication-related operation such as sending and receiving is realized based on calling the communication contract.
The communication method based on the blockchain is not limited by the two communication implementation modes, and for convenience of explanation, the following embodiments of the application explain and explain in a way of establishing an encryption communication contract based on the blockchain, a privacy encryption area (communication pool) is established in advance in the communication contract, and messages sent by all users are stored in the communication pool, wherein the communication pool is a public communication pool, but by adopting the method provided by the application, communication messages stored in the communication pool except for two users participating in communication do not have communication behaviors between the two users participating in communication.
A blockchain-based communication method provided by the embodiment of the present application is explained below in conjunction with a plurality of specific application examples. Fig. 1 is a flow chart of a blockchain-based communication method according to an embodiment of the present application, wherein any blockchain node of a blockchain network is applied, and as shown in fig. 1, the method includes:
s101: and receiving a storage operation for the communication message sent by the first user equipment.
In an embodiment of the present application, the first user equipment and the second user equipment are both user equipment installed with preset communication software, and communication between the first user equipment and the second user equipment is achieved by sending a communication message on the preset communication software, where when the first user equipment wants to send a message to the second user equipment, the first user equipment may send a message storing operation to any blockchain node of the blockchain network by calling a message sending interface based on the preset communication software, where the communication message includes: hash value of destination address and message content.
S102: and storing the communication message in a preset communication pool.
In an embodiment of the present application, the preset communication pool is a preset privacy encryption area, and is a public communication pool, the communication pool is established based on a preset position, the established position of the communication pool can be stored in a blockchain communication contract, for example, the address of the preset communication pool can be stored at the position of a hash (0) of the blockchain communication contract, and a 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 in the process of message transmission.
For example, in some possible embodiments, taking the second user equipment as B as an example, the storage manner of the communication message may be, for example, that the communication message is stored according to a preset format: SENDMESSAGE (DSTADDRHASH, msg), wherein msg is message content, DSTADDRHASH = hash (addressB); because the hash is a one-way hash function, the hash cannot be reversed, the real address of the second user equipment cannot be determined according to the hash address after the hash address is obtained, and the message content corresponding to the hash address can be obtained only after the second user equipment performs hash according to the real address and successfully matches with the hash address.
That is, in such a manner that only the hash address of the second user equipment is stored, the guaranteed message content can only be acquired by the second user equipment, and even if the other user equipment except the second user equipment knows DSTADDRHASH in the communication message, addressB cannot be obtained reversely according to DSTADDRHASH. That is, only the second ue B can know that the message is sent to the second ue B, and other ues can only know that the first ue a sent a communication message, but cannot know the communication destination (the second ue B) and the message content of the communication message, so that the privacy of the communication of the user when sending the communication message is ensured, and the disclosure of the communication object and the communication content is avoided.
In the embodiment of the application, in order to further ensure the privacy of the user message content, the message content in the communication messages stored in the communication pool is encrypted message content, and when the second user equipment receives the encrypted message content, the second user equipment can decrypt the encrypted message content according to a preset decryption mode and then read the encrypted message content.
For example, in some possible embodiments, the message content may be encrypted, for example, by: encrypting the message content through an asymmetric encryption algorithm, for example, the first user equipment can encrypt the message content through a private key of the first user and a public key of the second user, and after the second user obtains the encrypted message content, the second user decrypts the encrypted message content according to the private key of the second user and the public key of the first user, so that original message content information can be obtained; or in other possible embodiments, for example, the message content may be encrypted according to a password agreed in advance by the first user equipment and the second user equipment; it should be understood that the foregoing embodiments are merely exemplary, and the specific manner of encrypting the message content may be flexibly adjusted according to the needs of the user, and is not limited to the foregoing embodiments.
S103: a message event is sent to all blockchain nodes of the blockchain network.
After the storage operation of the communication message is successfully executed each time, the storage operation of the communication message is sent to all block chain links in the block chain network to send the message event corresponding to the storage operation of the communication message, so that user equipment can inquire whether the communication message which needs to be received by the user equipment or not, all the user equipment can inquire the message event through the message event, but only the user equipment 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.
In the embodiment of the application, if the communication message is successfully stored, that is, if the communication message is correctly stored in the communication pool, a message event is sent to all the block links of the block chain network, so that other user equipment is informed that a new communication message is currently stored in the communication pool, and the other user equipment can go to the communication pool to attempt to acquire the communication message to determine whether the communication message is a communication message sent to the user equipment.
In some possible embodiments, if the communication message fails to be deposited, a communication message depositing failure instruction may be sent to the first user device, and the first user may choose to discard sending the communication message or attempt to resend the communication message.
In an embodiment of the present application, the message event includes: the hash value of the target address and the storage position slot of the communication message in the preset communication pool are equal, for example, the slot of the current communication message stored in the communication pool is slot1, and then slot1 is the storage position corresponding to the communication message.
In some possible embodiments, the storage manner of the communication messages may be, for example, that the communication messages are sequentially stored in a preset communication pool according to the time of receiving the communication messages; that is, the communication messages are sequentially stored in the private communication area (communication pool) according to the time of the communication messages, it should be understood that the above embodiment is only illustrative, and the basis for storing the communication messages in the specific communication pool can be flexibly adjusted according to the needs of the user, and is not limited to the above embodiment.
That is, after the communication message is successfully stored, the format and content of the message event sent to all the blockchain nodes are event (DSTADDRHASH, slot 1), where the message event is used to enable the second user equipment 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 the storage location of the target address.
In such a message sending manner, after the communication message is successfully stored in the preset communication pool, the message event is sent to the block chain link, and the message event only includes the hash value of the target address and the storage position of the communication message in the preset communication pool, so that even if other user equipment acquires the message event through the block chain node, the message content in the message event cannot be determined according to the message event, and the message event cannot be sent to which user equipment, thereby ensuring the privacy of the message content and the privacy of the message object when the user sends the message.
For example, 100 communication messages are sent between the first user equipment a and the second user equipment B at 3 a.m., if the prior art is adopted, any user equipment on the blockchain does not acquire specific communication content between a and B, but any user equipment on the blockchain can know when the first user equipment a and the second user equipment B are in communication, that is, any user equipment can know how many communication processes with 100 communication records are performed between the first user equipment a and the second user equipment B at 3 a.m., so that the communication processes between the first user equipment a and the second user equipment B are exposed.
By adopting the method provided by the application, other user equipment except the second user equipment B only can know that the first user equipment A sends the communication message, but the specific content of the communication message sent by the first user equipment A and the specific content of the communication message sent by the first user equipment A cannot be known, namely, other users cannot acquire the communication process of the first user equipment A and the second user equipment B, so that the privacy of user communication is ensured, and no other user except the two communication parties can know the communication behaviors of the two communication parties.
By adopting the communication method based on the block chain, as the first user does not directly send the communication message to the second user when sending the message to the second user, but stores the communication message in the preset communication pool, sends the message event to all block chain links in the block chain network, receives the user equipment corresponding to each block chain link point in the message event, determines whether the user equipment is the second user equipment corresponding to the target address according to the target address in the message event, only the second user equipment corresponding to the target address can acquire the communication message from the preset communication pool based on the hash value and the storage position of the target address, and the setting mode is that other users can only see that the first user equipment transmits the message to other user equipment in the blockchain network, but the specific message content in the transmitted message and the specific user equipment to which the first user equipment transmits the message can not be known by other users, so that the communication privacy in the user communication process is ensured.
Optionally, on the basis of the above embodiment, the embodiment of the present application may further provide a blockchain-based communication method, and an implementation procedure of the method is described below with reference to the accompanying drawings. Fig. 2 is a schematic flow chart of a communication method based on a blockchain according to another embodiment of the present application, as shown in fig. 2, the method may further include:
s111: and receiving a message extraction instruction sent by the second user equipment.
In the embodiment of the present application, the sending manner of the message extraction instruction sent by the second user equipment may include, for example, the following two cases: if the preset communication software on the second user equipment is operated in real time, subscribing the information on the communication contract, thereby realizing the real-time receiving of the information event sent by the blockchain node and timely sending an information extraction instruction according to the information event; or if the preset communication software is not running in real time, the message event sent by the blockchain node may be received after the second user is online, that is, after the second user logs in the communication software, and the message extraction instruction is sent according to the received message event.
The message extraction instruction includes: hash value and storage location of the target address; because each user equipment has the unique corresponding address information, the user equipment which is uniquely corresponding to the address information can be directly determined according to the address information, and the hash value of the address information which is corresponding to the user equipment can be obtained after the hash conversion is carried out on the address information of the user equipment.
After receiving the message event sent by the blockchain node, the second user equipment can send a message extraction instruction including the hash value of the target address to the blockchain link when the first user equipment needs to extract the message sent to the second user equipment: still taking a storage address of a communication message as a slot1 as an example for illustration, after receiving a message event (DSTADDRHASH, slot 1) sent by a blockchain node, the second user equipment needs to take out the message according to the slot1 in the message event, wherein the slot1 is a storage position of the communication message in a communication pool, and at this time, the blockchain node needs to determine whether a message content corresponding to a hash value of a target address exists in the communication pool corresponding to the storage position according to the hash value of the target address; if yes, determining that the current second user equipment has message content to be extracted.
S112: and acquiring the message content in the communication message from a preset communication pool based on the hash value and the storage position of the target address.
In the embodiment of the present application, before executing S112, it is further required to determine whether the second user equipment has the authority to extract the message extraction instruction, where the determining manner may be, for example: determining whether the hash value of the target address in the communication message stored in the storage position is the same as the hash value corresponding to the address of the second user equipment, if so, determining that the second user equipment has the authority of extracting the message instruction, and extracting the corresponding message content in the storage position at the moment; if the second user equipment does not have the authority to extract the message instruction, namely, the hash value of the target address in the communication message stored in the storage position is determined, and when the hash value corresponding to the address of the second user equipment is different, the second user equipment is determined to have no authority to extract the message instruction, and at the moment, an extraction failure instruction is returned to the second user equipment.
S113: and returning the message content to the second user equipment.
When the second user equipment has the right of extracting the message instruction, the extracted message content is returned to the second user equipment, so that the communication between the first user equipment and the second user equipment is completed, other user equipment can only know that the first user equipment sends the message, but the receiving party of the communication message sent by the first user equipment and the specific message content in the communication message can not be known by other user equipment except the second user equipment of the receiving party of the message, the privacy communication between users is realized by the message sending mode, the privacy and the safety of the message in the communication process of the users are ensured, and the communication experience of the users is improved.
Optionally, on the basis of the above embodiment, the embodiment of the present application may further provide a blockchain-based communication method, and an implementation procedure of the method is described below with reference to the accompanying drawings. Fig. 3 is a flowchart of a communication method based on a blockchain according to another embodiment of the present application, where, as shown in fig. 3, before S101, the method may further include:
S121: and establishing a preset communication pool based on the preset position.
In the embodiment of the present application, the preset communication pool may be established at a location where the hash address is hash (0), for example, and it should be understood that the foregoing embodiment is only illustrative, and the preset location of the specific preset communication pool may be flexibly adjusted according to the needs of the user, and is not limited to the foregoing embodiment.
In the embodiment of the application, the communication between the block chain nodes is on-chain communication based on a preset contract, and the communication mode between the block chain nodes is agreed in the preset contract and the position information of the communication pool is stored.
After the preset communication pool is established based on the preset position, when the second user equipment extracts the communication message, the message extraction instruction includes the establishment position of the preset communication pool besides the hash value and the storage position of the target address, that is, the mode of extracting the message content by the second user equipment may be as follows: firstly, extracting communication pool position information in an instruction according to a message of a target block chain, and determining a preset communication pool corresponding to the communication pool position information; and extracting corresponding communication message content from a storage position corresponding to the communication message position information in the preset communication pool according to the communication message position information in the message extraction instruction of the target block chain.
For example, the second user equipment extracts the message content by a message extraction instruction including a slot1+hash (0), where slot1 is a storage location of the communication message in the communication pool, and hash (0) is a preset location of the communication pool, that is, the second user equipment is instructed to go to the communication pool with the preset location being hash (0) by slot1+hash (0), so as to extract the message content of the communication message corresponding to the position of slot1 in the communication pool.
The method provided by the application is based on the communication pool established at the preset position in the blockchain, all the communication messages sent by all users in 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, when other users receive the message, the communication message is required to be extracted from the communication pool, and in the extraction process, only the receiver of the communication message can acquire the message content of the corresponding storage position according to the hash value corresponding to the address, namely, no other users can know the communication behaviors of the communication parties except the communication parties participating in the communication, so that the privacy of the users in the communication process is ensured.
The blockchain-based communication device provided by the application is explained below with reference to the accompanying drawings, and the blockchain-based communication device can execute any of the blockchain-based communication methods of fig. 1 to 4, and the specific implementation and the beneficial effects thereof are referred to above and are not repeated below.
Fig. 4 is a schematic structural diagram of a communication device based on blockchain according to an embodiment of the present application, as shown in fig. 4, the device includes: a receiving module 201, a storing module 202 and a transmitting module 203, wherein:
A receiving module 201, configured to receive a depositing operation for a communication message sent by a first user equipment; wherein the communication message comprises: hash value of target address and message content;
a storage module 202, configured to store the communication message in a preset communication pool;
A sending module 203, configured to send a message event to all blockchain nodes of the blockchain network; the message event includes: the message event is used for enabling the second user equipment corresponding to the target address to acquire the communication message from the preset communication pool based on the hash value and the storage position of the target address.
Optionally, on the basis of the foregoing embodiment, an embodiment of the present application may further provide a blockchain-based communication device, where an implementation procedure of the device shown in fig. 4 is described below by way of example with reference to the accompanying drawings. Fig. 5 is a schematic structural diagram of a communication device based on blockchain according to another embodiment of the present application, as shown in fig. 5, the device further includes: an acquisition module 204, wherein:
The receiving module 201 is specifically configured to receive a message extraction instruction sent by the second user equipment, where the message extraction instruction includes: hash value and storage location of the target address;
An obtaining module 204, configured to obtain, from a preset communication pool, a message content in a communication message based on a hash value and a storage location of a target address;
The sending module 203 is specifically configured to return the message content to the second user equipment.
As shown in fig. 5, the apparatus may further include: a storage module 202, configured to store the communication message in a preset communication pool according to the time of receiving the communication message.
Optionally, the sending module 203 is specifically configured to send a message event to all blockchain nodes of the blockchain network if the communication message deposit is successful.
As shown in fig. 5, the apparatus may further include: the establishing module 205 is configured to establish a preset communication pool based on the preset location.
As shown in fig. 5, the apparatus may further include: a determining module 206, configured to determine a preset communication pool corresponding to the communication pool position information according to the communication pool position information in the message extraction instruction of the target blockchain;
the obtaining module 204 is specifically configured to extract, according to the communication message location information in the message extraction instruction of the target blockchain, corresponding communication message content from a storage location corresponding to the communication message location information in the preset communication pool.
Optionally, the sending module 203 is specifically configured to determine whether the second user equipment has a right to extract the message extraction instruction; if not, returning an extraction failure instruction to the second user equipment.
The foregoing apparatus is used for executing the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more Application SPECIFIC INTEGRATED Circuits (ASIC), or one or more microprocessors, or one or more field programmable gate arrays (Field Programmable GATE ARRAY FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 6 is a schematic structural diagram of a blockchain-based communication device according to an embodiment of the present application, where the blockchain-based communication device may be integrated in a terminal device or a chip of the terminal device.
As shown in fig. 6, the blockchain-based communication device includes: a processor 501, a bus 502, and a storage medium 503.
The processor 501 is configured to store a program, and the processor 501 invokes the program stored in the storage medium 503 to perform the method embodiments corresponding to fig. 1-4. The specific implementation manner and the technical effect are similar, and are not repeated here.
Optionally, the present application also provides a program product, such as a storage medium, on which a computer program is stored, including a program which, when being executed by a processor, performs the corresponding embodiments of the above-mentioned method.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of 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.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the application. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.

Claims (9)

1.一种基于区块链的通信方法,其特征在于,应用区块链网络的任一区块链节点,所述方法包括:1. A communication method based on blockchain, characterized in that any blockchain node of a blockchain network is used, and 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.如权利要求1所述的方法,其特征在于,所述将所述通信消息存放在预设通信池中,包括:2. The method according to claim 1, wherein storing the communication message in a preset communication pool comprises: 根据接收所述通信消息的时间,将所述通信消息存放在所述预设通信池中。The communication message is stored in the preset communication pool according to the time when the communication message is received. 3.如权利要求1所述的方法,其特征在于,所述向所述区块链网络的所有区块链节点发送消息事件,包括:3. The method according to claim 1, wherein the sending of a message event to all blockchain nodes of the blockchain network comprises: 若所述通信消息存放成功,则向所述区块链网络的所有区块链节点发送所述消息事件。If the communication message is stored successfully, the message event is sent to all blockchain nodes of the blockchain network. 4.如权利要求1所述的方法,其特征在于,所述接收第一用户设备发送的针对通信消息的存放操作之前,所述方法还包括: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 comprises: 基于预设位置建立所述预设通信池。The preset communication pool is established based on a preset location. 5.如权利要求1所述的方法,其特征在于,所述基于所述目标地址的哈希值和所述存储位置,从所述预设通信池中获取所述通信消息中的所述消息内容,包括:5. The method according to claim 1, wherein 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 comprises: 根据目标区块链的消息提取指令中的通信池位置信息,确定所述通信池位置信息对应的预设通信池;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.如权利要求1所述的方法,其特征在于,所述基于所述目标地址的哈希值和所述存储位置,从所述预设通信池中获取所述通信消息中的所述消息内容之前,所述方法还包括: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 comprises: 确定所述第二用户设备是否具有提取所述消息提取指令的权限;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.一种基于区块链的通信装置,其特征在于,应用区块链网络的任一区块链节点,所述装置包括:接收模块、存放模块和发送模块,其中: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 configured to return the message content to the second user equipment. 8.一种基于区块链的通信设备,其特征在于,所述设备包括:处理器、存储介质和总线,所述存储介质存储有所述处理器可执行的机器可读指令,当所述基于区块链的通信设备运行时,所述处理器与所述存储介质之间通过总线通信,所述处理器执行所述机器可读指令,以执行上述权利要求1-6任一项所述的方法。8. A blockchain-based communication device, characterized in that the device comprises: a processor, a storage medium and a bus, the storage medium stores machine-readable instructions executable by the processor, and when the blockchain-based communication device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the method described in any one of claims 1 to 6. 9.一种存储介质,其特征在于,所述存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行上述权利要求1-6任一项所述的方法。9. A storage medium, characterized in that a computer program is stored on the storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is executed.
CN202310109542.1A 2023-02-03 2023-02-03 Communication method, device, equipment and storage medium based on blockchain Active CN116132166B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310109542.1A CN116132166B (en) 2023-02-03 2023-02-03 Communication method, device, equipment and storage medium based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310109542.1A CN116132166B (en) 2023-02-03 2023-02-03 Communication method, device, equipment and storage medium based on blockchain

Publications (2)

Publication Number Publication Date
CN116132166A CN116132166A (en) 2023-05-16
CN116132166B true CN116132166B (en) 2024-11-12

Family

ID=86307919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310109542.1A Active CN116132166B (en) 2023-02-03 2023-02-03 Communication method, device, equipment and storage medium based on blockchain

Country Status (1)

Country Link
CN (1) CN116132166B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111950026A (en) * 2020-08-21 2020-11-17 安徽高山科技有限公司 Ciphertext sharing method based on block chain intelligent contract
CN112235278A (en) * 2020-10-10 2021-01-15 杭州溪塔科技有限公司 Method and device for monitoring address information of trader and electronic equipment
CN115511633A (en) * 2022-09-28 2022-12-23 度小满科技(北京)有限公司 Method, device, terminal and storage medium for recovering blockchain assets

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2327554A1 (en) * 2000-11-28 2002-05-28 E. John R. Sinton A transaction execution system and method with user proxy and middleware
EP1959693A1 (en) * 2007-02-19 2008-08-20 Siemens Networks S.p.A. Cross-layer error recovery optimisation in wireless systems
CN107391298B (en) * 2017-07-06 2021-02-09 上海策链信息科技有限公司 Data storage state detection method and device and computer readable storage medium
CN110896390B (en) * 2018-09-12 2021-05-11 华为技术有限公司 Message sending method, message verification method, device and communication system
CN110351363B (en) * 2019-07-12 2021-09-10 全链通有限公司 Data backup method, device and computer readable storage medium
CN111309808B (en) * 2020-02-18 2024-07-09 腾讯科技(深圳)有限公司 Page access method, device and equipment for decentralizing application and storage medium
CN111401903B (en) * 2020-06-03 2020-09-11 腾讯科技(深圳)有限公司 Block chain message processing method, device, computer and readable storage medium
CN112822255B (en) * 2020-12-31 2023-02-28 平安科技(深圳)有限公司 Block chain-based mail processing method, mail sending end, receiving end and equipment
CN113268439A (en) * 2021-05-26 2021-08-17 北京金山云网络技术有限公司 Memory address searching method and device, electronic equipment and storage medium
CN114978646B (en) * 2022-05-13 2024-09-20 京东科技控股股份有限公司 Access right determining method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111950026A (en) * 2020-08-21 2020-11-17 安徽高山科技有限公司 Ciphertext sharing method based on block chain intelligent contract
CN112235278A (en) * 2020-10-10 2021-01-15 杭州溪塔科技有限公司 Method and device for monitoring address information of trader and electronic equipment
CN115511633A (en) * 2022-09-28 2022-12-23 度小满科技(北京)有限公司 Method, device, terminal and storage medium for recovering blockchain assets

Also Published As

Publication number Publication date
CN116132166A (en) 2023-05-16

Similar Documents

Publication Publication Date Title
CN111949953B (en) Identity authentication method, system and device based on block chain and computer equipment
KR101786132B1 (en) Low-latency peer session establishment
MX2012015175A (en) System and method for secure messaging in a hybrid peer-to-peer net work.
CN101640682A (en) Method for improving safety of Web service
WO2019178942A1 (en) Method and system for performing ssl handshake
CN112019541A (en) Data transmission method and device, computer equipment and storage medium
CN109359472A (en) A kind of data encrypting and deciphering processing method, device and relevant device
CN112202557A (en) Encryption method, device, equipment and storage medium based on secret key update distribution
CN112600820A (en) Network connection method, device, computer equipment and storage medium
CN113923655B (en) Data decryption receiving method and device based on adjacent nodes
CN116112458B (en) Communication method, device, equipment and storage medium
US10785025B1 (en) Synchronization of key management services with cloud services
CN109120641B (en) Report automatic uploading method and device, computer equipment and storage medium
CN116132166B (en) Communication method, device, equipment and storage medium based on blockchain
CN108566379B (en) Concealed Data Transmission Synchronization Method Based on Protocol Field Redundancy in P2P Network
CN111262837B (en) Data encryption method, data decryption method, system, equipment and medium
JP2024505553A (en) Systems and methods for federated learning using peer-to-peer networks
EP3282664B1 (en) Email verification
CN110351086B (en) Method and system for processing and transmitting encrypted information in robot group
CN110049024B (en) Data transmission method, transfer server and access network point server
CN116095033B (en) Social communication method, device, equipment and storage medium
CN112751661A (en) Industrial field device privacy data protection method based on homomorphic encryption
CN106254425A (en) For mobile device to high in the clouds the transmission method and system of data, mobile terminal
CN111147344B (en) Virtual private network implementation method, device, equipment and medium
CN110995730B (en) Data transmission method and device, proxy server and proxy server cluster

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant