Blockchain-based efficient consistency consensus method and system for agent data

By initializing global parameters, preprocessing data, and conducting multi-dimensional quantitative evaluation, combined with reputation-driven dynamic committee election and three-stage parallel consensus, the problem of low efficiency and high resource consumption of blockchain consensus algorithms in multi-agent environments is solved, achieving efficient and secure data consensus and recording.

CN122240661APending Publication Date: 2026-06-19ZHEJIANG SHUREN UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG SHUREN UNIV
Filing Date
2026-03-11
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing blockchain consensus algorithms suffer from problems such as low consensus efficiency, unquantifiable node reputation, high resource consumption, and delayed data query in multi-agent data sharing environments, which limit their practical application in complex agent collaboration systems.

Method used

By generating digital identity credentials for intelligent agents through initializing global parameters, performing data preprocessing and multi-dimensional quantitative evaluation, adopting a reputation-driven dynamic committee election mechanism, and combining a three-stage parallel consensus operation and a multi-dimensional fast on-chain structure, an efficient data consensus process is achieved.

Benefits of technology

It significantly reduces consensus computation costs, improves block confirmation speed and cross-node data consistency, ensures fast, reliable and tamper-proof data records, enhances system security, stability and traceability, and is suitable for multi-agent collaboration and high-density data scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240661A_ABST
    Figure CN122240661A_ABST
Patent Text Reader

Abstract

This invention provides a blockchain-based method and system for efficient consensus on intelligent agent data consistency, relating to the field of blockchain consensus technology. The method includes: initializing global parameters; generating digital identity credentials for the intelligent agent based on the initialized global parameters; preprocessing the data generated by the intelligent agent; evaluating the segmented data; encapsulating the preprocessed data into blocks based on the evaluation results; determining whether the network is in the startup phase and whether there is insufficient on-chain historical behavior data based on the encapsulation results; if so, electing the first committee members from the existing nodes; otherwise, calculating the comprehensive reputation score of all nodes; determining the current committee members based on each comprehensive reputation score; driving the current committee members to perform a three-stage parallel consensus to confirm the winning block, using time slots as the driving unit; and performing a multi-dimensional on-chain operation on the winning block that can be quickly queried.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain consensus technology, and in particular to a blockchain-based method and system for efficient consensus on intelligent agent data consistency. Background Technology

[0002] AI agents are computational entities capable of perceiving external information, performing reasoning and analysis, and autonomously taking actions to achieve predetermined goals in a specific environment. Blockchain is a distributed, immutable, and traceable data recording technology where multiple nodes jointly maintain a data ledger, ensuring data consistency and trustworthiness through a consensus mechanism.

[0003] In complex application scenarios such as autonomous driving, smart healthcare, intelligent manufacturing, energy dispatching, financial risk control, and supply chain management, multiple intelligent agents can achieve collaborative decision-making through task decomposition and data sharing, thereby improving the overall operating efficiency and intelligence level of the system.

[0004] However, existing blockchain consensus algorithms still face problems such as low consensus efficiency, unquantifiable node reputation, high resource consumption, and slow data querying in multi-agent data sharing environments, limiting their practical application in complex agent collaboration systems. How to achieve efficient node reputation election, parallelized consensus processes, and a quickly queryable block organization structure while ensuring system security and decentralization has become a critical technical problem urgently needing to be solved in the field of trusted data sharing and consistency maintenance for intelligent agents. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a blockchain-based method for efficient consensus on intelligent agent data consistency. This method can solve the problems that existing blockchain consensus algorithms still face in multi-agent data sharing environments, such as low consensus efficiency, unquantifiable node reputation, high resource consumption, and data query delays, which limit their practical application in complex intelligent agent collaborative systems.

[0006] A first aspect of this invention proposes a blockchain-based method for efficient consensus on intelligent agent data consistency, comprising: S1: Initialize global parameters, which include: epoch block count threshold, network parameters, and current epoch anchor block; S2: Based on the initialized global parameters, generate the agent's digital identity credential, which includes: a unique identifier (DT) and a public-private key pair; S3: Preprocess the data generated by the intelligent agent based on the digital identity credentials; S4: Perform multi-dimensional quantitative evaluation on the segmented data, including: complexity, value, timeliness, and utility. S5: Based on the multi-dimensional quantitative evaluation results, the preprocessed data is encapsulated into blocks that conform to the consensus standard; S6: Based on the encapsulation result, determine whether the network is in the startup phase and whether there is insufficient on-chain historical behavior data; if so, use random sampling to elect the first committee members from the existing nodes and proceed to step S9; otherwise, proceed to step S7. S7: Calculate the overall reputation score of all nodes; S8: Determine the members of the current committee based on the comprehensive credit scores; S9: Driven by time slots, the current committee members confirm the winning block by performing a three-phase parallel consensus operation; S10: Perform multi-dimensional on-chain operations on the winning block that can be quickly queried.

