CN115617907A - Channel allocation method and device for league chain cross-chain and electronic equipment - Google Patents

Channel allocation method and device for league chain cross-chain and electronic equipment Download PDF

Info

Publication number
CN115617907A
CN115617907A CN202211234522.9A CN202211234522A CN115617907A CN 115617907 A CN115617907 A CN 115617907A CN 202211234522 A CN202211234522 A CN 202211234522A CN 115617907 A CN115617907 A CN 115617907A
Authority
CN
China
Prior art keywords
chain
external
shared data
target
alliance chain
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.)
Pending
Application number
CN202211234522.9A
Other languages
Chinese (zh)
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.)
Beijing Octa Innovations Information Technology Co Ltd
Original Assignee
Beijing Octa Innovations Information Technology 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 Beijing Octa Innovations Information Technology Co Ltd filed Critical Beijing Octa Innovations Information Technology Co Ltd
Priority to CN202211234522.9A priority Critical patent/CN115617907A/en
Publication of CN115617907A publication Critical patent/CN115617907A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a channel allocation method and device for league chain cross-chain and electronic equipment, wherein the method and device are used for responding to a plurality of external block chains to be accessed into a target league chain; grouping a plurality of external block chains to be accessed into a target alliance chain to obtain a plurality of external block chain groups; for each external blockchain group, mapping it to a set of virtual internal blockchains of the federation chains; based on each virtual internal blockchain set, enabling the corresponding external blockchain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain; and establishing a shared data channel for all external block chains in each alliance chain subnet, and mutually isolating the shared data channels corresponding to the external block chains in different alliance chain subnets so as to enable all external block chains in the same group to perform data interaction with the target alliance chain on the basis of the same shared data channel, thereby effectively realizing that the blocks outside the alliance chain are linked into the alliance chain.

Description

