Data expansion processing method and device based on block chain, and electronic equipment
By constructing a directed acyclic graph and on-chain capability programs, the problem of limited blockchain functionality is solved, enabling flexible expansion of blockchain functions and efficient data processing to adapt to diverse business needs.
Patent Information
- Application Number
- CN202510946543.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-10-21
AI Technical Summary
Existing blockchain technology has limited functionality in data management and analysis, resulting in low execution efficiency and complex integration with multiple systems, making it difficult to flexibly adapt to changing needs.
By constructing a directed acyclic graph, data processing requests are allocated to capability nodes based on label expressions, thereby expanding blockchain functionality. Capability programs are then uploaded to the blockchain and endorsed, capability nodes are created, and capability programs are invoked in real time to enhance blockchain functionality.
It enables seamless expansion of blockchain functionality, improves data processing and task execution efficiency, simplifies data processes, and adapts to diverse business needs.
Smart Images

Figure CN120821777A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology or other related technical fields, and specifically to a blockchain-based data expansion processing method, device, and electronic device. Background Art
[0002] In recent years, blockchain technology, owing to its outstanding advantages in data security, transparency, and decentralization, has become a crucial cornerstone of digital transformation across numerous industries. However, with the increasing diversity of application scenarios, relying solely on the simple data storage and transaction processing capabilities of traditional blockchains is no longer sufficient to meet the complex data management and analysis needs of modern enterprises. Blockchain technology faces significant technical challenges, particularly in areas such as object storage, privacy protection, and artificial intelligence (AI) computing.
[0003] To address the shortcomings of a single blockchain system, related technologies have employed multifunctional integration by deploying and integrating multiple independent systems, such as specialized object storage systems, privacy-preserving computing platforms, and AI service frameworks. However, this cross-system integration is not only technically complex but also leads to inefficient data exchange processes. Furthermore, the integration of multiple systems inevitably introduces disconnects in the data flow, creating blind spots in data credibility. Furthermore, the integration and maintenance of multiple systems is extremely complex, increasing the time, manpower, and financial costs required to advance business. More importantly, this complexity often leads to rigid product forms, making it difficult to flexibly adapt to rapidly changing needs.
[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0005] The embodiments of the present invention provide a data expansion processing method based on blockchain, a device thereof, and an electronic device, in order to at least solve the problem of single blockchain function in related technologies, and the technical problem of low execution efficiency in the method of implementing blockchain function expansion by linking multiple business systems.
[0006] According to one aspect of an embodiment of the present invention, a data expansion processing method based on blockchain is provided, comprising: receiving a data processing request, parsing the data processing request, and obtaining a label expression for data processing; constructing a directed acyclic graph based on the label expression, and sending the data to be processed to a corresponding capability node based on the topological order of the directed acyclic graph, and obtaining a data processing result of the capability node, wherein the capability node is used to call a capability program to expand the functionality of the blockchain, and the capability program is represented as an application program for expanding the functionality of the blockchain; adding the data processing result of each capability node to the corresponding topological node in the directed acyclic graph, updating the directed acyclic graph, and obtaining an updated directed acyclic graph; comparing the updated directed acyclic graphs of multiple account book organizations to obtain a comparison result, and comparing the updated directed acyclic graphs of the multiple account book organizations indicated by the comparison result to obtain a comparison result. Figure 1 If the data is consistent, the data expansion processing result is generated based on the directed acyclic graph after the update of each account book to which the organization belongs.
[0007] Furthermore, before receiving the data processing request, it also includes: uploading capability program data to the accounting node of each of the account book organizations, and uploading the capability program data to the chain to obtain the up-chain data; endorsing the up-chain data based on each of the account book organizations to obtain the endorsement result of the up-chain data; when the endorsement result indicates that all of the account book organizations have passed the endorsement, the capability program is recorded in the account book and a capability tag is configured for the capability program, wherein the capability tag of the capability program corresponds to the role field in the tag expression.
[0008] Furthermore, after recording the capability program on the ledger, it also includes: each of the ledger-tolerance organizations constructs a capability node based on the capability program, and generates a secret key and a certificate for the capability node; creates a configuration transaction for adding the capability node based on the capability node, the secret key and the certificate; sends the configuration transaction to the accounting node of each of the ledger-tolerance organizations for endorsement, and obtains a transaction endorsement result; when the transaction endorsement result indicates that the endorsement is passed, sends the endorsed configuration transaction to the consensus node, and the configuration transaction is chained through the consensus node, and the capability node is deployed to the blockchain configuration block.
[0009] Furthermore, after the capability node is deployed into the blockchain configuration block, it also includes: receiving a capability program activation request initiated by the capability node, wherein the capability node extracts the capability tag in the certificate, and based on the capability tag, initiates a program activation request to the accounting node under the organization to which the same ledger as the capability node belongs; performing identity verification on the capability node, and if the capability node passes the identity verification, issuing a capability program to the capability node, wherein the capability node establishes a communication connection with the capability program through the issued capability program, and calls the capability program in real time.
[0010] Furthermore, the step of constructing a directed acyclic graph based on the label expression includes: extracting the execution steps involved in the label expression and the dependency relationships between the execution steps; constructing an initial directed acyclic graph with the execution steps as topological nodes and the dependency relationships between the execution steps as connecting lines between topological nodes; extracting the role fields involved in each of the execution steps in the label expression; determining the capability label based on the role field, and adding the capability label to the initial directed acyclic graph to obtain the directed acyclic graph.
[0011] Furthermore, the data to be processed is sent to the corresponding capability node based on the topological order of the directed acyclic graph, and the step of obtaining the data processing result of the capability node includes: constructing a task request for the data to be processed based on the topological order of the directed acyclic graph, and sending the task request to the corresponding capability node under each of the account book organizations, wherein, after receiving the task request, the capability node under each account book organization calls the capability program corresponding to the capability node, processes the data to be processed through the capability program, and generates a result label for the processed data, and returns the processing result to the capability node based on the result label, the capability node endorses the processing result and generates a data processing result; and receives the data processing result returned by the corresponding capability node under each of the account book organizations.
[0012] Furthermore, the step of parsing the data processing request and obtaining the label expression for data processing includes: parsing the data processing request to obtain the data processing requirements, and obtaining the label expression based on the data processing requirements; or, matching the data processing request with a preset data processing request, and when the data processing request successfully matches any preset data processing request, obtaining a predefined label expression based on the successfully matched preset data processing request.
[0013] According to another aspect of an embodiment of the present invention, a data expansion processing device based on blockchain is also provided, including: a receiving unit for receiving a data processing request, parsing the data processing request, and obtaining a label expression for data processing; a construction unit for constructing a directed acyclic graph based on the label expression, and sending the data to be processed to the corresponding capability node based on the topological order of the directed acyclic graph, and obtaining the data processing result of the capability node, wherein the capability node is used to call the capability program to expand the function of the blockchain, and the capability program is represented as an application for expanding the function of the blockchain; an updating unit for adding the data processing result of each capability node to the corresponding topological node in the directed acyclic graph, updating the directed acyclic graph, and obtaining the updated directed acyclic graph; a generating unit for comparing the updated directed acyclic graphs of multiple account book organizations to obtain a comparison result, and comparing the updated directed acyclic graphs of the multiple account book organizations indicated by the comparison result to obtain the updated directed acyclic graphs. Figure 1 If the data is consistent, the data expansion processing result is generated based on the directed acyclic graph after the update of each account book to which the organization belongs.
[0014] Furthermore, the blockchain-based data expansion processing device also includes: a first uploading module, used to upload capability program data on the accounting node of each of the account book organizations, and to put the capability program data on the chain to obtain the on-chain data; a first endorsement module, used to endorse the on-chain data based on each of the account book organizations to obtain the endorsement result of the on-chain data; a first configuration module, used to record the capability program on the account book when the endorsement result indicates that all of the account book organizations have passed the endorsement, and to configure a capability label for the capability program, wherein the capability label of the capability program corresponds to the role field in the label expression.
[0015] Furthermore, the blockchain-based data expansion processing device also includes: a first construction module, which is used for each of the account book organizations to build a capability node based on the capability program, and generate a secret key and a certificate for the capability node; a first addition module, which is used to create a configuration transaction for adding the capability node based on the capability node, the secret key and the certificate; a second endorsement module, which is used to send the configuration transaction to the accounting node of each of the account book organizations for endorsement, and obtain a transaction endorsement result; a first deployment module, which is used to send the endorsed configuration transaction to the consensus node when the transaction endorsement result indicates that the endorsement is passed, and to put the configuration transaction on the chain through the consensus node, and deploy the capability node to the blockchain configuration block.
[0016] Furthermore, the blockchain-based data expansion processing device also includes: a first receiving module, used to receive a capability program activation request initiated by the capability node, wherein the capability node extracts the capability tag in the certificate, and based on the capability tag, initiates a program activation request to the accounting node under the organization to which the same account book as the capability node belongs; a first issuing module, used to perform identity verification on the capability node, and if the capability node passes the identity verification, issue the capability program to the capability node, wherein the capability node establishes a communication connection with the capability program through the issued capability program, and calls the capability program in real time.
[0017] Furthermore, the construction unit includes: a first extraction module, used to extract the execution steps involved in the label expression and the dependency relationships between each execution step; a second construction module, used to construct an initial directed acyclic graph with the execution steps as topological nodes and the dependency relationships between each execution step as connecting lines between topological nodes; a second extraction module, used to extract the role fields involved in each execution step in the label expression; a first adding module, used to determine the capability label based on the role field, and add the capability label to the initial directed acyclic graph to obtain the directed acyclic graph.
[0018] Furthermore, the construction unit also includes: a third construction module, which is used to construct a task request for the data to be processed based on the topological order of the directed acyclic graph, and send the task request to the corresponding capability node under each of the account book organizations, wherein, after receiving the task request, the capability node under each of the account book organizations calls the capability program corresponding to the capability node, processes the data to be processed through the capability program, and generates a result label for the processed data, and returns the processing result to the capability node based on the result label, and the capability node endorses the processing result and generates a data processing result; a second receiving module, which is used to receive the data processing result returned by the corresponding capability node under each of the account book organizations.
[0019] Furthermore, the receiving unit includes: a first parsing module, used to parse the data processing request, obtain data processing requirements, and obtain the label expression based on the data processing requirements; a first matching module, used to match the data processing request with a preset data processing request, and when the data processing request successfully matches any preset data processing request, obtain a predefined label expression based on the successfully matched preset data processing request.
[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned blockchain-based data expansion processing methods.
[0021] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned blockchain-based data expansion processing methods.
[0022] In this application, blockchain data is expanded and processed through the following steps: receiving a data processing request, parsing the data processing request, obtaining a label expression for data processing, and then constructing a directed acyclic graph based on the label expression, and sending the data to be processed to the corresponding capability node based on the topological order of the directed acyclic graph, obtaining the data processing result of the capability node, wherein the capability node is used to call the capability program to expand the function of the blockchain, and the capability program is represented as an application for expanding the function of the blockchain, and the data processing result of each capability node is added to the corresponding topological node in the directed acyclic graph, and the directed acyclic graph is updated to obtain an updated directed acyclic graph. Finally, the updated directed acyclic graphs of multiple account book organizations are compared to obtain a comparison result. Figure 1 If the data is consistent, the data expansion processing results are generated based on the updated directed acyclic graph of each account book’s affiliated organization.
[0023] In this application, the capability program is put on the chain, and the capability node is created to call the capability program in real time to perform expansion tasks, so that the blockchain function is enhanced, and multiple expansion functions can be seamlessly integrated, which broadens the application scenarios of the blockchain. It also avoids the interaction of multiple systems and improves the efficiency of data processing and task execution. When parsing the data processing request, the capability node is associated with the directed acyclic graph, and the directed acyclic graph is used to intelligently schedule the priority and processing order of data processing, thereby improving the efficiency and accuracy of data processing. This solves the problem of low execution efficiency in the related art, which is that the blockchain function is single and the expansion of blockchain functions by linking multiple business systems is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 is a flowchart of an optional blockchain-based data expansion processing method according to an embodiment of the present invention;
[0026] Figure 2 1 is a schematic diagram of an optional initial configuration of a blockchain ledger according to an embodiment of the present invention;
[0027] Figure 3 1 is a schematic diagram of a configuration of capability nodes of an optional blockchain ledger according to an embodiment of the present invention;
[0028] Figure 4 2 is a schematic diagram of an optional blockchain-based data expansion processing device according to an embodiment of the present invention;
[0029] Figure 5 This is a hardware structure block diagram of an electronic device (or mobile device) that executes a blockchain-based data expansion processing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] To facilitate those skilled in the art to understand the present invention, some of the terms or nouns involved in the embodiments of the present invention are explained below:
[0033] Accounting node, a blockchain node responsible for recording blocks.
[0034] Consensus node is a blockchain node responsible for consensus and block generation.
[0035] A capability node is a blockchain node that is responsible for providing a specific expansion capability and is responsible for the results of this capability. This capability is provided by loading the capability program on the capability node.
[0036] Capability programs are programs recorded on the blockchain ledger after consensus among the organizations that own the ledger, thus ensuring their credibility. Capability programs provide specific functionality, such as object storage, privacy-preserving computing, confidential computing, and AI computing. These capabilities are provided by the program itself or acquired externally. Capability programs rely on capability nodes to load and start.
[0037] Configuration block is responsible for recording the information of the ledger node composition.
[0038] Object storage node, a type of capability node, is a blockchain node responsible for storing large-granularity files.
[0039] Privacy computing node, a type of capability node, is a blockchain node responsible for privacy computing.
[0040] It should be noted that the blockchain-based data expansion processing method and device thereof in this application can be used in the field of blockchain technology when the functionality of the blockchain is expanded based on capability nodes, and can also be used in any field other than the field of blockchain technology when the functionality of the blockchain is expanded based on capability nodes. This application does not limit the application field of the blockchain-based data expansion processing method and device thereof.
[0041] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set up between this system and the relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain the relevant information after receiving the consent information fed back by the aforementioned user or institution.
[0042] It should be noted that in this application, when collecting and analyzing customer information, corresponding operation entrances are provided for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.
[0043] The following embodiments of this invention can be applied to various blockchain-based data expansion and processing systems, applications, and devices. Through the definition, deployment, and scheduling of capability nodes, this invention integrates blockchain, computing, storage, and AI technologies into a scalable on-chain capability node resource. Label expressions are also flexibly applied to the processing of on-chain data. This scalability of capability nodes and the flexibility of label expressions transcend the limitations of blockchains that limit them to storing simple data, opening up unlimited possibilities for blockchain data processing and enabling rapid response to changing user needs.
[0044] The present invention will be described in detail below with reference to various embodiments.
[0045] Example 1
[0046] According to an embodiment of the present invention, an embodiment of a data expansion processing method based on blockchain is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0047] Figure 1 This is a flowchart of an optional blockchain-based data expansion processing method according to an embodiment of the present invention. The execution subject of the embodiment of the present invention is a blockchain-based data expansion processing system, such as Figure 1 As shown, the method includes the following steps:
[0048] Traditional blockchain designs focus on storing relatively simple and structured data, such as transaction records, digital asset transfer details, and contract terms. This is because blockchain's initial application was primarily to provide a secure, decentralized payment method, so its data model and storage mechanism were optimized for storing this type of transaction data. With the continuous development of blockchain technology, its application scenarios are constantly expanding, such as supply chain management, digital identity verification, privacy protection, and complex computing requirements. Traditional blockchains can no longer meet the growing and diverse needs of users, and therefore, the expansion of blockchain functionality has become an inevitable trend.
[0049] In the embodiments of the present invention, by abstracting extended functions into capability nodes and providing a capability node management mechanism on the blockchain, the unlimited scalability of blockchain capabilities is achieved. At the same time, by putting capability programs on the chain and providing endorsement guarantees for the use of capability programs, the credibility issue of capability nodes is fundamentally resolved. The developability and trusted on-chain nature of capability programs further ensure the scalability, reusability, and credibility of capabilities, providing a solid technical foundation for the blockchain capability ecosystem. In addition, by labeling capability programs as core identifiers for capability provision and use, and combining them with capability expressions to achieve flexible orchestration and selection of extended functions, users are provided with a highly customized on-chain capability experience. This design not only enables rapid data on-chaining, but also agile responses to changing needs, fully meeting users' needs for efficient, flexible, and reliable blockchain capability services.
[0050] Furthermore, before receiving the data processing request, it also includes: uploading the capability program data to the accounting node of each account book organization, and uploading the capability program data to the chain to obtain the chain data; endorsing the uplinked data based on each account book organization to obtain the endorsement result of the uplinked data; when the endorsement result indicates that all account book organizations have passed the endorsement, the capability program is recorded in the account book and a capability tag is configured for the capability program, wherein the capability tag of the capability program corresponds to the role field in the tag expression.
[0051] In this embodiment of the present invention, the on-chain integration of capability programs enables blockchain systems to expand functionality on demand. By adding new capability programs, the blockchain architecture can easily integrate new services and features, such as privacy-preserving computing, AI services, and object storage, without requiring large-scale changes to the existing infrastructure, enabling the blockchain to adapt to a wider range of business needs. By integrating the capabilities of multiple independent technologies into the blockchain, the complexity and cost of multi-system interactions are reduced, data processing is streamlined, and overall operational efficiency and user experience are improved.
[0052] Specifically, on the accounting nodes of each organization to which the ledger belongs, the administrator or designated operator first uploads the capability program data to a local storage directory. This step ensures that all participating organizations' accounting nodes have the same version of the capability program, laying the foundation for subsequent consistency endorsement. Once the data is uploaded, a request is initiated to write the capability program data to the blockchain ledger, creating the on-chain data. This step, through the consensus mechanism, not only ensures data reliability and consistency but also formally incorporates the capability program into the blockchain's management system, providing a legitimate basis for its subsequent invocation and execution.
[0053] After receiving the on-chain data, the accounting nodes of each ledger's organization endorse it. In consortium and enterprise blockchain applications, endorsement is primarily used to ensure the validity and legitimacy of transactions and is a critical step in the transaction process from proposal to final confirmation. Endorsement involves the accounting nodes of each ledger's organization verifying the integrity and consistency of the on-chain data and signing the verified data. This signature is attached to the data processing result as an endorsement. Thus, the endorsements of each accounting node form a set, reflecting the level of consensus among different accounting nodes on the transaction and indicating the acceptance of the data by the accounting nodes of each ledger's organization. The endorsement result reflects the consensus among organizations on the capability program data and is a key factor in determining whether the capability program will be formally recorded in the ledger.
[0054] The data processing results of each ledger-owning organization on the on-chain data are consolidated into an endorsement result, which is then sent to the consensus node. Based on the endorsement result and the consensus algorithm, the consensus node decides whether to add the capability program to the blockchain. Once all accounting nodes of the ledger-owning organization have successfully endorsed the on-chain data, the data has passed multi-organization consistency verification and met the expected consensus standards. At this point, the consensus node records the capability program on the ledger, assigning it the identity of an on-chain asset. Simultaneously, a capability tag is assigned to the capability program. This tag is a unique identifier for the capability program, corresponding to the role field in the tag expression. The presence of capability tags enables the system to accurately identify and locate specific capability programs, providing clear guidance for invoking the capability in subsequent data processing requests.
[0055] Furthermore, after the capability program is recorded in the ledger, it also includes: each ledger-tolerance organization builds a capability node based on the capability program and generates a secret key and certificate for the capability node; creates a configuration transaction for the newly added capability node based on the capability node, secret key and certificate; sends the configuration transaction to the accounting node of each ledger-tolerance organization for endorsement, and obtains a transaction endorsement result; when the transaction endorsement result indicates that the endorsement is passed, the endorsed configuration transaction is sent to the consensus node, the configuration transaction is chained through the consensus node, and the capability node is deployed to the blockchain configuration block.
[0056] After successfully recording a capability program on the ledger, the organization to which the ledger belongs (e.g., org1.com or org2.com) must proceed to the next step: building a capability node based on the on-chain capability program and invoking the capability node by activating it. Specifically, the capability node is first built and a key and certificate are generated for it. The key is used to encrypt and decrypt data, ensuring data security during transmission; the certificate identifies the node and proves its authority to execute a specific capability program. The certificate contains role information, ensuring the correspondence between the capability node and the capability program.
[0057] A configuration transaction for the newly constructed capability node is then created. This is used to add the new capability node to the ledger's configuration block. Once the configuration transaction is created, it is sent to the ledger nodes of all organizations affiliated with the ledger for endorsement. The endorsement process verifies the legitimacy, consistency, and integrity of the configuration transaction, ensuring that all organizations accept the addition of the new capability node. Based on the established endorsement policy (e.g., "ALL" means all nodes must endorse), the ledger nodes independently review and sign the transaction, generating a transaction endorsement result. If the transaction endorsement result indicates that all ledger nodes have endorsed the transaction, the transaction has been approved by all parties involved. The endorsed configuration transaction is then submitted to the consensus nodes. The consensus nodes then generate consensus on the configuration transaction using the consensus algorithm, ultimately creating a new block and uploading the configuration transaction to the blockchain, thereby deploying the capability node to the blockchain's configuration block. This step officially marks the capability node as a part of the ledger system, ready to be scheduled by the system to perform specific tasks.
[0058] Furthermore, after the capability node is deployed into the blockchain configuration block, it also includes: receiving a capability program activation request initiated by the capability node, wherein the capability node extracts the capability tag in the certificate and, based on the capability tag, initiates a program activation request to the accounting node under the organization to which the same ledger as the capability node belongs; performing identity verification on the capability node, and if the capability node passes the identity verification, issuing the capability program to the capability node, wherein the capability node establishes a communication connection with the capability program through the issued capability program and calls the capability program in real time.
[0059] Specifically, after a capability node is deployed to the blockchain configuration block, a communication connection must be established between the capability node and the capability program to ensure the normal use of the capability program. This ensures that the capability node can successfully invoke the capability program. The capability node initiates a capability program activation request. This request essentially involves sending an activation request to the ledger node in the same organization as the ledger, based on the capability tag defined in the certificate. The capability tag serves as the identity of the capability program and is the basis for scheduling and identifying the capability program. Upon receiving the activation request, the ledger node immediately verifies the identity of the capability node. This verification process includes verifying the validity of the capability node's certificate, confirming that it is registered as a node with the corresponding capability tag in the ledger configuration block, and checking the transaction signature for accuracy. This step ensures that only legitimately deployed capability nodes can access and activate capability programs on the ledger, thereby enhancing system security and reliability. If the capability node passes identity verification, the ledger node will issue the capability program matching the capability tag to the capability node. After receiving the capability program, the capability node establishes a communication connection with the capability program. As a result, capability nodes can call capability programs in real time and perform corresponding functions, such as data storage, privacy computing, deep analysis and calculation, while ensuring close coordination and consistency with the data processing flow on the ledger, thus achieving effective docking and secure activation of capability nodes and capability programs on the ledger.
[0060] Step S101: receiving a data processing request, parsing the data processing request, and obtaining a label expression for data processing.
[0061] In the above step S101, the smart contract or blockchain engine of the blockchain receives a real-time data processing request, and needs to parse the data processing request and determine the label expression corresponding to the data processing request. The label expression clarifies the capability nodes and services that need to be called before and after the data is uploaded to the chain, and specifies the order of calling.
[0062] Optionally, the data processing request includes data to be processed and describes data processing requirements.
[0063] Based on label expressions, the system can formulate detailed processing plans and assign the correct capability nodes to undertake specific tasks, ensuring a smooth and efficient data processing process.
[0064] Furthermore, the steps of parsing the data processing request and obtaining the label expression for data processing include: parsing the data processing request, obtaining the data processing requirements, and obtaining the label expression based on the data processing requirements; or, matching the data processing request with a preset data processing request, and when the data processing request successfully matches any preset data processing request, obtaining a predefined label expression based on the successfully matched preset data processing request.
[0065] Specifically, label expressions can come from data processing requirements or preset label expressions. When a data processing request is received, it is first matched with the preset data processing request. For some preset data processing requests, the processing function within the smart contract contains the preset label expression, which can be directly obtained. For data processing requests that are not successfully matched, the user's data processing requirements are parsed, and then the label expression is obtained based on the data processing requirements. For example, if the data processing requirement is to store large files and perform hash calculations, the label expression may be set to "oss-hash", which clearly points out the two key links in the data processing process: object storage (oss) and hash operation (hash). This expression serves as an instruction for the subsequent scheduling capability node, ensuring that the data processing process is accurately matched with user requirements.
[0066] Step S102 : constructing a directed acyclic graph based on the label expression, sending the data to be processed to the corresponding capability node based on the topological order of the directed acyclic graph, and obtaining the data processing result of the capability node.
[0067] Optionally, the capability node is used to call a capability program to expand the functionality of the blockchain, and the capability program is represented as an application program for expanding the functionality of the blockchain.
[0068] In the above step S102, a directed acyclic graph can be constructed based on the label expression obtained by parsing. The directed acyclic graph contains the capability nodes required for scheduling data processing, the capability programs to be called, and the calling order of each capability program. A directed acyclic graph can contain parallel structures and serial structures. Each capability label represents a topological node in the directed acyclic graph, and the connection between the topological nodes represents the order of processing. For example, the "oss-hash" expression will be converted into a directed acyclic graph containing an object storage node (oss) and a hash calculation node (hash), where the object storage node is called before the hash calculation node.
[0069] After constructing the directed acyclic graph, accounting nodes receiving data processing requests will sequentially send the data to be processed to the corresponding capability nodes in the topological order indicated by the directed acyclic graph. Each capability node will invoke its local capability program to perform specific processing on the data. Capability programs are pre-online applications that extend blockchain functionality and can perform diverse tasks such as object storage, privacy-preserving computing, and AI analysis. If data processing involves multiple ledger-owned organizations endorsing the results, it is necessary to collect the data processing results from the capability nodes under each ledger-owned organization for subsequent endorsement verification to ensure the accuracy, immutability, and consistency of the data processing results.
[0070] In this embodiment of the present invention, the DAG topology ensures the sequential execution of processing flows, avoids confusion or invalid operations in data processing, and improves the accuracy and reliability of data processing. Furthermore, the DAG-based dynamic call mechanism enables the system to flexibly call and combine different capability nodes based on data processing requirements, providing customized and modular services for data processing.
[0071] Furthermore, the steps of constructing a directed acyclic graph based on the label expression include: extracting the execution steps involved in the label expression and the dependency relationships between the execution steps; constructing an initial directed acyclic graph with the execution steps as topological nodes and the dependency relationships between the execution steps as connecting lines between the topological nodes; extracting the role fields involved in each execution step in the label expression; determining the capability label based on the role field, and adding the capability label to the initial directed acyclic graph to obtain a directed acyclic graph.
[0072] Specifically, when constructing a directed acyclic graph, the execution order of each execution step and the dependency relationship between the steps are first extracted from the label expression, and each execution step is used as a topological node. The connection line between each topological node is established based on the dependency relationship between the execution steps. Finally, the corresponding capability label is determined based on the role field in the label expression. The capability label indicates the capability node and Zeng Li program involved in the execution step. The capability label is added to the directed acyclic graph to obtain the final directed acyclic graph.
[0073] Furthermore, the data to be processed is sent to the corresponding capability node based on the topological order of the directed acyclic graph, and the step of obtaining the data processing result of the capability node includes: constructing a task request for the data to be processed based on the topological order of the directed acyclic graph, and sending the task request to the corresponding capability node under each account book organization, wherein, after receiving the task request, the capability node under each account book organization calls the capability program corresponding to the capability node, processes the data to be processed through the capability program, generates a result label for the processed data, returns the processing result to the capability node based on the result label, the capability node endorses the processing result, and generates a data processing result; receives the data processing result returned by the corresponding capability node under each account book organization.
[0074] Specifically, after determining the capability node corresponding to each execution step, the data to be processed is packaged, a task request is constructed, and the task request is sent to the capability node corresponding to each ledger's organization. Upon receiving the task request, the capability node invokes the capability program that matches its capability tag to process the data. A capability program contains the code logic to perform a specific task and can provide specific capabilities such as object storage, privacy-preserving computing, or AI analysis. After processing is complete, the capability node generates a result tag for the processed data, identifying the association between the processing result and the capability node. The processing result, along with the result tag, is returned to the capability node, which then endorses it. The endorsement process involves signing the result with the capability node's private key to ensure its authenticity and integrity. This signature is returned as part of the data processing result to the point where the task request was originally initiated.
[0075] Step S103 : adding the data processing result of each capability node to the corresponding topological node in the directed acyclic graph, updating the directed acyclic graph, and obtaining an updated directed acyclic graph.
[0076] In step S103, the data processing results returned by each capability node are added to the corresponding topological nodes in the directed acyclic graph, and the actual output of each processing link is recorded to facilitate the intuitive display of the processing results and lay the foundation for subsequent verification, query and analysis. As the processing results are gradually added, the directed acyclic graph will be updated in real time to reflect the latest processing status. The updated directed acyclic graph not only contains the original data flow and processing steps, but also adds the actual processing results, forming a richer and more detailed data processing flow chart.
[0077] Step S104: compare the updated directed acyclic graphs of the multiple account book organizations to obtain a comparison result. Figure 1 If the data is consistent, the data expansion processing results are generated based on the updated directed acyclic graph of each account book’s affiliated organization.
[0078] In the consortium blockchain scenario, a ledger is jointly maintained by multiple organizations. When processing data, multiple organizations need to endorse the results to ensure the consistency and accuracy of the data processing results. After all capability nodes complete data processing and return the endorsed data processing results, it is necessary to compare the updated directed acyclic graphs of multiple ledger organizations. This process is designed to verify whether the results generated by different ledger organizations are consistent when processing the same data. The comparison involves comparing the data processing results of the corresponding topological nodes in each directed acyclic graph to ensure that the processing procedures and output results of all participating institutions are the same. In the directed acyclic graphs updated by the multiple ledger organizations indicated by the comparison results, the updated directed acyclic graphs of the ledger organizations are compared. Figure 1 If the data processing tasks are consistent, the final data expansion processing results are generated based on these consistent directed acyclic graphs to indicate whether the final data processing task is completed.
[0079] Through the above steps, the data processing request is received and parsed to obtain the label expression of the data processing. Then, a directed acyclic graph is constructed based on the label expression, and the data to be processed is sent to the corresponding capability node based on the topological order of the directed acyclic graph to obtain the data processing result of the capability node. The capability node is used to call the capability program to expand the function of the blockchain. The capability program is represented as an application for expanding the function of the blockchain. The data processing result of each capability node is added to the corresponding topological node in the directed acyclic graph, and the directed acyclic graph is updated to obtain the updated directed acyclic graph. Finally, the updated directed acyclic graphs of the multiple account book organizations are compared to obtain the comparison results. Figure 1 If the data is consistent, the data expansion processing results are generated based on the updated directed acyclic graph of each account book’s affiliated organization.
[0080] In this embodiment, capability programs are uploaded to the blockchain, and capability nodes are created to call capability programs in real time to execute expansion tasks. This enhances blockchain functionality, seamlessly integrates multiple expansion functions, broadens blockchain application scenarios, avoids multi-system interaction, and improves data processing and task execution efficiency. When parsing data processing requests, capability nodes are associated with a directed acyclic graph, which intelligently schedules data processing priorities and processing sequences, improving data processing efficiency and accuracy. This addresses the technical issue of low execution efficiency in related technologies, which exists in the context of single blockchain functionality and the linkage of multiple business systems to achieve blockchain function expansion.
[0081] The following describes in detail another optional specific implementation.
[0082] Figure 2 This is a schematic diagram of the initial configuration of an optional blockchain ledger according to an embodiment of the present invention. In traditional blockchains, ledgers only contain two basic types: consensus nodes and accounting nodes. The ledger established on this initial basis can only handle conventional data on-chain services. Figure 2As shown, the account channel 1 is jointly maintained by the three account organizations org1.com, org2.com, and org3.com. Each account organization contains accounting nodes in the initial state (such as the accounting nodes an1.org1.com, an2.org1.com, and an1.org1.com of org1.com; the accounting nodes an1.org2.com, an2.org2.com, and an1.org2.com of org2.com; and the accounting nodes an1.org3.com, an2.org3.com, and an1.org3.com of org3.com). 1.org3.com) and consensus nodes (such as org1.com's consensus nodes cn1.org1.com, cn2.org1.com, cn1.org1.com; org2.com's accounting nodes cn1.org2.com, cn2.org2.com, cn1.org2.com; org3.com's accounting nodes cn1.org3.com, cn2.org3.com, cn1.org3.com), the embodiment of the present invention adds new capability node types to the account channel 1 based on the initial state, such as object storage node ( Figure 2 In the figure, the accounting nodes of org1.com are sn1.org1.com, sn2.org1.com, sn1.org1.com; the accounting nodes of org2.com are sn1.org2.com, sn2.org2.com, sn1.org2.com; the accounting nodes of org3.com are sn1.org3.com, sn2.org3.com, sn1.org3.com), privacy computing nodes ( Figure 2 In the figure, the accounting nodes of org1.com are pn1.org1.com, pn2.org1.com, and pn1.org1.com; the accounting nodes of org2.com are pn1.org2.com, pn2.org2.com, and pn1.org2.com; and the accounting nodes of org3.com are pn1.org3.com, pn2.org3.com, and pn1.org3.com. In addition, there can also be various types of capability expansion nodes such as AI computing nodes.
[0083] At the same time, strict label definitions are defined for the established capability nodes. The label definitions indicate the functions of the capability nodes, such as: role = accounting, role = consensus, role = oss, role = pc, role = ai.
[0084] After the ledger's owner organization reaches consensus and endorses the Capability Application, it is written to the ledger for use. The Capability Application's key (corresponding to the Capability Tag) corresponds to the Capability Node's role value (corresponding to the Role field). Capability Nodes hosted in the blockchain configuration block can retrieve the Capability Application from the ledger using the Capability Tag.
[0085] A capability node is a container that loads and starts the corresponding capability program from the ledger based on the role information in the node certificate. While providing this capability to the outside world, it also endorses the calculation results of this capability.
[0086] Figure 3 is a schematic diagram of a capability node configuration of an optional blockchain ledger according to an embodiment of the present invention, such as Figure 3 As shown, after the account organization arranges and sets the capability nodes in the account configuration block and reaches consensus on the chain, each organization starts its corresponding capability node container. After the capability node is started, the capability tag (Capability Node) is determined according to the role information in the certificate information (Key&Cert) of the capability node, and the capability program (Capability Application) is pulled from the account (Blockchina Ledger), and the capability program is started to be in a ready state. When the capability node is accessed, the capability node program is called by the capability node to obtain the processing result, and the capability node endorses the processing result (Endorse). This result, together with the endorsement information, is used as the final result for a response receipt. The response receipt corresponds to a capability usage link on the directed acyclic graph, and is ultimately recorded in the account through the directed acyclic graph structure.
[0087] Ledger data processing may require different capabilities. For example, general storage only requires the capabilities of the accounting node, object data storage requires the capabilities of both the object storage node and the accounting node, and private data storage requires the capabilities of both the privacy node and the accounting node. Capability expressions describe the corresponding capability requirements for data processing. Capabilities can be provided by capability nodes or built-in functions, such as hash tags, which correspond to hash functions and provide hash results for data. Capability expressions can construct directed acyclic graphs (DAGs) that indicate the flow and sequence of data processing.
[0088] When processing data processing requests sent by the user, the smart contract's internal processing function reads the label expression in the data or the preset label expression in the function after receiving the data processing request. It then passes the data and the label expression to the engine for processing. The engine parses the directed acyclic graph (DAG) structure contained in the label and then processes the data layer by layer according to the topological order in the DAG. For a specific DAG link, the system locates the capability node through its label expression, sends a data request to it to obtain the processing result, and appends the execution result of each step to the DAG structure. The system returns this DAG structure as the final processing result to the smart contract. The smart contract provides a key value for this processing result and records the processing result in the blockchain ledger. This ensures the traceability and immutability of the entire data processing link.
[0089] When multiple ledger-owning organizations need to jointly endorse a result, the results of each link in the DAG are compared. If the results of a link are consistent, the signature information of multiple parties is added to that link. This forms the final DAG-based consistency result. If the processing results of a link in the DAG are inconsistent, the result is considered inconsistent.
[0090] The embodiments of the present invention are described below by way of examples.
[0091] Assume that there are currently ledgers belonging to organizations org1.com and org2.com, and they intend to establish a common ledger channel1. The ledger includes org1's accounting node an1.org1.com and consensus node cn1.org1.com, and org2's accounting node an1.org2.com and consensus node cn1.org2.com.
[0092] The administrative user of org1 is adminA;
[0093] The administrative user of org2 is adminB.
[0094] The general user of org1 is userA;
[0095] The general user of org2 is userB.
[0096] The system contract for the engine to install or obtain capability programs is called capability. The key value of the capability program is stored in the independent namespace capability.
[0097] There is a capability program called OSS, which provides object storage capabilities and has the capability label OSS.
[0098] The system's built-in label function is hash, which provides the hash256 operation result, and its label is hash.
[0099] Currently, there is a user contract called storage, which is responsible for storing users' storage requests. Its write function is write, its read function is read, and its endorsement policy is ALL (all account book-owning organizations participate in the endorsement).
[0100] Installation of the capability program consists of the following steps:
[0101] Step 1: adminA uploads the OSS program to the installation directory capablities on all accounting nodes of org1.
[0102] Step 2: adminB uploads the OSS program to the installation directory capablities on all accounting nodes of org2.
[0103] Step 3: adminA calls the system contract capablity through the an1.org1.com node to upload the capability program to the chain. The data is oss program, the label is oss, and the endorsement rule is ALL.
[0104] Step 4: org1's accounting node an1.org1.com receives the request, detects whether the OSS program exists locally, compares the data consistency, and endorses the on-chain data.
[0105] Step 5: org2's accounting node an1.org2.com receives the request, detects whether the OSS program exists locally, compares the data consistency, and endorses the on-chain data.
[0106] Step 6: If either org1 or org2 fails to endorse, the capability program installation will fail.
[0107] In step seven, both org1 and org2 have completed endorsement, and the results are consistent.
[0108] Step 8: The data is submitted to the consensus node to complete the block generation.
[0109] Step 9: Record the OSS program in the ledger. The key is OSS. This key is located in the Capablity namespace, and its value is the OSS program.
[0110] The configuration steps of the capability node are as follows:
[0111] In step 1, org1 calls its Certificate Authority (CA) to generate a key and certificate for the oss1.org1.com node. The identity role in the certificate is oss.
[0112] In step 2, org2 calls its CA to generate a key and certificate for the oss1.org2.com node. The identity role in the certificate is oss.
[0113] Step 3: AdminA of org1 initiates a configuration change transaction request for account channel 1, adding oss1.org1.com information for org1 and oss1.org2.com information for org2.
[0114] Step 4: The org1 node an1.org1.com node endorses this configuration change transaction.
[0115] Step 5: The org2 node an1.org2.com node endorses this configuration change transaction.
[0116] Step 6: Send the transaction endorsed by both parties to the consensus node.
[0117] Step 7: Consensus nodes cn1.org1.com and cn1.org2.com generate a block based on their consensus. This block is the configuration block.
[0118] Step 8: The accounting nodes an1.org1.com and cn1.org2.com are synchronized to the block, completing the configuration change.
[0119] The startup of a capability node includes the following steps:
[0120] Step 1: After the oss1.org1.com capability node carries the secret key and certificate and starts the genesis block, it extracts the role information oss from the certificate and initiates a transaction request initiated by the oss program to the capability smart contract of any accounting node in the same organization, such as an1.org1.com.
[0121] In step 2, the accounting node an1.org1.com receives the request. The contract uses the node information in the configuration block to determine whether the identity of the request sender exists in the list, and verifies the validity of its certificate and the validity of the transaction signature.
[0122] Step 3: After verification, send the OSS program to it.
[0123] Step 4: The capability node oss1.org1.com receives the OSS program and starts communicating with it (e.g., a Unix domain socket).
[0124] Step 5: After the oss1.org2.com capability node starts with the secret key certificate and genesis block, it extracts the role information oss from the certificate and initiates a transaction request initiated by the oss program to the capability smart contract of any accounting node in the same organization, such as an1.org2.com.
[0125] In step 6, the accounting node an1.org2.com receives the request. The contract uses the node information in the configuration block to determine whether the identity of the request sender exists in the list, and verifies the validity of its certificate and the validity of the transaction signature.
[0126] Step 7: After verification, send the OSS program to it.
[0127] Step 8: The capability node oss1.org2.com receives the OSS program and starts to establish communication with it (e.g., a Unix domain socket).
[0128] When processing a data write request, the following exemplary execution steps are included:
[0129] Step 1: User userA initiates a write transaction request to the smart contract storage through an1.org1.com. The data is a piece of object data and the labels is oss-hash.
[0130] Step 2: an1.org1.com receives the transaction request, checks the contract endorsement rule and finds it is ALL, and then sends an endorsement request to an1.org1.com and an1.org2.com.
[0131] In step 3, an1.org1.com receives the request, parses the request labels expression oss-hash, extracts the label oss, selects the capability node oss1.org1.com corresponding to oss in the same organization from the configuration block, and sends the data to the oss1.org1.com node.
[0132] Step 4: The oss1.org1.com node receives the request and calls the OSS capability program.
[0133] Step 5: The OSS capability program stores the data and returns the unique extraction key corresponding to the file: k1.
[0134] Step 6: The oss1.org1.com node endorses the result and sends a receipt.
[0135] Step 7: an1.org1.com receives the receipt and records the result in the OSS link of the DAG structure.
[0136] In step 8, an1.org1.com extracts the tag hash, calls the hash function to hash and endorse the data, and records the result in the hash link of the DAG structure.
[0137] Step 9: The smart contract sets the key for saving this DAG result to: k1.
[0138] In step 10, an1.org2.com receives the request, parses the request labels expression oss-hash, extracts the label oss, selects the capability node oss1.org2.com corresponding to oss in the same organization from the configuration block, and sends the data to the oss1.org2.com node.
[0139] Step 11: The oss1.org2.com node receives the request and calls the OSS capability program.
[0140] Step 12: The OSS capability program stores the data and returns the unique extraction key corresponding to the file: k1.
[0141] Step 13: The oss1.org2.com node endorses the result and sends a receipt.
[0142] Step 14: an1.org2.com receives the receipt result and records the result in the OSS link of the DAG structure.
[0143] In step 15, an1.org2.com extracts the tag hash, calls the hash function to hash the data and endorse it, and records the result in the hash link of the DAG structure.
[0144] Step 16: The smart contract sets the key for saving this DAG result to: k1.
[0145] Step 17: an1.org1.com collects the endorsement results of an1.org1.com and an1.org2.com.
[0146] In step 18, the DAG results are compared step by step. If the results are consistent, the endorsement results of both parties are attached.
[0147] In step 19, endorsement is successful when the entire DAG results are consistent and the DAG's saved key values are consistent.
[0148] Step 20: an1.org1.com sends the endorsed transaction proposal to any consensus node, such as cn1.org1.com.
[0149] Step 21: After cn1.org1.com and all other consensus nodes reach consensus on the transaction, they complete the transaction sorting and block generation process and broadcast the results to all accounting nodes.
[0150] In step 22, an1.org1.com and an1.org2.com both verify the validity of the results and record them in the ledger.
[0151] Step 23: The smart contract writes back the execution result k1 to userA.
[0152] When processing blockchain data extraction operations, the following exemplary execution steps are included:
[0153] Step 1: userA initiates a read request to the storage smart contract of an1.org1.com with parameter k1.
[0154] Step 2: an1.org1.com verifies the validity of the transaction signature.
[0155] Step 3: an1.org1.com submits the request to the read function of the smart contract.
[0156] Step 4: The smart contract extracts the DAG result corresponding to k1 from the ledger.
[0157] Step 5: The smart contract searches for the OSS link from the DAG results.
[0158] Step 6: The smart contract extracts the result value k1 from the oss link of the DAG.
[0159] Step 7: The smart contract finds any OSS node from the blockchain configuration block, such as oss1.org1.com.
[0160] Step 8: The smart contract initiates a request to extract k1 from oss1.org1.com.
[0161] Step 9: The oss1.org1.com node extracts the object data, signs it, and issues a receipt.
[0162] Step 10: The smart contract receives the object data and calculates its hash value.
[0163] Step 11: The smart contract extracts the hash value in the hash link from the DAG.
[0164] In step 12, the smart contract compares the hash values in the first two steps to see if they are consistent. If they are not consistent, an error message will be sent to the user.
[0165] Step 13: If they are consistent, write the object data back to the user.
[0166] Step 14: userA obtains the object data.
[0167] In this embodiment of the present invention, through the definition, deployment, and scheduling of capability nodes, blockchain, computing, storage, and AI technologies are integrated as scalable on-chain capability node resources. Label expressions are flexibly applied to the processing of on-chain data. This scalability of capability nodes and the flexibility of label expressions break the shackles of blockchains that are limited to storing simple data, opening up unlimited possibilities for blockchain data processing and facilitating rapid response to changing user needs.
[0168] The following describes it in detail with reference to another embodiment.
[0169] Example 2
[0170] A blockchain-based data expansion processing device provided in this embodiment includes multiple implementation units, each of which corresponds to each implementation step in the above-mentioned embodiment 1. Its specific implementation methods and beneficial effects can be referred to the above-mentioned method embodiments and will not be repeated here.
[0171] Figure 4 is a schematic diagram of an optional blockchain-based data expansion processing device according to an embodiment of the present invention. Figure 4 As shown, the data expansion processing device based on blockchain may include: a receiving unit 41, a construction unit 42, an updating unit 43, and a generating unit 44, wherein:
[0172] The receiving unit 41 is used to receive a data processing request, parse the data processing request, and obtain a label expression for the data processing;
[0173] A construction unit 42 is configured to construct a directed acyclic graph based on the label expression, send the data to be processed to the corresponding capability node based on the topological order of the directed acyclic graph, and obtain the data processing results of the capability node. The capability node is used to call the capability program to expand the functionality of the blockchain. The capability program is represented as an application program for expanding the functionality of the blockchain.
[0174] An updating unit 43 is configured to add the data processing results of each capability node to the corresponding topological node in the directed acyclic graph, update the directed acyclic graph, and obtain an updated directed acyclic graph;
[0175] The generating unit 44 is configured to compare the directed acyclic graphs of the multiple account book organizations after the update, obtain a comparison result, and generate the directed acyclic graphs of the multiple account book organizations after the update indicated by the comparison result. Figure 1 If the data is consistent, the data expansion processing results are generated based on the updated directed acyclic graph of each account book’s affiliated organization.
[0176] The above-mentioned data expansion processing device based on blockchain receives a data processing request through a receiving unit 41, parses the data processing request, and obtains a label expression for data processing; constructs a directed acyclic graph based on the label expression through a construction unit 42, and sends the data to be processed to the corresponding capability node based on the topological order of the directed acyclic graph to obtain the data processing result of the capability node, wherein the capability node is used to call the capability program to expand the function of the blockchain, and the capability program is represented as an application program for expanding the function of the blockchain; adds the data processing result of each capability node to the corresponding topological node in the directed acyclic graph through an updating unit 43, updates the directed acyclic graph, and obtains an updated directed acyclic graph; compares the updated directed acyclic graphs of multiple account book organizations through a generating unit 44 to obtain a comparison result, and compares the updated directed acyclic graphs of multiple account book organizations indicated by the comparison result. Figure 1 If the data is consistent, the data expansion processing results are generated based on the updated directed acyclic graph of each account book’s affiliated organization.
[0177] In this embodiment, capability programs are uploaded to the blockchain, and capability nodes are created to call capability programs in real time to execute expansion tasks. This enhances blockchain functionality, seamlessly integrates multiple expansion functions, broadens blockchain application scenarios, avoids multi-system interaction, and improves data processing and task execution efficiency. When parsing data processing requests, capability nodes are associated with a directed acyclic graph, which intelligently schedules data processing priorities and processing sequences, improving data processing efficiency and accuracy. This addresses the technical issue of low execution efficiency in related technologies, which exists in the context of single blockchain functionality and the linkage of multiple business systems to achieve blockchain function expansion.
[0178] Furthermore, the blockchain-based data expansion processing device also includes: a first uploading module, which is used to upload capability program data to the accounting node of each account book organization, and to put the capability program data on the chain to obtain the on-chain data; a first endorsement module, which is used to endorse the on-chain data based on each account book organization to obtain the endorsement result of the on-chain data; a first configuration module, which is used to record the capability program on the account book when the endorsement result indicates that all account book organizations have passed the endorsement, and to configure a capability label for the capability program, wherein the capability label of the capability program corresponds to the role field in the label expression.
[0179] Furthermore, the blockchain-based data expansion processing device also includes: a first construction module, which is used for each ledger-to-affiliate organization to construct a capability node based on the capability program and generate a secret key and certificate for the capability node; a first new module, which is used to create a configuration transaction for a new capability node based on the capability node, secret key and certificate; a second endorsement module, which is used to send the configuration transaction to the accounting node of each ledger-to-affiliate organization for endorsement to obtain a transaction endorsement result; a first deployment module, which is used to send the endorsed configuration transaction to the consensus node when the transaction endorsement result indicates that the endorsement is passed, and to upload the configuration transaction to the chain through the consensus node, and to deploy the capability node to the blockchain configuration block.
[0180] Furthermore, the blockchain-based data expansion processing device also includes: a first receiving module, used to receive a capability program activation request initiated by a capability node, wherein the capability node extracts the capability tag in the certificate and, based on the capability tag, initiates a program activation request to the accounting node under the organization to which the same ledger as the capability node belongs; a first issuing module, used to verify the identity of the capability node, and if the capability node passes the identity verification, issue the capability program to the capability node, wherein the capability node establishes a communication connection with the capability program through the issued capability program and calls the capability program in real time.
[0181] Furthermore, the construction unit includes: a first extraction module, used to extract the execution steps involved in the label expression and the dependency relationships between the execution steps; a second construction module, used to construct an initial directed acyclic graph with the execution steps as topological nodes and the dependency relationships between the execution steps as connecting lines between the topological nodes; a second extraction module, used to extract the role fields involved in each execution step in the label expression; a first adding module, used to determine the capability label based on the role field, and add the capability label to the initial directed acyclic graph to obtain a directed acyclic graph.
[0182] Furthermore, the construction unit also includes: a third construction module, which is used to construct a task request for the data to be processed based on the topological order of the directed acyclic graph, and send the task request to the corresponding capability node under each account book organization, wherein, after receiving the task request, the capability node under each account book organization calls the capability program corresponding to the capability node, processes the data to be processed through the capability program, and generates a result label for the processed data, returns the processing result to the capability node based on the result label, the capability node endorses the processing result, and generates a data processing result; a second receiving module, which is used to receive the data processing result returned by the corresponding capability node under each account book organization.
[0183] Furthermore, the receiving unit includes: a first parsing module, used to parse the data processing request, obtain the data processing requirements, and obtain the label expression based on the data processing requirements; a first matching module, used to match the data processing request with the preset data processing request, and when the data processing request successfully matches any preset data processing request, obtain a pre-defined label expression based on the successfully matched preset data processing request.
[0184] The above-mentioned blockchain-based data expansion processing device may also include a processor and a memory. The above-mentioned receiving unit 41, construction unit 42, update unit 43, generation unit 44, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0185] The aforementioned processor contains a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be configured, and the blockchain's functionality can be expanded by adjusting kernel parameters.
[0186] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0187] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned blockchain-based data expansion processing methods.
[0188] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any of the above-mentioned blockchain-based data expansion processing methods.
[0189] According to another aspect of an embodiment of the present invention, a computer program product is further provided, comprising a computer program, wherein when the computer program is executed by a processor, any one of the above-mentioned blockchain-based data expansion processing methods is implemented.
[0190] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: receiving a data processing request, parsing the data processing request, and obtaining a label expression for data processing; constructing a directed acyclic graph based on the label expression, and sending the data to be processed to the corresponding capability node based on the topological order of the directed acyclic graph, and obtaining the data processing result of the capability node, wherein the capability node is used to call the capability program to expand the function of the blockchain, and the capability program is represented as an application program for expanding the function of the blockchain; adding the data processing result of each capability node to the corresponding topological node in the directed acyclic graph, updating the directed acyclic graph, and obtaining an updated directed acyclic graph; comparing the updated directed acyclic graphs of multiple account book organizations to obtain a comparison result, and comparing the updated directed acyclic graphs of multiple account book organizations indicated by the comparison result to the updated directed acyclic graphs of the multiple account book organizations. Figure 1 If the data is consistent, the data expansion processing results are generated based on the updated directed acyclic graph of each account book’s affiliated organization.
[0191] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing an initialization program having the following method steps: uploading capability program data to the accounting node of each ledger-to-accounting organization, and uploading the capability program data to the chain to obtain the up-chain data; endorsing the up-chain data based on each ledger-to-accounting organization to obtain an endorsement result of the up-chain data; when the endorsement result indicates that the endorsement of all ledger-to-accounting organizations is passed, recording the capability program in the ledger and configuring a capability label for the capability program, wherein the capability label of the capability program corresponds to the role field in the label expression.
[0192] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing an initialization program having the following method steps: each ledger-to-be-owned organization constructs a capability node based on the capability program and generates a secret key and certificate for the capability node; creates a configuration transaction for a newly added capability node based on the capability node, secret key and certificate; sends the configuration transaction to the accounting node of each ledger-to-be-owned organization for endorsement, and obtains a transaction endorsement result; when the transaction endorsement result indicates that the endorsement is passed, sends the endorsed configuration transaction to the consensus node, and the consensus node uploads the configuration transaction to the chain, and deploys the capability node to the blockchain configuration block.
[0193] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing an initialization program having the following method steps: receiving a capability program activation request initiated by a capability node, wherein the capability node extracts the capability tag in the certificate and, based on the capability tag, initiates a program activation request to the accounting node under the organization to which the same ledger as the capability node belongs; performing identity verification on the capability node, and if the capability node passes the identity verification, issuing the capability program to the capability node, wherein the capability node establishes a communication connection with the capability program through the issued capability program and calls the capability program in real time.
[0194] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing an initialization program having the following method steps: extracting the execution steps involved in the label expression and the dependency relationships between the execution steps; constructing an initial directed acyclic graph using the execution steps as topological nodes and the dependency relationships between the execution steps as connecting lines between the topological nodes; extracting the role fields involved in each execution step in the label expression; determining the capability label based on the role field, and adding the capability label to the initial directed acyclic graph to obtain a directed acyclic graph.
[0195] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing a program that is initialized with the following method steps: constructing a task request for the data to be processed based on the topological order of a directed acyclic graph, and sending the task request to the capability node corresponding to each account book organization, wherein, after receiving the task request, the capability node under each account book organization calls the capability program corresponding to the capability node, processes the data to be processed through the capability program, generates a result label for the processed data, returns the processing result to the capability node based on the result label, the capability node endorses the processing result, and generates a data processing result; and receives the data processing result returned by the capability node corresponding to each account book organization.
[0196] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing an initialization program having the following method steps: parsing a data processing request, obtaining data processing requirements, and obtaining a label expression based on the data processing requirements; or, matching the data processing request with a preset data processing request, and when the data processing request successfully matches any preset data processing request, obtaining a predefined label expression based on the successfully matched preset data processing request.
[0197] Figure 5 This is a hardware structure diagram of an electronic device (or mobile device) that executes a data expansion processing method based on blockchain according to an embodiment of the present invention. Figure 5 As shown, the electronic device may include one or more processors ( Figure 5502a, 502b, ..., 502n are used to illustrate that the processor may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 505 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 5 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 5 More or fewer components than shown, or with Figure 5 Different configurations shown.
[0198] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0199] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0200] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0201] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0202] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0203] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.
[0204] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A data expansion processing method based on blockchain, characterized in that: include: Receive a data processing request, parse the data processing request, and obtain a label expression for the data processing; Constructing a directed acyclic graph based on the label expression, and sending the data to be processed to the corresponding capability node based on the topological order of the directed acyclic graph, and obtaining the data processing result of the capability node, wherein the capability node is used to call the capability program to expand the functionality of the blockchain, and the capability program is represented as an application program for expanding the functionality of the blockchain; Adding the data processing results of each capability node to the corresponding topological node in the directed acyclic graph, updating the directed acyclic graph, and obtaining the updated directed acyclic graph; The updated directed acyclic graphs of the multiple account book organizations are compared to obtain a comparison result. If the updated directed acyclic graphs of the multiple account book organizations indicated by the comparison result are consistent, a data expansion processing result is generated based on the updated directed acyclic graphs of the respective account book organizations.
2. The method according to claim 1, characterized in that Before receiving a data processing request, it also includes: Uploading capability program data to the accounting node of the organization to which each of the account books belongs, and uploading the capability program data to the blockchain to obtain the uplinked data; Endorsing the on-chain data based on the organizations to which the ledgers belong, and obtaining an endorsement result for the on-chain data; If the endorsement result indicates that all the organizations to which the account book belongs have passed the endorsement, the capability program is recorded in the account book, and a capability tag is configured for the capability program, wherein the capability tag of the capability program corresponds to the role field in the tag expression.
3. The method according to claim 2, characterized in that After recording the capability program in the ledger, it also includes: Each of the account book ownership organizations builds a capability node based on the capability program and generates a key and a certificate for the capability node; Creating a configuration transaction for adding the capability node based on the capability node, the secret key, and the certificate; Send the configuration transaction to the accounting node of each account book organization for endorsement, and obtain the transaction endorsement result; When the transaction endorsement result indicates that the endorsement is passed, the endorsed configuration transaction is sent to the consensus node, the configuration transaction is uploaded to the chain by the consensus node, and the capability node is deployed to the blockchain configuration block.
4. The method according to claim 3, characterized in that After deploying the capability node into the blockchain configuration block, the method further includes: Receiving a capability program activation request initiated by the capability node, wherein the capability node extracts the capability tag from the certificate and initiates a program activation request to a bookkeeping node under the same ledger organization as the capability node based on the capability tag; An identity verification is performed on the capability node. If the capability node passes the identity verification, a capability program is issued to the capability node. The capability node establishes a communication connection with the capability program through the issued capability program and calls the capability program in real time.
5. The method according to claim 2, characterized in that The steps of constructing a directed acyclic graph based on the label expression include: Extracting the execution steps involved in the label expression and the dependency relationships between the execution steps; Constructing an initial directed acyclic graph using the execution steps as topological nodes and the dependency relationships between the execution steps as connecting lines between the topological nodes; Extracting the role fields involved in each of the execution steps in the label expression; The capability label is determined based on the role field, and the capability label is added to the initial directed acyclic graph to obtain the directed acyclic graph.
6. The method according to claim 1, characterized in that The step of sending the data to be processed to the corresponding capability node based on the topological order of the directed acyclic graph and obtaining the data processing result of the capability node includes: Constructing a task request for the data to be processed based on the topological order of the directed acyclic graph, and sending the task request to the capability node corresponding to each of the account book organizations, wherein, after receiving the task request, the capability node under each of the account book organizations calls the capability program corresponding to the capability node, processes the data to be processed through the capability program, generates a result label for the processed data, and returns a processing result to the capability node based on the result label. The capability node endorses the processing result and generates a data processing result; Receive the data processing results returned by the capability node corresponding to the organization to which each account book belongs.
7. The method according to claim 1, characterized in that The steps of parsing the data processing request and obtaining a label expression for data processing include: Parsing the data processing request to obtain data processing requirements, and obtaining the label expression based on the data processing requirements; or, The data processing request is matched with a preset data processing request. If the data processing request successfully matches any preset data processing request, a predefined label expression is obtained based on the successfully matched preset data processing request.
8. A data expansion processing device based on blockchain, characterized in that: include: A receiving unit, configured to receive a data processing request, parse the data processing request, and obtain a label expression for data processing; A construction unit, configured to construct a directed acyclic graph based on the label expression, and send the to-be-processed data to a corresponding capability node based on the topological order of the directed acyclic graph, and obtain a data processing result of the capability node, wherein the capability node is configured to call a capability program to expand the functionality of the blockchain, and the capability program is represented as an application program for expanding the functionality of the blockchain; An updating unit, configured to add the data processing results of each capability node to the corresponding topological node in the directed acyclic graph, update the directed acyclic graph, and obtain the updated directed acyclic graph; A generating unit is configured to compare the updated directed acyclic graphs of the multiple account book organizations to obtain a comparison result, and if the comparison result indicates that the updated directed acyclic graphs of the multiple account book organizations are consistent, generate a data expansion processing result based on the updated directed acyclic graphs of the respective account book organizations.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the blockchain-based data expansion processing method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: The system comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the blockchain-based data expansion processing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Industrial graph construction method and device, electronic equipment and storage medium
CN112632293A
Data processing method and system, electronic equipment and computer storage medium
CN113746908A
Block chain construction method, block chain construction system and block chain system
CN116346369A
Directed acyclic graph-based system order determination method, apparatus and device, and medium
CN117196760A