CN109496407B - Message transmission method, device and storage medium in block chain system - Google Patents

Message transmission method, device and storage medium in block chain system Download PDF

Info

Publication number
CN109496407B
CN109496407B CN201880002403.6A CN201880002403A CN109496407B CN 109496407 B CN109496407 B CN 109496407B CN 201880002403 A CN201880002403 A CN 201880002403A CN 109496407 B CN109496407 B CN 109496407B
Authority
CN
China
Prior art keywords
application server
ring
server cluster
message
management
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
CN201880002403.6A
Other languages
Chinese (zh)
Other versions
CN109496407A (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.)
Quliantong Network Co ltd
Original Assignee
Quliantong 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 Quliantong Network Co ltd filed Critical Quliantong Network Co ltd
Publication of CN109496407A publication Critical patent/CN109496407A/en
Application granted granted Critical
Publication of CN109496407B publication Critical patent/CN109496407B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/042Network management architectures or arrangements comprising distributed management centres cooperatively managing the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention relates to a message transmission method, a device and a storage medium in a block chain system, wherein the method comprises the following steps: logically forming a management ring by an application server cluster, and dividing the management ring into a plurality of management ring fragments; logically forming a worker ring by a resource server cluster, and dividing the worker ring into a plurality of worker ring fragments; the management ring fragments manage corresponding worker ring fragments; a resource server cluster in a worker ring fragment sends a message of a block chain system to an application server cluster of a management ring fragment for managing the worker ring fragment; the application server cluster of the operation block chain program receives the information of the block chain system and sends the information to other application server clusters of the management ring segment; and sending the message to the application server clusters which are peer-to-peer nodes, and sending the message to other application server clusters of the corresponding management ring segment by the application server clusters which are peer-to-peer nodes.

Description

