Multi-blockchain load balancing method, gateway and construction data management system

By comprehensively considering the node resource utilization rate and transaction matching degree, the node overload problem is solved, and efficient transaction processing and data flow of the blockchain system is realized.

CN120416246BActive Publication Date: 2025-08-29HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510911025.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-08-29
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

Traditional blockchain load balancing methods cannot consider the actual affordability of nodes in real time, resulting in overloading of certain nodes, affecting system efficiency, and may lead to delays when handling key transaction tasks.

Method used

By weighted summing the basic resource utilization, network score and historical reliability of multi-blockchain nodes, calculating dynamic weights based on transaction queue length, combining transaction resource requirements with node resource matching degree, comprehensive allocation priority, and using a consistent hash ring mechanism and resource reassignment adjustment to ensure that transactions are allocated to appropriate nodes.

Benefits of technology

Load balancing of the blockchain system is realized, ensuring that transactions can be processed in a timely and effective manner, avoiding backlogs, and improving overall efficiency and efficient flow of engineering data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120416246B_ABST
    Figure CN120416246B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of blockchain related technology, and discloses a multi-blockchain load balancing method, a gateway, and a construction data management system. The load balancing method includes: calculating the comprehensive performance index P of the blockchain node i i ; Comprehensively consider the comprehensive performance index P of node i i and its queue waiting situation, and obtain the dynamic weight W of node i i ; Calculate transaction tx j The matching degree between the required resource intensity and the existing resource intensity of each node i is used to obtain the node i’s response to transaction tx j The matching score S ij ; Comprehensive dynamic weight W i and matching score S ij , get node i for transaction tx j The comprehensive allocation priority F ij Endorsing nodes are assigned to transactions based on their overall priority. This process takes into account both the load on each node and the resource matching between transactions and nodes. This ensures that data is processed and uploaded to the blockchain in a timely and efficient manner, achieving blockchain load balancing and improving overall efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field related to blockchain, and more specifically, relates to a multi-blockchain load balancing method, a gateway, and a construction data management system. Background Art

[0002] With the development of science and technology, blockchain, with its core characteristics of open, transparent, traceable, and tamper-proof data, has become a major force driving the development of information technology in my country. With the widespread application of blockchain technology and the increasing complexity of actual business scenarios, especially in the construction industry, the scale of information data involving personnel, machinery, materials, methods, and the environment is also growing. Blockchain systems need to be able to handle high-concurrency transactions to meet growing business needs.

[0003] However, for highly concurrent transactions, traditional transaction allocation methods based on static rules or simple algorithms fail to take into account the actual capacity of blockchain nodes in real time, easily leading to node overload and affecting the overall efficiency of the system. Furthermore, if important transaction tasks (such as engineering changes and fund payments) are not handled promptly, they can lead to delays in critical tasks, impacting project schedules and cost control. Summary of the Invention

[0004] In response to the above-mentioned defects or improvement needs of the existing technology, the present invention provides a multi-blockchain load balancing method, gateway and construction data management system, the purpose of which is to assign corresponding nodes to transaction tasks according to the actual status of the nodes, achieve blockchain load balancing, and improve overall efficiency.

[0005] To achieve the above objectives, the present invention provides a multi-blockchain load balancing method in a first aspect, which includes:

[0006] Perform weighted summation of multiple dimensions of node i in multiple blockchains to obtain the comprehensive performance index P of node i i The indicators of the multiple dimensions include the basic resource availability, network score, and historical reliability of node i. The basic resource availability includes the processor availability, memory availability, and the proportion of time when the disk is not performing read and write operations. The network score is negatively correlated with the network latency of the corresponding node, and the historical reliability is negatively correlated with the failure frequency of the corresponding node. i is the index of the currently selectable node.

[0007] 1-T i / T max As the queue waiting coefficient of node i, the comprehensive performance index P of node i is i Multiplying it by the queue waiting coefficient of node i, we get the dynamic weight W of node i i , where T iis the current transaction queue length of node i, T max The current maximum transaction queue length among all optional nodes;

[0008] Calculate transaction tx j The matching degree between the required resource intensity and the existing resource intensity of each node i is used to obtain the node i’s response to transaction tx j The matching score S ij ; j is the index of the transaction;

[0009] Comprehensive dynamic weight W i and matching score S ij , get node i for transaction tx j The comprehensive allocation priority F ij ; F ij With dynamic weight W i and matching score S ij Any one of them is positively correlated;

[0010] The corresponding transactions are assigned to the endorsing nodes according to the comprehensive allocation priority of each transaction.

[0011] Optionally, the calculation transaction tx j The matching degree between the required resources and the existing resources of each node i includes:

[0012] Construct transaction tx j The demand resource vector r j :

[0013] r j =[r j1 ,r j2 ,…,r jn ];

[0014] Construct the existing resource vector c of node i i :

[0015] c i =[c i1 ,c i2 ,…,c in ];

[0016] Compute the required resource vector r j and the existing resource vector c i The cosine similarity of ij ;

[0017] Where r jk Indicates transaction tx j The intensity of demand for the kth resource, c ik It represents the available intensity of node i for the kth type of resource, and n is the number of resource categories.

[0018] Optionally, the comprehensive allocation priority F ij The calculation formula is:

[0019] F ij =W i ×S ij .

[0020] Optionally, allocating nodes to corresponding transactions according to the comprehensive allocation priority of each transaction includes:

