CN112688790A - Data processing method and device of alliance chain, electronic equipment and storage medium - Google Patents

Data processing method and device of alliance chain, electronic equipment and storage medium Download PDF

Info

Publication number
CN112688790A
CN112688790A CN202011541170.2A CN202011541170A CN112688790A CN 112688790 A CN112688790 A CN 112688790A CN 202011541170 A CN202011541170 A CN 202011541170A CN 112688790 A CN112688790 A CN 112688790A
Authority
CN
China
Prior art keywords
node
alliance
transaction information
subnet
information
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.)
Granted
Application number
CN202011541170.2A
Other languages
Chinese (zh)
Other versions
CN112688790B (en
Inventor
曹崇瑞
赖奕宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202011541170.2A priority Critical patent/CN112688790B/en
Publication of CN112688790A publication Critical patent/CN112688790A/en
Application granted granted Critical
Publication of CN112688790B publication Critical patent/CN112688790B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application provides a data processing method, a data processing device, electronic equipment and a storage medium of a alliance chain, wherein the method comprises the following steps: when the type of the sender is the client, checking the transaction information; when the verification is passed, the transaction information is broadcasted to the same subnet in full, and the transaction information is broadcasted to one alliance link point device in each other subnet; storing the transaction information; when the type of the sender is the alliance link node equipment which belongs to the same subnet as the alliance link node equipment, storing the transaction information; when the type of the sender is alliance link node equipment which belongs to a different subnet from the alliance link node equipment, the transaction information is checked; when the signature passes, broadcasting transaction information to the same subnet in full; the transaction information is stored, and the method is favorable for improving the consensus efficiency of the alliance chain.

Description

Data processing method and device of alliance chain, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method and apparatus for a federation chain, an electronic device, and a storage medium.
Background
At present, after one alliance link node device in an alliance chain receives one transaction message, the one alliance link node device carries out delay signing on the transaction message, and carries out full broadcasting on other alliance link node devices in the alliance chain after the delay signing is passed, the other alliance link node devices also carry out delay signing on the transaction message after receiving the transaction message through broadcasting, and carries out full broadcasting on the other alliance link node devices in the alliance chain again after the delay signing is passed, so that a large amount of broadcast messages are filled in the alliance chain, a broadcast storm is formed, and the consensus efficiency of the alliance chain is further reduced.
Disclosure of Invention
In view of this, embodiments of the present application provide a data processing method and apparatus for a federation chain, an electronic device, and a storage medium, so as to improve the consensus efficiency of the federation chain.
In a first aspect, an embodiment of the present application provides a data processing method for a federation chain, where the federation chain includes at least one subnet, each subnet includes at least one federation link node device, and long connections are established between federation link node devices belonging to the same subnet, where the method includes:
for each alliance link point device, after transaction information is obtained, judging the type of a sender of the transaction information;
when the type of the sender is a client, checking the transaction information; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance node equipment belongs in full, and the transaction information is broadcasted to one alliance node equipment in each other subnet; storing the transaction information into a transaction pool maintained by the alliance link point equipment;
when the type of the sender is the alliance link node equipment which belongs to the same subnet as the alliance link node equipment, storing the transaction information into a transaction pool maintained by the alliance link node equipment;
when the type of the sender is alliance link node equipment which belongs to a different subnet from the alliance link node equipment, the transaction information is checked; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance link point equipment belongs in full; and storing the transaction information into a transaction pool maintained by the alliance node equipment.
Optionally, each alliance-chain node device stores therein node information of each alliance-chain node device in the alliance chain, where the node information includes a subnet name of a subnet to which the alliance-chain node device belongs, a node identifier of the alliance-chain node device in the alliance chain, and a node communication address of the alliance-chain node device.
Optionally, the determining the type of the sender of the transaction information includes:
judging whether node information of the alliance link node equipment for sending the transaction information is stored in the alliance link node equipment;
if the node information of the alliance link point device for sending the transaction information is not stored, determining that the type of the sender is the client;
if the node information of the alliance link node equipment for sending the transaction information is stored, judging whether the subnet name in the node information of the alliance link node equipment for sending the transaction information is the same as the subnet name in the node information corresponding to the alliance link node equipment;
if the type of the sender is the same as that of the alliance link node equipment, determining that the type of the sender is the alliance link node equipment belonging to the same subnet as the alliance link node equipment;
and if not, determining that the type of the sender is the alliance link node equipment which belongs to a different subnet from the alliance link node equipment.
Optionally, the broadcasting the transaction information to one alliance link point device in each other subnet includes:
according to a preset selection rule, determining a target node identifier in each other subnet from the node information of each alliance node device;
for each target node identification, sending a short connection establishment request to a target node communication address corresponding to the target node identification;
receiving feedback information which is sent by target alliance link point equipment corresponding to the target node communication address and used for indicating that short connection establishment is agreed, and establishing short connection between the alliance link point equipment and the target alliance link point equipment;
and sending the transaction information to the target alliance link point device through the short connection.
Optionally, the determining, according to a preset selection rule, a target node identifier of each of the other subnets from the node information of each of the alliance node devices includes:
determining the target node identification from the node information of each alliance link point device according to a random algorithm; alternatively, the first and second electrodes may be,
for each subnet, acquiring the state information of each alliance node device in the subnet; when the subnet has the alliance link node equipment in the idle state, determining the node identification corresponding to the alliance link node equipment in the idle state as the target node identification; and when the node equipment in the alliance chain in the idle state does not exist in the subnet, determining the node identification corresponding to the node equipment in the alliance chain with the lowest computing resource occupancy rate in the subnet as the target node identification.
Optionally, the short connection is established and maintained by the alliance link node device and the alliance link node device with higher data processing capability in the target alliance link node device.
Optionally, after sending the transaction information to the target federation link point device over the short connection, the method further includes:
disconnecting the short connection; alternatively, the first and second electrodes may be,
timing the short connection; judging whether data transmission is carried out through the short connection within a preset time length, and if the data transmission is carried out through the short connection within the preset time length, timing the short connection again; and if the data transmission is not carried out through the short connection within the preset duration, disconnecting the short connection.
Optionally, the broadcasting the transaction information in a total amount in a subnet to which the federation node device belongs includes:
inquiring the long connection established with the alliance link node equipment;
and sending the transaction information through the long connection established with the alliance link node device.
Optionally, when the type of the sender is a federation chain node device belonging to the same subnet as the federation chain node device, the method further includes:
and selecting one alliance link node device which does not send the transaction information from other subnets to send random information containing the transaction information.
Optionally, when the type of the sender is a federation chain node device belonging to the same subnet as the federation chain node device, the method further includes:
after receiving random information which is sent by alliance link node equipment which does not send the transaction information in other subnets and contains the transaction information, judging whether the transaction information is stored in a transaction pool maintained by the alliance link node equipment;
if yes, discarding the random information;
if not, the transaction information is checked; and after the verification passes, storing the transaction information into a transaction pool maintained by the equipment of the link node of the alliance.
Optionally, when the alliance-link node device is started, the method further includes:
determining target node information with the same subnet name as the alliance node equipment;
and establishing the long connection of the alliance node equipment according to the node communication address in the target node information.
In a second aspect, an embodiment of the present application provides a data processing apparatus of a federation chain, where the federation chain includes at least one subnet, each subnet includes at least one federation link point device, and long connections are established between federation link point devices belonging to the same subnet, and the apparatus includes:
the judging unit is used for judging the type of a sender of the transaction information after the transaction information is acquired for each alliance link node device;
the processing unit is used for checking the transaction information when the type of the sender is a client; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance node equipment belongs in full, and the transaction information is broadcasted to one alliance node equipment in each other subnet; storing the transaction information into a transaction pool maintained by the alliance link point equipment; and when the type of the sender is the alliance link node device belonging to the same subnet as the alliance link node device, storing the transaction information into a transaction pool maintained by the alliance link node device; and when the type of the sender is alliance link node equipment which belongs to a different subnet from the alliance link node equipment, the transaction information is checked; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance link point equipment belongs in full; and storing the transaction information into a transaction pool maintained by the alliance node equipment.
Optionally, each alliance-chain node device stores therein node information of each alliance-chain node device in the alliance chain, where the node information includes a subnet name of a subnet to which the alliance-chain node device belongs, a node identifier of the alliance-chain node device in the alliance chain, and a node communication address of the alliance-chain node device.
Optionally, when the determining unit is configured to determine the type of the sender of the transaction information, the determining unit includes:
judging whether node information of the alliance link node equipment for sending the transaction information is stored in the alliance link node equipment;
if the node information of the alliance link point device for sending the transaction information is not stored, determining that the type of the sender is the client;
if the node information of the alliance link node equipment for sending the transaction information is stored, judging whether the subnet name in the node information of the alliance link node equipment for sending the transaction information is the same as the subnet name in the node information corresponding to the alliance link node equipment;
if the type of the sender is the same as that of the alliance link node equipment, determining that the type of the sender is the alliance link node equipment belonging to the same subnet as the alliance link node equipment;
and if not, determining that the type of the sender is the alliance link node equipment which belongs to a different subnet from the alliance link node equipment.
Optionally, when the processing unit is configured to broadcast the transaction information to one federation link node device in each other subnet, the processing unit includes:
according to a preset selection rule, determining a target node identifier in each other subnet from the node information of each alliance node device;
for each target node identification, sending a short connection establishment request to a target node communication address corresponding to the target node identification;
receiving feedback information which is sent by target alliance link point equipment corresponding to the target node communication address and used for indicating that short connection establishment is agreed, and establishing short connection between the alliance link point equipment and the target alliance link point equipment;
and sending the transaction information to the target alliance link point device through the short connection.
Optionally, when the processing unit is configured to determine, according to a preset selection rule, a target node identifier of each of other subnets from the node information of each of the federation node devices, the method includes:
determining the target node identification from the node information of each alliance link point device according to a random algorithm; alternatively, the first and second electrodes may be,
for each subnet, acquiring the state information of each alliance node device in the subnet; when the subnet has the alliance link node equipment in the idle state, determining the node identification corresponding to the alliance link node equipment in the idle state as the target node identification; and when the node equipment in the alliance chain in the idle state does not exist in the subnet, determining the node identification corresponding to the node equipment in the alliance chain with the lowest computing resource occupancy rate in the subnet as the target node identification.
Optionally, the short connection is established and maintained by the alliance link node device and the alliance link node device with higher data processing capability in the target alliance link node device.
Optionally, the processing unit is further configured to:
after the transaction information is sent to the target alliance link point device through the short connection, disconnecting the short connection; or, timing the short connection; judging whether data transmission is carried out through the short connection within a preset time length, and if the data transmission is carried out through the short connection within the preset time length, timing the short connection again; and if the data transmission is not carried out through the short connection within the preset duration, disconnecting the short connection.
Optionally, when the processing unit is configured to broadcast the transaction information in a total amount in a subnet to which the federation node device belongs, the processing unit includes:
inquiring the long connection established with the alliance link node equipment;
and sending the transaction information through the long connection established with the alliance link node device.
Optionally, the processing unit is further configured to:
and when the type of the sender is the alliance link node equipment which belongs to the same subnet as the alliance link node equipment, selecting alliance link node equipment which does not send the transaction information from other subnets to send random information containing the transaction information.
Optionally, the processing unit is further configured to:
when the type of the sender is the alliance link node equipment belonging to the same subnet as the alliance link node equipment, after receiving random information which is sent by the alliance link node equipment which does not send the transaction information in other subnets and contains the transaction information, judging whether the transaction information is stored in a transaction pool maintained by the alliance link node equipment;
if yes, discarding the random information;
if not, the transaction information is checked; and after the verification passes, storing the transaction information into a transaction pool maintained by the equipment of the link node of the alliance.
Optionally, the processing unit is further configured to:
when the alliance link node equipment is started, determining target node information with the same subnet name as the alliance link node equipment;
and establishing the long connection of the alliance node equipment according to the node communication address in the target node information.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of the federation chain data processing method according to any one of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the data processing method of the federation chain according to any one of the first aspect.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the application, a alliance chain is divided into a plurality of subnets, each subnet comprises at least one alliance link point device, long connection is established among alliance link point devices belonging to the same subnet, for each alliance link point device, after transaction information is obtained, the type of a sender of the transaction information is judged, whether the alliance chain node device is a node device which receives the transaction information first in the alliance chain or a node device which receives the transaction information first in the subnet can be determined through the type of the sender, so that the alliance link point device judges whether to carry out delay signing or not, the transaction information is sent to other subnet devices and other alliance link point devices belonging to the same subnet, when the type of the sender is a client, the transaction information needs to be delayed signing, and after the delay signing is passed, the transaction information is broadcast to the subnet to which the alliance link point device belongs to in full quantity, broadcasting the transaction information to one alliance node device in each other subnet, and storing the transaction information into a transaction pool maintained by the alliance node device at the same time; when the type of the sender is the alliance link node equipment which belongs to the same subnet as the alliance link node equipment, storing the transaction information into a transaction pool maintained by the alliance link node equipment; when the type of the sender is alliance link node equipment which belongs to a different subnet from the alliance link node equipment, the transaction information is checked; after the verification is passed, broadcasting transaction information in a whole amount in a subnet to which the alliance link point equipment belongs; the transaction information is stored in the transaction pool maintained by the alliance link point device, after one alliance link point device in the alliance chain receives the transaction information sent by the client, all alliance link point devices in the alliance chain can form consensus, in the process of consensus, only the node device which receives the transaction information in the subnet carries out full broadcasting into the subnet, other node devices in the subnet can directly store the transaction information after receiving the transaction information, other node devices in the subnet cannot carry out full broadcasting, and the node device which receives the transaction information in the first alliance chain only sends the transaction information to one node device in each subnet, so that the method can reduce the broadcasting quantity of each node device in the alliance chain in the process of consensus, and is beneficial to improving the consensus efficiency of the alliance chain, meanwhile, only the node device which receives the transaction information first in the alliance chain and the node device which receives the transaction information first in the subnet can carry out the extension signing, so that the extension signing speed of the alliance chain is improved, and the consensus efficiency of the alliance chain is further improved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flowchart of a data processing method of a federation chain according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a federation chain according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another data processing method of a federation chain according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another data processing method of a federation chain according to an embodiment of the present application;
fig. 5 is a schematic flowchart of another data processing method of a federation chain according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating another data processing method of a federation chain according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating another data processing method of a federation chain according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a data processing apparatus in a federation chain according to a second embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
In order to make the objects, 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 with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the consensus referred to in this application refers to the recognition of the same data by each alliance node device in the alliance chain, that is: the unification of data is achieved by all alliance link point devices in the alliance chain.
It should be noted again that the federation chain in this application includes a certain group of members and limited third parties, and a plurality of preselected nodes are designated as billing persons inside the federation chain, where each of the preselected nodes is a federation node device, and the generation of each block is determined by all the preselected nodes, that is: the corresponding block is generated after all the preselected nodes are identified.
It should be noted that the delay referred to in this application refers to determining whether the data is complete and accurate, and determining the related content of the data sender, and the specific content of the delay refers to the related technology, and is not limited herein.
There are multiple alliance link node devices in an alliance chain, after one alliance chain node device receives a transaction message, it will carry out delay signing on the transaction message, and after the delay signing is passed, it will broadcast the whole amount to other alliance chain node devices in the alliance chain, and after the other alliance chain node devices receive the transaction message through broadcasting, it will also carry out delay signing on the transaction message, and after the delay signing is passed, it will broadcast the whole amount to other alliance chain node devices in the alliance chain again, for example: the alliance chain node equipment included in one alliance chain is as follows: after the node device 1 receives a transaction message, the node device 1 will carry out delayed signing on the transaction message, and after the delayed signing is passed, will carry out full broadcasting to send the transaction message to the node device 2 and the node device 3, and both the node device 2 and the node device 3 will carry out the following operations: the transaction information is subjected to delay signing, full broadcasting is carried out after the delay signing is passed, the node device 2 broadcasts the transaction information to the node device 1 and the node device 3 in full, the node device 3 broadcasts the transaction information to the node device 1 and the node device 2 in full, and when the number of the transaction information is large, a great amount of broadcast information is filled in a alliance chain, so that a broadcast storm is formed, and the consensus efficiency of the alliance chain is reduced.
Based on this, the present application provides a data processing method, an apparatus, an electronic device and a storage medium for a federation chain, in which the federation chain is divided into a plurality of subnets, each subnet includes at least one federation link point device, long connections are established between federation link point devices belonging to the same subnet, and during the process of consensus, only the first node device in the subnet receiving the transaction information performs full broadcast into the subnet, other node devices in the subnet will directly store the transaction information after receiving the transaction information, other node devices in the subnet will not perform full broadcast, and the first node device in the federation chain receiving the transaction information will only transmit the transaction information to one node device in each subnet, so the above method can reduce the broadcast number of each node device in the federation chain during the process of consensus, therefore, the consensus efficiency of the alliance chain is improved, meanwhile, only the node device which receives the transaction information first in the alliance chain and the node device which receives the transaction information first in the subnet can carry out the delay signing, and therefore the delay signing speed of the alliance chain is improved, and the consensus efficiency of the alliance chain is further improved.
The following is a detailed description of examples of the present application.
Example one
Fig. 1 is a schematic flowchart of a data processing method of a federation chain according to an embodiment of the present application, where the federation chain includes at least one subnet, each subnet includes at least one federation node device, and long connections are established between federation node devices belonging to the same subnet, as shown in fig. 1, the method includes the following steps:
step 101, for each alliance link point device, after transaction information is obtained, judging the type of a sender of the transaction information; when the type of the sender is the client, executing step 102; when the type of the sender is a federation chain node device belonging to the same subnet as the federation chain node device, executing step 103; and when the type of the sender is the alliance link node device which belongs to a different subnet from the alliance link node device, executing step 104.
102, checking the transaction information; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance node equipment belongs in full, and the transaction information is broadcasted to one alliance node equipment in each other subnet; and storing the transaction information into a transaction pool maintained by the alliance node equipment.
And 103, storing the transaction information into a transaction pool maintained by the alliance node equipment.
104, checking the transaction information; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance link point equipment belongs in full; and storing the transaction information into a transaction pool maintained by the alliance node equipment.
Specifically, since each alliance link point device in the alliance chain is composed of some specific devices and limited third-party devices, the trust level between each alliance link point device is relatively high, and the trust level between alliance link node devices with a certain degree of association is higher, taking a hospital as an example, each device in the hospital can be regarded as an alliance link node device, the trust level between each alliance link point device belonging to the same hospital is relatively high, and the trust level between alliance link point devices belonging to the same department is higher, so that each alliance link point device in one alliance chain can be divided into a plurality of subnets, each subnetwork includes at least one alliance link point device, so as to execute the flow steps shown in fig. 1.
It should be noted that the specific dividing manner for dividing each alliance link node device in the alliance chain into a plurality of subnets may be set according to actual scenarios and needs, and is not specifically limited herein.
In order to reduce the broadcast amount in the consensus process and enable all alliance link point devices in an alliance chain to store the same transaction information, after acquiring one transaction information, for each alliance link point device, the sender type of the transaction information needs to be judged, if the sender type is a client, the alliance chain node device is the first node device in the alliance chain to receive the transaction information, at the moment, the alliance link point device is required to carry out delay signing on the transaction information, and the transaction information needs to be broadcast to other node devices belonging to the same subnet after the delay signing is passed, so that the other node devices belonging to the same subnet can store the transaction information, and meanwhile, the transaction information needs to be broadcast to other subnets, because the trust degree of the node devices in the same subnet is higher, the transaction information only needs to be broadcast to one alliance link point device in each other subnet during broadcasting, and the alliance link point device stores the transaction information into a transaction pool maintained by the alliance link point device; if the type of the sender is the alliance link node device belonging to the same subnet as the alliance link node device, the sender indicates that the existing alliance link node device in the subnet carries out delay signing on the transaction information, and the alliance link node device can directly store the transaction information into a self-maintained transaction pool due to the fact that the trust degree of the node device belonging to the same subnet is higher; when the type of the sender is the alliance link node device belonging to a different subnet from the alliance link node device, the subnet to which the alliance link node device belongs is indicated to receive the transaction information for the first time, at this time, the transaction information needs to be subjected to delay signing, and after the delay signing is passed, the transaction information is broadcasted to the node device belonging to the same subnet, so that other node devices belonging to the same subnet can store the transaction information.
For example, fig. 2 is a schematic structural diagram of a federation chain provided in an embodiment of the present application, and as shown in fig. 2, node devices 1 to 7 all belong to federation link point devices of the same federation chain, where node device 1 and node device 2 belong to a subnet 1, a long connection is established between node device 1 and node device 2, node device 3 belongs to subnet 2, node device 4 belongs to subnet 3, node device 5, node device 6, and node device 7 belong to subnet 4, when node device 1 receives a transaction message and determines that the transaction message is sent by a client, a delay is performed on the transaction message, after the delay passes, node device 1 stores the transaction message in a transaction pool maintained by itself, broadcasts the transaction message to a subnet 1 in full, and broadcasts the transaction message to a node device in subnet 2, Broadcasting the transaction information to a node device in sub-network 3 and broadcasting the transaction information to a node device in sub-network 4.
After the node device 2 receives the transaction information, it can be determined that the node device that sends the transaction information is a node device that belongs to the same subnet as the node device 2, and at this time, the node device directly stores the transaction information into a transaction pool maintained by itself.
Both sub-network 2 and sub-network 3 comprise only one node device and therefore both node device 3 in sub-network 2 and node device 4 in sub-network 3 will receive the transaction information, which, at this time, the node device 3 may determine that the node device that sends the transaction information belongs to a subnet different from the subnet to which the node device 3 belongs, and the node device 4 may determine that the node device that sends the transaction information belongs to a subnet different from the subnet to which the node device 4 belongs, so that both the node device 3 and the node device 4 may delay the transaction information, and the transaction information is respectively stored in a self-maintained transaction pool after the delayed signing is passed, and simultaneously, node device 3 will broadcast in full in subnet 2, node device 4 will broadcast in full in subnet 3, since no other node device is included in both the subnet 2 and the subnet 3, the flow of the subnet 2 and the subnet 3 is ended at this time.
Taking the case that the node device 5 in the subnet 4 receives the transaction information as an example, after receiving the transaction information, the node device 5 may determine that the node device that sends the transaction information belongs to a different subnet from the node device 5, so the node device 5 performs a delay of the transaction information, after the delay passes, the node device 5 stores the transaction information in a transaction pool maintained by itself, and broadcasts the transaction information by the node device 6 and the node device 7, and the subsequent processing flows of the node device 6 and the node device can refer to the processing principle of the node device 2.
By the method, after one alliance link point device in the alliance chain receives the transaction information sent by the client, all alliance link point devices in the alliance chain can form consensus, in the process of consensus, only the first node device in the subnet which receives the transaction information broadcasts in full to the subnet, other node devices in the subnet can directly store the transaction information after receiving the transaction information, other node devices in the subnet do not broadcast in full, and the first node device in the alliance chain which receives the transaction information only sends the transaction information to one node device in each subnet, so that the method can reduce the broadcast number of each node device in the alliance chain in the process of consensus, and is beneficial to improving the consensus efficiency of the alliance chain And the extension is carried out, so that the extension speed of the alliance chain is favorably improved, and the consensus efficiency of the alliance chain is further favorably improved.
In a possible embodiment, each alliance-chain node device stores node information of each alliance-chain node device in the alliance chain, and the node information includes a subnet name of a subnet to which the alliance-chain node device belongs, a node identifier of the alliance-chain node device in the alliance chain, and a node communication address of the alliance-chain node device.
Specifically, each alliance-link node device stores node information of each alliance-link node device in the alliance link in a full amount, so as to determine whether the node device belongs to the same subnet as the sender through the node information, determine a specific alliance-link node device, and a communication address when performing data communication, for example: when the alliance chain node device in the alliance chain includes the node device 1, the node device 2 and the node device 3, the node device 1 not only stores the node information of itself, but also stores the node information of the node device 2 and the node device 3, the node information stored in the node device 2 includes the node information of the node device 1, the node device 2 and the node device 3, and the node information stored in the node device 3 includes the node information of the node device 1, the node device 2 and the node device 3.
It should be noted that the node information may also include other contents, and other specific contents are not described in detail herein.
In a possible implementation, fig. 3 is a schematic flowchart of another data processing method of a federation chain provided in the first embodiment of this application, and as shown in fig. 3, when determining the type of the sender of the transaction information, the method may be implemented by:
step 301, judging whether node information of the alliance link node device sending the transaction information is stored in the alliance link node device.
Step 302, if the node information of the alliance link point device sending the transaction information is not stored, determining that the type of the sender is the client.
Step 303, if the node information of the alliance link node device sending the transaction information is stored, judging whether the subnet name in the node information of the alliance link node device sending the transaction information is the same as the subnet name in the node information corresponding to the alliance link node device.
And step 304, if the type of the sender is the same as that of the alliance link node device belonging to the same subnet, determining that the sender is the alliance link node device.
And 305, if the type of the sender is different, determining that the sender is the alliance link node equipment which belongs to a different subnet from the alliance link node equipment.
Specifically, after dividing the alliance chain according to the structure shown in fig. 2, the sender sending the transaction information includes three types, the first type is a client, the second type is an alliance chain node device which is the first in the alliance chain to receive the transaction information, the third type is an alliance chain node device which is the first in the subnet to receive the transaction information, and corresponding to different senders, the processing strategies of the alliance chain node devices receiving the transaction information are different, so that the type of the sender needs to be determined, because each alliance chain node device stores the node information of each alliance chain node device in the alliance chain in full, but the client does not belong to the node device, it is possible to determine whether the sender is an alliance chain node device or a sender by using the node information of the alliance chain node device which is sending the transaction information stored in the alliance chain node device receiving the transaction information, if the node information of the alliance link point device for sending the transaction information is not stored, determining that the type of the sender is the client, if the node information of the alliance link point device for sending the transaction information is stored, determining that the sender is the alliance link point device, then continuously judging whether the alliance link point device for sending the transaction information and the alliance link node device for receiving the transaction information belong to the same subnet, judging whether subnet names in the node information of the sender and the node information of the alliance link point device for sending the transaction information are the same or not when the step is carried out, if the subnet names in the node information of the sender and the node information of the alliance link point device for receiving the transaction information are the same, indicating that the node information of the sender and the node information of the.
In a possible implementation, fig. 4 is a schematic flow chart of another data processing method of a federation chain provided in the first embodiment of this application, and as shown in fig. 4, when the transaction information is broadcasted to one federation node device in each other subnet in step 102, the following steps may be implemented:
step 401, according to a preset selection rule, determining a target node identifier in each of other subnets from the node information of each alliance node device.
Step 402, for each target node identification, sending a short connection establishment request to a target node communication address corresponding to the target node identification.
Step 403, receiving feedback information sent by the target alliance link point device corresponding to the target node communication address and used for indicating agreement to establish short connection, and establishing short connection between the alliance link node device and the target alliance link point device.
And step 404, sending the transaction information to the target alliance link point device through the short connection.
Specifically, in order to enable the federation chain to form a consensus quickly in the whole network, when the sender is a client, the federation chain node device receiving the transaction information needs to broadcast the transaction information to other federation chain node devices in the subnet in a full amount, and also needs to send the transaction information to federation chain node devices in other subnets, after the federation chains are divided according to the structure shown in fig. 2, the federation node devices belonging to the same subnet trust each other, after receiving the transaction information sent by the alliance link node equipment in the same subnet, the transaction information can be directly stored, one alliance-link node device in each subnet may therefore be selected as the alliance-link node device in the subnet that receives the transaction information in order to reduce the number of broadcasts, and then the alliance link node equipment receiving the transaction information broadcasts the transaction information to the own subnet in full, for example: the subnet included in the alliance chain comprises a subnet 1, a subnet 2 and a subnet 3, the subnet 1 comprises a node device 1 and a node device 2, the subnet 2 comprises a node device 3, a node device 4 and a node device 5, the subnet 3 comprises a node device 6 and a node device 7, the node device 1 is the first alliance chain node device in the alliance chain which receives the transaction information, the node device 1 broadcasts the transaction information to the node device 2 after the delay sign passes, and also needs to select a node device from subnet 2 to broadcast the transaction information, and also needs to select a node device from subnet 3 to broadcast the transaction information, so that the node devices in sub-network 2 receiving the transaction information broadcast the transaction information into sub-network 2, and so that the node devices in the sub-network 3 receiving the transaction information broadcast the transaction information to the sub-network 3, thereby completing the consensus of the node devices.
When selecting one alliance link point device in each other subnet as a target node, the node information of the other alliance link point device stored in the alliance link point device can be utilized to select so as to obtain a node identifier of one alliance link point device in each other subnet as a target node identifier, then a short connection is established according to a target node communication address corresponding to each target node identifier, and transaction information is sent through the short connection, on the basis of the above example, taking the subnet 2 as an example, the node device 1 selects the node identifier of the node device 3 in the subnet 2 as the target node identifier according to the node information of the other node device, sends a short connection establishment request to the node device 3 according to the node communication address of the node device 3, after receiving feedback information which is sent by the node device 3 and used for indicating that the short connection is established, a short connection between the node apparatus 1 and the node apparatus 3 is established, and then the node apparatus 1 transmits the transaction information to the node apparatus 3 through the short connection.
And when two alliance chain node devices between different subnets send transaction information, the transaction information is sent by using short connection, and because the short connection has short time, a fixed connection channel cannot be established, thereby being beneficial to avoiding the risk of forming broadcast storms.
In one possible embodiment, when step 401 is executed, it can be implemented in two ways:
the first method is as follows: and determining the target node identification from the node information of each alliance link point device according to a random algorithm.
Specifically, since the node information can represent the subnet to which the node device in the federation belongs, a random algorithm is performed on the node information belonging to the same subnet, so as to obtain a target node identifier in the subnet.
It should be noted that, the specific random algorithm may be set according to actual needs, and is not specifically limited herein.
The second method comprises the following steps: for each subnet, acquiring the state information of each alliance node device in the subnet; when the subnet has the alliance link node equipment in the idle state, determining the node identification corresponding to the alliance link node equipment in the idle state as the target node identification; and when the node equipment in the alliance chain in the idle state does not exist in the subnet, determining the node identification corresponding to the node equipment in the alliance chain with the lowest computing resource occupancy rate in the subnet as the target node identification.
Specifically, in order to increase the data processing speed, the state information of each alliance link point device belonging to the same subnet may be obtained first, then the node identifier of the alliance link node device in the subnet in the idle state is preferentially selected as the target node identifier, and if the alliance link point device in the idle state does not exist in the subnet, the node identifier of the alliance link node device with the lowest computing resource occupancy rate in the subnet is selected as the target node identifier, so as to ensure that relatively sufficient computing resources are available to process the transaction information.
In one possible embodiment, the short connection is established and maintained by the alliance-link node device with higher data processing capability in the alliance-link node device and the target alliance-link node device.
Specifically, in order to ensure that the short connection can be established quickly and maintained effectively, the short connection is established and maintained by the alliance link node device which sends the transaction information and the alliance link node device which has higher data processing capability in the target alliance link node device, for example: the node device 1 sends the transaction information to the node device 3, the node device 1 and the node device 3 belong to different subnets, and the alliance link node device with higher data processing capacity in the node device 1 and the node device 3 is used for establishing and maintaining.
In one possible embodiment, after step 404 is executed, the following two processing methods are further included:
the first method is as follows: the short connection is broken.
Specifically, after the transaction information is sent, the short connection is directly disconnected, so that the risk of a broadcast storm formed when the transaction information is sent after a plurality of short connections are subsequently established is avoided.
The second method comprises the following steps: timing the short connection; judging whether data transmission is carried out through the short connection within a preset time length, and if the data transmission is carried out through the short connection within the preset time length, timing the short connection again; and if the data transmission is not carried out through the short connection within the preset duration, disconnecting the short connection.
Specifically, in order to realize the recycling of the short connection, after the transaction information is sent, the short connection is timed, if data needing to be transmitted through the short connection exists in the preset time, the short connection is continuously used for data transmission, then the short connection is timed, if the data needing to be transmitted through the short connection does not exist in the preset time, the short connection is directly disconnected, the situation that a plurality of short connections exist among different subnets when the short connection has a long time is avoided, and further the risk of forming a broadcast storm when the transaction information is sent is favorably avoided.
In a possible implementation, fig. 5 is a schematic flow chart of another data processing method of a federation chain according to an embodiment of the present application, and as shown in fig. 5, when the transaction information is broadcast in all the subnets to which the federation node devices belong in step 102 or step 104 is executed, the following steps may be implemented:
step 501, inquiring the long connection established with the alliance link node device.
Step 502, the transaction information is sent through the long connection established with the alliance link node device.
Specifically, when the full-volume broadcasting is performed in the subnet to which the alliance-link node device belongs, long connections are established among the alliance-link node devices belonging to the same subnet, so that the transaction information can be sent by inquiring all the long connections, and the purpose of full-volume broadcasting in the subnet is achieved.
In a possible embodiment, in order to ensure that all the alliance-link node devices in the alliance chain can commonly identify the transaction information, when the type of the sender is the alliance-link node device belonging to the same subnet as the alliance-link node device, selecting one alliance-link node device which does not send the transaction information from other subnets to send random information containing the transaction information.
For example, the subnet 1 includes a node device 1 and a node device 2, the subnet 2 includes a node device 3 and a node device 4, the node device 1 is a node device that performs full broadcast in the subnet 1, the node device 3 is a node device that performs full broadcast in the subnet 2, at this time, both the node device 2 and the node device 4 are receivers, both the node device 1 and the node device 3 are senders, and, for the node device 2, the sender type of the node device 1 is a federation link node device belonging to the same subnet as the node device 2, for the node device 1, the sender type of the node device 3 is a federation link node device belonging to the same subnet as the node device 4, for the node device 4, at this time, for the node device 2, the node device 4 is a federation link node device that has not sent transaction information in other subnets, therefore, after receiving the transaction information, the node device 2 may send random information including the transaction information to the node device 4 to verify whether the node device 4 recognizes the transaction information, so that it may be determined whether each alliance-link node device in the alliance chain recognizes the transaction information.
In a possible implementation, fig. 6 is a schematic flow chart of another data processing method of a federation chain provided in an embodiment of the present application, and as shown in fig. 6, when the type of the sender is a federation chain node device belonging to the same subnet as the federation chain node device, after receiving random information including the transaction information sent by a federation chain node device that does not send the transaction information in another subnet, the method further includes the following steps:
step 601, judging whether the transaction information is stored in a transaction pool maintained by the alliance link node equipment.
Step 602, if yes, discarding the random information.
Step 603, if not, checking the transaction information; and after the verification passes, storing the transaction information into a transaction pool maintained by the equipment of the link node of the alliance.
Based on the above example, after the node device 4 receives the random information, it is determined whether the transaction information is stored in the transaction pool maintained by itself, if so, it indicates that the node device 4 forms a consensus on the transaction information, if not, it indicates that the node device 4 also forms a consensus on the transaction information, and indicates that the node device 4 receives a full broadcast of the node device 3, at this time, the node device 4 needs to delay the transaction information, and after the delay passes, the transaction information is stored in the transaction pool maintained by itself.
In a possible implementation, fig. 7 is a schematic flowchart of a data processing method of another federation chain provided in an embodiment of the present application, and as shown in fig. 7, when a node device of the federation chain is started, the method further includes the following steps:
and 701, determining the target node information with the same subnet name as the alliance node equipment.
Step 702, according to the node communication address in the target node information, establishing the long connection of the alliance node device.
Specifically, when one alliance link node device is started, in order to enable the alliance link node device to access to the corresponding subnet, target node information with the same subnet name as the alliance link node device is determined according to the stored full amount of node information, all alliance link node devices belonging to the same subnet can be determined at the moment, then long connection is established according to the node communication address in the target node information, and at the moment, the newly started alliance link node device establishes long connection with all other alliance link node devices belonging to the same subnet, so that full amount broadcasting in the subnet can be performed subsequently.
Example two
Fig. 8 is a schematic structural diagram of a data processing apparatus of a federation chain according to a second embodiment of the present application, where the federation chain includes at least one subnet, each subnet includes at least one federation link node device, and long connections are established between federation link node devices belonging to the same subnet, as shown in fig. 8, the apparatus includes:
the judging unit 81 is configured to, for each alliance link point device, judge the type of a sender of the transaction information after the transaction information is acquired;
the processing unit 82 is configured to, when the type of the sender is a client, check the transaction information; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance node equipment belongs in full, and the transaction information is broadcasted to one alliance node equipment in each other subnet; storing the transaction information into a transaction pool maintained by the alliance link point equipment; and when the type of the sender is the alliance link node device belonging to the same subnet as the alliance link node device, storing the transaction information into a transaction pool maintained by the alliance link node device; and when the type of the sender is alliance link node equipment which belongs to a different subnet from the alliance link node equipment, the transaction information is checked; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance link point equipment belongs in full; and storing the transaction information into a transaction pool maintained by the alliance node equipment.
In a possible embodiment, each alliance-chain node device stores node information of each alliance-chain node device in the alliance chain, and the node information includes a subnet name of a subnet to which the alliance-chain node device belongs, a node identifier of the alliance-chain node device in the alliance chain, and a node communication address of the alliance-chain node device.
In a possible embodiment, the determining unit 81 is configured to determine the type of the sender of the transaction information, and includes:
judging whether node information of the alliance link node equipment for sending the transaction information is stored in the alliance link node equipment;
if the node information of the alliance link point device for sending the transaction information is not stored, determining that the type of the sender is the client;
if the node information of the alliance link node equipment for sending the transaction information is stored, judging whether the subnet name in the node information of the alliance link node equipment for sending the transaction information is the same as the subnet name in the node information corresponding to the alliance link node equipment;
if the type of the sender is the same as that of the alliance link node equipment, determining that the type of the sender is the alliance link node equipment belonging to the same subnet as the alliance link node equipment;
and if not, determining that the type of the sender is the alliance link node equipment which belongs to a different subnet from the alliance link node equipment.
In a possible embodiment, when the processing unit 82 is configured to broadcast the transaction information to one federation nexus device in each of the other subnets, the processing unit includes:
according to a preset selection rule, determining a target node identifier in each other subnet from the node information of each alliance node device;
for each target node identification, sending a short connection establishment request to a target node communication address corresponding to the target node identification;
receiving feedback information which is sent by target alliance link point equipment corresponding to the target node communication address and used for indicating that short connection establishment is agreed, and establishing short connection between the alliance link point equipment and the target alliance link point equipment;
and sending the transaction information to the target alliance link point device through the short connection.
In a possible embodiment, when the processing unit 82 is configured to determine, according to a preset selection rule, a target node identifier of each of the other subnets from the node information of each of the federation node devices, the method includes:
determining the target node identification from the node information of each alliance link point device according to a random algorithm; alternatively, the first and second electrodes may be,
for each subnet, acquiring the state information of each alliance node device in the subnet; when the subnet has the alliance link node equipment in the idle state, determining the node identification corresponding to the alliance link node equipment in the idle state as the target node identification; and when the node equipment in the alliance chain in the idle state does not exist in the subnet, determining the node identification corresponding to the node equipment in the alliance chain with the lowest computing resource occupancy rate in the subnet as the target node identification.
In one possible embodiment, the short connection is established and maintained by the alliance-link node device with higher data processing capability in the alliance-link node device and the target alliance-link node device.
In a possible embodiment, the processing unit 82 is further configured to:
after the transaction information is sent to the target alliance link point device through the short connection, disconnecting the short connection; or, timing the short connection; judging whether data transmission is carried out through the short connection within a preset time length, and if the data transmission is carried out through the short connection within the preset time length, timing the short connection again; and if the data transmission is not carried out through the short connection within the preset duration, disconnecting the short connection.
In a possible embodiment, when the processing unit 82 is configured to broadcast the transaction information in a total amount in a subnet to which the federation node device belongs, the processing unit includes:
inquiring the long connection established with the alliance link node equipment;
and sending the transaction information through the long connection established with the alliance link node device.
In a possible embodiment, the processing unit 82 is further configured to:
and when the type of the sender is the alliance link node equipment which belongs to the same subnet as the alliance link node equipment, selecting alliance link node equipment which does not send the transaction information from other subnets to send random information containing the transaction information.
In a possible embodiment, the processing unit 82 is further configured to:
when the type of the sender is the alliance link node equipment belonging to the same subnet as the alliance link node equipment, after receiving random information which is sent by the alliance link node equipment which does not send the transaction information in other subnets and contains the transaction information, judging whether the transaction information is stored in a transaction pool maintained by the alliance link node equipment;
if yes, discarding the random information;
if not, the transaction information is checked; and after the verification passes, storing the transaction information into a transaction pool maintained by the equipment of the link node of the alliance.
In a possible embodiment, the processing unit 82 is further configured to:
when the alliance link node equipment is started, determining target node information with the same subnet name as the alliance link node equipment;
and establishing the long connection of the alliance node equipment according to the node communication address in the target node information.
For the principle explanation of the second embodiment, reference may be made to the related explanation of the first embodiment, and detailed explanation is not provided herein.
EXAMPLE III
Fig. 9 is a schematic structural diagram of an electronic device according to a third embodiment of the present application, including: a processor 901, a storage medium 902 and a bus 903, where the storage medium 902 stores machine-readable instructions executable by the processor 901, and when the electronic device runs the above-mentioned federation chain data processing method, the processor 901 and the storage medium 902 communicate with each other through the bus 903, and the processor 901 executes the machine-readable instructions to execute the method steps described in the first embodiment.
Example four
A fourth embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to perform the method steps described in the first embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the present disclosure, which should be construed in light of the above teachings. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. A data processing method of a federation chain is characterized in that the federation chain comprises at least one subnet, each subnet comprises at least one federation node device, and long connections are established between federation node devices belonging to the same subnet, the method comprises:
for each alliance link point device, after transaction information is obtained, judging the type of a sender of the transaction information;
when the type of the sender is a client, checking the transaction information; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance node equipment belongs in full, and the transaction information is broadcasted to one alliance node equipment in each other subnet; storing the transaction information into a transaction pool maintained by the alliance link point equipment;
when the type of the sender is the alliance link node equipment which belongs to the same subnet as the alliance link node equipment, storing the transaction information into a transaction pool maintained by the alliance link node equipment;
when the type of the sender is alliance link node equipment which belongs to a different subnet from the alliance link node equipment, the transaction information is checked; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance link point equipment belongs in full; and storing the transaction information into a transaction pool maintained by the alliance node equipment.
2. The method of claim 1, wherein each federation chain node device has stored therein node information for each federation node device in the federation chain, the node information including a subnet name of a subnet to which the federation chain node device belongs, a node identification of a federation node device in the federation chain, and a node communication address of a federation chain node device.
3. The method of claim 2, wherein said determining a type of sender of the transaction message comprises:
judging whether node information of the alliance link node equipment for sending the transaction information is stored in the alliance link node equipment;
if the node information of the alliance link point device for sending the transaction information is not stored, determining that the type of the sender is the client;
if the node information of the alliance link node equipment for sending the transaction information is stored, judging whether the subnet name in the node information of the alliance link node equipment for sending the transaction information is the same as the subnet name in the node information corresponding to the alliance link node equipment;
if the type of the sender is the same as that of the alliance link node equipment, determining that the type of the sender is the alliance link node equipment belonging to the same subnet as the alliance link node equipment;
and if not, determining that the type of the sender is the alliance link node equipment which belongs to a different subnet from the alliance link node equipment.
4. The method of claim 2, wherein said broadcasting said transaction information to one federation nexus device in each other subnet comprises:
according to a preset selection rule, determining a target node identifier in each other subnet from the node information of each alliance node device;
for each target node identification, sending a short connection establishment request to a target node communication address corresponding to the target node identification;
receiving feedback information which is sent by target alliance link point equipment corresponding to the target node communication address and used for indicating that short connection establishment is agreed, and establishing short connection between the alliance link point equipment and the target alliance link point equipment;
and sending the transaction information to the target alliance link point device through the short connection.
5. The method of claim 2, wherein the determining, according to a preset selection rule, a target node identifier of each of the other subnets from the node information of each of the federation node devices includes:
determining the target node identification from the node information of each alliance link point device according to a random algorithm; alternatively, the first and second electrodes may be,
for each subnet, acquiring the state information of each alliance node device in the subnet; when the subnet has the alliance link node equipment in the idle state, determining the node identification corresponding to the alliance link node equipment in the idle state as the target node identification; and when the node equipment in the alliance chain in the idle state does not exist in the subnet, determining the node identification corresponding to the node equipment in the alliance chain with the lowest computing resource occupancy rate in the subnet as the target node identification.
6. The method of claim 4, wherein the short connection is established and maintained by a higher data processing capability of the federation link node device and the target federation link node device.
7. The method of claim 4, wherein after sending the transaction information to the target federation node device over the short connection, the method further comprises:
disconnecting the short connection; alternatively, the first and second electrodes may be,
timing the short connection; judging whether data transmission is carried out through the short connection within a preset time length, and if the data transmission is carried out through the short connection within the preset time length, timing the short connection again; and if the data transmission is not carried out through the short connection within the preset duration, disconnecting the short connection.
8. The method of claim 1, wherein said broadcasting said transaction information in full within a subnet to which the federation node-based device belongs comprises:
inquiring the long connection established with the alliance link node equipment;
and sending the transaction information through the long connection established with the alliance link node device.
9. The method of claim 1, wherein when the sender is of a type of federation link node device that belongs to the same subnet as the federation link node device, the method further comprises:
and selecting one alliance link node device which does not send the transaction information from other subnets to send random information containing the transaction information.
10. The method of claim 1 or 9, wherein when the sender is of a type of federation link node device that belongs to the same subnet as the federation link node device, the method further comprises:
after receiving random information which is sent by alliance link node equipment which does not send the transaction information in other subnets and contains the transaction information, judging whether the transaction information is stored in a transaction pool maintained by the alliance link node equipment;
if yes, discarding the random information;
if not, the transaction information is checked; and after the verification passes, storing the transaction information into a transaction pool maintained by the equipment of the link node of the alliance.
11. The method of claim 2, wherein upon startup of the federation chain node device, the method further comprises:
determining target node information with the same subnet name as the alliance node equipment;
and establishing the long connection of the alliance node equipment according to the node communication address in the target node information.
12. A data processing apparatus of a federation chain, the federation chain including at least one subnet, each subnet including at least one federation link node device, long connections being established between federation link node devices belonging to the same subnet, the apparatus comprising:
the judging unit is used for judging the type of a sender of the transaction information after the transaction information is acquired for each alliance link node device;
the processing unit is used for checking the transaction information when the type of the sender is a client; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance node equipment belongs in full, and the transaction information is broadcasted to one alliance node equipment in each other subnet; storing the transaction information into a transaction pool maintained by the alliance link point equipment; and when the type of the sender is the alliance link node device belonging to the same subnet as the alliance link node device, storing the transaction information into a transaction pool maintained by the alliance link node device; and when the type of the sender is alliance link node equipment which belongs to a different subnet from the alliance link node equipment, the transaction information is checked; after the verification is passed, the transaction information is broadcasted in the subnet to which the alliance link point equipment belongs in full; and storing the transaction information into a transaction pool maintained by the alliance node equipment.
13. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the federation chain data processing method of any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when being executed by a processor, carries out the steps of the data processing method of a federation chain according to any one of claims 1 to 11.
CN202011541170.2A 2020-12-23 2020-12-23 Data processing method and device of alliance chain, electronic equipment and storage medium Active CN112688790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011541170.2A CN112688790B (en) 2020-12-23 2020-12-23 Data processing method and device of alliance chain, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011541170.2A CN112688790B (en) 2020-12-23 2020-12-23 Data processing method and device of alliance chain, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112688790A true CN112688790A (en) 2021-04-20
CN112688790B CN112688790B (en) 2021-09-28

Family

ID=75451280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011541170.2A Active CN112688790B (en) 2020-12-23 2020-12-23 Data processing method and device of alliance chain, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112688790B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107528886A (en) * 2017-07-25 2017-12-29 中国科学院计算技术研究所 Block chain the whole network method for splitting and system
CN108306292A (en) * 2018-04-15 2018-07-20 珠海市华清创新科技有限公司 A kind of distributed energy resource system including the use of end index block chain
CN108769142A (en) * 2018-05-11 2018-11-06 中国联合网络通信集团有限公司 Exchange information processing method and block generate node
CN111161061A (en) * 2019-12-05 2020-05-15 中国电力科学研究院有限公司 Distributed energy centralized transaction system and method
CN111611619A (en) * 2020-05-26 2020-09-01 牛津(海南)区块链研究院有限公司 Traceability method, traceability device, traceability equipment and readable storage medium based on alliance chain
WO2020173498A1 (en) * 2019-02-26 2020-09-03 白杰 Blockchain-based subnet transaction method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107528886A (en) * 2017-07-25 2017-12-29 中国科学院计算技术研究所 Block chain the whole network method for splitting and system
CN108306292A (en) * 2018-04-15 2018-07-20 珠海市华清创新科技有限公司 A kind of distributed energy resource system including the use of end index block chain
CN108769142A (en) * 2018-05-11 2018-11-06 中国联合网络通信集团有限公司 Exchange information processing method and block generate node
WO2020173498A1 (en) * 2019-02-26 2020-09-03 白杰 Blockchain-based subnet transaction method and system
CN111161061A (en) * 2019-12-05 2020-05-15 中国电力科学研究院有限公司 Distributed energy centralized transaction system and method
CN111611619A (en) * 2020-05-26 2020-09-01 牛津(海南)区块链研究院有限公司 Traceability method, traceability device, traceability equipment and readable storage medium based on alliance chain

Also Published As

Publication number Publication date
CN112688790B (en) 2021-09-28

Similar Documents

Publication Publication Date Title
CN107332876B (en) Method and device for synchronizing block chain state
US20170075941A1 (en) Consensus system and method for adding data to a blockchain
CN109041262A (en) Data transmission method and relevant apparatus
CN110855792B (en) Message pushing method, device, equipment and medium
CN112118239B (en) Block chain consensus method and device, electronic equipment and storage medium
CN111328108B (en) 5G service data processing method, device and distribution equipment
CN108881354A (en) A kind of pushed information storage method, device, server and computer storage medium
CN107370636B (en) Link state determination method and device
CN112995040B (en) Message path tracing method and device based on equipment identification calculation
CN109275157B (en) Configuration parameter optimization method and device for NPRACH (network-defined random Access channel) of base station
CN113365227A (en) WI-SUN network system, and network access method, device and equipment based on WI-SUN network system
CN114363963A (en) Load balancing selection method and system for cloud-native UPF signaling plane
CN110213230B (en) network security verification method and device for distributed communication
EP3503495A1 (en) Method for accumulating and co-assembling uniform data
CN112688790B (en) Data processing method and device of alliance chain, electronic equipment and storage medium
CN110888892B (en) Block synchronization method, device and storage medium
CN107995125B (en) Traffic scheduling method and device
CN113596105B (en) Content acquisition method, edge node and computer readable storage medium
CN114500237A (en) Communication method and system
CN114255020A (en) Block chain transaction processing method, device, equipment and storage medium based on multiple chains
CN112104615B (en) IPv6 address-based file credibility judgment processing method and device
CN111615110B (en) Node and base station bidirectional authentication method for node storage N
CN111641698B (en) Data statistical method, system, equipment and storage medium
CN111628869B (en) Node for storing n by base station and base station bidirectional authentication method
CN116193628B (en) Communication link establishment method, device, equipment and readable storage medium

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