[0007] A second aspect of this invention proposes a blockchain-based intelligent agent data efficient consistency consensus system, comprising: a processor and a memory; The memory stores programs or instructions that can run on a processor, and when the programs or instructions are executed by the processor, they implement the steps of the blockchain-based intelligent agent data efficient consistency consensus method as described in the first aspect.

[0008] A third aspect of the present invention provides a readable storage medium on which a program or instruction is stored, and when the program or instruction is executed by a processor, it implements the steps of the blockchain-based intelligent agent data efficient consistency consensus method of the first aspect.

[0009] The beneficial effects of the technical solutions provided by the embodiments of the present invention include at least the following: In this embodiment of the invention, by introducing data preprocessing, segmentation sampling, multi-dimensional quantitative evaluation, and a reputation-driven dynamic committee election mechanism, the scale of on-chain data processing can be effectively reduced in scenarios where agents generate massive amounts of heterogeneous data, thereby significantly reducing consensus computation costs. Through a three-stage parallel consensus and multi-dimensional rapid on-chain structure design, block confirmation speed and cross-node data consistency can be improved, ensuring that agent data is recorded quickly, reliably, and tamper-proofly across the entire network. Furthermore, a reputation scoring system based on node historical behavior, communication latency, and standardization can dynamically filter high-quality nodes to enter the committee, improving the consensus reliability and anti-attack capabilities of the entire network. This further enhances the overall efficiency of agent data on-chaining and consensus, and significantly strengthens the system's security, stability, and traceability, making it suitable for trusted data management in multi-agent collaboration, IoT, and high-density data scenarios. Attached Figure Description

[0010] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0011] Figure 1 This is a flowchart illustrating a blockchain-based intelligent agent data efficient consistency consensus method provided in an embodiment of the present invention.

[0012] Figure 2 This is a schematic diagram of the structure of a blockchain-based intelligent agent data efficient consistency consensus system provided in an embodiment of the present invention. Detailed Implementation

[0013] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0014] The following description, in conjunction with the accompanying drawings, details the blockchain-based intelligent agent data efficient consistency consensus method provided by the present invention through specific embodiments and application scenarios.

[0015] Reference manual attached Figure 1 The diagram illustrates a flowchart of a blockchain-based intelligent agent data efficient consistency consensus method provided by an embodiment of the present invention.

[0016] This invention provides a blockchain-based method for efficient consensus on intelligent agent data consistency, which may include the following steps: S1: Initialize global parameters, which include: epoch block count threshold, network parameters, and current epoch anchor block.

[0017] Global parameters refer to the basic configuration that the entire blockchain network follows throughout an epoch cycle, determining the operational rules for subsequent data processing, consensus execution, and epoch switching. All nodes in the network must maintain consistency.

[0018] It should be noted that by pre-initializing the threshold number of epoch blocks, network parameters, and the current epoch anchor block, a unified global operating benchmark can be established before the system runs, effectively avoiding the risk of forks caused by inconsistent understanding of the system state by nodes. At the same time, it provides a structured operating boundary for subsequent processes such as committee election, block encapsulation, multi-dimensional on-chaining, and epoch switching, so that the entire network can obtain clear control parameters and a stable consensus environment during the startup phase, thereby significantly improving the overall reliability, consensus efficiency, and operational controllability of the system.

[0019] S2: Based on the initialized global parameters, generate the agent's digital identity credential, which includes: a unique identifier (DT) and a public-private key pair; Intelligent agents refer to individual nodes that can autonomously generate data, possess basic computing capabilities, and engage in on-chain interactions. These include, but are not limited to, sensor nodes, robots, drones, camera nodes, and edge devices.

[0020] Digital identity credentials refer to the core set of identity information used by an agent in a blockchain network for identity identification, trusted communication, and signature authentication. They typically include identity identifiers, keys, and on-chain registration information, ensuring that node behavior is verifiable, traceable, and tamper-proof.