[0021] According to the comprehensive allocation priority of each transaction, the consistent hash ring mechanism is combined to allocate nodes to the corresponding transactions.

[0022] Optionally, the method further includes: monitoring whether there is an overloaded node whose load exceeds its load threshold; if there is an overloaded node i, performing resource reallocation and dynamic adjustment, wherein the resource reallocation and dynamic adjustment include:

[0023] Redistribute transactions of node i that exceed its load threshold to other optional nodes that are not overloaded. The larger the current dynamic weight of other optional nodes, the more transactions will be redistributed to them.

[0024] Optionally, the redistribution formula is:

[0025] ;

[0026] Among them, ΔT is the number of transactions that node i needs to transfer to other nodes, ΔT ij It refers to the number of transactions transferred from node i to node j.

[0027] In a second aspect of the present invention, a gateway is provided, which includes a load balancing module, wherein the load balancing module is used to execute the multi-blockchain load balancing method as described in any one of the above items when a transaction request is received.

[0028] Optionally, the gateway further includes:

[0029] The user rights management module is used to submit a registration application to the corresponding blockchain upon receiving a user's registration request and determine the corresponding user's rights based on the information fed back by the blockchain, and to verify the user's rights upon receiving a user's application for access to the blockchain;

[0030] The data upload module is used to send the original data to be uploaded to the corresponding storage space and obtain the download address of the original data in the storage space, generate a data summary of the original data, and submit the download address and data summary to the blockchain;

[0031] Information retrieval module, used to search for corresponding content based on the query keywords entered by the user;

[0032] The data verification module is used to recalculate the hash value of the downloaded data obtained by the user using the hash algorithm used for data on-chain, and compare the recalculated hash value with the hash value when it was uploaded to the chain to see if they are consistent. If they are consistent, the verification is successful; otherwise, the verification fails.

[0033] Data interaction and transmission module, used to realize information interaction between blockchain networks.

[0034] In a third aspect, the present invention provides a blockchain-based construction data management system, which includes: a blockchain system composed of a blockchain network and the gateway as described above, and each blockchain network has a corresponding gateway.

[0035] Optionally, the management system has a government blockchain system and a project blockchain system, the government blockchain system includes a government-supervised blockchain network, and the project blockchain system includes multiple project blockchain networks. Different project blockchain networks are used to manage data of different projects in construction, and each blockchain network contains multiple blockchains.

[0036] In general, the above technical solutions conceived by the present invention have the following beneficial effects compared with the prior art:

[0037] The multi-blockchain load balancing method proposed in the present invention first calculates the comprehensive performance indicators of each node based on the basic resources of each node. At the same time, it also considers the transaction queue situation of the node, and comprehensively considers the transaction queue situation of the node and the comprehensive performance indicators of the node to calculate the dynamic weight of the node. The node with a higher weight is more suitable for continuing to receive and process new data. In addition, the resource requirements of the transaction are matched with the resources of the node to obtain a matching score. The higher the resource matching degree, the higher the matching score, which means that the node is more suitable for the transaction. Finally, the dynamic weight and matching score are comprehensively considered to obtain the comprehensive allocation priority of the node for the transaction. Since the above process takes into account both the load situation of each node and the resource matching situation between the transaction and the node, the transaction can be assigned to the processing node based on the comprehensive allocation priority, which can ensure that the data can be processed and uploaded to the chain in a timely and effective manner, avoiding the backlog of transactions at a certain node, ensuring the efficient flow of engineering data, realizing blockchain load balancing, and improving overall efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 This is a flowchart of the steps of a multi-blockchain load balancing method in one embodiment of the present invention.

[0039] Figure 2 It is a structural framework diagram of a gateway in one embodiment of the present invention.

[0040] Figure 3This is an architectural diagram of a blockchain-based construction data management system in one embodiment of the present invention.

[0041] Figure 4 This is a workflow diagram of the load balancing module in the gateway in one embodiment of the present invention.

[0042] Figure 5 This is a workflow diagram of a user rights management module in a gateway in one embodiment of the present invention.

[0043] Figure 6 This is a workflow diagram of the data uplink module in the gateway in one embodiment of the present invention.

[0044] Figure 7 This is a workflow diagram of the information retrieval module in the gateway in one embodiment of the present invention.

[0045] Figure 8 This is a workflow diagram of a data verification module in a gateway in one embodiment of the present invention.

[0046] Figure 9 This is a workflow diagram of a data interaction transmission module in a gateway in one embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

[0048] Example 1

[0049] For example, in construction projects, participants need to submit or process large amounts of data through blockchains. Consequently, the load on each node in the blockchain fluctuates in real time. This paper proposes a multi-blockchain load balancing method that allocates appropriate nodes to the current transaction volume based on the current load of each node in the blockchain.

[0050] like Figure 1 The figure shows a flowchart of the steps of the multi-blockchain load balancing method according to one embodiment of the present invention. The main steps are described in detail below.

[0051] S1. Perform weighted summation of multiple dimensions of indicators of node i in multiple blockchains to obtain the comprehensive performance index P of node i. i; The indicators in multiple dimensions include the basic resource availability, network score and historical reliability of node i. Among them, the basic resource availability includes the processor availability, memory availability and the proportion of time when the disk is not performing read and write operations. The network score is negatively correlated with the network delay of the corresponding node, and the historical reliability is negatively correlated with the failure frequency of the corresponding node. i is the index of the current optional node.