Channel allocation method and device for league chain cross-chain and electronic equipment
Technical Field
The present application relates to the field of alliance chain technologies, and in particular, to an alliance chain cross-chain channel allocation method, apparatus, and electronic device.
Background
Block chains are widely used due to their unique traceability and non-tamper-ability, and belong to a hot platform for data storage sharing. In the block chain, as for the alliance chain, the number of nodes is small, the processing speed is high, and the transaction cost is low. However, because the number of nodes in the federation chain is small and congestion is likely to occur, the federation chain and the external block chain are usually used for chain crossing, so that an effect of capacity expansion is achieved, and a situation of congestion is avoided.
However, how to access the block chain outside the alliance chain to the alliance chain becomes a technical problem to be solved urgently.
Disclosure of Invention
Based on the above problem, the embodiments of the present application provide a method and an apparatus for allocating channels across alliance chains, and an electronic device.
The embodiment of the application discloses the following technical scheme:
1. a federation chain cross-chain channel allocation method, comprising:
responsive to a plurality of external blockchains to access the target federation chain;
grouping a plurality of external block chains to be accessed into a target alliance chain to obtain a plurality of external block chain groups;
for each external blockchain group, mapping it to a set of virtual internal blockchains of the federation chains;
based on each virtual internal block chain set, enabling a corresponding external block chain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain;
and creating a shared data channel for all external block chains in each alliance chain subnet, wherein the shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other, so that all external block chains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
2. The method for channel allocation across federation chains according to claim 1, wherein the creating a shared data channel for all external blockchains within each federation chain subnet, the shared data channels corresponding to external blockchains within different federation chain subnets being isolated from each other so that all external blockchains within the same group perform on-chain data interaction with the target federation chain based on the same shared data channel comprises: determining a capacity value of the same shared data channel, an exclusive description value of the same shared data channel and a capacity extensible description value of the same shared data channel based on a channel isolation allocation model, matching with a plurality of external block chain groups, and determining a corresponding relation between the external block chain groups and the shared data channel; and establishing a shared data channel for all external block chains in each alliance chain subnet based on the corresponding relation between the external block chain group and the shared data channel, wherein the shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other, so that all external block chains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
3. The method of claim 2, wherein the determining, based on the channel isolation allocation model, a capacity value of a same shared data channel, a dedicated description value of a same shared data channel, and a capacity scalable description value of a same shared data channel, matching the capacity values with a plurality of external blockchain groups, and determining a correspondence between the external blockchain groups and the shared data channel comprises: determining a capacity value of the same shared data channel, an exclusive description value of the same shared data channel and a capacity extensible description value of the same shared data channel based on a channel isolation allocation model, and loading the capacity values into a created first container; and matching the capacity value of the shared data channel, the exclusive description value of the same shared data channel and the capacity extensible description value of the same shared data channel with a plurality of external block chain groups based on the first container, and determining the corresponding relation between the external block chain groups and the shared data channel.
4. A method for assigning a channel across federation chains according to claim 1, wherein the step of grouping the corresponding external blockchain groups to be accessed to the target federation chain into one federation chain subnet of the target federation chain based on each virtual internal blockchain set comprises: converting each virtual internal block chain set into an account book, and distributing corresponding account book identifiers; and adding the account book identification into the alliance chain, and enabling the corresponding external blockchain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain.
5. The method for channel allocation across federation chains according to claim 1, wherein the creating a shared data channel for all external blockchains within the federation chain subnet such that all external blockchains within the federation chain subnet perform on-chain data interaction with the target federation chain based on the same shared data channel comprises: and creating a shared data channel for all external block chains in the alliance chain subnet, so that when any external block chain in the alliance chain subnet performs on-chain data interaction with the target alliance chain based on the same shared data channel, privatizing corresponding on-chain data, and isolating on-chain data targeted by the on-chain data interaction with other external block chains and the target alliance chain based on the same shared data channel.
6. The method for channel allocation across federation chains according to claim 1, wherein the creating a shared data channel for all external blockchains within each federation chain subnet, the shared data channels corresponding to external blockchains within different federation chain subnets being isolated from each other so that all external blockchains within the same group perform on-chain data interaction with the target federation chain based on the same shared data channel comprises: all the external block chains in each alliance chain subnet are configured to be side chains, the alliance chains are configured to be main chains, cross-chain data transmission is carried out between all the external block chains in each alliance chain subnet and the alliance chains, and shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other.
7. The method for allocating channel of alliance chain cross-link as claimed in claim 6, wherein the making cross-link data transmission between all external blockchains in each alliance chain subnet and the alliance chain comprises: responding to a alliance chain cross-chain request of any external block chain in each alliance chain subnet, and generating a first random number by the external block chain to be accessed into a target alliance chain; carrying out hash operation on the first random number to obtain a first hash value; and locking the alliance chain cross-link request by using the first hash value and setting a valid first time lock so as to enable the external block chain to be accessed into the target alliance chain to perform cross-link data transmission with the alliance chain.
8. The method for allocating channel across federation chains according to claim 7, wherein the using the first hash value to lock the federation chain cross-chain request and set a valid first time lock for cross-chain data transmission between the external block chain to be accessed to the target federation chain and the federation chain comprises: sending a locking request obtained by locking the alliance chain crossing request by using the first hash value and a set effective first time lock to the alliance chain, and enabling the alliance chain to use the first random number to lock target data pointed by the alliance chain crossing request to obtain locking data and set effective second time lock, wherein the duration of the second time lock is not more than that of the first time lock; and the external block chain to be accessed into the target alliance chain is enabled to access the locking data by using a locking request in the first time lock, and the alliance chain feeds the locking data back to the external block chain to be accessed into the target alliance chain in the second time lock.
9. The method for assigning channels across federation chains according to claim 8, wherein the using the first hash value to lock the federation chain cross-chain request and set a valid first time lock for cross-chain data transmission between the external blockchain to access the target federation chain and the federation chain further comprises: and enabling the external block chain to be accessed into the target alliance chain to access the locking data without using a locking request in the first time lock, and/or enabling the alliance chain not to feed the locking data back to the external block chain to be accessed into the target alliance chain in the second time lock, and terminating the cross-link data transmission between the external block chain to be accessed into the target alliance chain and the alliance chain.
10. A federation chain inter-chain channel allocation apparatus, comprising:
a first program element for responding to a plurality of external blockchains to access a target federation chain;
a second program unit, configured to group multiple external blockchains to be accessed to the target alliance chain, so as to obtain multiple external blockchain groups;
a third program element for mapping each external blockchain group to a set of virtual internal blockchains of the federation chain;
a fourth program unit, configured to enable a corresponding external blockchain group to be accessed to the target federation chain to form one federation chain subnet of the target federation chain based on each virtual internal blockchain set;
and a fifth program unit, configured to create a shared data channel for all external blockchains in each alliance chain subnet, where shared data channels corresponding to external blockchains in different alliance chain subnets are isolated from each other, so that all external blockchains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
11. A federation chain cross-chain channel allocation apparatus as recited in claim 10, wherein the fifth program unit is further to: determining the capacity value of the same shared data channel, the exclusive description value of the same shared data channel and the capacity extensible description value of the same shared data channel based on a channel isolation allocation model, matching with a plurality of external block chain groups, and determining the corresponding relation between the external block chain groups and the shared data channel; and establishing a shared data channel for all external block chains in each alliance chain subnet based on the corresponding relation between the external block chain group and the shared data channel, wherein the shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other, so that all external block chains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
12. A federation chain cross-chain channel allocation apparatus as recited in claim 11, wherein the fifth program unit is further to: determining a capacity value of the same shared data channel, an exclusive description value of the same shared data channel and a capacity extensible description value of the same shared data channel based on a channel isolation allocation model, and loading the capacity values into a created first container; and matching the capacity value of the shared data channel, the exclusive description value of the same shared data channel and the capacity extensible description value of the same shared data channel with a plurality of external block chain groups based on the first container, and determining the corresponding relation between the external block chain groups and the shared data channel.
13. A federation chain cross-chain channel allocation apparatus as recited in claim 10, wherein the fourth program element is further to: converting each virtual internal block chain set into an account book, and distributing corresponding account book identification; and adding the account book identification into the alliance chain, and enabling the corresponding external blockchain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain.
14. A federation chain cross-chain channel allocation apparatus as recited in claim 10, wherein the fifth program unit is further to: and creating a shared data channel for all external block chains in the alliance chain subnet, so that when any external block chain in the alliance chain subnet performs on-chain data interaction with the target alliance chain based on the same shared data channel, privatizing corresponding on-chain data, and isolating on-chain data targeted by the on-chain data interaction with other external block chains and the target alliance chain based on the same shared data channel.
15. A federation chain cross-chain channel allocation apparatus as recited in claim 10, wherein the fifth program unit is further to: all the external block chains in each alliance chain subnet are configured to be side chains, the alliance chains are configured to be main chains, cross-chain data transmission is carried out between all the external block chains in each alliance chain subnet and the alliance chains, and shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other.
16. A federation chain cross-chain channel allocation apparatus as recited in claim 15, wherein the fifth program unit is further to: responding to a alliance chain cross-chain request of any external blockchain in each alliance chain subnet, and generating a first random number by the external blockchain to be accessed into the target alliance chain; carrying out hash operation on the first random number to obtain a first hash value; and locking the alliance chain cross-link request by using the first hash value and setting a valid first time lock so as to enable the external block chain to be accessed into the target alliance chain to perform cross-link data transmission with the alliance chain.
17. A federation chain cross-chain channel allocation apparatus as recited in claim 16, wherein the fifth program unit is further to: sending a locking request obtained by locking the alliance chain crossing request by using the first hash value and a set effective first time lock to the alliance chain, and enabling the alliance chain to use the first random number to lock target data pointed by the alliance chain crossing request to obtain locking data and set effective second time lock, wherein the duration of the second time lock is not more than that of the first time lock; and the external block chain to be accessed into the target alliance chain is enabled to access the locking data by using a locking request in the first time lock, and the alliance chain feeds the locking data back to the external block chain to be accessed into the target alliance chain in the second time lock.
18. A federation chain cross-chain channel allocation apparatus as recited in claim 17, wherein the fifth program unit is further to: and enabling the external block chain to be accessed into the target alliance chain to access the locking data without using a locking request in the first time lock, and/or enabling the alliance chain not to feed the locking data back to the external block chain to be accessed into the target alliance chain in the second time lock, and terminating the cross-link data transmission between the external block chain to be accessed into the target alliance chain and the alliance chain.
19. An electronic device, comprising a memory and a processor, wherein the memory stores an executable program, and the processor executes the executable program to perform the following steps:
responsive to a plurality of external blockchains to access the target federation chain;
grouping a plurality of external block chains to be accessed into a target alliance chain to obtain a plurality of external block chain groups;
for each external blockchain group, mapping it to a set of virtual internal blockchains of the federation chains;
based on each virtual internal blockchain set, enabling the corresponding external blockchain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain;
and creating a shared data channel for all external block chains in each alliance chain subnet, wherein the shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other, so that all external block chains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
In the technical scheme of the embodiment of the application, a plurality of external block chains to be accessed to a target alliance chain are responded; grouping a plurality of external block chains to be accessed into a target alliance chain to obtain a plurality of external block chain groups; for each external blockchain group, mapping it to a set of virtual internal blockchains of the federation chains; based on each virtual internal blockchain set, enabling the corresponding external blockchain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain; and establishing a shared data channel for all external block chains in each alliance chain subnet, and mutually isolating the shared data channels corresponding to the external block chains in different alliance chain subnets, so that all external block chains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel, thereby effectively realizing that the block chains outside the alliance chain are linked into the alliance chain.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a method for allocating channels across federation chains according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a channel allocation apparatus across a federation chain according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of an electronic device in an embodiment of the present application;
fig. 4 is a schematic diagram of a hardware structure of an electronic device in the embodiment of the present application.
Detailed Description
It is not necessary for any particular embodiment of the invention to achieve all of the above advantages at the same time.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the technical scheme of the embodiment of the application, a plurality of external block chains to be accessed to a target alliance chain are responded; grouping a plurality of external block chains to be accessed into a target alliance chain to obtain a plurality of external block chain groups; for each external blockchain group, mapping it to a set of virtual internal blockchains of the federation chains; based on each virtual internal block chain set, enabling a corresponding external block chain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain; and establishing a shared data channel for all external block chains in each alliance chain subnet, and mutually isolating the shared data channels corresponding to the external block chains in different alliance chain subnets so as to enable all external block chains in the same group to perform data interaction with the target alliance chain on the basis of the same shared data channel, thereby effectively realizing that the blocks outside the alliance chain are linked into the alliance chain.
Fig. 1 is a schematic flowchart of a method for allocating channels across federation chains according to an embodiment of the present application; as shown in fig. 1, it includes:
s101, responding to a plurality of external block chains to be accessed into a target alliance chain;
s102, grouping a plurality of external block chains to be accessed into a target alliance chain to obtain a plurality of external block chain groups;
s103, aiming at each external blockchain group, mapping the external blockchain group into a virtual internal blockchain set of the alliance chain;
s104, based on each virtual internal blockchain set, enabling the corresponding external blockchain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain;
and S105, creating a shared data channel for all external block chains in each alliance chain subnet, wherein the shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other, so that all external block chains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
Optionally, the creating a shared data channel for all external blockchains in each federation chain subnet, and isolating shared data channels corresponding to external blockchains in different federation chain subnets from each other, so that all external blockchains in the same group perform on-chain data interaction with the target federation chain based on the same shared data channel, includes: determining the capacity value of the same shared data channel, the exclusive description value of the same shared data channel and the capacity extensible description value of the same shared data channel based on a channel isolation allocation model, matching with a plurality of external block chain groups, and determining the corresponding relation between the external block chain groups and the shared data channel; and establishing a shared data channel for all external block chains in each alliance chain subnet based on the corresponding relation between the external block chain group and the shared data channel, wherein the shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other, so that all external block chains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
In this embodiment, a shared data channel is created for all external blockchains in each alliance chain subnet, and shared data channels corresponding to external blockchains in different alliance chain subnets are isolated from each other, so that isolation of multiple shared data channels is ensured, data communication collision is avoided, and data crosstalk is avoided.
Optionally, the determining, based on the channel isolation allocation model, a capacity value of the same shared data channel, an exclusive description value of the same shared data channel, and a capacity extensible description value of the same shared data channel, matching the capacity extensible description values with the plurality of external blockchain groups, and determining a corresponding relationship between the external blockchain groups and the shared data channel includes: determining a capacity value of the same shared data channel, an exclusive description value of the same shared data channel and a capacity extensible description value of the same shared data channel based on a channel isolation allocation model, and loading the capacity value, the exclusive description value and the capacity extensible description value into a created first container; and matching the capacity value of the shared data channel, the exclusive description value of the same shared data channel and the capacity extensible description value of the same shared data channel with a plurality of external block chain groups based on the first container, and determining the corresponding relation between the external block chain groups and the shared data channel.
In this embodiment, based on the first easiness that the capacity value of the same shared data channel, the exclusive description value of the same shared data channel, and the capacity extensible description value of the same shared data channel are loaded, the corresponding relationship between the external blockchain group and the shared data channel can be quickly determined, the efficiency of executing the algorithm is improved, and the requirement of executing the algorithm on resources is reduced.
Optionally, the making, based on each virtual internal blockchain set, a corresponding external blockchain group to be accessed to the target federation chain into one federation chain subnet of the target federation chain includes: converting each virtual internal block chain set into an account book, and distributing corresponding account book identification; and adding the account book identification into the alliance chain, and enabling the corresponding external blockchain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain.
In this embodiment, based on the account book corresponding to each virtual internal blockchain set and the allocated account book identifier, it is quickly achieved that an external blockchain group to be accessed to the target federation chain forms one federation chain subnet of the target federation chain, and meanwhile, difficulty in algorithm design is reduced. In addition, based on the account book, dynamic maintenance of the virtual internal block chain set can be effectively realized.
Optionally, the creating a shared data channel for all external block chains in the federation chain subnet, so that all external block chains in the federation chain subnet perform uplink data interaction with the target federation chain based on the same shared data channel, includes: and creating a shared data channel for all external block chains in the alliance chain subnet, so that when any external block chain in the alliance chain subnet performs on-chain data interaction with the target alliance chain based on the same shared data channel, privatizing corresponding on-chain data, and isolating on-chain data targeted by the on-chain data interaction with other external block chains and the target alliance chain based on the same shared data channel.
In this embodiment, when performing on-chain data interaction with the target federation chain based on the same shared data channel, the corresponding on-chain data is privatized, so that the security of the data is ensured, and data crosstalk is prevented.
Optionally, the creating a shared data channel for all external blockchains in each federation chain subnet, and isolating shared data channels corresponding to external blockchains in different federation chain subnets from each other, so that all external blockchains in the same group perform on-chain data interaction with the target federation chain based on the same shared data channel, includes: all the external block chains in each alliance chain subnet are configured to be side chains, the alliance chains are configured to be main chains, cross-chain data transmission is carried out between all the external block chains in each alliance chain subnet and the alliance chains, and shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other.
In this embodiment, through the matching of the main chain and the side chain, cross-link data transmission between all external block chains in each alliance chain subnet and the alliance chain is achieved, and shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other, so that the security of data communication is ensured, and data crosstalk is prevented.
Optionally, the making of cross-link data transmission between all external blockchains within each federation chain subnet and the federation chain includes: responding to a alliance chain cross-chain request of any external block chain in each alliance chain subnet, and generating a first random number by the external block chain to be accessed into a target alliance chain; carrying out hash operation on the first random number to obtain a first hash value; and locking the alliance chain cross-link request by using the first hash value and setting a valid first time lock so as to enable the external block chain to be accessed into the target alliance chain to perform cross-link data transmission with the alliance chain.
In this embodiment, based on the first random number and the first hash value, security of a league chain cross-link request is ensured, and meanwhile, based on the first time lock, timeliness of cross-link data transmission between an external block chain to be accessed to a target league chain and the league chain is specified, thereby further improving security of data.
Optionally, the locking, by using the first hash value, the federation chain cross-link request and setting a valid first time lock, so as to enable cross-link data transmission between the external block chain to be accessed to the target federation chain and the federation chain, including: sending a locking request obtained by locking the alliance chain crossing request by using the first hash value and a set effective first time lock to the alliance chain, and enabling the alliance chain to use the first random number to lock target data pointed by the alliance chain crossing request to obtain locking data and set effective second time lock, wherein the duration of the second time lock is not more than that of the first time lock; and the external block chain to be accessed into the target alliance chain is enabled to access the locking data by using a locking request in the first time lock, and the alliance chain feeds the locking data back to the external block chain to be accessed into the target alliance chain in the second time lock.
In this embodiment, by setting the first time lock and the second time lock, and setting the duration of the second time lock to be not greater than the duration of the first time lock, it is ensured as much as possible that the external blockchain to be connected to the target alliance chain uses the locking request to access the locking data in the first time lock, and the alliance chain feeds back the locking data to the external blockchain to be connected to the target alliance chain in the second time lock, thereby ensuring the security of data communication.
Optionally, the locking, by using the first hash value, the federation chain cross-link request and setting a valid first time lock, so as to enable cross-link data transmission between the external block chain to be accessed to the target federation chain and the federation chain, further includes: and enabling the external blockchain to be accessed into the target alliance chain to access the locking data without using a locking request in the first time lock, and/or terminating the cross-link data transmission between the external blockchain to be accessed into the target alliance chain and the alliance chain if the alliance chain is not used.
In this embodiment, the first time lock and the second time lock are time-efficient, and if the lock request is not used to access the lock data in the first time lock, and/or the lock data is fed back to the external block chain to be accessed to the target federation chain in the second time lock, the cross-link data transmission between the external block chain to be accessed to the target federation chain and the federation chain is immediately terminated, thereby further improving the security of the cross-link data.
FIG. 2 is a schematic structural diagram of a channel allocation apparatus across a federation chain according to an embodiment of the present application; as shown in fig. 2, it includes:
a first program element 201 for responding to a plurality of external blockchains to access a target federation chain;
a second program unit 202, configured to group multiple external blockchains to be accessed to the target federation chain, so as to obtain multiple external blockchain groups;
a third program unit 203, configured to map, for each external blockchain group, it into one virtual internal blockchain set of the federation chains;
a fourth program unit 204, configured to make a corresponding external blockchain group to be accessed to the target federation chain form one federation chain subnet of the target federation chain based on each virtual internal blockchain set;
a fifth program unit 205, configured to create a shared data channel for all external blockchains in each alliance chain subnet, where the shared data channels corresponding to the external blockchains in different alliance chain subnets are isolated from each other, so that all external blockchains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
Optionally, the fifth program element 205 is further configured to: determining the capacity value of the same shared data channel, the exclusive description value of the same shared data channel and the capacity extensible description value of the same shared data channel based on a channel isolation allocation model, matching with a plurality of external block chain groups, and determining the corresponding relation between the external block chain groups and the shared data channel; and establishing a shared data channel for all external block chains in each alliance chain subnet based on the corresponding relation between the external block chain group and the shared data channel, wherein the shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other, so that all external block chains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
Optionally, the fifth program element 205 is further configured to: determining a capacity value of the same shared data channel, an exclusive description value of the same shared data channel and a capacity extensible description value of the same shared data channel based on a channel isolation allocation model, and loading the capacity values into a created first container; and matching the capacity value of the shared data channel, the exclusive description value of the same shared data channel and the capacity extensible description value of the same shared data channel with a plurality of external block chain groups based on the first container, and determining the corresponding relation between the external block chain groups and the shared data channel.
Optionally, the fourth program unit 204 is further configured to: converting each virtual internal block chain set into an account book, and distributing corresponding account book identification; and adding the account book identification into the alliance chain, and enabling the corresponding external blockchain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain.
Optionally, the fifth program element 205 is further configured to: and creating a shared data channel for all external block chains in the alliance chain subnet, so that when any external block chain in the alliance chain subnet performs on-chain data interaction with the target alliance chain based on the same shared data channel, privatizing corresponding on-chain data, and isolating on-chain data targeted by the on-chain data interaction with other external block chains and the target alliance chain based on the same shared data channel.
Optionally, the fifth program element 205 is further configured to: all the external block chains in each alliance chain subnet are configured to be side chains, the alliance chains are configured to be main chains, cross-chain data transmission is carried out between all the external block chains in each alliance chain subnet and the alliance chains, and shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other.
Optionally, the fifth program element 205 is further configured to: responding to a alliance chain cross-chain request of any external blockchain in each alliance chain subnet, and generating a first random number by the external blockchain to be accessed into the target alliance chain; carrying out hash operation on the first random number to obtain a first hash value; and locking the alliance chain cross-link request by using the first hash value and setting a valid first time lock so as to enable the external block chain to be accessed into the target alliance chain to perform cross-link data transmission with the alliance chain.
Optionally, the fifth program element 205 is further configured to: sending a locking request obtained by locking the alliance chain crossing request by using the first hash value and a set effective first time lock to the alliance chain, and enabling the alliance chain to use the first random number to lock target data pointed by the alliance chain crossing request to obtain locking data and set effective second time lock, wherein the duration of the second time lock is not more than that of the first time lock; and the external block chain to be accessed into the target alliance chain is enabled to access the locking data by using a locking request in the first time lock, and the alliance chain feeds the locking data back to the external block chain to be accessed into the target alliance chain in the second time lock.
Optionally, the fifth program element 205 is further configured to: and enabling the external block chain to be accessed into the target alliance chain to access the locking data without using a locking request in the first time lock, and/or enabling the alliance chain not to feed the locking data back to the external block chain to be accessed into the target alliance chain in the second time lock, and terminating the cross-link data transmission between the external block chain to be accessed into the target alliance chain and the alliance chain.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application; as shown in fig. 3, it includes a memory 301 and a processor 302, the memory stores an executable program, and the processor executes the executable program and executes the following steps:
determining the unique identity of a plurality of external block chains to be accessed into a target alliance chain, and converting the identity of each external block chain to be accessed into the target alliance chain into the unique identity of a virtual internal block chain link point of the alliance chain according to a one-to-one corresponding relation;
enabling a plurality of external block chains to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain according to the unique identity of the virtual internal block chain node;
and creating a shared data channel for all external blockchains in the alliance chain subnet, so that all external blockchains in the alliance chain subnet perform on-chain data interaction with the target alliance chain based on the same shared data channel.
FIG. 4 is a schematic diagram of a hardware structure of an electronic device in an embodiment of the present application; as shown in fig. 4, the hardware structure of the electronic device may include: the electronic device 400 includes a computing unit 401 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 402 or a computer program loaded from a storage unit 406 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
A number of components in the electronic device 400 are connected to the I/O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 may be any type of device capable of inputting information to the electronic device 400, and the input unit 406 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. Output unit 407 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. The storage unit 404 may include, but is not limited to, a magnetic disk, an optical disk. The communication unit 409 allows the electronic device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
Computing unit 401 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 401 executes the respective methods and processes described above. For example, in some embodiments, the above steps may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 40. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 400 via the ROM 402 and/or the communication unit 409. In some embodiments, the computing unit 401 may be configured to perform the above steps in any other suitable manner (e.g., by means of firmware).
The electronic device of the embodiments of the present application exists in various forms, including but not limited to:
(1) Mobile communication devices, which are characterized by mobile communication capabilities and are primarily targeted at providing voice and data communications. Such terminals include smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) The ultra-mobile personal computer equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include PDA, MID, and UMPC devices, such as ipads.
(3) Portable entertainment devices such devices may display and play multimedia content. Such devices include audio and video players (e.g., ipods), handheld game consoles, electronic books, as well as smart toys and portable car navigation devices.
(4) The server is similar to a general computer architecture, but has higher requirements on processing capability, stability, reliability, safety, expandability, manageability and the like because of the need of providing highly reliable services.
(5) And other electronic devices with data interaction functions.
It should be noted that, in this specification, each embodiment is described in a progressive manner, and the same and similar parts between the embodiments are referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described embodiments of the apparatus and system are merely illustrative, and the modules illustrated as separate components may or may not be physically separate, and the components suggested as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only one specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should 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 (10)