[0021] It should be noted that generating unique identifiers and public-private key pairs based on global parameters can establish a verifiable and unforgeable on-chain identity system for each agent, enabling agents to have a clear and credible source of identity during data publishing, block proposal, and consensus voting. This mechanism not only ensures the traceability and non-repudiation of all on-chain operations, but also lays a secure foundation for subsequent data signature verification, reputation calculation, and cross-node encrypted communication, thereby significantly improving the system's security, data credibility, and overall network stability.

[0022] Specifically, after S2, it also includes: the agent publishing the public key to the network through a peer-to-peer encrypted channel.

[0023] S3: Preprocess the data generated by the intelligent agent based on the digital identity credentials.

[0024] In one possible implementation, preprocessing includes classification and storage processing, segmentation processing, and sampling processing.

[0025] The classification and storage process specifically involves classifying and storing agent data carrying digital identity (DT) according to video streams, images, text, audio, and log types. The segmentation process specifically involves: when the size of the agent data exceeds a preset size, the agent data carrying digital identity identifiers is divided into data fragments of a fixed size; The sampling process specifically involves determining a representative dataset by random sampling when the number of data fragments generated by the agent exceeds a threshold.

[0026] S4: Perform multi-dimensional quantitative evaluation on the segmented data, including: complexity, value, timeliness, and utility.

[0027] Among them, multi-dimensional quantitative evaluation refers to evaluating data from multiple angles, in a calculable and comparable index-based manner. It is not a subjective judgment, but rather a transformation of data characteristics into numerical values ​​so that they can be uniformly processed in consensus, data selection, and block encapsulation.

[0028] In one possible implementation, S4 specifically includes: S401: Based on data complexity, calculate the inverse correlation index of the segmented data: in, r Indicates a negative correlation indicator. N This represents the total number of samples in the dataset. Indicates the first i Data samples and the j Data samples The similarity function between them.

[0029] S402: Calculate the information entropy of the segmented data: H Represents information entropy. Indicates the first i Data such as pixels and sampling points in a data sample k The probability of occurrence, where log represents the logarithmic function.

[0030] S403: Calculate nonlinearity: Indicates nonlinearity. Indicates the first i Data samples and the Data samples The Euclidean distance between them.

[0031] S404: Computational data complexity: in, C Indicates data complexity. This indicates the weight of the inverse correlation indicator. Weights representing information entropy The weights represent the degree of nonlinearity.

[0032] S405: Calculate the value dimension value: in, Indicates the value dimension value. Indicates the percentage of missing items. Indicates the proportion of abnormalities.

[0033] S406: Calculate the timeliness value of data: in, Indicates the timeliness value of the data. Indicates the current timestamp. Indicates a valid update timestamp.

[0034] S407: Calculate the utility value of data: in, UI Indicates the data utility value. Indicates importance score, Indicates the frequency of use.

[0035] It should be noted that by quantitatively evaluating the segmented data across four dimensions—complexity, value, timeliness, and utility—the system can accurately identify the structural characteristics, quality level, real-time nature, and usability of the data before it is uploaded to the blockchain. This allows the system to prioritize high-quality, high-value data for block encapsulation. This mechanism not only effectively reduces the on-chain usage of redundant or low-quality data, lowering storage and consensus burdens, but also increases the effective information density of block content, providing significant performance advantages for subsequent consensus efficiency, data retrieval efficiency, and on-chain decision-making quality.

[0036] S5: Based on the multi-dimensional quantitative evaluation results, the preprocessed data is encapsulated into blocks that conform to the consensus standard.

[0037] Among them, blocks that meet consensus standards refer to blocks that meet the network's requirements for block structure, block size, data format, verification rules, etc.

[0038] In one possible implementation, a block consists of a block header and a block body.

[0039] The block header includes the identifier DT, timestamp1, parent block hash list ParentHashes, proposer identity, data root DataRoot, and consensus proof ConsensusProof.

[0040] The block body includes a timestamp (Timestamp2), an off-chain data hash (StoHash), and data information.

[0041] Data information includes basic data information, data complexity, data value, data timeliness, and data utility.

[0042] Basic data information includes the off-chain data type corresponding to the block, the data size, and the data generation time.

[0043] Data complexity includes inverse correlation indicators, information entropy values, and nonlinearity.