[0052] Specifically, we can first calculate the utilization rate R of the basic resources of node i i , then the availability of basic resources of node i is 1-R i .

[0053] In one embodiment, the utilization rate R i It is the weighted sum of CPU utilization, memory utilization, and IO utilization of node i. The calculation formula is as follows:

[0054] R i =α CPU ×U i CPU +α MEM ×U i MEM +α IO ×U i IO ;

[0055] Among them, U i CPU 、U i MEM 、U i IO They represent the CPU utilization, memory utilization, and IO utilization of node i, respectively, and each weight coefficient satisfies α CPU +α MEM +α IO =1.

[0056] Specifically, the network score of node i is negatively correlated with the network delay of node i.

[0057] In one embodiment, the network delay l of node i can be measured i , use the exponential decay function to obtain the network score N of node i i , the calculation formula is as follows:

[0058] ;

[0059] Among them, the sensitivity coefficient λ>0 is the set value used to adjust the network score N i With network delay i Sensitivity to change.

[0060] Specifically, the historical reliability of node i is negatively correlated with the failure frequency of node i.

[0061] In one embodiment, the historical reliability index Rel corresponding to node i can be obtained based on its historical performance. i , the calculation formula is as follows:

[0062] Rel i =(MTBF i ) / (MTBF i +MTTR i );

[0063] Among them, MTBF i Refers to the mean time between failures of node i, MTTR i It refers to the average repair time of node i.

[0064] Based on the basic resource utilization R of node i i , network score N i And the historical reliability index Rel i , the comprehensive performance index P of node i is obtained by fusion i , the calculation formula is as follows:

[0065] P i =γ1·(1-R i )+γ2·N i +γ3·Rel i ;

[0066] Among them, the weight coefficients γ1, γ2, and γ3 satisfy γ1+γ2+γ3=1.

[0067] S2, 1-T i / T max As the queue waiting coefficient of node i, the comprehensive performance index P of node i is i Multiplying it by the queue waiting coefficient of node i, we get the dynamic weight W of node i i , where T i is the current transaction queue length of node i, T max The current maximum transaction queue length among all selectable nodes.

[0068] Specifically, we need to further consider the transaction queue of node i and introduce the current transaction queue length T of node i. i , calculate the current queue waiting coefficient of node i 1-T i / T max , comprehensively considering the queue waiting coefficient of node i and the comprehensive performance index P of node i i , calculate the dynamic weight W of node i i , the calculation formula is as follows:

[0069] W i =P i ·(1-T i / T max );

[0070] Among them, T i Represents the current transaction queue length of node i, T max Represents the maximum transaction queue length of all optional nodes at the current moment. When the current transaction queue of node i is short, the weight W i The higher it is, the more suitable it is to assign transactions to node i.

[0071] For example, when a construction unit frequently uploads construction logs or submits settlement monitoring data, the processing capabilities of these nodes will be evaluated and a corresponding weight will be assigned to each node. The node with the higher weight will be more suitable for continuing to receive and process new data.

[0072] S3. Calculate transaction tx j The matching degree between the required resource intensity and the existing resource intensity of each node i is used to obtain the node i’s response to transaction tx j The matching score S ij ; j is the index of the transaction.

[0073] For example, in a deep foundation pit project, monitoring units are required to regularly upload foundation pit monitoring data, while construction units submit daily progress reports. Construction logs are large in volume, while settlement monitoring data is relatively small and frequent. Therefore, it is necessary to calculate a matching score between each transaction and node based on the processing requirements of the data type and the node's current load capacity to ensure that data is submitted to the most appropriate node.

[0074] In one embodiment, node i has a transaction tx j The matching score S ij The specific method is as follows:

[0075] Construct transaction tx j The demand resource vector r j :

[0076] r j =[r j1 ,r j2 ,…,r jn ];

[0077] Where r jk Indicates transaction tx j The intensity of demand for the kth resource, where n is the number of resource categories. Resources here include, for example, computing power, storage capacity, network bandwidth, processing latency, security level, and fault tolerance and reliability requirements;

[0078] Construct the existing resource vector c of node i i :

[0079] c i =[c i1 ,c i2 ,…,c in ];

[0080] Where c ik represents the available intensity of node i for the kth type of resource;

[0081] Compute the required resource vector r j and the existing resource vector c i The cosine similarity of ij ; The calculation formula is as follows:

[0082] .

[0083] S4, comprehensive dynamic weight W i and matching score S ij , get node i for transaction tx j The comprehensive allocation priority F ij ; F ij With dynamic weight W i and matching score S ij Any one of them is positively correlated.

[0084] Specifically, the present invention integrates the dynamic weight W i and matching score S ij , get node i for transaction tx j The comprehensive allocation priority F ij For example, when the construction unit and the monitoring unit upload and submit a large amount of data (such as construction personnel information and settlement data) at the same time, the present invention will evaluate the load of each node in the blockchain and select the node with lower load (i.e., larger W i ) and have a high resource matching degree (i.e. a higher matching score S ij ) nodes to ensure that data can be processed and uploaded to the chain in a timely and effective manner. This process avoids the backlog of transactions at a certain node and ensures the efficient flow of engineering data. In the actual calculation process, the dynamic weight W is first calculated based on the real-time load status of the node. i , to reflect the current overall processing capacity of node i, and at the same time, to obtain transaction tx j Matching score S with node i ij , in order to quantify the adaptability of the two in terms of resource demand and supply. Finally, based on the two, we can get the node i’s response to transaction tx j The comprehensive allocation priority F ij .

