Blockchain-based communication method, device, equipment, and storage medium
By introducing blockchain technology into the instant messaging system, building a decentralized communication blockchain system, and utilizing fast communication channels and encrypted channels, we can solve the information security problem in centralized communication and achieve secure, reliable communication and permanent information storage between end users.
Patent Information
- Application Number
- CN202211566449.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-12-07
AI Technical Summary
Existing instant messaging software has the risk of information exposure and tampering, and the reliance on centralized servers for communication leads to insufficient security.
The communication blockchain system is built using blockchain technology. Each blockchain node can connect to multiple terminals, realize decentralized instant communication through fast communication channels, and use the decentralized characteristics of blockchain and encrypted channels to ensure communication security.
It realizes decentralized communication between end users, ensures the security of information transmission, avoids information leakage and tampering, and provides permanent storage of communication records.
Smart Images

Figure CN115941325B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and more specifically, to a blockchain-based communication method, apparatus, device, and storage medium. Background Art
[0002] With the development of Internet technology, instant messaging has gradually occupied a more important position in people's lives. People use instant messaging to communicate with people who are far away.
[0003] With the development of instant messaging technology, communication software has emerged in an endless stream. Communication software allows people to use terminals connected to the wireless network to talk with other terminal users connected to the wireless network at any time, and even see the other party's real-time picture through video, so that people can communicate smoothly without being restricted by distance.
[0004] However, current communication software all uses a centralized service architecture, meaning that all messages need to be forwarded through a central server, which holds the communication records of all users, posing a risk of information exposure and tampering. 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 deficiencies in the above-mentioned prior art, so as to solve the risks of information exposure and tampering in the prior art.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows:
[0007] In a first aspect, an embodiment of the present application provides a blockchain-based communication method, which is applied to a communication blockchain system, wherein the system includes multiple blockchain nodes and multiple terminals, wherein each blockchain node can be used to connect to one or more terminals, and a fast communication channel can be established between every two blockchain nodes. The method includes:
[0008] The first terminal sends the instant messaging request to a first blockchain node that meets preset requirements in response to the instant messaging request, wherein the instant messaging request includes: information of at least one communication object, where the communication object includes other terminals among the plurality of terminals except the first terminal;
[0009] The first blockchain node sends the instant messaging request to the communication object through a fast communication channel corresponding to the communication object, where the fast communication channel corresponding to the communication object is a fast communication channel between the first blockchain node and a second blockchain node connected to the communication object;
[0010] After accepting the instant messaging request, the communication partner accesses the fast messaging channel to perform instant messaging.
[0011] In a second aspect, another embodiment of the present application provides a blockchain-based communication device, the device comprising: a sending module and an access module, wherein:
[0012] The sending module is specifically configured to, in response to an instant messaging request, send the instant messaging request to a first blockchain node that meets preset requirements, wherein the instant messaging request includes information about at least one communication partner, where the communication partner includes other terminals among the plurality of terminals except the first terminal; the first blockchain node sends the instant messaging request to the communication partner via a fast communication channel corresponding to the communication partner, where the fast communication channel corresponding to the communication partner is a fast communication channel between the first blockchain node and a second blockchain node to which the communication partner is connected;
[0013] The access module is specifically configured to access the fast communication channel to perform instant communication after the communication partner accepts the instant communication request.
[0014] 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. 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.
[0015] 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.
[0016] The beneficial effect of the present application is: by adopting the blockchain-based communication method provided by the present application, by constructing a communication blockchain system, multiple terminals can communicate with each other through multiple blockchain nodes. Specifically, after the user initiates an instant communication request, the first terminal sends an instant communication request to the first blockchain node that meets the preset requirements in the communication blockchain system. The first blockchain node sends an instant communication request to the communication object through the fast communication channel corresponding to each communication object through the information of at least one communication object in the instant communication request, and after the communication object accepts the instant communication request, it also connects the communication object to the fast channel to enable the communication object and the first terminal to communicate with each other, thereby realizing decentralized services. Each node can realize fast information exchange for the communication needs of terminal users by building a fast information channel, so that the communication between terminal users no longer relies on a centralized server. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. 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 relevant drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A flowchart of a blockchain-based communication method provided in one embodiment of the present application;
[0019] Figure 2 A schematic diagram of the structure of a communication blockchain system provided in one embodiment of the present application;
[0020] Figure 3 A schematic diagram of message transmission via a fast communication channel provided in one embodiment of the present application;
[0021] Figure 4 A flowchart of a blockchain-based communication method provided in another embodiment of the present application;
[0022] Figure 5 A flowchart of a blockchain-based communication method provided in another embodiment of the present application;
[0023] Figure 6 A flowchart of a blockchain-based communication method provided in another embodiment of the present application;
[0024] Figure 7 A schematic diagram of the structure of a blockchain-based communication device provided in one embodiment of the present application;
[0025] Figure 8A schematic structural diagram of a blockchain-based communication device provided in another embodiment of the present application;
[0026] Figure 9 A schematic diagram of the structure of a blockchain-based communication device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0027] 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.
[0028] The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different 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 claimed application, but rather merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.
[0029] In addition, the flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts may not be implemented in order, and steps that have no logical contextual relationship may be reversed or performed simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or may remove one or more operations from the flowcharts.
[0030] The following is an explanation of a blockchain-based communication method provided in an embodiment of the present application in combination with multiple specific application examples. Figure 1 A flowchart of a blockchain-based communication method provided in one embodiment of the present application is applied in a communication blockchain system.
[0031] Figure 2 A schematic diagram of the structure of a communication blockchain system provided in one embodiment of the present application is shown in FIG. Figure 2As shown, the system includes multiple blockchain nodes and multiple terminals, wherein each blockchain node is a basic component unit of the communication blockchain network, and is a computer with computing, storage, network and other resources. By deploying communication blockchain software on each computer node, communication services and blockchain services are provided to terminal users. Each blockchain node can use part of the computer's resources to build a fast communication channel, providing terminal users with communication needs with the function of fast communication information exchange. Each terminal is a terminal installed with preset communication software. In an embodiment of the present application, each of the blockchain nodes can be used to connect to one or more terminals, and a fast communication channel can be established between every two blockchain nodes. Moreover, communication is carried out on the communication blockchain system provided in the present application, which can realize the permanent storage of historical messages.
[0032] based on Figure 2 The introduction of the communication blockchain system structure of this application is combined with the accompanying drawings to further introduce the blockchain-based communication method provided by this application. Figure 1 As shown, the method includes:
[0033] S101: In response to an instant messaging request, the first terminal sends an instant messaging request to a first blockchain node that meets preset requirements.
[0034] The instant messaging request includes information of at least one communication object, where the communication object includes other terminals among the multiple terminals except the first terminal.
[0035] In an embodiment of the present application, each user can generate a user identifier uniquely corresponding to the user under the communication software deployed on each terminal based on the communication software deployed on the terminal, which is used to represent the user information of the user, and store the above user information in the communication software, so that the communication software stores the above user information on the blockchain node corresponding to the terminal through the terminal, and can also store it on each blockchain node in the system, thereby completing the decentralized storage of user information.
[0036] Among them, in some possible embodiments, the form of user identification can be, for example: user name, or universally unique identifier (UUID), or it can also include any kind of identification information such as public and private keys. It should be understood that the above embodiments are only exemplary descriptions, and the specific form of user identification can be flexibly adjusted according to user needs, as long as it can uniquely indicate each user, and is not limited to the above embodiments.
[0037] In one embodiment of the present application, the way in which the first terminal sends an instant communication request to the first blockchain node that meets the preset requirements can be, for example: the first terminal initiates a task of finding a fast communication channel in response to the instant communication request, and the first terminal establishes a link with the first blockchain node that meets the preset requirements based on the task of finding the fast communication channel, and sends an instant communication request to the first blockchain node that meets the preset requirements.
[0038] In one embodiment of the present application, the first blockchain determines the communication address that needs to be communicated based on the type of instant messaging request and preset service rules, writes the communication address into the contract, and then initiates the task of finding a fast communication channel.
[0039] Among them, when the first terminal initiates the task of finding a fast communication channel, it sends the fast communication channel task to all blockchain nodes in the communication blockchain system, and then determines the first blockchain node that meets the requirements and is closest to the first terminal.
[0040] S102: The first blockchain node sends an instant messaging request to the communication object through the fast communication channel corresponding to the communication object.
[0041] The fast communication channel corresponding to the communication object is a fast communication channel between the first blockchain node and the second blockchain node to which the communication object is connected.
[0042] In an embodiment of the present application, each blockchain node provides a fast communication channel service, and the communication objects corresponding to the terminals of all parties participating in the communication need to be connected to the above-mentioned fast communication channel service. After the communication object sends a message to the fast communication channel, the fast communication channel pushes each message to all other communication objects participating in the communication in sequence according to the order of the received messages.
[0043] In some possible embodiments, the fast communication channel is a fast encrypted communication channel, which ensures the security of communication message transmission between users corresponding to each terminal, avoids the problem of user privacy leakage during the communication message transmission process, and at the same time, the fast encrypted channel also provides a pull service so that terminal users can pull messages locally.
[0044] Figure 3 A schematic diagram of a fast communication channel for message transmission provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the fast communication channel of the first blockchain node sends message 1 to all other communication objects participating in the communication first, and then sends message 2 to all other communication objects participating in the communication according to the sending order of message 1 and message 2. Finally, the presentation form of each message in the chat text is that each communication object first receives message 1 and then receives message 2. It should be understood that Figure 3 The fast communication channels corresponding to the upper and lower first blockchain nodes are the same fast encryption channel of the same node, but are represented separately just for the convenience of message sending.
[0045] This setting method can realize fast serialization and fast broadcast of communication messages by utilizing fast communication channels.
[0046] S103: After the communication partner accepts the instant communication request, it accesses the fast communication channel to carry out instant communication.
[0047] Communication objects that join the fast communication channel can transmit communication messages bidirectionally through the fast communication channel, thereby realizing instant communication based on blockchain.
[0048] Among them, since blockchain is a new distributed infrastructure and computing paradigm that uses block chain data structure to verify and store data, uses distributed node consensus algorithm to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses smart contracts composed of automated script code to program and operate data, the communication method based on blockchain, due to the decentralized nature of blockchain itself, can ensure the transmission security and access security of communication messages during the transmission process, and the information stored on the blockchain cannot be changed, which avoids the tampering of stored communication messages.
[0049] By adopting the blockchain-based communication method provided in the present application, a communication blockchain system is constructed so that multiple terminals can communicate with each other through multiple blockchain nodes. Specifically, after the user initiates an instant communication request, the first terminal sends an instant communication request to the first blockchain node that meets the preset requirements in the communication blockchain system. The first blockchain node sends an instant communication request to the communication object through the fast communication channel corresponding to each communication object through the information of at least one communication object in the instant communication request, and after the communication object accepts the instant communication request, it also connects the communication object to the fast channel so that the communication object and the first terminal can communicate with each other, thereby realizing decentralized services. Each node can realize fast information exchange for the communication needs of terminal users by building a fast information channel, so that communication between terminal users no longer relies on a centralized server.
[0050] Continue as Figure 2As shown, in the embodiment of the present application, each blockchain node is connected to other blockchain nodes in three communication blockchain systems to form a peer-to-peer lending (P2P) communication network structure. That is, in the present application, by establishing a P2P network between blockchain nodes, it supports the interconnection between the blockchain nodes to form an open network, thereby realizing the rapid transmission of messages between the blockchain nodes.
[0051] Optionally, based on the above embodiment, the embodiment of the present application can also provide a blockchain-based communication method. The implementation process of the above method is illustrated below with reference to the accompanying drawings. Figure 4 A flowchart of a blockchain-based communication method provided in another embodiment of the present application is shown as follows: Figure 4 As shown, the method may further include:
[0052] S111: The first blockchain node obtains a communication message between the first terminal and the communication object.
[0053] S112: The first blockchain node transmits and stores the communication message to each blockchain node in the communication blockchain system.
[0054] In one embodiment of the present application, the method of storing communication messages may be, for example, that the first blockchain node packages the communication messages according to a preset hash algorithm to obtain hash information; the first blockchain node transmits and stores the hash information to each blockchain node in the communication blockchain system, wherein each blockchain node maintains a hash table.
[0055] Among them, the storage method can be, for example, based on a preset storage time interval, and every preset storage time interval, the message content within the preset storage time interval is packaged according to a preset hash algorithm to obtain the packaged hash information; or, in other possible embodiments, the storage method can also be, for example, based on a preset number of stored messages, after the number of communication messages reaches the preset number of stored messages, the communication messages of the preset number of stored messages are packaged according to a preset hash algorithm, and the packaged hash information is obtained; it should be understood that the above embodiments are only exemplary descriptions, and the specific method of storing communication messages can be flexibly adjusted according to user needs, and is not limited to the above embodiments.
[0056] In an embodiment of the present application, after obtaining the packaged hash information, the hash information needs to be stored and a space storage certificate needs to be provided for all stored hash information. In addition, in an embodiment of the present application, a time certificate for the storage of the hash information needs to be calculated at every preset time interval.
[0057] In an embodiment of the present application, after obtaining the packaged hash information, the obtained hash information will be quickly packaged in all blockchain nodes in the communication blockchain system through a consensus mechanism (DPOS), and then broadcast to all nodes in the communication blockchain system.
[0058] Optionally, based on the above embodiment, the embodiment of the present application can also provide a blockchain-based communication method. The implementation process of the above method is illustrated below with reference to the accompanying drawings. Figure 5 A flowchart of a blockchain-based communication method provided in another embodiment of the present application is shown as follows: Figure 5 As shown, after S101, the method may further include:
[0059] S121: The first blockchain obtains pre-stored resources of the first terminal according to the type of instant messaging request and preset service rules, where the preset service rules are used to indicate resource standards corresponding to different types of instant messaging.
[0060] S122: After obtaining the pre-stored resources, the first blockchain provides services according to the type of instant messaging request.
[0061] In some possible embodiments of the present application, the services may include, for example: instant storage of communication messages or permanent storage of communication messages; one-to-one instant messaging or group instant messaging.
[0062] In the embodiments of the present application, the accounts included in the present application include: external user accounts and contract accounts, depending on the service: wherein: an external user account is owned by each user participating in social communication, each user corresponds to an external user account, and each external account contains: address information, public and private keys, information about the pre-stored resources (balance / remaining fees) of the external account, and information about the chat group list in which the external account participates; a contract account is mainly used to represent a chat message list participating in group communication, including: address information, external account list information (information about each external account participating in the group chat), information about the pre-stored resources (balance / remaining fees, that is, the user pays for the resources used by the group) of the contract account, encrypted message list information, etc. Pre-stored resources can be various forms of resources such as virtual currency, currency, network resources, etc., and are not limited in this application.
[0063] In an embodiment of the present application, whether it is the pre-stored resources of an external account or the pre-stored resources of a contract account, if the pre-stored resources are not used, the target external account where the pre-stored resources are stored can extract the remaining unused pre-stored resources.
[0064] In an embodiment of the present application, if the service is group instant messaging, the method for determining the first blockchain node can be, for example, that when the target external account initiates instant messaging, it selects the number of external accounts included in the group instant messaging, and based on the number of people in the group instant messaging, searches among the blockchain nodes in the communication blockchain system for a blockchain node that is closest to the target external account and meets the requirements as the first blockchain node, and the first blockchain node provides a fast communication channel so that the corresponding external accounts in the group instant messaging can communicate with each other through the fast communication channel.
[0065] Among them, in an embodiment of the present application, when the target external account pulls up the group chat corresponding to the target contract account, a group chat corresponding to the target contract account is created on the entire network, and the target external account deposits the initial pre-stored resources (initial fee) for the target contract account as a deposit. In some possible embodiments, for example, a 3-day fee for the group chat can be charged. It should be understood that the above embodiment is only an exemplary description, and a 1-day fee for the group chat, or a weekly fee, etc. can also be charged. The specific fee can be flexibly adjusted according to user needs and is not limited to the above embodiment.
[0066] In the embodiments of the present application, transactions in the communication blockchain system are mainly charged by blockchain nodes as fast channels, and the charges mainly include the transmission fees of communication messages and the storage fees of communication messages. The calculation factors of the charges include: the number of receiving users corresponding to the communication message, the message size of the communication message, etc.; it should be understood that the above embodiments are only exemplary, and the specific charging calculation factors may include content that can be flexibly adjusted according to user needs and are not limited to those given in the above embodiments.
[0067] Optionally, based on the above embodiment, the embodiment of the present application can also provide a blockchain-based communication method. The implementation process of the above method is illustrated below with reference to the accompanying drawings. Figure 6 A flowchart of a blockchain-based communication method provided in another embodiment of the present application is shown as follows: Figure 6 As shown, the method may further include:
[0068] S131: If the first blockchain node detects that it is disconnected from the communication blockchain system, it requests to restore the connection.
[0069] In an embodiment of the present application, after any blockchain node in a communication blockchain system is disconnected, the disconnected node will actively initiate a connection request after the disconnection is restored, so that the disconnected blockchain node will actively connect to the blockchain network in the communication blockchain system.
[0070] S132: After restoring the connection, the first blockchain node synchronizes messages with other blockchain nodes.
[0071] In this way, when any blockchain node is disconnected, the disconnected blockchain node will actively connect to the blockchain network in the communication blockchain system, and synchronize the latest information for the disconnected blockchain node by synchronizing messages with other blockchain nodes.
[0072] By adopting the blockchain-based communication method provided by this application, the current situation of centralized servers in the social communication field is improved through the setting of the communication blockchain system, and permanent information records can be provided for users with social storage needs. In the process of information transmission, since all information is encrypted and transmitted through a fast information channel, the security of information transmission is guaranteed, and the stored communication records are tamper-proof. That is, the method provided by this application not only ensures the security of data transmission, improves the privacy of users, but also avoids the risk of information being tampered with. In addition, for users who have the need to store communication messages, communication messages can be permanently stored.
[0073] The following is an explanation of the blockchain-based communication device provided by this application with reference to the accompanying drawings. The blockchain-based communication device can perform the above Figures 1-6 The specific implementation and beneficial effects of any blockchain-based communication method are as described above and will not be repeated below.
[0074] Figure 7 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 7 As shown, the device includes: a sending module 201 and an access module 202, wherein:
[0075] The sending module 201 is specifically configured to, in response to an instant messaging request, send an instant messaging request to a first blockchain node that meets preset requirements. The instant messaging request includes: information about at least one communication partner, where the communication partner includes other terminals among the plurality of terminals except the first terminal; the first blockchain node sends the instant messaging request to the communication partner via a fast communication channel corresponding to the communication partner, where the fast communication channel corresponding to the communication partner is a fast communication channel between the first blockchain node and a second blockchain node to which the communication partner is connected;
[0076] The access module 202 is specifically configured to access a fast communication channel to perform instant communication after the communication partner accepts the instant communication request.
[0077] Optionally, based on the above embodiment, the present application embodiment may further provide a communication device based on blockchain, as shown below in conjunction with the accompanying drawings. Figure 7 The implementation process of the given device is described with an example. Figure 8 A schematic diagram of a blockchain-based communication device according to another embodiment of the present application is shown in FIG. Figure 8As shown, the apparatus further includes: an establishment module 203, wherein:
[0078] The sending module 201 is specifically configured for the first terminal to initiate a task of searching for a fast communication channel in response to an instant messaging request;
[0079] Establishing module 203, configured for the first terminal to establish a connection with a first blockchain node that meets preset requirements based on a task of finding a fast communication channel;
[0080] The sending module 201 is specifically configured to send an instant messaging request to a first blockchain node that meets preset requirements.
[0081] like Figure 8 As shown, the device further includes: an acquisition module 204 and a storage module 205, which are used for the first blockchain node to acquire the communication message between the first terminal and the communication object;
[0082] The storage module 205 is used for the first blockchain node to transmit and store the communication message to each blockchain node in the communication blockchain system.
[0083] Optionally, the acquisition module 204 is specifically configured to package the communication message according to a preset hash algorithm by the first blockchain node to obtain hash information;
[0084] The sending module 201 is specifically used for the first blockchain node to transmit and store the hash information to each blockchain node in the communication blockchain system, wherein each blockchain node maintains a hash table.
[0085] Optionally, the acquisition module 204 is specifically configured for the first blockchain to acquire pre-stored resources of the first terminal according to the type of instant messaging request and preset service rules, where the preset service rules are used to indicate resource standards corresponding to different types of instant messaging; after acquiring the pre-stored resources, the first blockchain provides services according to the type of instant messaging request.
[0086] Optionally, the service includes: instant storage of communication messages or permanent storage of communication messages; one-to-one instant messaging or group instant messaging.
[0087] Optionally, each blockchain node is connected to 3 other blockchain nodes.
[0088] Optionally, the access module 202 is specifically configured to request restoration of the connection if the first blockchain node detects a disconnection with the communication blockchain system;
[0089] The acquisition module 204 is specifically configured to synchronize messages between the first blockchain node and other blockchain nodes after the connection is restored.
[0090] The above-mentioned device is used to execute the method provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0091] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented by scheduling program code through a processing element, the processing element can 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 can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0092] Figure 9 A schematic structural diagram 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.
[0093] like Figure 9 As shown, the blockchain-based communication device includes: a processor 501, a bus 502 and a storage medium 503.
[0094] The processor 501 is used to store programs. The processor 501 calls the program stored in the storage medium 503 to execute the above Figures 1-6 The specific implementation and technical effects of the corresponding method embodiment are similar and will not be described in detail here.
[0095] 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.
[0096] In the several embodiments provided in this 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 merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, 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.
[0097] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0098] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0099] 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 and includes a number of instructions for causing a computer device (which can be a personal computer, server, or 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: a USB flash drive, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated: ROM), a random access memory (English: Random Access Memory, abbreviated: RAM), a disk or an optical disk, and other media that can store program code.
Claims
1. A communication method based on blockchain, characterized in that: Applied to a communication blockchain system, the system includes multiple blockchain nodes and multiple terminals, wherein each blockchain node can be used to connect to one or more terminals, and a fast communication channel can be established between every two blockchain nodes. The method includes: The first terminal sends the instant messaging request to a first blockchain node that meets preset requirements in response to the instant messaging request, wherein the instant messaging request includes: information of at least one communication object, where the communication object includes other terminals among the plurality of terminals except the first terminal; The first blockchain node sends the instant messaging request to the communication object through a fast communication channel corresponding to the communication object, where the fast communication channel corresponding to the communication object is a fast communication channel between the first blockchain node and a second blockchain node connected to the communication object, and the fast communication channel is a fast encrypted communication channel; After the communication object accepts the instant communication request, it accesses the fast communication channel to carry out instant communication; The first terminal sends the instant messaging request to the first blockchain node that meets the preset requirements in response to the instant messaging request, including: The first terminal initiates a task of searching for a fast communication channel in response to the instant messaging request; The first terminal establishes a connection with the first blockchain node that meets preset requirements based on the task of finding a fast communication channel; The instant messaging request is sent to a first blockchain node that meets the preset requirements.
2. The method according to claim 1, wherein The method further comprises: The first blockchain node obtains a communication message between the first terminal and the communication object; The first blockchain node transmits and stores the communication message to each blockchain node in the communication blockchain system.
3. The method according to claim 2, wherein The first blockchain node transmits and stores the communication message to each blockchain node in the communication blockchain system, including: The first blockchain node packages the communication message according to a preset hash algorithm to obtain hash information; The first blockchain node transmits and stores the hash information to each blockchain node in the communication blockchain system, wherein each blockchain node maintains a hash table.
4. The method according to claim 1, wherein After the first terminal sends the instant messaging request to the first blockchain node that meets the preset requirements in response to the instant messaging request, the method further includes: The first blockchain obtains pre-stored resources of the first terminal according to the type of the instant messaging request and preset service rules, where the preset service rules are used to indicate resource standards corresponding to different types of instant messaging; After acquiring the pre-stored resources, the first blockchain provides services according to the type of the instant messaging request.
5. The method according to claim 4, wherein The services include: instant storage of communication messages or permanent storage of communication messages; one-to-one instant messaging or group instant messaging.
6. The method according to claim 1, wherein Each of said blockchain nodes is connected to 3 other blockchain nodes.
7. The method according to claim 6, wherein The method further comprises: If the first blockchain node detects a disconnection with the communication blockchain system, it requests to restore the connection; After the connection is restored, the first blockchain node synchronizes messages with other blockchain nodes.
8. A communication device based on blockchain, characterized in that: The device includes: a sending module and an access module, wherein: The sending module is specifically configured to, in response to an instant messaging request, send the instant messaging request to a first blockchain node that meets preset requirements, wherein the instant messaging request includes: information of at least one communication object, where the communication object includes other terminals among the plurality of terminals except the first terminal; the first blockchain node sends the instant messaging request to the communication object via a fast communication channel corresponding to the communication object, where the fast communication channel corresponding to the communication object is a fast communication channel between the first blockchain node and a second blockchain node to which the communication object is connected, and the fast communication channel is a fast encrypted communication channel; The access module is specifically configured to enable the communication partner to access the fast communication channel for instant communication after accepting the instant communication request; The apparatus further comprises: an establishment module; The sending module is specifically configured to initiate a task of searching for a fast communication channel in response to an instant messaging request by the first terminal; The establishing module is configured to enable the first terminal to establish a connection with the first blockchain node that meets preset requirements based on the task of finding a fast communication channel; The sending module is specifically configured to send the instant messaging request to a first blockchain node that meets preset requirements.
9. A blockchain-based communication device, 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 and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the method described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Distributed instant messaging system and method based on blockchain and decentralized deployment
CN112417502A