[0044] It should be noted that by encapsulating the preprocessed data into blocks based on the quantitative evaluation results, the system can complete structural standardization and quality filtering before the data officially participates in the consensus process, ensuring that all data to be uploaded to the chain meets the unified block format and consensus requirements. This "evaluate first, then encapsulate" mechanism not only ensures the high quality and consistency of on-chain block content, but also effectively reduces invalid and low-value data from entering the subsequent consensus process, thereby significantly reducing consensus computation overhead, improving block propagation efficiency, and enhancing the reliability and throughput of the entire network in large-scale intelligent agent data scenarios.

[0045] S6: Based on the encapsulation results, determine whether the network is in the startup phase and whether there is insufficient historical on-chain behavior data. If so, elect the first committee members from the existing nodes using random sampling and proceed to step S9. Otherwise, proceed to step S7.

[0046] The startup phase refers to the stage when the blockchain system has just started or when the genesis block has just been created.

[0047] Among them, random sampling refers to selecting committee members who can represent the network from all active nodes in a random manner when there is no historical behavior data.

[0048] The first committee members refer to the set of block consensus executors selected by the system for the first time.

[0049] It should be noted that by determining whether the network is in the startup phase based on the encapsulation results, and by using random sampling to generate the first committee when historical behavior data is lacking, the problem of the consensus mechanism failing to start due to insufficient reputation data can be avoided. This allows the system to quickly form a working committee structure in the initial stage. This design not only ensures the fairness and unbiasedness of the initial committee election, but also establishes the necessary historical behavior basis for subsequent reputation assessment and dynamic committee rotation, thereby significantly improving the system's availability, stability, and self-organization capabilities under cold start conditions.

[0050] S7: Calculate the overall reputation score of all nodes.

[0051] In a blockchain network, a node refers to a network participant that can participate in operations such as data propagation, block verification, and consensus execution.

[0052] In this invention, a node typically corresponds to an intelligent agent or its agent program, and possesses a digital identity, key pair, and on-chain behavior records.

[0053] Among them, the comprehensive reputation score is a unified score obtained by quantitatively evaluating each node's historical behavior reliability, communication performance, and standardization in the network.

[0054] In one possible implementation, S7 specifically includes: S701: When the current committee is communicating with other nodes, obtain the number of blocks initiated and the number of finally confirmed blocks within the evaluation window of other nodes.

[0055] The final confirmed block count refers to the number of blocks initiated by a node that have been confirmed by the committee and added to the blockchain.

[0056] S702: Calculate the historical behavior reliability value, average communication latency, and node specification value for each node based on the number of blocks and the number of finally confirmed blocks.

[0057] Among these, the historical behavior reliability value evaluates the effectiveness of node proposals and can be expressed as the ratio of the number of blocks initiated by a node within the evaluation window to the number of blocks ultimately confirmed. The average node communication latency measures the communication efficiency and network location superiority of a node; it is the average latency between the current committee and that node. The canonical value focuses on misconfigured nodes and can be expressed as the number of blocks submitted by each node that were directly rejected by the network due to format errors or invalid signatures.

[0058] S703: Normalize the historical behavior reliability value, the average communication latency of the node, and the node specification value respectively to determine the comprehensive reputation score of each node: in, Indicates the overall credit score. Indicates the final number of confirmed blocks. This indicates the number of blocks initiated by the node within the evaluation window. This represents the maximum communication latency of the node. This represents the minimum communication latency of the node. This represents the average communication latency of the nodes. This indicates the number of blocks whose signatures were invalid and were directly rejected by the network. Indicates the weight of historical behavior reliability values. The weights of the communication latency metrics are indicated.

[0059] It should be noted that by introducing multiple indicators such as block proposal success rate, communication latency characteristics, and node standardization, and normalizing and integrating them to calculate a comprehensive reputation score, the system can objectively and quantitatively evaluate the trustworthiness of nodes from three key dimensions: behavioral quality, network performance, and security. This mechanism not only avoids evaluation bias caused by a single indicator, but also dynamically identifies low-quality nodes or nodes with potential attack risks, thereby ensuring more accurate and reliable election of committee members and significantly improving the consensus security, fault tolerance, and operational efficiency of the entire blockchain network.

[0060] S8: Determine the members of the current committee based on the comprehensive credit scores.

[0061] Specifically, S8 involves: after calculating the data for all candidate nodes, the current committee sorts all candidate nodes from largest to smallest, placing the node with the highest weight at the top. Finally, the top N nodes are directly selected as the final committee members. The committee size N = 3f + 1, where f is the maximum tolerable number of Byzantine nodes.

