The object of this embodiment is to provide an instant messaging system for fusion zone chains and point-to-point communication technology.
An instant messaging system for fusion zone chains and point-to-point communication technology, including data service layers, intermediate layers, and application layers;
The data service layer uses a block node network architecture to implement distributed storage and privacy protection for system data;
The intermediate layer uses a WebRTC point-to-point communication, and data is transferred by a transit server;
The application layer is based on the instant communication between the user based on the data service layer and the intermediate layer;
Among them, the user information encrypts the upper chain, the communication content is asynchronous, using the IPFS distributed storage system to record the encrypted chat content; the instant messaging system uses the block node and the IP information map of the terminal, instead of WebRTC network penetration method And ICE relay service.
Specifically, such asfigure 1 The architecture of the instant chat system of the fusion zone chain and the point-to-point communication technology is shown, based onfigure 1 The real-time chat system architecture shown in the present disclosure is described in detail with the plan of the plan of the present disclosure:
(1) Inter-block node information transmission
Through the target user IP penetration, replace the conventional SIP signaling service, the end-to-end (block node to block node) is notified.
(2) end-to-end penetration
Based on Transport / Session and NetWork I / O, Binary Protocol, SHA-256 Asymmetric Encryption Equality Links to achieve point-to-point data exchange; where SHA-256 is one of the safety hash algorithm SHA series algorithms, it is summarized The length is 256 bits, namely 32 bytes, so as the SHA256. For any length (press Bit calculations), the SHA256 generates a 32-byte length data called a message summary. When the message is received, this message summary can be used to verify that the data changes, that is, verify its integrity.
(3) Data asynchronous upper chain
Message data transmission simultaneously, asynchronously synchronized to the block chain, stored with IPFS distribution, and can be used anytime, anywhere.
(4) Single chat
After establishing a point-to-point connection, convert the data into binary, and perform sub-segmentation, each set of data port numbers and total points, implement parallel transmission and reorganization, improve data transmission performance, maximize network resources; through point-to-point point receipt, Resolve regular chat at least 4 times to resolve the message loss problem.
(5) Business (add friends, enter group)
The information that adds a friend request can be synchronized through the network node. The target node can decrypt the content after the public key encryption, encrypting parameters uses their own private key signature information, public key, timestamp, content's Hash value, and IPFS in IPFS s position.
(6) group chat
For group chats less than 2,000 people, the message is spread by point-to-point protocol; more than 2,000 group chat, transmit messages between block chain nods to achieve the spread of group chat, flexible use of network characteristics, and improve message transmission efficiency. When the mobile method is paralyzed, it can be automatically switched to another way; the members communicate the way the negotiation key is used with their own public-private keys to ensure that the encryption key of each chat room is different.
(7) Privacy protection
By using Hash, JWT asymmetric encryption, the intranet penetrates the MD5 non-reverse encryption algorithm, the user information, the internal network penetration conversion IP and communication content, the full-range encryption guarantee during the storage and transmission process.
Based on the above-mentioned instant chat system architecture and underlying design, login and communication processes, and message storage such asfigure 2 Indicated.
Further, landing and communication processes are divided into 7 steps:
(1) User registration
The user registers through the client, including the user's corresponding personal information;
(2) Upper chain and synchronize
Create a block and upstream of the registration information, and all nodes are synchronized;
(3) User login
Synchronize the user's public network and the intranets, port encryption to the whole network node;
(4) Get a list of users
The user's individual obtains the user list through the block node, selecting a friend to communicate;
(5) Get the optimal path
The communication notification is synchronized through the block node to the target node, and the speed optimal line notification is obtained by the path optimal algorithm;
(6) Resolution of communication content
After the target node receives the notification, use the own private key to resolve the communication content, and return its IP information to the other party through network diffusion;
(7) Establish a communication link
Source nodes and target nodes create a one-to-one point communication line by penetrating IP and port.
Further, message storage and offline message read processes such asimage 3The flow shown in, specific, message storage, and offline messages are divided into the following steps:
(1) Record terminal information
The terminal information of the communication will be initiated to the block node;
(2) Distributed storage
The block node information is stored in IPFS distributed storage, and roaming synchronization can be performed anytime, anywhere.
(3) Synchronous data
After the client is limited, the data is synchronized by distributed network;
(4) Query and decryption information
After the client synchronization data is detected, whether it contains its own communication information, and decrypt information through the appointment publicity;
Differentiate the data and communication information of the decryption communication information and the communication information;
(6) Terminal cache
Cache the processing contents to the terminal;
(7) Display information
According to the actual needs, a reasonable terminal layout is performed, and the information is displayed.
Further, the actual application of chat dating, interior communication, private communication, message notification, and live bucket, etc., based on the present disclosure.
(1) chat dating based on public chain
Each node on the public chain can freely add and exit the network, and participate in the reading and writing of the chain data, and read and write interconnects, there is no centralized server node in the network. Bitcoin and Tanfang, which are familiar with you are a public chain. The benefits of the public chain are not limited, you can participate free.
The requirements of social entertainment life are increasing, and various dating software is not in line. Flooding strange dating tool information exposes, bringing users a great privacy threat. Based on the instant messaging of the public chain, it is guaranteed to secure user privacy, but also with network advantages of block nodes.
(2) Enterprise internal communication based on the league chain
Each node of the league chain typically has a corresponding entity mechanism organization, and can be added to the exit network by authorization. All institutions have formulated a stakeholder associated alliance, and the healthy operation of the zone chain chain.
Based on the alliance chain to build a communication tool within the group, the data is stored to the group's league chain, and the data is completely self-control, but also guarantees the risk of stolen crack. At the same time, the network architecture is achieved, and the central service resource is saved for the company.
(3) Private communication based on private chain
The write weights of each node in the private chain are controlled internal control, and the read permissions can be selectively open. The proprietary chain is still hot with a general structure of multi-node running in zone chain, which is suitable for internal data management and auditing of specific agencies. Among them, the R3CEV CORDA platform and the Hyper Ledger Project are all private chain projects, and there is a higher demand for transaction efficiency, privacy protection and regulatory control. The application of private chain is the main direction.
Based on the private chain to create a single-link communication software for a family or group member. Information is only known to participate. The new listening mobility is displayed. A one-to-one binding of the terminal is to prevent terminal data from spreading to the currently complex Internet to achieve exclusive communication mode across the time.
(4) Message Notification Based on News
Busy social life, people always need to turn on message notification to remind you not to miss some important information. These news notifications fully needs to rely on various devices to provide vendor built-in services and remote center services. The message penetration is weak, the delivery rate is the end, the docking is complex, and the information is completely exposed. The message orientation node notification is implemented based on the network diffusion of the block node and the public-private key of the device terminal. Solve the pain points for existing message notifications.
(5) Live Broadcast Based on Network Broadcasting
With the continuous development of life and e-commerce technology, live broadcast has become a mass life. Through the live stream of the center broadcast, the bulk is sent, the large platform is consumed, and several hundred or even thousands of centralized distributed service architectures. The information synchronization characteristics of the block chain node implement the full network efficient delivery, in the real-time demand, not particularly high live broadcast business requirements, a large number of service resources. And can effectively save live information, solve video media and barrage synchronization problems when playback.
Further, the disclosure of the present disclosure is aimed at the disadvantage of the instant communication system of the centralized architecture, the fusion zone chain and point communication techniques of the present invention propose a new instant chat system. The system not only solves the disadvantages of the centralized instant messaging system, but also solves the new problems brought by the block chain technology of the convergence zone: when the district block consumption is time consuming, when the node propagates, the message reaches high delay, data Synchronization is too slow; when the message is high, the network pressure and node data synchronous pressure are too high, and the performance requirements are too high; the programs of this disclosure have the following innovations relative to the prior art:
(1) Communication architecture of block node network architecture instead of routine dependency centering services;
(2) User data encrypts the upper chain, communication content asynchronous upper chain, record the encrypted chat content through IPFS (distributed storage system), and verify chat information while verifying chat content;
(3) Using WebRTC point-to-point communication, bypassing the central service, solving resources and bandwidth, and improves concurrency;
(4) Use the IP information mapping of nodes and terminals instead of WebRTC's network penetration method and ICE relay service.