[0085] Among them, the dynamic weight W i and matching score S ij The comprehensive method can be summation, product or exponential operation, which in principle satisfies the dynamic weight W i and matching score S ij When any of the items increases, the overall allocation priority F will increase. ij .

[0086] In this embodiment, the method of multiplying the two is selected to calculate the comprehensive allocation priority F ij , which is calculated as follows:

[0087] F ij =W i ×S ij .

[0088] S5. Allocate the corresponding transactions to the endorsing nodes based on the comprehensive allocation priority of each transaction.

[0089] Specifically, for each current transaction, after obtaining the comprehensive allocation priority of each node for the transaction, allocation can be made based on the priority.

[0090] In some embodiments, a transaction may be directly assigned to the node with the highest overall assignment priority, so that assignment can be completed quickly.

[0091] In some embodiments, considering that the same node may serve as the node with the highest comprehensive allocation priority for multiple transactions at the same time, if multiple transactions are allocated to the node, it may cause the node to be instantly overloaded. Based on this, after obtaining the comprehensive allocation priority of each transaction, this embodiment further introduces the following consistent hash ring (HashRing) mechanism to implement node allocation.

[0092] First, based on the comprehensive allocation priority, the transaction tx in multiple chains j Initially select the top d nodes with the highest priority for comprehensive allocation and make a transaction tx j The candidate node set CN(t) at the current time t.

[0093] Second, for each node i in the candidate node set CN(t), calculate the number of virtual nodes V corresponding to the node i on the hash ring i (t), the calculation formula is as follows:

[0094] ;

[0095] Where N total The total number of nodes is set (for example, 100 virtual nodes are allocated per batch). The number is rounded down and added to ensure that at least one virtual node can be allocated.

[0096] Third, for each node i in the candidate node set CN(t), generate V i (t) unique identifiers of virtual nodes on the corresponding hash ring (such as chainID_node_i_v1, chainID_node_i_v2,...), calculate the hash value of the unique identifier of each virtual node, map it to the hash ring space, and calculate the transaction tx j The hash value H(tx j ), and also map it to the hash ring space.

[0097] Fourth, search the hash ring space clockwise for the first value greater than or equal to H(tx j ) virtual node, and use its corresponding physical node as the transaction tx j The assigned endorsing peers.

[0098] In one embodiment, even though a consistent hash ring mechanism is introduced, it still introduces a certain random factor, which is uncontrollable. In some cases, node overload may still occur. Therefore, it is impossible to completely guarantee that the node will not be overloaded. Based on this, this embodiment further introduces a resource reallocation and dynamic adjustment mechanism, namely:

[0099] Monitor whether there are overloaded nodes whose load exceeds their load threshold. If there is an overloaded node i, resource reallocation and dynamic adjustment are performed. Resource reallocation and dynamic adjustment include:

[0100] Redistribute transactions of node i that exceed its load threshold to other optional nodes that are not overloaded. The larger the current dynamic weight of other optional nodes, the more transactions will be redistributed to them.

[0101] During the supervision of deep foundation pit projects, the frequency of data submission may change with the progress of construction and the increase of monitoring frequency. When it is detected that the load of a certain node is too high (for example, the monitoring unit frequently uploads settlement monitoring data, causing excessive pressure on a certain node), the resource reallocation and dynamic adjustment mechanism will be automatically triggered to reallocate some transactions to other nodes with lower loads. Specifically, if it is detected that the load of node i exceeds the load threshold (T i >T th ), triggering resource reallocation and dynamic adjustment. The migration amount can be allocated according to the dynamic weight ratio of other nodes. For example, if the monitoring unit frequently uploads sedimentation data, causing a node to be overloaded, some transactions will be migrated to idle nodes with higher weights:

[0102] ΔT=T i -T th ;

[0103] ;

[0104] Among them, ΔT is the number of transactions that node i needs to transfer to other nodes, ΔT ij It refers to the number of transactions transferred from node i to node j with lower load.

[0105] Example 2

[0106] Accordingly, the present invention also claims protection for a gateway, which may be a hardware device or a software system, and which includes at least a load balancing module, which is used to execute the multi-blockchain load balancing method described above when receiving a transaction request.

[0107] like Figure 2 The figure shows a structural framework diagram of a gateway in one embodiment of the present invention. In one embodiment, the gateway includes not only a load balancing module, but also a user authority management module, a data uplink module, an information retrieval module, a data verification module and a data interactive transmission module.

[0108] Among them, the load balancing module is used to implement the multi-blockchain load balancing method in Example 1.

[0109] When a client initiates multi-party, high-concurrency transaction requests, the gateway's load balancing module calculates each node's dynamic weight based on the blockchain configuration and its current load, as well as its matching score for the transaction. The combined dynamic weight and matching score determine the optimal node for each transaction. Furthermore, the gateway monitors the load of each node and, if a node is overloaded, reallocates resources and dynamically adjusts them.

[0110] The user rights management module is used to submit a registration application to the corresponding blockchain when receiving a user's registration request and determine the corresponding user's rights based on the information fed back by the blockchain, as well as verify the user's rights when receiving a user's application for access to the blockchain.