Message transmission method, device and storage medium in block chain system
Technical Field
The present invention relates to the field of blockchain, and in particular, to a method, an apparatus, and a storage medium for transmitting messages in a blockchain system.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm, and the blockchain technology is a brand-new distributed infrastructure and a computing mode which utilize a blockchain data structure to verify and store data, utilize a distributed node consensus algorithm to generate and update data, utilize a cryptography mode to ensure the safety of data transmission and access, and utilize an intelligent contract composed of automatic script codes to program and operate data. In the prior art, server nodes in a blockchain network system are simultaneously responsible for processing service logic and managing resource logic, each server node broadcasts a message received by itself to other server nodes, higher network delay often causes that the message cannot be quickly propagated to each server node in the blockchain network system, and one server node may receive the same message sent by a plurality of server nodes, and a large amount of network bandwidth resources and hardware equipment resources are consumed for receiving repeated messages, thereby reducing the propagation efficiency of the message.
Disclosure of Invention
In order to overcome the above technical problems, especially the problem that the prior art blockchain system cannot efficiently propagate messages, the following technical solutions are proposed:
in a first aspect, the present invention provides a message management method in a blockchain system, where the blockchain system includes: the management ring is composed of a plurality of application server clusters, and the application server clusters are used for operating a block chain program; the worker ring is composed of a plurality of resource server clusters, and the resource server clusters are used for providing resources and forwarding data; the message transmission method comprises the following steps:
logically forming a plurality of application server clusters into a management ring with a ring structure, and dividing the management ring into a plurality of management ring fragments; logically forming a worker ring with a ring structure by a plurality of resource server clusters, and dividing the worker ring into a plurality of worker ring fragments; the management ring fragments manage corresponding worker ring fragments;
a resource server cluster in a worker ring fragment sends a message of a block chain system to an application server cluster of a management ring fragment for managing the worker ring fragment;
the application server cluster running the block chain program receives the message of the block chain system and sends the message to other application server clusters of the management ring fragment corresponding to the application server cluster; and sending the message to the application server clusters which are peer-to-peer nodes, wherein the application server clusters which are peer-to-peer nodes send the message to other application server clusters of the corresponding management ring fragments.
Further, the dividing the management ring into a plurality of management ring segments includes:
the number of application server clusters according to each management ring fragment is
Figure BDA0001900743800000021
Dividing the management ring into
Figure BDA0001900743800000022
Each management ring is divided into pieces; wherein the number of the application server clusters is N, the
Figure BDA0001900743800000023
Is a positive integer.
Further, when the application server cluster running the blockchain program receives the message of the blockchain system, the application server cluster is a leader application server cluster of the management ring segment, and the distance from the leader application server cluster along the same direction is 1 to 1
Figure BDA0001900743800000024
The application server clusters of (1) belong to the same management ring segment.
Further, the sending, by the resource server cluster in the worker ring segment, the message of the blockchain system to the application server cluster managing the management ring segment of the worker ring segment includes:
and the resource server cluster judges the service type of the message of the block chain system, and sends the message carrying the corresponding service type to an application server cluster for managing the management ring fragment of the worker ring fragment.
Further, after the sending the message to the application server clusters that are peer-to-peer nodes, and the application server clusters that are peer-to-peer nodes send the message to the other application server clusters that manage the ring segment correspondingly, the method further includes:
and the application server cluster stores the message into a block, and the application server cluster on the management ring generates a block chain for the block.
In a second aspect, the present invention provides a message transmission method in a blockchain system from the perspective of a single application server cluster, including:
the application server cluster on the management ring receives the message of the block chain system sent by the resource server cluster of the managed worker ring fragment;
sending the message to other application server clusters of the management ring fragments corresponding to the application server cluster; and sending the message to an application server cluster which is a peer node with the application server cluster, so that the application server cluster which is the peer node sends the message to other application server clusters of the corresponding management ring fragments.
Further, when the application server cluster receives a message that the resource server cluster of the managed worker ring segment sends the blockchain system, the application server cluster is a leader application server cluster in the management ring segment.
Further, after sending the message to the application server cluster that is a peer node with the application server cluster, so that the application server cluster that is a peer node sends the message to another application server cluster of the corresponding management ring segment, the method further includes:
and storing the message into a block, and generating a block chain for the block with other application server clusters on the management ring.
In a third aspect, the present invention further provides a message transmission apparatus in a blockchain system, including:
a receiving module: the message of the block chain system is used for receiving the message of the block chain system sent by the resource server cluster of the managed worker ring fragments;
a transmission module: the other application server clusters are used for sending the message to the management ring fragments corresponding to the application server cluster; and sending the message to an application server cluster which is a peer node with the application server cluster, so that the application server cluster which is the peer node sends the message to other application server clusters of the corresponding management ring fragments.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the message transmission method in the block chain system.
Compared with the prior art, the invention has the following beneficial effects:
according to the invention, the server cluster in the block chain system is separated according to the application server cluster and the resource server cluster, the application server cluster is logically formed into a ring and then is divided into a plurality of management ring fragments, the resource server cluster is logically formed into a ring and then is divided into a plurality of worker ring fragments, the server cluster on the ring can realize the point-to-point and point-to-multipoint transmission of messages, meanwhile, the worker ring fragments are managed based on the management ring fragments, the management ring fragments synchronize the received messages to the management ring fragments, the server cluster on the management ring fragments transmits the messages based on the management ring fragments after receiving the messages, the messages on the management ring fragments are quickly transmitted to the application server cluster on the management ring, and the message transmission efficiency in the block chain system is improved; moreover, the roles of each server cluster on the ring are the same, and each server cluster can be used as a fragment head server cluster, so that the fragments forming the ring can be dynamically changed, the fragments of a management ring and a worker ring can be more flexibly completed, and the message transmission efficiency is greatly improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flowchart illustrating a message transmission method in a blockchain system according to an embodiment of the present invention;
FIG. 2 is a block chain system showing an embodiment of a management ring and worker ring;
FIG. 3 is a schematic perspective view of a management ring and worker ring in the blockchain system according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a message transmission method in a blockchain system according to another embodiment of the present invention;
FIG. 5 is a diagram of a message transmitting device in a blockchain system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, or operations, but do not preclude the presence or addition of one or more other features, integers, steps, operations, or groups thereof.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
It will be appreciated by those skilled in the art that the terms "application," "computer program" and similar terms used herein refer to the same concepts known to those skilled in the art that refer to computer software electronically-adapted to be organized into a series of computer instructions and associated data sources. Unless otherwise specified, such nomenclature is not itself limited by the programming language class, level, or operating system or platform upon which it depends.
In one embodiment, the present invention sets forth a method for transmitting a message in a blockchain system, the message including a transaction message, the method being applied to the blockchain system, the blockchain system comprising: the management ring is composed of a plurality of application server clusters, and the application server clusters are used for operating a block chain program; the worker ring is composed of a plurality of resource server clusters, and the resource server clusters are used for providing resources and forwarding data; as shown in fig. 1, the method comprises the steps of:
s10: logically forming a plurality of application server clusters into a management ring with a ring structure, and dividing the management ring into a plurality of management ring fragments; logically forming a worker ring with a ring structure by a plurality of resource server clusters, and dividing the worker ring into a plurality of worker ring fragments; the management ring segment manages a corresponding worker ring segment.
In this embodiment, a specific number of servers form a server cluster, and then a plurality of server clusters (shown by Untiy in fig. 2) logically form a ring network with a ring structure. Specifically, as shown in fig. 2, in this embodiment, the blockchain system operates on a server cluster having a Ring structure including a management Ring (Ring 0 in fig. 2 and 3) and a worker Ring (Ring 1 in fig. 2 and 3), where the management Ring is logically established by forwarding rules based on IEEE 802.1 specification, and messages of the server clusters on the management Ring support point-to-point, multipoint-to-multipoint, and point-to-multipoint transmission, and the present embodiment preferably performs the transmission of messages in a point-to-point and point-to-multipoint manner; likewise, the worker ring is established by logically clustering resource servers based on forwarding rules of the IEEE 802.1 specification, and messages of the server clusters on the worker ring support point-to-point, multipoint-to-multipoint, and point-to-multipoint transmissions. Further, in order to implement dynamic management on message passing between server clusters and server clusters, in this embodiment, the management ring is divided into a plurality of management ring segments, the worker ring is divided into a plurality of worker ring segments, and then the management ring segments manage corresponding worker ring segments, where a management ring segment management worker ring segment is one or more segments on a management worker ring corresponding to an application resource server on the management ring, and index information on the segment is stored to synchronize messages received by the worker ring, and Group in fig. 2 is shown as a segment on the management ring.
S20: and the resource server cluster in the worker ring fragment sends the message of the block chain system to an application server cluster of a management ring fragment for managing the worker ring fragment.
Further, the application server clusters on the management ring segment all receive the message, in this embodiment, the application server cluster for managing the worker ring fragments manages one or more worker ring fragments on a worker ring, one worker ring fragment also comprises a plurality of resource server clusters, the resource server cluster of the worker ring fragment is responsible for receiving messages generated by the blockchain system, the message is then synchronized to the application server cluster that manages the management ring segment of the worker ring segment, i.e., the resource server cluster sends the message to the corresponding application server cluster, e.g., application server cluster S1 on management ring segment GROUP1 manages worker ring segment GROUP a and GROUP B, when any resource server cluster on the worker ring segment GROUP a and GROUP B receives the message of the blockchain system, the message is sent to the application server cluster S1.
S30: the application server cluster running the block chain program receives the message of the block chain system and sends the message to other application server clusters of the management ring fragment corresponding to the application server cluster; and sending the message to the application server clusters which are peer-to-peer nodes, wherein the application server clusters which are peer-to-peer nodes send the message to other application server clusters of the corresponding management ring fragments.
In the blockchain system of this embodiment, the management ring provides the logical operation capability for processing the blockchain service, but does not distinguish the blockchain service, the logical operation of the blockchain service provided by the blockchain system is processed by the application server cluster on the management ring, accordingly, the blockchain program runs on the application server cluster of the management ring, enjoys the operational capability of the application server cluster, when the application server cluster running the blockchain program receives the message of the blockchain system sent by the resource server cluster in the managed worker ring segment, the message is sent to other application server clusters of the management ring segment corresponding to the application server cluster, for example, the management ring segment 6 management ring segments GROUP1, GROUP2, … …, and GROUP6, the GROUP1 includes the application server clusters S1, S2, S3, S4, S1, and S2, S5, S6, the GROUP2 comprises application server clusters S7, S8, S9, S10, S11 and S12; when the application server cluster S1 receives a message of the blockchain system sent by a resource server in the managed resource server allocation, since the application server clusters on the management ring are logically looped to provide a point-to-many information transmission function, the application server cluster S1 sends the message to other application server clusters S2, S3, S4, S5, S6 of the corresponding management ring segment GROUP 1; meanwhile, the application server cluster that receives the message sends the message to the application server clusters that are peer-to-peer nodes, in this embodiment, the application server clusters at the same position in the two management ring segments are peer-to-peer nodes with each other (the counter shown in fig. 2 is two application server clusters that are peer-to-peer nodes with each other), and then the application server clusters that are peer-to-peer nodes send the message to other application server clusters of the management ring segment corresponding to the application server cluster, for example, the application server cluster S1 in the GROUP1 and the application server cluster S7 in the GROUP2 are peer-to-peer nodes with each other, the application server cluster S1 sends the message to the application server cluster S7 that is peer-to-peer node with each other, and then the application server cluster S7 that is peer-to-peer node sends the message to other application server cluster S8, the other application server cluster S8 in the corresponding management ring segment GROUP2, S9, S10, S11, S12; similarly, the other management ring segments GROUP3, … … and GROUP6 perform message transfer according to the method, thereby completing message transfer of all application server clusters running the block chain program on the management ring segment.
In this embodiment, a server cluster in a blockchain system is divided according to an application server cluster and a resource server cluster, the application server cluster is logically formed into a ring and then divided into a plurality of management ring fragments, the resource server cluster is logically formed into a ring and then divided into a plurality of worker ring fragments, the server cluster on the ring can realize point-to-point and point-to-multipoint transmission of messages, meanwhile, the worker ring fragments are managed based on the management ring fragments, the management ring fragments synchronize the received messages to the management ring fragments, and the server cluster on the management ring fragments transmits the messages based on the management ring fragments after receiving the messages, so that the messages on the management ring fragments are quickly transmitted to the application server cluster on the management ring, and the message transmission efficiency in the blockchain system is improved; moreover, the roles of each server cluster on the ring are the same, and each server cluster can be used as a fragment head server cluster, so that the fragments forming the ring can be dynamically changed, the fragments of a management ring and a worker ring can be more flexibly completed, and the message transmission efficiency is greatly improved.
In an embodiment of the present invention, the dividing the management ring into a plurality of management ring segments includes:
the number of application server clusters according to each management ring fragment is
Figure BDA0001900743800000081
Dividing the management ring into
Figure BDA0001900743800000082
Each management ring is divided into pieces; wherein the number of the application server clusters is N, the
Figure BDA0001900743800000083
Is a positive integer.
In order to achieve better dynamic fragment management, in this embodiment, when the management ring is fragmented, the number of the application server clusters of each management ring fragment is as follows
Figure BDA0001900743800000084
Partitioning a management ring into
Figure BDA0001900743800000085
The management ring fragments ensure that the number of the management ring fragments is equal to the number of the application server clusters in each management ring fragment, thereby facilitating the dynamic fragment management of the management ring
Figure BDA0001900743800000086
For positive integers, e.g. 36 clusters of application servers on the management ring, the management ring is divided into
Figure BDA0001900743800000087
Each management ring segment comprises 6 application server clusters.
Similarly, the rules of the worker ring fragments are similar to the rules of the management ring fragments, and if the number of resource server clusters on the worker ring is M, the worker ring is divided into the worker ring
Figure BDA0001900743800000088
Each worker ring segment comprises
Figure BDA0001900743800000089
And the resource server cluster is convenient for managing the worker ring fragments by the management ring fragments.
On the basis of the foregoing embodiment, in an embodiment of the present invention, when the application server cluster running the blockchain program receives the message of the blockchain system, the application server cluster is a leader application server cluster managing ring segments, and a distance from the leader application server cluster along the same direction is 1 to 1
Figure BDA00019007438000000810
The application server clusters of (1) belong to the same management ring segment.
In the embodiment of the present invention, the management ring is fragmented in a dynamic fragmentation mode, the roles of the application server clusters on the management ring are all the same, and each application server cluster can be regarded as a leader of a management ring fragment, in this embodiment, a leader of a management ring fragment is defined as a leader application server cluster, when an application server cluster running a block chain program receives a message of a block chain system, the application server cluster is a leader of a management ring fragment, and then the distance from the application server cluster to the leader application server cluster along the same direction of the ring structure is from 1 to 1
Figure BDA0001900743800000091
And the other application server cluster is a brother node of the leader application server cluster and belongs to the same management ring segment with the leader application server cluster. For example, there are application server clusters S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15, and S16 on the management ring, and from the above embodiment, if the management ring is fragmented, there are 4 management ring fragments, and there are 4 application server clusters in each management ring fragment, and when the application server cluster S3 receives a message of the blockchain system, at this time, the application server cluster S3 is a leader application server cluster of one management ring fragment, and the distance from the leader application server cluster S3 along the same direction is from 1 to 3The other application server clusters S4, S5, S6 are siblings of the leader application server cluster S3, and at this time, S3, S4, S5, S6 belong to the same management ring segment. It can be known that S7, S8, S9, and S10 also belong to the same management ring segment, S11, S12, S13, and S14 also belong to the same management ring segment, S15, S16, S1, and S2 also belong to the same management ring segment, and S7, S11, and S15 are all slice header application server clusters of the corresponding management ring segment, and S3, S7, S11, and S15 are peer nodes.
If the application server cluster S6 receives the message of the blockchain system, at this time, the application server cluster S6 is a leader application server cluster of a management ring segment, and the application server clusters S7, S8, and S9 are sibling nodes of the leader application server cluster S6, and at this time, S6, S7, S8, and S9 belong to the same management ring segment. In this embodiment, each application server cluster may be a leader application server cluster of a management ring segment, and the following nodes are regarded as sibling nodes of the same management ring segment, and the segment conditions under different application server cluster views are different, thereby realizing flexible change of the management ring segment.
In an embodiment of the present invention, the sending, by a resource server cluster in the worker ring segment, a message of a blockchain system to an application server cluster that manages a management ring segment of the worker ring segment includes:
and the resource server cluster judges the service type of the message of the block chain system, and sends the message carrying the corresponding service type to an application server cluster for managing the management ring fragment of the worker ring fragment.
In this embodiment, after the resource server cluster of the worker ring receives the message generated by the block chain system, the service type of the message is judged and verified, and then the message carrying the corresponding service type is sent to the application server cluster managing the management ring segment of the worker ring segment.
In an embodiment of the present invention, after sending the message to the application server clusters that are peer-to-peer nodes, and sending the message to the other application server clusters that are corresponding to the management ring segment, the sending the message further includes:
and the application server cluster stores the information into a block, and the application server cluster on the management ring generates a block chain for the block.
After receiving the message, the blockchain program of the application server cluster running on the management ring stores the message into a block of the server cluster, when all the application server clusters on the management ring store the message into the block, the block is linked into a blockchain and added into the blockchain system, once the message is verified and added into the blockchain system, the message is permanently stored, and unless more than half of the server clusters in the system can be controlled to approve and delete the transaction information, the modification of the message by a single server cluster is invalid, so that the stability and reliability of the blockchain system data are improved.
In another embodiment, as shown in fig. 4, the message transmission method in the blockchain system provided by the present invention is described from the perspective of a single application server cluster in the blockchain system, and includes:
s100: the application server cluster on the management ring receives the message of the block chain system sent by the resource server cluster of the managed worker ring fragment;
s200: sending the message to other application server clusters of the management ring fragments corresponding to the application server cluster; and sending the message to an application server cluster which is a peer node with the application server cluster, so that the application server cluster which is the peer node sends the message to other application server clusters of the corresponding management ring fragments.
The logic operation of the block chain service provided by the block chain system is processed by the application server cluster on the management ring, the block chain program runs on the application server cluster of the management ring and enjoys the operational power of the application server cluster, the application server cluster running the block chain program on the management ring receives the message of the block chain system sent by the resource server cluster in the managed worker ring fragment, and the application server cluster on the management ring can provide point-to-point and point-to-multiple information transmission functions because of the logic ring formation, and sends the message to other application server clusters of the management ring fragment corresponding to the application server cluster; meanwhile, the application server clusters at the same positions in the two management ring fragments are mutually peer-to-peer nodes, the application server cluster receiving the message sends the message to the application server cluster mutually serving as a peer-to-peer node with the application server cluster, so that the application server clusters mutually serving as the peer-to-peer nodes send the message to other application server clusters of the corresponding management ring fragments; thereby distributing messages to the various server clusters in the blockchain system.
In an embodiment of the present invention, when the application server cluster receives a message that the resource server cluster of the managed worker ring segment sends the blockchain system, the application server cluster is a leader application server cluster in the management ring segment.
In this embodiment, the number of the application server clusters that the management ring illuminates each management ring segment is
Figure BDA0001900743800000111
Partitioning a management ring into
Figure BDA0001900743800000112
A management ring is fragmented, and
Figure BDA0001900743800000113
is a positive integer, when the application server cluster running the blockchain program receives the message of the blockchain system, the application server cluster is a leader application server cluster of the management ring segment, and the leader application server cluster is along the same segmentThe distance from one direction to the leader application server cluster is 1 to
Figure BDA0001900743800000114
The application server clusters of (1) belong to the same management ring segment.
In an embodiment of the present invention, after sending the message to the application server cluster which is a peer node with the application server cluster, so that the application server cluster which is the peer node sends the message to another application server cluster of the corresponding management ring segment, the method further includes:
and storing the message into a block, and generating a block chain for the block with other application server clusters on the management ring.
After receiving the message, the blockchain program of the application server cluster running on the management ring stores the message into a block of the server cluster, when all the application server clusters on the management ring store the message into the block, the block is linked into a blockchain and added into the blockchain system, once the message is verified and added into the blockchain system, the message is permanently stored, and unless more than half of the server clusters in the system can be controlled to approve and delete the transaction information, the modification of the message by a single server cluster is invalid, so that the stability and reliability of the blockchain system data are improved.
In another embodiment, as shown in fig. 5, the present invention provides a message passing apparatus in a blockchain system, including:
the receiving module 100: the message of the block chain system is used for receiving the message of the block chain system sent by the resource server cluster of the managed worker ring fragments;
the transmission module 200: the other application server clusters are used for sending the message to the management ring fragments corresponding to the application server cluster; and sending the message to an application server cluster which is a peer node with the application server cluster, so that the application server cluster which is the peer node sends the message to other application server clusters of the corresponding management ring fragments.
In another embodiment, the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the message transmission method in the block chain system described in the above embodiments. The computer-readable storage medium includes, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magnetic-optical disks, ROMs (Read-Only memories), RAMs (Random access memories), EPROMs (Erasable Programmable Read-Only memories), EEPROMs (Electrically Erasable Programmable Read-Only memories), flash memories, magnetic cards, or optical cards. That is, a storage device includes any medium that stores or transmits information in a form readable by a device (e.g., a computer, a cellular phone), and may be a read-only memory, a magnetic or optical disk, or the like.
The computer-readable storage medium provided by the embodiment of the invention can realize that a plurality of application server clusters logically form a management ring with a ring structure, and the management ring is divided into a plurality of management ring fragments; logically forming a worker ring with a ring structure by a plurality of resource server clusters, and dividing the worker ring into a plurality of worker ring fragments; the management ring fragments manage corresponding worker ring fragments; a resource server cluster in a worker ring fragment sends a message of a block chain system to an application server cluster of a management ring fragment for managing the worker ring fragment; the application server cluster running the block chain program receives the message of the block chain system and sends the message to other application server clusters of the management ring fragment corresponding to the application server cluster; and sending the message to the application server clusters which are peer-to-peer nodes, wherein the application server clusters which are peer-to-peer nodes send the message to other application server clusters of the corresponding management ring fragments. The server cluster in the block chain system is divided according to the application server cluster and the resource server cluster, the application server cluster is logically formed into a ring and then divided into a plurality of management ring fragments, the resource server cluster is logically formed into a ring and then divided into a plurality of worker ring fragments, the server cluster on the ring can realize the point-to-point and point-to-multipoint transmission of messages, meanwhile, the worker ring fragments are managed based on the management ring fragments, the management ring fragments synchronize the received messages to the management ring fragments, and the server cluster on the management ring fragments transmits the messages based on the management ring fragments after receiving the messages, so that the messages on the management ring fragments are quickly transmitted to the application server cluster on the management ring, and the message transmission efficiency in the block chain system is improved; moreover, the roles of each server cluster on the ring are the same, and each server cluster can be used as a fragment head server cluster, so that the fragments forming the ring can be dynamically changed, the fragments of a management ring and a worker ring can be more flexibly completed, and the message transmission efficiency is greatly improved.
The computer-readable storage medium provided in the embodiment of the present invention can implement the embodiment of the message transmission method in the block chain system, and for specific function implementation, reference is made to the description in the embodiment of the method, which is not described herein again.
In addition, in another embodiment, the present invention further provides a server, which is composed of the application server cluster on the management ring and the resource server cluster on the worker ring shown in fig. 2 and fig. 3, and as shown in fig. 6, the server includes a processor 603, a memory 605, and other devices. Those skilled in the art will appreciate that the structural elements shown in fig. 6 do not constitute a limitation of all servers and may include more or fewer components than those shown, or some combination of components. The memory 605 may be used to store the computer program 601 and various functional modules, and the processor 603 runs the computer program 601 stored in the memory 605, thereby performing various functional applications of the device and data processing. The memory 605 may be an internal memory or an external memory, or include both internal and external memories. The memory may comprise read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), flash memory, or random access memory. The external memory may include a hard disk, a floppy disk, a ZIP disk, a usb-disk, a magnetic tape, etc. The disclosed memory includes, but is not limited to, these types of memory. The memory 605 of the present disclosure is provided by way of example only and not by way of limitation. The one or more processors 603 shown in fig. 6 can execute and implement the functions of the receiving module 100 and the transmitting module 200 shown in fig. 5.
In one embodiment, the server comprises one or more processors 603, one or more memories 605, and one or more computer programs 601, wherein the one or more computer programs 601 are stored in the memory 605 and configured to be executed by the one or more processors 603, and the one or more computer programs 601 are configured to perform the message transmission method in the blockchain system described in the above embodiment.
The server provided by the embodiment of the invention can form a server cluster, realize that a plurality of application server clusters logically form a management ring with a ring structure, and divide the management ring into a plurality of management ring fragments; logically forming a worker ring with a ring structure by a plurality of resource server clusters, and dividing the worker ring into a plurality of worker ring fragments; the management ring fragments manage corresponding worker ring fragments; a resource server cluster in a worker ring fragment sends a message of a block chain system to an application server cluster of a management ring fragment for managing the worker ring fragment; the application server cluster running the block chain program receives the message of the block chain system and sends the message to other application server clusters of the management ring fragment corresponding to the application server cluster; and sending the message to the application server clusters which are peer-to-peer nodes, wherein the application server clusters which are peer-to-peer nodes send the message to other application server clusters of the corresponding management ring fragments. The server cluster in the block chain system is divided according to the application server cluster and the resource server cluster, the application server cluster is logically formed into a ring and then divided into a plurality of management ring fragments, the resource server cluster is logically formed into a ring and then divided into a plurality of worker ring fragments, the server cluster on the ring can realize the point-to-point and point-to-multipoint transmission of messages, meanwhile, the worker ring fragments are managed based on the management ring fragments, the management ring fragments synchronize the received messages to the management ring fragments, and the server cluster on the management ring fragments transmits the messages based on the management ring fragments after receiving the messages, so that the messages on the management ring fragments are quickly transmitted to the application server cluster on the management ring, and the message transmission efficiency in the block chain system is improved; moreover, the roles of each server cluster on the ring are the same, and each server cluster can be used as a fragment head server cluster, so that the fragments forming the ring can be dynamically changed, the fragments of a management ring and a worker ring can be more flexibly completed, and the message transmission efficiency is greatly improved.
The server provided in the embodiment of the present invention can implement the embodiment of the message transmission method in the block chain system provided above, and for specific function implementation, reference is made to the description in the embodiment of the method, which is not described herein again.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for message transmission in a blockchain system, the blockchain system comprising:
the management ring is composed of a plurality of application server clusters, and the application server clusters are used for operating a block chain program;
the worker ring is composed of a plurality of resource server clusters, and the resource server clusters are used for providing resources and forwarding data;
the message transmission method comprises the following steps:
logically forming a plurality of application server clusters into a management ring with a ring structure, and dividing the management ring into a plurality of management ring fragments; logically forming a worker ring with a ring structure by a plurality of resource server clusters, and dividing the worker ring into a plurality of worker ring fragments; the management ring fragments manage corresponding worker ring fragments;
a resource server cluster in a worker ring fragment sends a message of a block chain system to an application server cluster of a management ring fragment for managing the worker ring fragment;
the application server cluster running the block chain program receives the message of the block chain system and sends the message to other application server clusters of the management ring fragment corresponding to the application server cluster; and sending the message to the application server clusters which are peer-to-peer nodes, wherein the application server clusters which are peer-to-peer nodes send the message to other application server clusters of the corresponding application ring fragments.
2. The method of claim 1, wherein the dividing the management ring into the plurality of management ring segments comprises:
the number of application server clusters according to each management ring fragment is
Figure FDA0001900743790000011
Dividing the management ring into
Figure FDA0001900743790000012
Each management ring is divided into pieces; wherein the number of the application server clusters is N, the
Figure FDA0001900743790000013
Is a positive integer.
3. The method of claim 2, wherein when the application server cluster running the blockchain program receives the message of the blockchain system, the application server cluster is a head application server cluster managing the ring segment, and the distance from the head application server cluster along the same direction is 1 to 1
Figure FDA0001900743790000014
The application server cluster belongs to the same management ringAnd (4) slicing.
4. The method of claim 1, wherein sending a message of a blockchain system by a resource server cluster in the worker ring fragment to an application server cluster managing a management ring fragment of the worker ring fragment comprises:
and the resource server cluster judges the service type of the message of the block chain system, and sends the message carrying the corresponding service type to an application server cluster for managing the management ring fragment of the worker ring fragment.
5. The method of claim 1, wherein after sending the message to the application server clusters that are peer-to-peer nodes, and sending the message to the other application server clusters of the corresponding management ring segment, the method further comprises:
and the application server cluster stores the message into a block, and the application server cluster on the management ring generates a block chain for the block.
6. A method for message transmission in a blockchain system, comprising:
the application server cluster on the management ring receives the message of the block chain system sent by the resource server cluster of the managed worker ring fragment;
sending the message to other application server clusters of the management ring fragments corresponding to the application server cluster; and sending the message to an application server cluster which is a peer node with the application server cluster, so that the application server cluster which is the peer node sends the message to other application server clusters of the corresponding management ring fragments.
7. The method of claim 6, wherein the application server cluster is a leader application server cluster in the management ring fragment when the application server cluster receives a message that the resource server cluster of the managed worker ring fragment sent the blockchain system.
8. The method according to claim 6, wherein after sending the message to the application server cluster that is a peer node with the current application server cluster, so that the application server cluster that is a peer node sends the message to the other application server clusters of the corresponding management ring segment, the method further comprises:
and storing the message into a block, and generating a block chain for the block with other application server clusters on the management ring.
9. A message transmission apparatus in a blockchain system, comprising:
a receiving module: the message of the block chain system is used for receiving the message of the block chain system sent by the resource server cluster of the managed worker ring fragments;
a transmission module: the other application server clusters are used for sending the message to the management ring fragments corresponding to the application server cluster; and sending the message to an application server cluster which is a peer node with the application server cluster, so that the application server cluster which is the peer node sends the message to other application server clusters of the corresponding management ring fragments.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the message transmission method in the blockchain system according to any one of claims 1 to 5; or, the computer program when executed by a processor implements the message transmission method in the blockchain system according to any one of claims 6 to 8.
CN201880002403.6A 2018-07-27 2018-07-27 Message transmission method, device and storage medium in block chain system Active CN109496407B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/097650 WO2020019343A1 (en) 2018-07-27 2018-07-27 Message transmission method and apparatus in blockchain system, and storage medium