[0062] It should be noted that by selecting committee members based on comprehensive reputation scores, the system can ensure that all nodes participating in the consensus have high behavioral reliability and communication stability. This avoids nodes with poor performance or potential attack risks from entering the core consensus process. Compared with random selection, this reputation-based election method is more targeted and secure. It not only significantly improves the overall credibility and collaboration efficiency of the committee, but also provides high-quality participating nodes for the subsequent block proposal, verification and confirmation processes. This enables the entire network to obtain stronger security and higher consensus throughput in the early stages of its official operation.

[0063] S9: Driven by time slots, the current committee members confirm the winning block by performing a three-phase parallel consensus operation.

[0064] A time slot is a fixed-length time period unit used to drive the consensus rhythm of a blockchain network.

[0065] The three-phase parallel consensus operation refers to the consensus steps that committee members execute in parallel in three phases within each time slot, including the nomination phase (proposing candidate blocks), the publication and comparison phase (exchanging and comparing block hashes and determining the preferred block), and the confirmation phase (verifying the block and generating a confirmation signature).

[0066] Among them, the number of epoch blocks refers to the total number of blocks that have been successfully confirmed and uploaded to the chain within an epoch cycle.

[0067] In one possible implementation, S9 specifically includes: S901: Create new blocks through nodes and determine the block pool to be confirmed based on the new blocks.

[0068] A new block is a block created by a node based on the data it is currently processing. The unconfirmed block pool is a set of candidate blocks consisting of new blocks created by multiple nodes.

[0069] S902: Each member of the current committee selects nominated blocks from the pool of unconfirmed blocks.

[0070] Among them, the nominated block is the candidate block that each committee member selects from the pool of unconfirmed blocks and deems most qualified.

[0071] S903: Publish the hash of the nominated block.

[0072] S904: Based on the published results and combined with deterministic rules, select the nominated block corresponding to the smallest hash value as the winning block.

[0073] The deterministic rule is a unified rule used to determine a final winning block from multiple nominated blocks. The minimum hash rule is used here.

[0074] Among them, the winning block refers to the final block determined by the minimum hash value rule, which will enter the verification and confirmation process.

[0075] S905: Retrieve the block data of the winning block.

[0076] S906: Verify the validity of the winning block based on block data.

[0077] S907: Based on the verification results, committee members generate confirmation signatures for the winning block and broadcast them.

[0078] S908: Publish the confirmation signature to each node.

[0079] S909: Collect confirmation signatures and determine the number of epoch blocks based on the collection results.

[0080] It should be noted that by constructing a complete three-stage parallel consensus process, the system can form an efficient, reproducible, and auditable block confirmation mechanism from new block creation, nomination, hash competition, validity verification to confirmation signature collection. This process ensures the determinism and fairness of block selection through the least hash rule, and enhances the security of block finality through multi-point verification and confirmation signatures. This significantly improves the accuracy of epoch block statistics and consensus execution efficiency, ensuring that the network can maintain high stability and strong resistance to attacks even when multiple nodes participate in parallel.

[0081] In one possible implementation, S9 specifically refers to: Determine if the number of blocks in the current epoch exceeds the epoch block count threshold. If so, start a new epoch, identify all expiring blocks, and create the next epoch anchor block using the expiring blocks as parent blocks. Otherwise, maintain the current epoch and continue to include the determined epoch blocks in the current epoch's block set.

[0082] S10: Perform multi-dimensional on-chain operations on the winning block that can be quickly queried.

[0083] Among them, multi-dimensional on-chain operation refers to the on-chain method of linking the winning block in a multi-dimensional and multi-relational structure, rather than the single-chain structure of traditional blockchain that only relies on the "hash of the previous block".

[0084] In one possible implementation, S10 specifically includes: S1001: Retrieve all on-chain blocks with the same data type as the block to be added to the chain within the current epoch.

[0085] S1002: Based on the type retrieval results, establish connections between blocks of the same type.

[0086] Specifically, the committee verifies that members retrieve all on-chain blocks with the same data type as the block to be added within the current epoch, and sort them by timestamp from most recent to oldest. If no on-chain block of the same type is found within the current epoch, the block to be added exists as the starting point in the data type link, and the process jumps to step 1003; otherwise, the most recent on-chain block of the same type is selected, its hash value is written into the ParentHashes field of the block to be added, a link of blocks of the same type is established, and the process jumps to step 1003.