[0111] The data on-chain module is used to send the original data to be on-chain to the corresponding storage space and obtain the download address of the original data in the storage space, as well as generate a data summary of the original data, and submit the download address and data summary to the blockchain.

[0112] The information retrieval module is used to search for corresponding content based on the query keywords entered by the user.

[0113] The data verification module is used to recalculate the hash value of the downloaded data obtained by the user using the hash algorithm used for data on-chain, and compare the recalculated hash value with the hash value when it was uploaded to the chain to see if they are consistent. If they are consistent, the verification is successful, otherwise, the verification fails.

[0114] The data interaction and transmission module is used to realize information interaction between blockchain networks.

[0115] The specific working implementation methods of each module can be found in the following introduction.

[0116] Example 3

[0117] Accordingly, the present invention also claims protection for a blockchain-based construction data management system, a blockchain system composed of a blockchain network and the gateway introduced above, each blockchain network having a corresponding gateway.

[0118] In one embodiment, the management system comprises a government blockchain system and a project blockchain system. The government blockchain system includes a government regulatory blockchain network, while the project blockchain system comprises multiple project blockchain networks. These different project blockchain networks are used to manage data for different construction projects, each containing multiple blockchains. The government blockchain system and the project blockchain system constitute a "1+N" multi-chain parallel blockchain system.

[0119] like Figure 3 Shown is an architectural diagram of a blockchain-based construction data management system in one embodiment of the present invention.

[0120] The management system includes project blockchain system, government regulatory blockchain system and gateway.

[0121] The project blockchain system includes N project blockchain networks, which are used to store relevant business data.

[0122] In construction engineering scenarios, data required for supervision and key project data are categorized and stored, enabling data isolation and privacy protection across different participants and projects, ensuring data security and integrity. The project blockchain encompasses multiple nodes, allowing all parties involved—including construction companies, designers, contractors, supervisors, and third-party testing companies—to register and join. This provides a secure and reliable data exchange platform for engineering projects, fostering collaboration and information sharing among all parties involved.

[0123] The government regulatory blockchain system includes a regulatory blockchain network for processing corresponding transactions in parallel.

[0124] In the construction project scenario, government regulators must complete a registration process when joining a government-led regulatory blockchain network. Subsequently, they submit regulatory requests to the project blockchain network to obtain necessary regulatory data. In response, the project blockchain network provides the corresponding regulatory data files to support regulatory oversight and review. This helps government regulators achieve real-time dynamic monitoring of deep foundation pit construction processes, effectively improving regulatory efficiency and the reliability of information sharing.

[0125] Gateways not only enable user and data management within a blockchain network but also facilitate interaction between multiple blockchain networks, acting as a "gateway" between two networks, allowing data to flow between them. Gateway functionality can be customized to meet the specific needs of the platform.

[0126] In this embodiment, given the diversity of engineering scenarios and their varying requirements for engineering data management models, multiple blockchain systems need to be designed based on these diverse scenarios. In the deep foundation pit supervision business, addressing the government's need for multi-project oversight and the operational independence between different projects, the design concept of dedicated blockchains and multi-chain coexistence is used to divide different functions or phases within the business scenario onto separate blockchains. A government blockchain network and multiple independent project blockchain networks are constructed, forming a "1+N" multi-chain parallel consortium chain system. The government blockchain system submits regulatory requirements to the project blockchain system, obtains necessary regulatory data, and implements project compliance oversight and auditing. Each project blockchain network can record a variety of project-related information, covering multi-dimensional elements such as personnel, machinery and equipment, materials, processes, and the environment. This information is uploaded to the object storage service platform in the form of multimodal data such as text, images, video, audio, and BIM model files. Only key feedback information is stored on-chain to achieve data traceability, forming a complete construction project management ecosystem. Personnel information management not only includes verifying the relevant certificates of specialized operations personnel but also covers whether workers' ages comply with legally mandated maximum working ages. It also records staff transfers between projects, ensuring that every worker involved in construction possesses the necessary qualifications and complies with applicable regulations. Machinery and equipment information encompasses the status, performance, and entry and exit records of on-site equipment. For example, records of the entry and exit of machinery and equipment across projects enable effective tracking of equipment efficiency and maintenance status. Material information includes quality standards, specifications, and performance indicators for building materials, ensuring that all used materials meet relevant specifications. It also records information on construction waste disposal, with detailed records of waste generation, classification, storage, transportation, and final disposal being uploaded to the project blockchain. Process information management encompasses production process flows, work instructions, quality control plans, and inspection standards, ensuring that the entire construction process adheres to established specifications and standards. In terms of environmental information management, attention needs to be paid to the potential impact of construction on surrounding buildings and the environment. For example, foundation pit settlement should be monitored to prevent potential impacts on surrounding buildings during urban construction, and environmental monitoring reports should be generated regularly for review and evaluation by government regulatory authorities.

[0127] In one embodiment, each gateway integrates a user authority management module, a load balancing module, a data uploading module, an information retrieval module, a data verification module and a data interactive transmission module.

[0128] The multi-chain load balancing module uses a load balancing algorithm to intelligently determine which blockchain node to allocate transactions, such as uploads and downloads, to maintain overall system performance and stability. This module monitors the load status of each chain's nodes in real time (such as transaction queue backlogs and resource utilization), and analyzes node-task compatibility based on transaction characteristics to achieve transaction allocation. Furthermore, it selects high-potential candidate nodes based on dynamic weights and compatibility scores, and employs a consistent hashing ring method to select nodes and assign transaction requests to appropriate nodes for processing. Furthermore, when node load deviates from a threshold, an elastic resource reallocation strategy is triggered, migrating overloaded tasks to less-loaded nodes.