Publications (2)

Publication Number Publication Date
CN109496407A CN109496407A (en) 2019-03-19
CN109496407B true CN109496407B (en) 2020-07-24

Family

ID=65713876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880002403.6A Active CN109496407B (en) 2018-07-27 2018-07-27 Message transmission method, device and storage medium in block chain system

Country Status (2)

Country Link
CN (1) CN109496407B (en)
WO (1) WO2020019343A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009498A (en) * 2019-03-29 2019-07-12 阿里巴巴集团控股有限公司 Resource allocation methods and device based on block chain
CN111405074B (en) * 2020-06-08 2020-09-08 南京邮电大学 Data center network fault diagnosis and automatic configuration method based on hybrid chain
CN113612810B (en) * 2021-05-18 2023-06-27 中国信息通信研究院 Method for optimizing performance among cluster nodes based on DHT, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101677328A (en) * 2008-09-19 2010-03-24 中兴通讯股份有限公司 Content-fragment based multimedia distributing system and content-fragment based multimedia distributing method
CN101853186A (en) * 2008-12-31 2010-10-06 Sap股份公司 Distributed transactional recovery system and method
CN101969468A (en) * 2010-10-14 2011-02-09 广州从兴电子开发有限公司 Inquiry server cluster system and inquiry method
CN107896157A (en) * 2017-08-31 2018-04-10 上海壹账通金融科技有限公司 Blacklist data exchange method and application server

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104780221B (en) * 2015-04-29 2018-04-06 温州中普科技咨询有限公司 Medium-sized and small enterprises intellectual property synthetic service platform system
US10305694B2 (en) * 2016-05-27 2019-05-28 Mastercard International Incorporated Method and system for efficient distribution of configuration data utilizing permissioned blockchain technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101677328A (en) * 2008-09-19 2010-03-24 中兴通讯股份有限公司 Content-fragment based multimedia distributing system and content-fragment based multimedia distributing method
CN101853186A (en) * 2008-12-31 2010-10-06 Sap股份公司 Distributed transactional recovery system and method
CN101969468A (en) * 2010-10-14 2011-02-09 广州从兴电子开发有限公司 Inquiry server cluster system and inquiry method
CN107896157A (en) * 2017-08-31 2018-04-10 上海壹账通金融科技有限公司 Blacklist data exchange method and application server