[0087] S1003: Retrieve all on-chain blocks within the current epoch that have the same creator as the block to be added to the chain.

[0088] S1004: Establish a connection with the creator based on the creator's search results.

[0089] Specifically, the committee verifies that members retrieve all existing blocks with the same creator as the block to be added to the blockchain within the current epoch, and sort them by timestamp from most recent to oldest. If no existing block with the same creator as the block to be added to the blockchain is found within the current epoch, the block to be added to the blockchain exists as the starting point in that creator's chain, and the process jumps to step 1005; otherwise, the block with the most recent timestamp that is the same creator as the block to be added to the blockchain is selected, the hash value of that block is written into the ParentHashes field of the block to be added to the blockchain, a connection with the creator is established, the connection is terminated, and network-wide synchronization is performed.

[0090] S1005: Determine if the block to be added to the chain has already established a connection of the same type or the same creator. If so, end the connection and perform a network-wide synchronization. Otherwise, select the anchor block of the current epoch as the parent block and write the hash value of the anchor block into the ParentHashes field to establish an anchor block connection.

[0091] Specifically, the committee verification members determine whether the block to be added to the chain has established a connection of the same type or the same creator. If a connection has been established, the connection is terminated and the entire network is synchronized; otherwise, the block to be added to the chain will select the anchor block corresponding to the current epoch as the parent block, write the hash value of the anchor block into the ParentHashes field of the block to be added to the chain, establish the anchor block connection, terminate the connection, and synchronize the entire network.

[0092] S1006: After the multidimensional connection is established, perform a multidimensional on-chain operation on the winning block that can be quickly queried.

[0093] It should be noted that by constructing blockchain connections based on data type, creator identity, and anchor blocks in multiple dimensions, the system can automatically establish a multi-index structure of type view, behavior view, and epoch view before a block is officially added to the chain. This enables each block to have fast retrieval capabilities through multiple entry points and paths. This mechanism not only significantly reduces the query overhead caused by single-path traversal in traditional chain structures, but also makes data classification, behavior tracking, and historical association in different dimensions more efficient. At the same time, it ensures that reliable connection links can still be established through anchor blocks even when blocks of the same type or the same creator are missing, thereby greatly improving the system's data organization capabilities, query efficiency, and scalability.

[0094] In one possible implementation, the process after S10 includes: S11: When a node initiates a data query or data transaction request, it quickly locates and traces the target block based on the multi-dimensional connection relationship of the blocks already on the chain.

[0095] S12: Based on the results of rapid location and tracing, update the local state of the node and return to step S3.

[0096] In this embodiment of the invention, when a node needs to conduct data transactions with other nodes, it analyzes the time information of the required data, searches for the corresponding epoch anchor block in the locally maintained DAG chain, and then uses this anchor block to quickly determine the epoch of the target block. Based on the target block information such as data type and creator information, it searches for the block with the latest timestamp from the same source blocks and blocks of the same type as a starting point, and simultaneously performs a reverse traversal along the same source blocks or blocks of the same type, checking the data in the block header one by one until the required data block and its header data are found. Once the target block is confirmed, the node initiates a peer-to-peer communication request to the node holding the data in the network to conduct the data transaction, and returns to step S3.

[0097] It should be noted that by using multi-dimensional connections to quickly locate and trace the target block in S11, and updating the local state of the node in a timely manner based on the location results in S12, the system can achieve efficient retrieval and accurate tracking of target data in a large-scale block data environment, avoiding the query delay caused by linear traversal in traditional blockchains. At the same time, this closed-loop state update mechanism can keep nodes consistent and up-to-date with the ledger view, thereby improving the data consistency, query speed and node autonomy of the entire network, and significantly enhancing the network's response performance and operational stability in scenarios with dense intelligent agents.

[0098] In this embodiment of the invention, by introducing data preprocessing, segmentation sampling, multi-dimensional quantitative evaluation, and a reputation-driven dynamic committee election mechanism, the scale of on-chain data processing can be effectively reduced in scenarios where agents generate massive amounts of heterogeneous data, thereby significantly reducing consensus computation costs. Through a three-stage parallel consensus and multi-dimensional rapid on-chain structure design, block confirmation speed and cross-node data consistency can be improved, ensuring that agent data is recorded quickly, reliably, and tamper-proofly across the entire network. Furthermore, a reputation scoring system based on node historical behavior, communication latency, and standardization can dynamically filter high-quality nodes to enter the committee, improving the consensus reliability and anti-attack capabilities of the entire network. This further enhances the overall efficiency of agent data on-chaining and consensus, and significantly strengthens the system's security, stability, and traceability, making it suitable for trusted data management in multi-agent collaboration, IoT, and high-density data scenarios.