[0129] like Figure 4 FIG. 1 is a flowchart showing the working process of the load balancing module in the gateway in one embodiment of the present invention.

[0130] In actual business processes, as the various modules of the gateway perform their corresponding operations, the load balancing module monitors the load status of each blockchain in real time and, based on the load balancing method described above, intelligently allocates transactions such as data uploads to the appropriate blockchain node. This process ensures that the system maintains operational stability and rapid response even under high load conditions, effectively avoiding resource bottlenecks.

[0131] The user rights management module can include two independent computing engines: one responsible for managing user permissions within their blockchain network, ensuring that users can only perform the specific operations for which they are authorized; the other engine is responsible for handling cross-network business permission interaction management. In a multi-blockchain network environment, business processes often need to span different networks. When cross-network business needs arise, this engine can synchronize user permissions between the source and target networks, acting as a bridge between different networks to ensure the consistency and security of user permissions when operating across networks.

[0132] like Figure 5 Shown is a workflow diagram of a user rights management module in a gateway in one embodiment of the present invention.

[0133] Government regulators, as well as project stakeholders such as construction companies, designers, contractors, and third-party testing companies, submit applications for node registration to the corresponding blockchain through the gateway. The blockchain's Registration Authority (RA) will conduct a rigorous review of these users' identities to verify that the identity information they submit is consistent with their stated identity.

[0134] After authentication is successful, the registration authority forwards the user's certificate registration request to the Certificate Authority (CA). The CA is responsible for issuing digital certificates for each registered node and feeding them back to the gateway. These certificates contain the certificate holder's identity information, such as name, organization, position, etc.

[0135] The gateway confirms the identity and authority of each party based on the certificate content and determines the type of data the party can access and the operations it can perform.

[0136] The data on-chain module is responsible for uploading data to the blockchain. Data on-chain comes from two main sources: user-uploaded data and cross-blockchain network data. When the system directly receives business data uploaded by internal users, it must first verify the user's identity and permissions using the internal user operation permission management engine within the user management permission module. The raw data is then pre-processed using lightweight operations and hash calculations. When receiving data transmitted from other blockchain networks to this network, this data is already processed as critical data and can be directly labeled with attributes such as data source and type. After completing pre-on-chain operations for both types of data, the multi-chain load balancing module calculates and selects the optimal on-chain method to improve the performance of the data on-chain processing process.

[0137] like Figure 6 FIG2 is a flowchart showing the working process of the data uplink module in the gateway in one embodiment of the present invention.

[0138] In a construction project, all parties involved (such as the construction company, design company, construction company, and third-party testing company) will send the original data to be uploaded to the chain to the gateway after passing the authority authentication. Then, through the OSS object storage cloud service platform, the multi-dimensional and multi-modal original supervision data covering factors such as personnel, machinery, materials, methods, and environment will be uploaded to the corresponding storage space (Bucket) in the form of objects (Object). After the upload is successful, the OSS platform will return the access domain name (Endpoint) of the data, that is, the URL used to store the data, which will serve as the unique location address for all parties to access the data in the subsequent stages;

[0139] The gateway uses a hash algorithm (such as SHA-256) to process the original data and generate a data digest;

[0140] The gateway uploads the transaction, including key information such as the data summary and the URL of the OSS storage, to the project blockchain to ensure data security and traceability. This information is stored on the blockchain, and only authorized users (such as government regulators, construction companies, or third-party testing agencies) can access and verify it.

[0141] In one embodiment, key information includes a gateway ID, data digest, unique identifier, OSS storage URL, timestamp, and signature. This key information is standardized and encapsulated to form a complete transaction proposal. For example, the original data is first hashed using a hash algorithm (such as SHA-256) to generate a fixed-length data digest, ensuring data uniqueness and integrity. Next, this key information is structured and organized using metadata such as the gateway ID (which serves as the unique identifier of the data gateway), the unique identifier, the URL returned by the OSS storage platform (which points to the original data storage location), and the timestamp (which records the specific time the data was uploaded to the blockchain), creating a standardized data structure. This data structure is then signed using digital signature technology to generate a digital signature field (sign) to verify the data's source legitimacy and ensure tamper-proofing. Finally, the encapsulated data structure is uploaded to the blockchain network, forming a secure, traceable, and tamper-proof transaction (Tx). The transaction data structure, as shown in the table above, includes core fields such as the gateway ID, data digest, unique identifier, OSS storage URL, timestamp, and signature, ensuring the integrity and credibility of the uploaded data and enabling efficient subsequent retrieval and verification.

[0142]

[0143] To achieve lightweight on-chain storage of engineering data, only the aforementioned key information needs to be uploaded to the blockchain for storage, ensuring data immutability and traceability. Other engineering data-related information, such as business extension fields (e.g., file name or file ID, data type, device tag), chainID (indicating which blockchain the engineering data is stored on), and transaction hash value (a unique key associated with blockchain transactions), is collated and uploaded to a MySQL database for storage. During subsequent searches, by querying fields such as file name or data type, users can obtain the corresponding transaction hash (tx_hash) and chain ID (chainID), thereby locating the specific blockchain where the data is stored. Based on the transaction hash, users can retrieve transaction information, obtain the OSS storage address, and data summary for subsequent integrity verification, meeting the project's data traceability and query requirements in various scenarios.