1. A method for allocating channels of a federation chain across chains is characterized by comprising the following steps:
responsive to a plurality of external blockchains to access the target federation chain;
grouping a plurality of external block chains to be accessed into a target alliance chain to obtain a plurality of external block chain groups;
for each external blockchain group, mapping it to a set of virtual internal blockchains of the federation chains;
based on each virtual internal blockchain set, enabling the corresponding external blockchain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain;
and creating a shared data channel for all external block chains in each alliance chain subnet, wherein the shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other, so that all external block chains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
2. The method for allocating channels across alliance chains as claimed in claim 1, wherein the creating a shared data channel for all external block chains in each alliance chain subnet, and the shared data channels corresponding to external block chains in different alliance chain subnets are isolated from each other, so that all external block chains in the same group perform data interaction with the target alliance chain based on the same shared data channel comprises: determining the capacity value of the same shared data channel, the exclusive description value of the same shared data channel and the capacity extensible description value of the same shared data channel based on a channel isolation allocation model, matching with a plurality of external block chain groups, and determining the corresponding relation between the external block chain groups and the shared data channel; and establishing a shared data channel for all external block chains in each alliance chain subnet based on the corresponding relation between the external block chain group and the shared data channel, wherein the shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other, so that all external block chains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
3. The method of claim 2, wherein the determining, based on the channel isolation allocation model, a capacity value of a same shared data channel, a dedicated description value of a same shared data channel, and a capacity scalable description value of a same shared data channel, matching the capacity values with a plurality of external blockchain groups, and determining a correspondence between the external blockchain groups and the shared data channel comprises: determining a capacity value of the same shared data channel, an exclusive description value of the same shared data channel and a capacity extensible description value of the same shared data channel based on a channel isolation allocation model, and loading the capacity values into a created first container; and matching the capacity value of the shared data channel, the exclusive description value of the same shared data channel and the capacity extensible description value of the same shared data channel with a plurality of external block chain groups based on the first container, and determining the corresponding relation between the external block chain groups and the shared data channel.
4. A method for assigning a channel across federation chains according to claim 1, wherein the step of grouping the corresponding external blockchain groups to be accessed to the target federation chain into one federation chain subnet of the target federation chain based on each virtual internal blockchain set comprises: converting each virtual internal block chain set into an account book, and distributing corresponding account book identifiers; and adding the account book identification into the alliance chain, and enabling the corresponding external blockchain group to be accessed into the target alliance chain to form an alliance chain subnet of the target alliance chain.
5. The method for channel allocation across federation chains according to claim 1, wherein the creating a shared data channel for all external blockchains within the federation chain subnet such that all external blockchains within the federation chain subnet perform on-chain data interaction with the target federation chain based on the same shared data channel comprises: and creating a shared data channel for all external block chains in the alliance chain subnet, so that when any external block chain in the alliance chain subnet performs on-chain data interaction with the target alliance chain based on the same shared data channel, privatizing corresponding on-chain data, and isolating on-chain data targeted by the on-chain data interaction with other external block chains and the target alliance chain based on the same shared data channel.
6. The method for channel allocation across federation chains according to claim 1, wherein the creating a shared data channel for all external blockchains within each federation chain subnet, the shared data channels corresponding to external blockchains within different federation chain subnets being isolated from each other so that all external blockchains within the same group perform on-chain data interaction with the target federation chain based on the same shared data channel comprises: all the external block chains in each alliance chain subnet are configured to be side chains, the alliance chains are configured to be main chains, cross-chain data transmission is carried out between all the external block chains in each alliance chain subnet and the alliance chains, and shared data channels corresponding to the external block chains in different alliance chain subnets are isolated from each other.
7. The method for assigning channels across federation chains according to claim 6, wherein the enabling cross-chain data transmission between all external blockchains within each of the federation chain subnets and the federation chains comprises: responding to a alliance chain cross-chain request of any external blockchain in each alliance chain subnet, and generating a first random number by the external blockchain to be accessed into the target alliance chain; carrying out hash operation on the first random number to obtain a first hash value; and locking the alliance chain cross-link request by using the first hash value and setting a valid first time lock so as to enable the external block chain to be accessed into the target alliance chain to perform cross-link data transmission with the alliance chain.
8. The method for allocating channel across federation chains according to claim 7, wherein the using the first hash value to lock the federation chain cross-chain request and set a valid first time lock for cross-chain data transmission between the external block chain to be accessed to the target federation chain and the federation chain comprises: sending a locking request obtained by locking the alliance chain crossing request by using the first hash value and a set effective first time lock to the alliance chain, and enabling the alliance chain to use the first random number to lock target data pointed by the alliance chain crossing request to obtain locking data and set effective second time lock, wherein the duration of the second time lock is not more than that of the first time lock; and the block chain outside the target alliance chain to be accessed uses a locking request to access the locking data in the first time lock, and the alliance chain feeds the locking data back to the block chain outside the target alliance chain to be accessed in the second time lock.
9. The method for assigning channels across federation chains according to claim 8, wherein the using the first hash value to lock the federation chain cross-chain request and set a valid first time lock for cross-chain data transmission between the external blockchain to access the target federation chain and the federation chain further comprises: and enabling the external block chain to be accessed into the target alliance chain to access the locking data without using a locking request in the first time lock, and/or enabling the alliance chain not to feed the locking data back to the external block chain to be accessed into the target alliance chain in the second time lock, and terminating the cross-link data transmission between the external block chain to be accessed into the target alliance chain and the alliance chain.
10. A federation chain inter-chain channel allocation apparatus, comprising:
a first program element for responding to a plurality of external blockchains to access a target federation chain;
a second program unit, configured to group multiple external blockchains to be accessed to the target alliance chain, so as to obtain multiple external blockchain groups;
a third program element for mapping each external blockchain group to a set of virtual internal blockchains of the federation chain;
a fourth program unit, configured to enable a corresponding external blockchain group to be accessed to the target federation chain to form one federation chain subnet of the target federation chain based on each virtual internal blockchain set;
and a fifth program unit, configured to create a shared data channel for all external blockchains in each alliance chain subnet, where shared data channels corresponding to external blockchains in different alliance chain subnets are isolated from each other, so that all external blockchains in the same group perform on-chain data interaction with the target alliance chain based on the same shared data channel.
CN202211234522.9A 2022-10-10 2022-10-10 Channel allocation method and device for league chain cross-chain and electronic equipment Pending CN115617907A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211234522.9A CN115617907A (en) 2022-10-10 2022-10-10 Channel allocation method and device for league chain cross-chain and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211234522.9A CN115617907A (en) 2022-10-10 2022-10-10 Channel allocation method and device for league chain cross-chain and electronic equipment