[0099] Reference manual attached Figure 2 The diagram illustrates a structural schematic of a blockchain-based intelligent agent data efficient consistency consensus system provided by an embodiment of the present invention.

[0100] This invention provides a blockchain-based intelligent agent data high-efficiency consistency consensus system 20, comprising: a processor 201 and a memory 202; The memory 202 stores programs or instructions that can run on the processor 201. When the program or instructions are executed by the processor 201, they implement the steps of the above-described blockchain-based intelligent agent data efficient consistency consensus method and achieve the same technical effect. To avoid repetition, the present invention will not elaborate further.

[0101] It should be understood that the processor 201 in this embodiment of the invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0102] It should also be understood that the memory 202 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM).

[0103] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.

[0104] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0105] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0106] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0107] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0108] The units described as separate components may or may not be physically separate. 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 network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0109] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0110] If a function is implemented as 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 this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0111] This invention provides a readable storage medium that stores a program or instructions on the medium. When the program or instructions are executed by a processor, they implement the steps of the above-described blockchain-based intelligent agent data efficient consistency consensus method and achieve the same technical effect. To avoid repetition, this invention will not elaborate further.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.

Claims

1. A blockchain-based efficient consistency consensus method for agent data, characterized in that, include: S1: Initialize global parameters, wherein the global parameters include: epoch block number threshold, network parameters, and current epoch anchor block; S2: Based on the initialized global parameters, generate the digital identity credential of the agent, wherein the digital identity credential includes: a unique identifier (DT) and a public-private key pair; S3: Preprocess the data generated by the intelligent agent based on the digital identity credential; S4: Perform multi-dimensional quantitative evaluation on the segmented data, wherein the multi-dimensional evaluation includes: complexity, value, timeliness, and utility; S5: Based on the multi-dimensional quantitative evaluation results, the preprocessed data is encapsulated into blocks that conform to the consensus standard; S6: Based on the encapsulation result, determine whether the network is in the startup phase and whether there is insufficient on-chain historical behavior data; if so, use random sampling to elect the first committee members from the existing nodes and proceed to step S9; otherwise, proceed to step S7. S7: Calculate the overall reputation score of all nodes; S8: Determine the members of the current committee based on the comprehensive credit scores mentioned above; S9: Driven by time slots, the current committee members confirm the winning block by performing a three-phase parallel consensus operation; S10: Perform a multi-dimensional on-chain operation on the winning block that can be quickly queried.

2. The blockchain-based intelligent agent data efficient consistency consensus method according to claim 1, characterized in that, The preprocessing includes classification and storage processing, segmentation processing, and sampling processing; The specific classification and storage process involves classifying and storing agent data carrying digital identity (DT) according to video streams, images, text, audio, and log types. The segmentation process specifically involves: when the size of the agent data exceeds a preset size, the agent data carrying digital identity identifiers is divided into data fragments of a fixed size; The sampling process specifically involves determining a representative dataset by random sampling when the number of data fragments generated by the agent exceeds a threshold.

3. The blockchain-based intelligent agent data efficient consistency consensus method according to claim 1, characterized in that, S4 specifically includes: S401: Based on data complexity, calculate the inverse correlation index of the segmented data: in, r Indicates a negative correlation indicator. N This represents the total number of samples in the dataset. Indicates the first i Data samples and the j Data samples Similarity function between them; S402: Calculate the information entropy of the segmented data: H Represents information entropy. Indicates the first i Data such as pixels and sampling points in a data sample k The probability of occurrence, where log represents the logarithmic function; S403: Calculate nonlinearity: Indicates nonlinearity. Indicates the first i Data samples and the Data samples The Euclidean distance between them; S404: Computational data complexity: in, C Indicates data complexity. This indicates the weight of the inverse correlation indicator. Weights representing information entropy Weights representing the degree of nonlinearity; S405: Calculate the value dimension value: in, Indicates the value dimension value. Indicates the percentage of missing items. Indicates an abnormal proportion; S406: Calculate the timeliness value of data: in, Indicates the timeliness value of the data. Indicates the current timestamp. Indicates a valid update timestamp; S407: Calculate the utility value of data: in, UI Indicates the data utility value. Indicates importance score, Indicates the frequency of use.