[0144] The information retrieval module provides users with a powerful and secure query interface, allowing authorized users to retrieve various types of information stored on the chain, including but not limited to transaction records, smart contract execution results, permission certificates, data modification history, and user interaction logs. Before providing query services, this module will work closely with the user management permission module to verify user identity, thereby ensuring that only authorized users can access specific sensitive information.

[0145] like Figure 7FIG. 1 is a flowchart showing the working process of the information retrieval module in the gateway in one embodiment of the present invention.

[0146] Authentication: Before a user can begin a retrieval operation, they must authenticate themselves through the User Rights Management Module to verify their identity and permission level, confirming whether all parties involved have the appropriate permissions to access data on the project blockchain or government regulatory chain. If the verification is successful, the User Rights Management Module will grant a temporary access token, allowing the user to perform subsequent operations;

[0147] Submitting a search request: After completing identity verification, users can submit a data search request through the search interface. Users can enter various parameters to retrieve information related to construction projects, such as keywords, date ranges for foundation pit monitoring reports, and transaction hash values. Search requests are sent to the information retrieval module for processing via the system interface or API. Multi-dimensional query combinations are supported to improve search efficiency and accuracy.

[0148] When a user's search request involves multiple blockchain networks, the information retrieval module can activate a cross-chain search coordination mechanism. By communicating with the gateways of different blockchain networks, the search request is distributed to the relevant chains, initiating queries across multiple blockchain networks and accurately returning relevant data on each blockchain network.

[0149] Users will receive a summary of the search results and can view or download some or all of the data they need.

[0150] The data verification module uses hashing to verify that the data downloaded by the user has not been tampered with during transmission and storage. When a user requests data verification, the module asks the user to provide the hash value accompanying the data and recalculates the hash value of the downloaded data locally. By comparing the two hash values, the originality and reliability of the data are verified.

[0151] like Figure 8 FIG2 is a flowchart showing the working process of the data verification module in the gateway in one embodiment of the present invention.

[0152] After completing data download, the user can send a data verification request through the gateway interface to instruct the gateway to verify the consistency of the downloaded data. The request must include the user's identity information, the identifier of the downloaded data (such as the data file ID), and other necessary parameters for the gateway to identify the verification object;

[0153] After receiving the data verification request, the gateway will obtain a copy of the downloaded data from the user's device and process the data using the same hash algorithm (such as SHA-256) as when the data was stored on the chain. It will read the entire data file and calculate a new hash value.

[0154] After the gateway completes the hash calculation for the data, it obtains the original stored hash value associated with the data from the user and compares the newly generated hash value with the original hash value of the corresponding data record on the blockchain. The gateway provides feedback based on the comparison results. If the newly calculated hash value matches the original hash value, the gateway sends a confirmation message to the user, including details such as the verification time and data ID. If the hash values ​​do not match, the gateway issues a warning, indicating that the data may have been tampered with.

[0155] The data exchange and transmission module can be composed of two independently designed computing engines: one dedicated to handling cross-chain data transmission within a blockchain network, and the other for handling data transmission across blockchain networks. Both engines are tightly integrated with the computing engine in the user rights management module, leveraging the latter's verification mechanisms to ensure data security and compliance. Furthermore, by monitoring and logging all data transmission activities, data integrity and traceability are guaranteed. Furthermore, this module handles data encryption and decryption, as well as ensuring data compatibility and consistency across different blockchains.

[0156] like Figure 9 Shown is a workflow diagram of a data interaction transmission module in a gateway in one embodiment of the present invention.

[0157] In deep foundation pit engineering projects, users (such as government regulatory agencies, construction units, monitoring units, design units, and construction units) must undergo identity authentication through the user rights management module before conducting cross-chain data transmission. The identity authentication module verifies whether the identity information matches the certificate information on the blockchain and verifies whether the user has the authority to initiate cross-chain interactive transmission of engineering data.

[0158] Once the user has passed authentication and has permissions, the data interaction and transmission module will extract relevant key data information from the source blockchain network, including data summaries and OSS storage URLs.

[0159] The data transmission module sends the packaged key data information to the target blockchain network. If the transmission is only carried out within the blockchain network, the gateway will be able to directly upload the data summary and the URL address of the OSS storage to the target blockchain through the data on-chain module. If it involves cross-blockchain network transmission, such as construction workers making personnel transfers between different projects or government regulatory departments needing to view project-related information, the data needs to be transmitted from the project blockchain network to other project blockchain networks or government regulatory blockchain networks. The gateway of the source blockchain network communicates with the gateway of the target blockchain network, and then the target blockchain network gateway transmits the packaged key data information to the target blockchain;

[0160] Once the critical data reaches the target blockchain's gateway, the data on-chain module is responsible for uploading this critical information to the target blockchain. Since the data has already been processed to include key information such as the data summary and URL during the on-chain operation on the source chain, no further pre-processing is required. Only information such as the source blockchain of the data needs to be marked.

[0161] In one embodiment, to meet the business needs of cross-blockchain network interaction, the original data structure is expanded and integrated with the original transaction data to form a unified cross-chain data structure, as shown in Table 2. Key information such as the source blockchain gateway ID, source blockchain ID, target blockchain gateway ID, OSS storage address, unique identifier, file attributes, timestamp, data summary, and digital signature are encapsulated and packaged to provide a standardized format for cross-chain data transmission, ensuring the standardized expression and storage of information between multiple blockchain networks.

