Block chain consensus optimization auditing method and terminal based on Beidou time service
By using the BeiDou time synchronization system to provide a unified time reference for the blockchain network, generating transaction timestamps and performing global time-series sorting, the problem of time asynchrony in the blockchain system is solved, consensus efficiency and security are improved, and efficient parallel processing and security auditing are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN XINGHAI COMM TECH
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-15
AI Technical Summary
Blockchain systems suffer from inefficiencies in consensus mechanisms, high energy consumption, and large latency. Furthermore, the lack of a unified time base makes transaction sorting difficult, leading to forks and rollbacks. Security audits rely on post-event analysis and lack real-time monitoring.
The BeiDou time service system is used to provide unified time reference data for the blockchain network, generate transaction timestamps and perform global time-series sorting, use time window grouping technology for parallel verification and processing, and generate tamper-proof time audit log data for storage in the blockchain network.
The BeiDou satellite timing system solved the problem of time asynchrony between distributed nodes, improved consensus efficiency, reduced latency and energy consumption, enabled efficient parallel processing and security auditing of transactions, and enhanced the transparency and compliance of the system.
Smart Images

Figure CN122048360A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain technology, and in particular to a blockchain consensus optimization and upgrade method and terminal based on BeiDou time synchronization. Background Technology
[0002] Currently, blockchain systems primarily employ consensus mechanisms such as Proof-of-Work (PoW), Proof-of-Stake (PoS), and Practical Byzantine Fault Tolerance (PBFT). However, these methods suffer from inefficiencies, high energy consumption, and significant latency when handling large-scale transactions. Traditional consensus mechanisms lack a unified time base, and clock asynchrony between nodes leads to difficulties in transaction sequencing, making forks and rollbacks more likely. Time synchronization schemes in related technologies mainly rely on the Network Time Protocol (NTP), but its accuracy is limited and it is vulnerable to network attacks. Security auditing of blockchain systems primarily relies on post-event analysis, lacking real-time security monitoring and protection mechanisms. Summary of the Invention
[0003] The technical problem to be solved by this invention is to provide a blockchain consensus optimization and upgrade method and terminal based on Beidou time synchronization, so as to realize a unified time base for the blockchain network, optimize the efficiency of the consensus mechanism, and enhance the system security and traceability.
[0004] A blockchain consensus optimization and upgrade method based on BeiDou time synchronization includes: Based on the BeiDou satellite timing system, a unified time reference data is provided for nodes in the blockchain network; Upon receiving a transaction request, a transaction timestamp is generated based on the unified time base data, and a global time-series sorting result for all the transaction requests is generated based on the transaction timestamp. Using the global time-series sorting results of the transactions, all transaction requests are verified and processed in parallel using time window grouping technology to obtain the parallel verification results of the transactions. Based on the unified time base data, the global time sequence sorting results of the transactions, and the parallel verification results of the transactions, tamper-proof time audit log data is generated and stored in the blockchain network.
[0005] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A blockchain consensus optimization auditing terminal based on BeiDou time synchronization includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it performs the following steps: Based on the BeiDou satellite timing system, a unified time reference data is provided for nodes in the blockchain network; Upon receiving a transaction request, a transaction timestamp is generated based on the unified time base data, and a global time-series sorting result for all the transaction requests is generated based on the transaction timestamp. Using the generated global time-series sorting result of transactions, all transaction requests are verified and processed in parallel through time window grouping technology to obtain the parallel verification result of transactions. Based on the unified time base data, the global time sequence sorting results of the transactions, and the parallel verification results of the transactions, tamper-proof time audit log data is generated and stored in the blockchain network.
[0006] The beneficial effects of this invention are as follows: By using the BeiDou satellite timing system, a unified time reference data is provided for nodes in the blockchain network, fundamentally solving the problem of time asynchrony among distributed nodes. This lays a deterministic temporal foundation for the subsequent consensus mechanism, thereby completely eliminating the risks of transaction sorting chaos, forks, and rollbacks caused by time deviations in traditional blockchains. Based on this, this invention constructs a consensus mechanism based on high-precision timestamps and generates a global transaction temporal ordering result according to the timestamp, simplifying the complex multi-round consensus to the verification of physical time order, improving consensus efficiency and reducing latency and energy consumption. Furthermore, using the global temporal ordering result and time window grouping technology, efficient parallel verification and processing of transactions are achieved while ensuring global temporal consistency, improving the system's transaction throughput and processing capacity. Simultaneously, the tamper-proof audit logs generated based on this standard time reference constitute a complete and traceable security audit chain from the time source to the transaction's completion, enhancing the system's transparency and compliance, realizing a unified time reference for the blockchain network, optimizing the efficiency of the consensus mechanism, and enhancing system security and traceability. Attached Figure Description
[0007] Figure 1 A flowchart illustrating the steps of a blockchain consensus optimization and upgrade method based on BeiDou time synchronization, provided in this embodiment of the invention; Figure 2 A schematic diagram illustrating the working principle of a blockchain consensus optimization and upgrade method based on BeiDou time synchronization provided in an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a blockchain consensus optimization audit terminal based on BeiDou time synchronization provided in an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a blockchain consensus optimization auditing system based on BeiDou time synchronization provided in an embodiment of the present invention; Label Explanation: 1. A blockchain consensus-optimized audit terminal based on BeiDou time synchronization; 2. Processor; 3. Memory. Detailed Implementation
[0008] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0009] Please refer to Figure 1 A blockchain consensus optimization auditing method based on BeiDou time synchronization includes steps 110 to 140.
[0010] Step 110: Based on the BeiDou satellite timing system, provide unified time reference data to nodes in the blockchain network. For example, each node in the blockchain network is equipped with a BeiDou satellite timing system, receiving standard time signals transmitted by BeiDou satellites in real time, and providing unified time reference data to nodes in the blockchain network.
[0011] Step 120: Upon receiving a transaction request, a transaction timestamp is generated based on unified time base data, and a global time-series ranking of all transaction requests is generated according to the transaction timestamp. For example, after receiving a transaction request, the system generates a transaction timestamp for the transaction request based on unified time base data. For global time-series ranking, the system adopts a timestamp-based ranking mechanism: first, all pending transactions and their corresponding timestamps are collected, and then they are sorted in ascending order according to the timestamp values, with transactions with smaller timestamp values listed first and those with larger values listed later. For transactions with the same timestamp, the system further sorts them lexicographically according to their hash values to ensure the uniqueness and determinism of the ranking results. Through this strict chronological ranking method, the system generates a global time-series ranking of all transaction requests, ensuring that all honest nodes can obtain a completely consistent transaction execution order based on the same set of timestamps.
[0012] Step 130: Utilizing the global transaction time-series sorting results, the system performs parallel verification and processing of all transaction requests using time window grouping technology to obtain parallel transaction verification results. For example, the system processes transactions based on the global transaction time-series sorting results using time window grouping technology: Specifically, the system sets a time window length parameter (e.g., 10 milliseconds or 100 milliseconds), and then groups all transactions whose timestamps fall within the same time window interval according to the timestamp of each transaction. For example, transactions with timestamps in the range [T0, T0+10ms) are assigned to the first window, transactions with timestamps in the range [T0+10ms, T0+20ms) are assigned to the second window, and so on, dividing the continuous transaction stream into multiple time windows arranged in chronological order. Within each time window, since the transactions within the window have already undergone global time-series sorting and conflicts have been resolved, the system can allocate multiple transactions to different processor cores or verification nodes to perform verification and processing tasks in parallel, including signature verification, state reading and writing, smart contract execution, and other operations. Each time window is processed sequentially according to its time order, ensuring that the status update result of the transaction in the previous window can be correctly read by the transactions in the subsequent windows after the transaction is completed. Finally, the system summarizes the execution results of all windows in window order to form a parallel transaction verification result.
[0013] Step 140: Based on unified time base data, global transaction time sequence ranking results, and parallel transaction verification results, generate tamper-proof time audit log data and store it in the blockchain network. For example, the system records unified time base data, global transaction time sequence ranking results, and parallel transaction verification results as time audit log data, and stores the generated tamper-proof time audit log data in the blockchain network to ensure secure traceability throughout the entire process from the time source to the transaction's completion.
[0014] As described above, the beneficial effects of this invention are as follows: By constructing a blockchain consensus and upgrade system driven by BeiDou time synchronization, the BeiDou satellite time synchronization system provides unified time reference data for nodes in the blockchain network, fundamentally solving the problem of time asynchrony among distributed nodes and establishing a precise and reliable time sequence foundation for subsequent consensus. Upon receiving a transaction request, this invention generates a globally trusted timestamp for the transaction based on this unified time reference, and directly generates a global time sequence ranking result for the transaction based on the timestamp. This simplifies the traditional complex multi-round consensus process to the verification of a determined time order, significantly improving consensus efficiency and reducing system latency and resource consumption. Furthermore, using this global time sequence ranking result, transactions are verified and processed in parallel through time window grouping technology, significantly improving the system's transaction throughput and processing capacity while ensuring the consistency of transaction order. Finally, based on the unified time reference, global time sequence ranking, and parallel verification results, an tamper-proof time audit log is generated and stored in the blockchain network, achieving immutable and traceable security auditing of the entire process from time synchronization and consensus ranking to transaction execution, comprehensively enhancing the security, transparency, and compliance of the blockchain system.
[0015] Further, step 110 includes steps 111 to 114.
[0016] Step 111: Receive standard time data via the BeiDou time synchronization module. For example, each blockchain node is equipped with a BeiDou time synchronization module that continuously receives standard time data.
[0017] Step 112: Generate the node's local standard time based on the standard time data. For example, the node uses the standard time data to generate its local standard time, which serves as the basis for subsequent precision calibration.
[0018] Step 113: Calculate network latency parameters and time drift parameters based on standard time data, and calculate time compensation values based on network latency parameters and time parameters. For example, a node continuously measures the round-trip time of messages between itself and neighboring nodes or time servers, and combines this with historical data analysis to calculate the statistical value of network transmission latency as the network latency parameter; at the same time, it monitors the long-term deviation rate between the local clock and the received standard time data to obtain the clock drift parameter. The calculation process for the time compensation value is as follows: First, for the network latency parameter, the node records the time t1 when the time synchronization request is sent and the time t4 when the time response is received, as well as the time t2 when the time server receives the request and the time t3 when it sends the response. The round-trip time (RTT) is calculated as RTT = (t4 - t1) - (t3 - t2), and the one-way network latency is taken as d = RTT / 2. For the time drift parameter, the node calculates the deviation sequence between the local clock time and the standard time, and obtains the clock drift rate (drift) through linear regression or sliding window averaging, in seconds per second. Then, the system calculates the cumulative drift amount as drift × Δt based on the time interval Δt between the current time and the last calibration. Finally, the network latency d and the cumulative drift amount drift × Δt are weighted and summed to obtain the time compensation value offset = α × d + β × (drift × Δt), where α and β are weighting coefficients that are dynamically adjusted according to network conditions and clock stability. Typically, α is 0.5-1.0 and β is 0.8-1.0. This time compensation value is used to offset the effects of network latency and clock drift, ensuring the accuracy of node time.
[0019] Step 114: Calibrate the node's local standard time according to the time compensation value to obtain the unified time reference data. For example, the node applies the time compensation value to its local standard time for precise adjustment; simultaneously, in a time synchronization network based on a hierarchical architecture, the node performs time synchronization step by step and iteratively according to its role and the calibration information received from the upper-layer time source, combined with its own calculated time compensation value, ultimately ensuring that all nodes in the network maintain consistency within a very small error range, generating globally unified, reliable time reference data that can be used for consensus and auditing.
[0020] As described above, by introducing BeiDou precision time synchronization, the time infrastructure of the blockchain network has been fundamentally reconstructed. This process not only achieves nanosecond-level time unification among nodes, but also establishes a trusted time benchmark with inherent security by monitoring network latency and clock drift parameters in real time. It achieves high-precision time unification among blockchain nodes, and more importantly, establishes a proactive mechanism to defend against time attacks, ensuring the integrity and reliability of the time benchmark data, and providing a solid and secure foundation for subsequent consensus sequencing and security auditing.
[0021] Further, step 113, which calculates the time compensation value based on the network delay parameter and the time drift parameter, includes steps 1131 to 1134.
[0022] Step 1131: Detect the statistical distribution of node time behavior based on standard time data. For example, the system continuously collects and monitors the local time information reported by all nodes in the blockchain network within a continuous time synchronization period, based on standard time data. This reported information is compared with the standard time data to form a series of time deviation values. The system aggregates and statistically analyzes these time deviation values, plots their distribution over time, and calculates key statistical indicators to quantify and describe the overall statistical distribution of the time behavior of all nodes in the network.
[0023] Step 1132: Analyze the statistical distribution and extract the dynamic characteristics of network latency and time drift parameters. For example, by analyzing the statistical distribution, the system identifies the dynamic characteristics of network latency parameters, such as the amplitude variation of latency jitter and the duration and frequency of sudden high latency. Simultaneously, it extracts the dynamic characteristics of clock drift parameters, such as the long-term trend of the drift rate and short-term irregular fluctuation patterns. These dynamic characteristics are key fingerprints reflecting the true state of the network and the stability of node hardware.
[0024] Step 1133: Match dynamic features with pre-stored attack features to detect the presence of time-based attacks. For example, the system maintains a pre-stored time-based attack feature library, which defines feature vectors for various known attack patterns. For instance, a "timestamp rollback attack" typically manifests as an unreasonable negative step in a time deviation sequence; a "timestamp jump attack" manifests as a sudden positive increase far exceeding normal fluctuations within a short period; and a "delay injection attack" alters the distribution of network latency parameters, causing an abnormal increase in variance. The system performs similarity calculations or pattern recognition on the real-time extracted dynamic feature vectors and entries in the feature library, for example, using a trained machine learning classifier or setting threshold rules for matching. When the matching degree between a real-time dynamic feature and a pre-stored attack feature exceeds a preset security threshold, an alarm is triggered.
[0025] Step 1134: If a match is successful, a time attack is determined, and the system calculates the time compensation value based on the network latency and time drift parameters corresponding to the matched attack characteristics. For example, once the system determines that a specific type of time attack has occurred, such as a "delay injection attack," it will immediately activate the protection mechanism preset for this type of attack. The core of this mechanism is to correct the contaminated parameters: the system will temporarily ignore or significantly reduce the weight of data from identified abnormal nodes or the period affected by the attack, and instead rely more on historical reliable data, the median of data from adjacent normal nodes, or activate a robust estimation algorithm to re-estimate the reliable network latency and clock drift parameters at the current moment. Subsequently, based on these security-corrected parameters, rather than the original parameters that may have been tampered with, the system uses a predetermined compensation algorithm to calculate the final time compensation value used for time calibration. This ensures that even under attack, the calculated compensation value remains secure and reliable.
[0026] As described above, the intelligent time security protection and time compensation value calculation process not only achieves high-precision time parameter measurement and compensation, but more importantly, it introduces a real-time online security detection and correction step. This process can effectively identify and resist various known attacks targeting the system's time base. By dynamically correcting input parameters, it fundamentally ensures the integrity and attack resistance of the subsequently calculated time compensation value and the final generated unified time base data, thus constructing a crucial underlying security barrier for the entire blockchain consensus and auditing system.
[0027] Further, step 114 includes steps 1141 to 1143.
[0028] Step 1141: In the blockchain network, construct a hierarchical time synchronization network topology among nodes. For example, in a blockchain network, the system dynamically constructs a hierarchical time synchronization network topology of master nodes and slave nodes based on the physical location, network connection quality, historical stability, and computing power of the blockchain network nodes. In this topology, a few nodes that maintain stable and high-precision time synchronization connections directly with the BeiDou satellite or are elected as highly reliable nodes are established as the top-level master nodes or root time sources. Other nodes are organized into multi-level subordinate relationships based on their network distance and reliability from the master nodes, forming a tree-like or hierarchical synchronization structure. This structure aims to minimize the number of hops in time synchronization and control the gradual accumulation and propagation of errors.
[0029] Step 1142: In the hierarchical time synchronization network topology, a reference time source is selected based on node performance metrics. For example, for each level of the hierarchical time synchronization topology, the system does not simply connect to any node in the previous level, but instead executes a time source selection mechanism based on trust and performance. This mechanism comprehensively evaluates multiple performance metrics of candidate parent nodes, including but not limited to: their own long-term clock stability and accuracy, historical time deviation with the BeiDou source, network connection latency and packet loss rate, and historical reliability scores assessed by the consensus mechanism. The system calculates the comprehensive score of each candidate source using a weighted algorithm, and selects the best one as the reference time source for this node, thereby forming high-quality time synchronization paths within the topology, connected by high-precision and high-reliability nodes.
[0030] Step 1143: Based on the reference event source and time compensation value, receive the calibrated time to obtain calibrated unified time base data. For example, a node periodically receives time synchronization messages from its selected reference time source. The message not only contains the current precise time information of the reference source but also integrates the calculated time compensation value for that synchronization path. After receiving the message, the node first applies the time compensation value to offset the fixed and variable delays generated during message transmission, and then uses a precise clock synchronization algorithm to adjust its own local clock. Simultaneously, the system continuously monitors synchronization errors at all levels. Once a reference source fails or the error exceeds the limit, a fault recovery mechanism is triggered, automatically switching to a backup time source. Ultimately, through this hierarchical, feedback-controlled synchronization process, all nodes in the network reach consensus within a very small error range, generating globally unified, reliable, and attack-resistant time base data.
[0031] As described above, the hierarchical time synchronization mechanism designed in this invention effectively reduces the complexity and communication overhead of direct synchronization of large-scale nodes by constructing a master-slave network topology, and confines synchronization errors to a limited number of layers, avoiding the global accumulation of errors. The intelligent reference time source selection mechanism dynamically elects the optimal reference time source based on multi-dimensional performance indicators such as node clock accuracy, network stability, and historical reliability, ensuring the quality and reliability of the synchronization path from the source. More importantly, this calibration process deeply integrates time compensation values detected and corrected by security attacks, enabling each level of synchronization to actively offset network latency and clock drift, and defend against malicious interference, thereby achieving nanosecond-level time uniformity across all network nodes. This mechanism not only fundamentally overcomes the technical challenge of high-precision time synchronization in a blockchain distributed environment, but its built-in real-time error monitoring and fault self-healing capabilities also ensure the continuous high availability and resilience of the time reference service, constructing an indispensable and robust underlying time-series infrastructure for upper-layer timestamp-based deterministic consensus, efficient parallel processing, and end-to-end trusted auditing.
[0032] Further, step 120 includes steps 121 to 125.
[0033] Step 121: Perform a total order sort on the timestamps of all pending transactions. For example, the system uses a unified time base data to generate a globally unique and immutable timestamp for each newly arrived transaction request. Then, the system aggregates all pending transactions and performs a total order sort strictly based on the numerical value of their accompanying timestamps. A "total order sort" means that for any two transactions A and B, comparing their timestamps will necessarily determine a unique sequential relationship: either A precedes B, or B precedes A; there are no cases where they cannot be compared or are tied. In practice, the system uses sorting algorithms such as quicksort or mergesort, using the timestamp value as the comparison key, and arranges the transactions in ascending order. For transactions with identical timestamp values, the lexicographical order of the transaction hash values is further used as a secondary sorting criterion to ensure the uniqueness and reproducibility of the sorting result. Through this total order sort, a preliminary transaction sequence is generated, arranged from earliest to latest timestamp. This sorting is deterministic; all honest nodes will obtain a completely consistent sequence based on the same set of timestamps.
[0034] Step 122: Analyze the read / write operation dependencies among the sorted transactions and construct a transaction dependency graph. For example, the system analyzes the blockchain state that each transaction in the initial transaction sequence attempts to access, such as reading or modifying specific account balances, smart contract states, etc., i.e., the transaction's read / write set. By comparing the read / write sets of different transactions, the system identifies the data dependencies between transactions: if the data that transaction B needs to read is written by transaction A, then B depends on A. Based on these dependencies, the system transforms the linear initial transaction sequence into a directed acyclic transaction dependency graph, where nodes represent transactions and directed edges represent dependency directions.
[0035] Step 123: Detect conflicting transaction pairs in the transaction dependency graph. For example, the system focuses on detecting a special type of dependency in the transaction dependency graph: write conflicts, or "race conditions." A conflicting transaction pair exists when two or more transactions, such as transaction A and transaction C, are not connected (i.e., they are independent) in the dependency graph, but both attempt to modify the same blockchain state unit. The system scans the dependency graph to precisely identify all such transaction pairs that have access conflicts but no temporal dependencies.
[0036] Step 124: Conflicting transaction pairs are judged based on their timestamp order, retaining the transaction with the earlier timestamp. For example, for each detected conflicting transaction pair, the system initiates a time-priority-based adjudication mechanism. This mechanism strictly follows a core rule: transactions with earlier timestamps have absolute priority. For example, in a conflicting pair, transaction A has a timestamp of T1, and transaction C has a timestamp of T2, where T1 is less than T2. The system will determine that transaction A is a valid transaction, while transaction C, because it attempts to modify a state already locked by an earlier transaction, will be deemed invalid or require rollback. This adjudication is deterministic, relying solely on objective timestamps, without requiring additional voting or computational competition.
[0037] Step 125: Based on the judgment result and total order, generate a global transaction time-series ranking result. For example, the system applies the judgment result to the generated preliminary transaction sequence. It removes or marks all transactions deemed invalid from the sequence. Simultaneously, it strictly respects the constructed transaction dependency graph, ensuring that all retained transactions are executed in the order determined by their dependencies. Finally, the system outputs a deterministic, conflict-free list of transaction execution orders that is consistent with the consensus of all honest nodes—the global transaction time-series ranking result. This result not only defines the execution order of transactions but also implicitly contains their validity status, providing a unique basis for subsequent parallel verification and block packaging.
[0038] As described above, by introducing a final decision-making right based on timestamp priority, any conflicts between transactions can be automatically and consistently resolved based on the indisputable objective fact of chronological order, thus logically eliminating the root cause of blockchain forks. This mechanism improves efficiency, saves significant communication overhead and computational redundancy, and achieves near-instantaneous transaction finality. More importantly, the security and authority of the consensus no longer rely on the complexity of the distributed protocol itself, but are instead based on the tamper-proof global time reference provided by the BeiDou time system. This allows the consensus kernel to achieve extremely high throughput and low latency, while also naturally possessing time-dimensional security and audit traceability that traditional consensus mechanisms cannot match, laying a solid theoretical foundation and technical implementation path for building a high-performance, highly secure next-generation blockchain system.
[0039] Furthermore, step 130 uses time window grouping technology to perform parallel verification and processing on all transaction requests to obtain parallel transaction verification results, including steps 131 to 133.
[0040] Step 131: Based on the timestamps in the global transaction time-series sorting results, divide all transactions into time windows. For example, based on the generated global transaction time-series sorting results, the system divides the continuous transaction stream into a series of time windows of fixed duration or containing a fixed number of transactions according to the timestamp of each transaction, in order to optimize resource utilization.
[0041] Step 132: Within a time window, perform parallel verification preprocessing on all transactions allocated to that window. For example, once a time window is determined, the system distributes all transactions within it to multiple processor cores or verification nodes, executing the verification and processing tasks required for each transaction in parallel. Since transactions within the same window are globally ordered and their conflicts have been resolved, these transactions logically possess the conditions of being dependency-free or having decidable dependencies, making large-scale parallel execution possible and thus improving verification throughput.
[0042] Step 133: Aggregate the verification results and coordination results within all time windows to obtain the parallel transaction verification result. For example, the system collects the parallel verification results of all transactions within each window, as well as the resulting cross-window coordination results, in the order of the time windows. These results are then summarized and integrated according to the original global time sequence to finally generate a complete parallel transaction verification result that reflects the final validity of all transactions and the new global state.
[0043] As described above, by using time windows to transform the linear global transaction flow into batches that can be processed in parallel, this approach fully utilizes modern multi-core computing resources and overcomes the performance bottleneck of traditional blockchain transactions requiring serial verification. Simultaneously, through meticulous dependency coordination and dynamic resource scheduling mechanisms, this framework rigorously guarantees the most critical aspects of distributed systems—state consistency and execution determinism—while pursuing extremely high throughput. This achieves a balance between performance and correctness, making it a core technical means to improve the scalability of blockchain systems.
[0044] Further, step 131 includes steps 1311 and 1312.
[0045] Step 1311: Detect real-time system load metrics. For example, the system continuously collects and analyzes real-time load metrics reflecting the current system processing capacity through its built-in monitoring agent. The system performs high-frequency sampling and aggregation of these real-time load metrics to form a real-time profile of the overall resource pressure and processing potential of the current system.
[0046] Step 1312: Dynamically adjust the window size and number of time windows based on real-time load metrics. For example, the system dynamically optimizes the time window configuration using an adaptive adjustment algorithm based on the acquired real-time load metrics. The decision logic is as follows: when the system detects sufficient resources, to fully utilize computing power and maximize throughput, the algorithm increases the window size or decreases the number of windows, allowing each window to handle more transactions and increasing the scale of parallel verification. Conversely, when the system load is high, resources are scarce, or network fluctuations occur, to avoid excessively long processing times for individual windows leading to increased overall latency, and to more finely schedule resources, the algorithm decreases the window size or increases the number of windows, thereby reducing parallel granularity, shortening the processing time of each window, enabling the system to respond more agilely to load changes and maintain stable processing latency. This dynamic adjustment achieves the optimal balance between system throughput and processing latency.
[0047] As described above, the adaptive parallel processing resource scheduling mechanism with real-time feedback overcomes the limitations of fixed parameter configurations. It dynamically and precisely adjusts the granularity and number of time windows based on real-time data: expanding the window to maximize parallelism and throughput when resources are abundant; and shrinking the window to improve response speed when resources are scarce or low latency is required. This elastic scaling capability ensures that the system achieves an optimal balance between transaction processing throughput and confirmation latency under different load scenarios, effectively coping with sudden fluctuations in business traffic and maintaining stable service levels.
[0048] Further, step 140 includes steps 141 to 144.
[0049] Step 141: Record the events and states during the process of generating unified time base data, achieving global transaction time-series sorting results, and generating parallel transaction verification results as a log entry, and calculate the hash value of each log entry. For example, at each key operation point—the generation of unified time base data, the achievement of global transaction time-series sorting results, and the output of parallel transaction verification results—the system synchronously records the event type, participants, input parameters, output results, and the system snapshot state at that time. Each such record constitutes an audit log entry. The system immediately uses a cryptographic hash function to calculate a unique, fixed-length hash value for the entire contents of the log entry.
[0050] Step 142: When generating a new log entry, the hash value of the previous log entry is used as a component to calculate the hash value of the new log entry, forming a hash chain. For example, when the next event needs to be recorded, the system creates a new audit log entry. It embeds the hash value calculated from the previous log entry as a specific, indispensable field into the data structure of this new log entry. Then, the system recalculates the hash value of the complete content of this new log entry, which includes the predecessor's hash, resulting in a new hash value. In this way, subsequent log entries are cryptographically linked to and depend on previous log entries. This process iterates, and all log entries are chained together in the order of their generation, forming a cryptographic hash chain. Any attempt to tamper with a historical log entry will invalidate the hash values of all log entries after that point, thus being detected immediately.
[0051] Step 143: Based on unified time base data, perform timestamp storage and continuity verification on the logs in the hash chain. For example, the system uses unified time base data to append a timestamp to each log entry in the hash chain when it is generated. This not only gives each log entry a precise time imprint, but more importantly, it makes the log chain verifiable in the time dimension. The system can periodically or as needed perform continuity verification on the hash chain: on the one hand, verifying the chain structure itself; on the other hand, verifying whether the appended timestamp sequence conforms to the monotonically increasing logic of time and is consistent with the global time base. These two verifications together ensure the integrity and authenticity of the audit logs in both content and time dimensions.
[0052] Step 144: Distribute and cross-validate the hash chain across multiple network nodes to obtain tamper-proof time-stamped audit log data, which is then stored in the blockchain network. For example, the system replicates and distributes this complete, timestamped hash chain across multiple nodes in the blockchain network, rather than in a single location. These storage nodes periodically cross-validate their respective audit log copies using a consensus protocol, ensuring that the log chains stored on all nodes are completely consistent. Any attempt by a node to provide a tampered version of the log will be detected and rejected by other nodes by comparing the hash value and timestamp sequence. Through this distributed consensus notarization mechanism, the audit log data itself acquires the same level of tamper-proof and high-availability properties as the blockchain ledger.
[0053] As described above, by integrating the immutability of cryptographic hash chains, the non-repudiation of BeiDou timestamps, and the robustness of storage and verification in blockchain distributed consensus, this system not only passively records the entire process from time synchronization and consensus sequencing to transaction execution, but also actively ensures the integrity, authenticity, temporality, and durability of these records through its inherent technical characteristics. This constructs a secure closed loop for the blockchain network, covering the entire operational chain from underlying time synchronization and consensus decision-making to upper-level transaction execution, enhancing the system's credibility and applicability in key areas.
[0054] Furthermore, it also includes steps 150 and 151.
[0055] Step 150: Analyze time synchronization errors, consensus delays, and anomalies in the time audit log data. For example, the system periodically or triggeredly performs in-depth mining and analysis on the generated time audit log data. It extracts and quantifies key performance and security indicators, mainly including time synchronization errors, consensus delays, and anomalies. Through machine learning or statistical analysis models, the system identifies performance degradation patterns, security threat trends, and potential system vulnerabilities from this historical data.
[0056] Step 151: Based on the analysis results, dynamically adjust the algorithm parameters for calculating the time compensation value, the priority weights for judging conflicting trading pairs, and the strategy parameters for dividing the time window. For example, based on the analysis results, the system starts a parameter adaptive adjustment engine to dynamically and finely optimize the operating parameters of the preceding key modules, and dynamically adjust the algorithm parameters for calculating the time compensation value, the priority weights for judging conflicting trading pairs, and the strategy parameters for dividing the time window.
[0057] As described above, by introducing an intelligent management closed loop based on data-driven and feedback control, the entire system evolves from a static execution architecture into an adaptive organism with autonomous perception, intelligent analysis, and dynamic optimization capabilities. This closed loop uses time audit logs as the system's central hub, continuously collecting and feeding back comprehensive operational data on time synchronization accuracy, consensus efficiency, and security posture. The system utilizes this data for in-depth analysis and pattern recognition, thereby proactively and precisely adjusting the parameters of underlying key algorithms and strategies. For example, it optimizes the threshold for time attack detection, calibrates the weights for consensus conflict resolution, and dynamically adapts window strategies for parallel processing. This mechanism of learning from practice and optimizing during operation enables the system to continuously adapt to changing network environments and load pressures, achieving self-breakthroughs in performance bottlenecks, proactive strengthening of security defenses, and continuous optimization of resource allocation over long-term operation.
[0058] Please refer to Figure 2The following are application embodiments of the present invention, specifically applying the above solution to a blockchain consensus optimization and security audit system in a cross-border financial payment scenario, particularly in global payment clearing networks requiring high concurrency, low latency, strong consistency, attack resistance, and strong compliance. Taking a multinational fintech company's real-time cross-border payment settlement platform as an example, its global node network deploys a blockchain consensus and security audit system based on the present invention. The specific implementation includes the following steps: S1. Establishing a nanosecond-level unified time benchmark for global nodes through the BeiDou time synchronization system. The system deploys BeiDou high-precision time synchronization receiving modules on blockchain nodes located in multiple key financial hubs. When a cross-border payment transaction is initiated, the initiating node obtains nanosecond-level precision standard UTC time data from the BeiDou satellite through its BeiDou time synchronization receiving module. Subsequently, the system transforms the raw time data into a trusted unified time benchmark. Specifically, nodes generate their local standard time based on the standard time data and monitor and calculate network latency and clock drift parameters in real time. More importantly, the system calls an embedded time attack detection algorithm to analyze the statistical distribution of node time behavior and perform real-time matching with pre-stored attack feature libraries such as "timestamp rollback" and "delay injection." For example, if an abnormal timestamp forward jump is detected in a node, it is determined that it may be under attack. The system will automatically isolate the abnormal data and instead use historical trusted data and the median of data from adjacent normal nodes to recalculate secure network latency and clock drift parameters, and derive an anti-attack time compensation value accordingly. Finally, in the hierarchical time synchronization network topology, nodes intelligently select the optimal superior reference time source based on their performance and reliability scores, apply the aforementioned secure time compensation value for precise calibration, and ultimately generate globally unique, tamper-proof, and nanosecond-level synchronized unified time reference data, attaching an authoritative timestamp to this transaction. This is equivalent to steps 110, 111 to 114, 1131 to 1134, and 1141 to 1143.
[0059] S2. Deterministic global ordering of transactions based on a timestamp consensus mechanism. Upon receiving the payment request and its accompanying timestamp, the system executes step 120. When multiple concurrent transactions exist in the network, firstly, the timestamps of all pending transactions are sorted in total order to obtain a preliminary sequence strictly arranged by physical time. Next, the system performs a deep analysis of the read / write set of each transaction, such as the accounts and amounts involved, and constructs a transaction dependency graph revealing their data dependencies. Then, the system intelligently detects conflicting transaction pairs in the graph, i.e., those transactions that have no dependencies but attempt to modify the same state. For each pair of conflicting transactions, the system unconditionally prioritizes the transaction with the smaller timestamp value, and the conflicting transaction with the later timestamp is marked as invalid and rejected by the system. For example, if the timestamp of a transaction initiated by node A is T1 and that initiated by node B is T2, since T1 is less than T2, then transaction T1 is valid, and transaction T2 is blocked due to double-spending risk. Ultimately, based on this ruling and dependencies, the system outputs a conflict-free global transaction time-series order that all honest nodes will inevitably agree upon, thus eliminating the possibility of blockchain forks and double-spending at the logical root. This is equivalent to steps 120, 121 to 125.
[0060] S3. Utilizing adaptive time window technology for efficient parallel verification of transactions. After obtaining the global time-series ranking, the system maximizes processing efficiency using time window grouping technology. Specifically, the system dynamically divides the ranked transaction stream into consecutive time windows based on the transaction timestamps. The window partitioning strategy is intelligent and adaptive: the system monitors load indicators such as CPU utilization, memory usage, and network bandwidth of each node in real time. For example, during peak traffic periods, if the system detects persistently high resource utilization, it will automatically trigger dynamic adjustments, increasing the window size to accommodate more transactions per window, such as adjusting from a 1-millisecond window to a 2-millisecond window, to enhance the scale effect of parallel processing and increase system throughput from tens of thousands of transactions per second to tens of thousands of transactions per second. Subsequently, the system distributes hundreds of cross-border payment transactions within the same time window to multi-core processors or distributed verification nodes, performing complex operations in parallel such as digital signature verification, anti-money laundering list screening, real-time currency conversion, and atomic updates of account balances. Since the execution order of transactions within a window is uniquely determined by the global time-series results and conflicts have been resolved, this large-scale parallelism will not cause any state inconsistencies. Finally, the system aggregates all parallel verification results in an orderly manner according to the window order, and handles any account dependencies that may exist across windows, such as A transferring funds to B, and B immediately transferring funds to C, forming the final parallel verification result of the transaction with consistent status. This is equivalent to steps 130, 131 to 133, 1311, and 1312.
[0061] S4. Construct a full-link tamper-proof time audit log. After the consensus and verification process is completed, the system generates a reliable audit record. The system first records the unified time base data involved in this batch of transactions, the global time sequence sorting results of transactions, the verification results of each transaction, and the final state, as a complete audit log entry, and immediately calculates its hash value H1 using a cryptographic hash function. When recording the next log entry, the system embeds the hash value H1 of the previous log entry as a required field into the data structure of the new log entry, and then calculates the hash value H2 of the new log entry. This process iterates to form a cryptographic hash chain in which each log entry contains the hash of the previous log entry, with each entry linked to the next. At the same time, each log entry is timestamped to nanoseconds using the aforementioned BeiDou unified time base data when it is generated, ensuring that the entire log chain is not only tamper-proof in content but also strictly continuous and verifiable in the time dimension. Ultimately, this complete timestamp hash chain is replicated and distributed across multiple regulatory or notary nodes located in different jurisdictions. The blockchain network's consensus mechanism facilitates notarization and cross-verification, generating tamper-proof time-stamped audit log data that can be used for real-time monitoring, compliance review, and dispute arbitration. This corresponds to steps 140, 141, and 144.
[0062] S5. Based on dynamic optimization and system self-evolution using audit data, an intelligent feedback optimization closed loop is formed. The system regularly performs in-depth analysis of massive amounts of time audit log data, extracting key indicators. Based on these data insights, the system can dynamically and accurately adjust core operating parameters. For example, if the analysis finds that the network latency parameter model of a certain intercontinental link is continuously underestimated during a specific period, the system will automatically adjust the trust weight of that link data in the time compensation value calculation algorithm; or, based on long-term load patterns, further optimize the algorithm parameters of the time window dynamic adjustment strategy to make it more predictive of traffic peaks. This allows the entire system to learn, adapt, and evolve autonomously during continuous operation, like an organism, continuously improving its performance, security, and fairness. This is equivalent to steps 150 and 151.
[0063] Through the above application examples, this solution fully demonstrates and verifies a complete technical closed loop in the real-world scenario of cross-border financial payments, which places extreme demands on timeliness, transaction finality, system throughput, security defense, and compliance auditing. This loop encompasses building an inherently secure time foundation, achieving unambiguous transaction sequencing, realizing efficient parallel resource utilization, and ultimately forming end-to-end trusted auditing and system self-optimization. This solution not only significantly improves the clearing efficiency and capacity of cross-border payment networks but also fundamentally overcomes the core shortcomings of traditional blockchains, such as double-spending, difficulty in auditing and tracing, and the decline in consensus efficiency with scale. It provides a key solution with high practical value and technological foresight for building the next generation of global financial infrastructure.
[0064] Please refer to Figure 3 A blockchain consensus optimization auditing terminal 1 based on BeiDou time synchronization includes a memory 3, a processor 2, and a computer program stored on the memory 3 and running on the processor 2. When the processor 2 executes the computer program, it implements each step of the aforementioned blockchain consensus optimization auditing method based on BeiDou time synchronization.
[0065] Please refer to Figure 4 The processor 11 can be a CPU, which can realize BeiDou time synchronization processing, consensus algorithm execution, time window management, security event detection and dynamic parameter optimization. The memory 22 can be RAM, used for timestamp database, transaction dependency graph storage, audit log storage, consensus parameter caching and block data storage; External interfaces include the BeiDou satellite timing receiving interface, the blockchain network communication interface, the transaction processing and verification interface, and the security audit and monitoring interface.
[0066] The beneficial effects of a blockchain consensus optimization audit terminal based on BeiDou time synchronization are the same as those of the aforementioned blockchain consensus optimization audit method based on BeiDou time synchronization, and will not be repeated here.
[0067] In summary, this invention constructs a blockchain consensus optimization auditing method and terminal based on BeiDou time synchronization. By deeply integrating the high-precision unified time benchmark provided by the BeiDou satellite time synchronization system into the entire process of blockchain consensus and auditing, a new blockchain consensus and security auditing system with trusted time as the core driving engine is constructed, realizing fully adaptive and intelligent operation from high-precision time synchronization, deterministic transaction ordering, efficient parallel verification to end-to-end tamper-proof auditing.
[0068] The system can establish a nanosecond-level unified time benchmark based on the real-time status of blockchain nodes in a globally distributed network, using BeiDou time synchronization. Based on this benchmark, it generates globally unique and tamper-proof timestamps for all transactions. Leveraging the objective temporal attributes of these timestamps, the system constructs a deterministic consensus mechanism based on time priority, enabling automated and unambiguous adjudication of transaction conflicts and double-spending issues. Furthermore, the system introduces adaptive time window grouping technology, dynamically adjusting the parallel processing granularity according to the system's real-time load. This significantly improves transaction verification throughput and processing efficiency while ensuring global state consistency.
[0069] Meanwhile, the system constructs a tamper-proof time audit log chain based on a unified time benchmark. Through triple protection of cryptographic hash chains, continuous timestamp verification, and distributed consensus notarization, it achieves complete, reliable, and traceable recording of the entire operation chain from time synchronization and consensus decision-making to transaction execution. This system not only passively records but also proactively analyzes performance and security data in the audit logs, dynamically optimizing time synchronization strategies, consensus parameters, and parallel processing configurations, forming a closed-loop management system with self-awareness, intelligent analysis, and continuous evolution capabilities.
[0070] This method differs from traditional blockchain systems that rely on probabilistic consensus, lack a global time benchmark, and are difficult to audit and trace. By using time-driven approaches, simplified consensus mechanisms, parallel acceleration, and enhanced auditing, it constructs an efficient, secure, and auditable blockchain consensus and auditing workflow, significantly improving the overall performance of blockchain systems in terms of transaction processing speed, system throughput, time consistency, security defense, and compliance capabilities.
[0071] Furthermore, a dynamic parameter optimization mechanism based on real-time load and historical data has been established during system operation and service. When network congestion or resource shortages are detected, the system can adaptively adjust the time synchronization frequency and consensus window size, achieving an optimal balance between resource utilization efficiency and service response latency while ensuring core timing consistency. This improves system performance while guaranteeing the absolute requirements of financial-grade applications for high reliability and strong consistency.
[0072] This terminal is suitable for blockchain application scenarios with extremely high requirements for transaction timing, finality, throughput, and audit compliance, such as cross-border payments, supply chain finance, and digital asset trading. By constructing an intelligent, secure, and evolvable timing consensus and auditing system, it effectively solves the efficiency bottlenecks, double-spending risks, and auditing challenges faced by traditional blockchains in large-scale applications. It provides a verifiable, optimizable, and scalable integrated solution for the large-scale and reliable deployment of blockchain technology in critical financial infrastructure, possessing significant industrial application value and broad market prospects.
[0073] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A blockchain consensus optimization auditing method based on BeiDou time synchronization, characterized in that, include: Based on the BeiDou satellite timing system, unified time reference data is provided to nodes in the blockchain network; Upon receiving a transaction request, a transaction timestamp is generated based on the unified time base data, and a global time-series sorting result for all the transaction requests is generated based on the transaction timestamp. Using the global time-series sorting results of the transactions, all the transaction requests are verified and processed in parallel through time window grouping technology to obtain the parallel verification results of the transactions. Based on the unified time base data, the global time sequence sorting results of the transactions, and the parallel verification results of the transactions, tamper-proof time audit log data is generated and stored in the blockchain network.
2. The blockchain consensus optimization auditing method based on BeiDou time synchronization according to claim 1, characterized in that, The provision of unified time reference data to nodes in the blockchain network based on the BeiDou satellite timing system includes: Receive standard time data via the BeiDou time synchronization module; Based on the aforementioned standard time data, generate the node's local standard time; Calculate network latency parameters and time drift parameters based on the standard time data, and calculate time compensation values based on the network latency parameters and time drift parameters; The local standard time of the node is calibrated based on the time compensation value to obtain the unified time reference data.
3. The blockchain consensus optimization auditing method based on BeiDou time synchronization according to claim 2, characterized in that, The step of calculating the time compensation value based on the network latency parameter and the time drift parameter includes: Based on the aforementioned standard time data, the statistical distribution of node time behavior is detected; Analyze the statistical distribution to extract the dynamic characteristics of the network latency parameter and the time drift parameter; The dynamic features are matched with pre-stored attack features to detect the presence of time-based attack behaviors. If a match is found, it is determined that a time attack has occurred, and the time compensation value is calculated by using the network latency parameter and the time drift parameter corresponding to the matched attack feature.
4. The blockchain consensus optimization auditing method based on BeiDou time synchronization according to claim 2, characterized in that, The step of calibrating the local standard time of the node according to the time compensation value to obtain the unified time reference data includes: In the blockchain network, a hierarchical time synchronization network topology is constructed among the nodes; In the hierarchical time synchronization network topology, a reference time source is selected based on node performance indicators; Based on the reference event source and the time compensation value, the calibrated time is received to obtain the calibrated unified time reference data.
5. The blockchain consensus optimization auditing method based on BeiDou time synchronization according to claim 1, characterized in that, Upon receiving a transaction request, the step of generating a transaction timestamp based on the unified time base data, and generating a global time-series ranking result for all the transaction requests based on the transaction timestamp, includes: Sort all pending transactions by total order using their timestamps; Analyze the read / write operation dependencies among the sorted transactions and construct a transaction dependency graph; Detect conflicting transaction pairs in the transaction dependency graph; The conflicting transaction pairs are judged according to the order of the timestamps, and the transaction with the earlier timestamp is retained; Based on the judgment result and the total order sort, the global time-series sort result of the transaction is generated.
6. The blockchain consensus optimization auditing method based on BeiDou time synchronization according to claim 1, characterized in that, The parallel verification and processing of all transaction requests using time window grouping technology to obtain parallel transaction verification results includes: Based on the timestamps in the global time-series sorting results of the transactions, all the transactions are divided into time windows; Within the time window, all transactions allocated to the time window are verified and processed in parallel. By aggregating the verification results and coordination results within all the time windows, the parallel verification result of the transaction is obtained.
7. The blockchain consensus optimization auditing method based on BeiDou time synchronization according to claim 6, characterized in that, The step of dividing the transactions into consecutive time windows based on the timestamps in the global time-series sorting results includes: Detect the real-time load indicators of the monitoring system; The size and number of time windows are dynamically adjusted based on the real-time load metric.
8. The blockchain consensus optimization auditing method based on BeiDou time synchronization according to claim 1, characterized in that, The process of generating tamper-proof time audit log data based on the unified time base data, the global time sequence sorting result of transactions, and the parallel verification result of transactions and storing it in the blockchain network includes: Record the events and states during the process of the unified time base data, the global time sequence sorting result of the transaction, and the parallel verification result of the transaction as a log, and calculate the hash value of the log; When generating a new log entry, the hash value of the previous log entry is used as a component to calculate the hash value of the new log entry, forming a hash chain. Based on the unified time base data, timestamps are stored and continuity is verified on the logs in the hash chain; The hash chain is distributed and cross-validated across multiple network nodes to obtain the tamper-proof time audit log data, which is then stored in the blockchain network.
9. The blockchain consensus optimization auditing method based on BeiDou time synchronization according to claim 8, characterized in that, Also includes: Analyze the time synchronization errors, consensus delays, and abnormal events in the time audit log data; Based on the analysis results, the algorithm parameters for calculating the time compensation value, the priority weights for judging the conflicting trading pairs, and the strategy parameters for dividing the time window are dynamically adjusted.
10. A blockchain consensus-optimized auditing terminal based on BeiDou time synchronization, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement each step of the blockchain consensus optimization auditing method based on BeiDou time synchronization as described in any one of claims 1 to 9.