Publications (1)

Publication Number Publication Date
CN115617907A true CN115617907A (en) 2023-01-17

Family

ID=84862655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211234522.9A Pending CN115617907A (en) 2022-10-10 2022-10-10 Channel allocation method and device for league chain cross-chain and electronic equipment

Country Status (1)

Country Link
CN (1) CN115617907A (en)

Similar Documents

Publication Publication Date Title
CN102202289B (en) Method and system for remote calling software and hardware resources through mobile terminal
WO2020173287A1 (en) Systems and methods for determining network shards in blockchain network
CN111163130A (en) Network service system and data transmission method thereof
CN103002517A (en) Data transmission method and data terminal
CN107888351B (en) Reference signal sending method, reference signal processing method and equipment
CN115617907A (en) Channel allocation method and device for league chain cross-chain and electronic equipment
CN115269056A (en) Encryption module plug-in method and device based on class loader and related product
CN116647843A (en) Method and system for zero-trust dynamic access authentication
CN115270161A (en) Encryption method and device based on encryption plug-in and related product
CN115766336A (en) Resource allocation method, device, equipment and storage medium
CN115632788A (en) Dynamic access method and device for nodes in alliance chain and electronic equipment
CN116032482A (en) Multi-channel cross-link linking method and device for alliance chains and electronic equipment
CN114092101A (en) Transaction verification method and device, storage medium and electronic equipment
CN113919511A (en) Federal learning method and device
CN115630394A (en) League chain cross-link method and device and electronic equipment
CN115618411A (en) Access method and device for shared data in alliance chain and electronic equipment
CN107454021B (en) Communication method and device
CN115618382A (en) Storage method and device for shared data in alliance chain and electronic equipment
CN104618421A (en) Method and device for distributing storage resources
CN103442094A (en) Server address allocating method and relative devices and systems
CN113992757B (en) Storage resource sharing management method and device in heterogeneous network and related products
CN115906150A (en) Method and device for accessing sensitive data in alliance chain and electronic equipment
CN115618383A (en) Method and device for storing sensitive data in alliance chain and electronic equipment
CN104396207B (en) The method and apparatus for realizing multi-display access
CN113992572A (en) Routing method, device and related product of shared storage resource path in heterogeneous network

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