[0162]

[0163] The technical features of the above embodiments can be combined in any manner. To simplify the description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. It should be noted that the phrases "in one embodiment", "for example", "and another example", etc. of the present invention are intended to illustrate the present invention and are not intended to limit the present invention.

[0164] The above embodiments merely illustrate several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, and all such variations and improvements fall within the scope of protection of the present invention.

Claims

1. A multi-blockchain load balancing method, characterized in that: include: Perform weighted summation of multiple dimensions of node i in multiple blockchains to obtain the comprehensive performance index P of node i i The indicators of the multiple dimensions include the basic resource availability, network score, and historical reliability of node i. The basic resource availability includes the processor availability, memory availability, and the proportion of time when the disk is not performing read and write operations. The network score is negatively correlated with the network latency of the corresponding node, and the historical reliability is negatively correlated with the failure frequency of the corresponding node. i is the index of the currently selectable node. 1-T i / T max As the queue waiting coefficient of node i, the comprehensive performance index P of node i is i Multiplying it by the queue waiting coefficient of node i, we get the dynamic weight W of node i i , where T i is the current transaction queue length of node i, T max The current maximum transaction queue length among all optional nodes; Calculate transaction tx j The matching degree between the required resource intensity and the existing resource intensity of each node i is used to obtain the node i’s response to transaction tx j The matching score S ij ; j is the index of the transaction; Comprehensive dynamic weight W i and matching score S ij , get node i for transaction tx j The comprehensive allocation priority F ij ; F ij With dynamic weight W i and matching score S ij Any one of them is positively correlated; The corresponding transactions are assigned to the endorsing nodes according to the comprehensive allocation priority of each transaction.

2. The multi-blockchain load balancing method according to claim 1, wherein: The calculation transaction tx j The matching degree between the required resources and the existing resources of each node i includes: Construct transaction tx j The demand resource vector r j : r j =[r j1 ,r j2 ,…,r jn ]; Construct the existing resource vector c of node i i : c i =[c i1 ,c i2 ,…,c in ]; Compute the required resource vector r j and the existing resource vector c i The cosine similarity of ij ; Where r jk Indicates transaction tx j The intensity of demand for the kth resource, c ik It represents the available intensity of node i for the kth type of resource, and n is the number of resource categories.

3. The multi-blockchain load balancing method according to claim 1, wherein: Comprehensive allocation priority F ij The calculation formula is: F ij =W i ×S ij 。 4. The multi-blockchain load balancing method according to claim 1, wherein: The allocation of nodes to corresponding transactions based on the comprehensive allocation priority of each transaction includes: According to the comprehensive allocation priority of each transaction, the consistent hash ring mechanism is combined to allocate nodes to the corresponding transactions.

5. The multi-blockchain load balancing method according to claim 1, wherein: The method further includes: monitoring whether there is an overloaded node whose load exceeds its load threshold; if there is an overloaded node i, performing resource reallocation and dynamic adjustment, wherein the resource reallocation and dynamic adjustment include: Redistribute transactions of node i that exceed its load threshold to other optional nodes that are not overloaded. The larger the current dynamic weight of other optional nodes, the more transactions will be redistributed to them.

6. The multi-blockchain load balancing method according to claim 5, characterized in that: The formula for redistribution is: ; Among them, ΔT is the number of transactions that node i needs to transfer to other nodes, ΔT ij It refers to the number of transactions transferred from node i to node j.

7. A gateway, characterized in that: The load balancing module includes a load balancing module, which is used to execute the multi-blockchain load balancing method according to any one of claims 1 to 6 when a transaction request is received.

8. The gateway according to claim 7, wherein: The gateway further comprises: The user rights management module is used to submit a registration application to the corresponding blockchain upon receiving a user's registration request and determine the corresponding user's rights based on the information fed back by the blockchain, and to verify the user's rights upon receiving a user's application for access to the blockchain; The data upload module is used to send the original data to be uploaded to the corresponding storage space and obtain the download address of the original data in the storage space, generate a data summary of the original data, and submit the download address and data summary to the blockchain; Information retrieval module, used to search for corresponding content based on the query keywords entered by the user; The data verification module is used to recalculate the hash value of the downloaded data obtained by the user using the hash algorithm used for data on-chain, and compare the recalculated hash value with the hash value when it was uploaded to the chain to see if they are consistent. If they are consistent, the verification is successful; otherwise, the verification fails. Data interaction and transmission module, used to realize information interaction between blockchain networks.

9. A blockchain-based construction data management system, characterized by: include: A blockchain system consisting of blockchain networks and a gateway as described in claim 7 or 8, each blockchain network has a corresponding gateway.

10. The construction data management system according to claim 9, wherein: The management system has a government blockchain system and a project blockchain system. The government blockchain system includes a government-supervised blockchain network, and the project blockchain system includes multiple project blockchain networks. Different project blockchain networks are used to manage data of different projects in construction, and each blockchain network contains multiple blockchains.

Citation Information

Patent Citations

  • Real-time hierarchical distribution method for power cloud resources of digital power grid

    CN119603304A

  • Blockchain-based method and system for immutable resource allocation in a cloud computing environment

    US20190334726A1