4. The blockchain-based intelligent agent data efficient consistency consensus method according to claim 1, characterized in that, The block consists of a block header and a block body; The block header includes the identifier DT, timestamp Timestamp1, parent block hash list ParentHashes, proposer identity Proposer, data root DataRoot, and consensus proof ConsensusProof; The block body includes a timestamp Timestamp2, an off-chain storage data hash value StoHash, and data information; The data information includes basic data information, data complexity, data value, data timeliness, and data utility. The basic data information includes the off-chain data type corresponding to the block, the data size, and the data generation time; The data complexity includes the inverse correlation index, information entropy value, and nonlinearity.

5. The blockchain-based intelligent agent data efficient consistency consensus method according to claim 1, characterized in that, Specifically, S7 includes: S701: When the current committee is communicating with other nodes, obtain the number of blocks initiated and the number of finally confirmed blocks within the evaluation window of other nodes; S702: Calculate the historical behavior reliability value, average communication latency, and node specification value of each node based on the number of blocks and the number of finally confirmed blocks; S703: Normalize the historical behavior reliability value, the average communication latency of the node, and the node specification value respectively to determine the comprehensive reputation score of each node: in, Indicates the overall credit score. Indicates the final number of confirmed blocks. This indicates the number of blocks initiated by the node within the evaluation window. This represents the maximum communication latency of the node. This represents the minimum communication latency of the node. This represents the average communication latency of the nodes. This indicates the number of blocks whose signatures were invalid and were directly rejected by the network. Indicates the weight of historical behavior reliability values. The weights of the communication latency metrics are indicated.

6. The blockchain-based intelligent agent data efficient consistency consensus method according to claim 1, characterized in that, S9 specifically includes: S901: Create a new block through the node, and determine the block pool to be confirmed based on the new block; S902: Each member of the current committee selects a nominated block from the pool of blocks to be confirmed; S903: Publish the hash of the nominated block; S904: Based on the publication results and combined with deterministic rules, select the nominated block corresponding to the smallest hash value as the winning block; S905: Retrieve the block data of the winning block; S906: Verify the validity of the winning block based on the block data; S907: Based on the verification results, committee members generate confirmation signatures for the winning block and broadcast them; S908: Publish the confirmation signature to each node; S909: Collect the confirmation signatures and determine the number of epoch blocks based on the collection results.

7. The blockchain-based intelligent agent data efficient consistency consensus method according to claim 1, characterized in that, Specifically, S9 is: Determine if the number of blocks in the current epoch exceeds the threshold for the number of blocks in the epoch; if so, start a new epoch, identify all end blocks, and create the next epoch anchor block as the parent block; otherwise, keep the current epoch unchanged and continue to include the determined epoch blocks into the block set of the current epoch.

8. The blockchain-based intelligent agent data efficient consistency consensus method according to claim 1, characterized in that, S10 specifically includes: S1001: Retrieve all already-on-chain blocks within the current epoch that have the same data type as the block to be added to the chain; S1002: Establish connections between similar blocks based on type retrieval results; S1003: Retrieve all blockchained blocks in the current epoch that have the same creator as the block to be added to the blockchain; S1004: Establish a connection with the creator based on the creator's search results; S1005: Determine whether the block to be added to the chain has already established a connection of the same type or the same creator; if so, end the connection and perform full network synchronization; otherwise, select the anchor block of the current epoch as the parent block and write the hash value of the anchor block into the ParentHashes field to establish an anchor block connection. S1006: After the multidimensional connection is established, perform a multidimensional on-chain operation that can be quickly queried on the winning block.

9. The blockchain-based intelligent agent data efficient consistency consensus method according to claim 1, characterized in that, Following S10, the following is also included: S11: When a node initiates a data query or data transaction request, it quickly locates and traces the target block based on the multi-dimensional connection relationship of the blocks already on the chain. S12: Based on the rapid location and tracing results, update the local state of the node and return to step S3.

10. A blockchain-based intelligent agent data high-efficiency consensus system, characterized in that, include: Processor and memory; The memory stores programs or instructions that can run on the processor, and when the programs or instructions are executed by the processor, they implement the steps of the blockchain-based intelligent agent data efficient consistency consensus method as described in any one of claims 1 to 9.