Also Published As

Publication number Publication date
CN109496407A (en) 2019-03-19
WO2020019343A1 (en) 2020-01-30

Similar Documents

Publication Publication Date Title
CN110245956B (en) Asynchronous multi-chain based block chain transaction confirmation method and system
CN108200210B9 (en) Block chain-based chain management method, block chain-based chain management device and computer-readable medium
KR102566892B1 (en) Blockchain consensus method, device and system
US11190525B2 (en) Blockchain system and permission management method thereof
CN109496407B (en) Message transmission method, device and storage medium in block chain system
Kshemkalyani et al. Necessary and sufficient conditions on information for causal message ordering and their optimal implementation
CN109792406B (en) Message transmission method, device and storage medium in server cluster
Tariq et al. Meeting subscriber‐defined QoS constraints in publish/subscribe systems
US8989046B1 (en) Inter-domain routing message distribution through wide area broadcast channel
US20100049869A1 (en) Methods and Apparatus for Event Distribution and Routing in Peer-to-Peer Overlay Networks
Liu et al. Minimizing age-of-information with throughput requirements in multi-path network communication
Karimzadeh-Farshbafan et al. Reliability aware service placement using a viterbi-based algorithm
Tennakoon et al. Dynamic blockchain sharding
KR20200081533A (en) Blockchain Consensus Method based Improved Dynamic Blind Voting for Internet of Things Environment
CN110149221B (en) Self-adaptive network construction method and device based on alliance chain
Low et al. Distributed multicast routing, with end-to-end delay and delay variation constraints
Choudhary et al. A quality of service‐aware high‐security architecture design for software‐defined network powered vehicular ad‐hoc network s using machine learning‐based blockchain routing
CN114760202A (en) Reliable construction and deployment method of service function chain in network slice scene
CN109496420B (en) Ring server cluster management method, device and computer storage medium
Abe et al. Suzaku: a churn resilient and lookup-efficient key-order preserving structured overlay network
CN105049255B (en) A kind of method and device thereof of network element data synchronization
Haeupler et al. Optimal gossip with direct addressing
Wang et al. AC: an NDN-based blockchain network with erasure coding
Ji et al. A memory-storable quantum-inspired evolutionary algorithm for network coding resource minimization
Harutyunyan et al. Directional core selection approach and dynamic tree reorganization for delay and delay variation multicast routing

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