Tough city resource allocation method and system based on block chain and edge computing
Through the resilient urban resource allocation method of blockchain and edge computing, node trust weights are dynamically adjusted and incremental patches are generated, which solves the information chain breakage and trust management problems in urban resource allocation, and realizes efficient and trustworthy resource allocation and learning synchronization, improving the city's response ability to emergencies.
Patent Information
- Application Number
- CN202511089090.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-08-05
AI Technical Summary
The existing technology has high latency and low throughput problems caused by breaking information chains, inter-node trust management and transaction priority ranking static configuration in urban resource allocation, especially in the emergencies, which leads to public safety risks.
The resilient urban resource allocation method based on blockchain and edge computing is adopted, and through rolling optimization of adaptive decision-making drivers, node trust weights are dynamically adjusted, incremental patches are generated and differential shear training is carried out, combining gradient summary and structural fingerprints to achieve efficient and trustworthy dynamic allocation and sustainable learning of cross-departmental resources.
It has achieved efficient and trustworthy dynamic synchronization of urban resource allocation, improved forward-looking insights and response coherence of emergencies, and built a safe and privacy-friendly urban learning ecosystem to ensure that resource allocation is tampered with and traceable.
Smart Images

Figure CN120579803A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban resource allocation, and specifically to a resilient urban resource allocation method and system based on blockchain and edge computing. Background Art
[0002] As cities around the world gradually move toward data-driven resilient governance, critical systems such as public transportation, electricity, drainage, and healthcare are beginning to deploy dense IoT terminals at the edge and leverage AI models for advanced predictions. To gain global insights without leaking raw data, pilot projects are deploying federated learning in roadside computing units and substation controllers, enhancing emergency response capabilities through collaborative training. Meanwhile, permissioned blockchains are being used to record predictions, authorization signatures, and dispatch instructions to ensure the integrity and traceability of multi-departmental collaboration. Recent research also proposes integrating edge computing and blockchain into digital twins or urban multi-agent frameworks, enabling real-time synchronization of physical and virtual systems and providing intervention plans before disasters occur.
[0003] However, most existing solutions are limited to a single scenario (such as traffic signals or energy consumption scheduling). Prediction models and execution feedback are often scattered across different chain networks or central servers, resulting in a broken information chain. At the same time, trust management between nodes and transaction priority sorting often use static configurations, making it difficult to maintain low latency and high throughput in high-concurrency or Byzantine environments.
[0004] In actual urban operations, after the deployment intention is triggered, execution subsystems such as drainage pumps, traffic lights, and distribution switches will return operating status and performance indicators; these receipts need to be accurately matched with the previous prediction window, model version, and structural fingerprint before they can be converted into the next round of training samples. If the query latency of the receipt on the chain is too high, or the content quality is uneven and there is a lack of unified weight quantization, the edge node will write noise or even wrong labels into the local state tensor, causing model offset; if the patch fusion strategy is too coarse, the prediction-execution-learning link will converge and stagnate due to frequent false triggering of training or excessive freezing of weights. More seriously, in the absence of dynamic trust adjustment and patch freshness decay mechanisms, malicious or inaccurate nodes may repeatedly upload high-weight receipts, gradually dragging down the entire network model, and ultimately leading to cross-departmental resource mismatches, delayed responses, and even public safety risks.
[0005] This problem is often magnified during periods of sudden heavy rain at night, delayed subway operations, or heavy passenger flow during holidays: the frequency of prediction and execution increases dramatically, but network jitter intensifies. Traditional centralized cleaning and static threshold strategies are unable to filter out erroneous receipts in real time, causing the next round of predictions to be distorted based on the latest operating conditions. This in turn accumulates deviations and triggers a chain of erroneous deployments, resulting in serious consequences such as insufficient drainage pump power, unbalanced traffic signals, or overload on the power grid.
[0006] To this end, the present invention provides a resilient city resource allocation method and system based on blockchain and edge computing. Summary of the Invention
[0007] (1) Technical problems solved In response to the shortcomings of the existing technology, the present invention provides a resilient urban resource allocation method and system based on blockchain and edge computing, in which cross-departmental resource rescheduling is completed by rolling optimization of an adaptive decision-driven system; the execution receipt is mapped as an incremental patch written back to the local state tensor and the node trust weight is dynamically adjusted. When the coverage and weight increase meet the trigger strategy, differential shearing training is started and a new structural fingerprint and model signature are generated, which can ensure the efficient and reliable dynamic allocation of urban public resources in emergency scenarios and the synchronous evolution of sustainable learning, thereby solving the technical problems recorded in the background technology.
[0008] (2) Technical solution To achieve the above objectives, the present invention is implemented through the following technical solutions: a blockchain-based and edge computing-based resilient city resource allocation method and system, including completing spatiotemporal alignment and semantic normalization processing of multi-source real-time data, generating a local state tensor containing self-checking metadata, and caching it in a ring buffer queue in a secure zone for persistent storage; The gradient summary is formed by combining clipping gradient with differential privacy mask, and the dynamic trust weight is weighted and aggregated to synchronize the iterative model version signature and output the network-wide consistent weight vector for use in the next round; The compressed prediction tuple is concatenated with the structural fingerprint and model signature to generate a prediction hash, which is broadcast in batches according to priority and written into the permission chain through Byzantine consensus to obtain a time stamp and synchronization mark; A dual-threshold judgment is performed on the weighted risk curve within the sliding window. When the conditions are met, a multi-signature template is instantiated to generate a deployment intention and broadcasted to the sidechain message bus for real-time delivery. Sharded documents are received through a zero-round-trip handshake, and the adaptive decision driver integrates multi-source state rolling optimization control sequences and issues them in parallel with cloud-based corrections, with performance receipts recorded on-chain. The retrieval receipt calculates the quality score and generates incremental patch weights, which are then fused into a tensor. The patch coverage and trust weight increase are used to determine whether differential clipping training is triggered and the new fingerprint and version are cached for federated aggregation.
[0009] Furthermore, the timestamp of the external sensor message is corrected at the microsecond level through a constant temperature crystal oscillator, and the moving coordinates are dynamically patched in combination with the Kalman filter; A semantic template with feedback is used to merge multiple vendor fields into a unified indicator, and the corrected data is then written into a ring buffer queue protected by a one-time key to ensure the spatiotemporal consistency and confidentiality integrity of the original state frame.
[0010] Furthermore, we use depthwise separable convolution combined with channel attention weights to filter out redundant features, and use gated recurrent units to fuse short-term fluctuations with long-term trends. After stacking the continuous gated outputs into a local state tensor along the newly added time dimension, double hashing is performed to generate the structural fingerprint and a one-to-one mapping between the tensor and the fingerprint is cached locally.
[0011] Furthermore, when calculating the local gradient, a temperature modulation coefficient is introduced to enhance the gradient amplitude of rare high-impact samples. The gradient vector is amplitude clipped and then superimposed with differential privacy noise based on structural fingerprints. Threshold Huffman coding is used to generate byte-level gradient summaries.
[0012] Furthermore, the aggregation layer constructs a weighted cosine similarity matrix for the uploaded gradient summaries, detects abnormal nodes with angles exceeding the threshold, and lowers their trust weights; After filtering, local averaging of homogeneous clusters and global fusion with soft gating are used to generate new weights, and rolling hashing is used to generate the model version signature sequence.
[0013] Furthermore, after loading the global weight inference on the local state tensor, the confidence interval is obtained through Monte Carlo sampling and compressed into a prediction tuple, which is then concatenated with the structural fingerprint and model signature to generate a prediction hash, and the transaction priority is set according to the trust weight.
[0014] Furthermore, the predicted hash transactions are batch packaged within the homogeneous cluster and enter the Byzantine fault tolerance process of the entire network through layered broadcasting; the voting rounds are automatically adjusted according to the transaction macro iteration flag, and the block hash is cross-checked after being written into the permission chain in parallel on the multi-shard accounting nodes.
[0015] Furthermore, the smart contract applies a nonlinear threshold function to the risk value of each scenario within a sliding window, accumulates the historical window with exponential decay, and then calculates the global risk score based on the scenario weight. A trigger signal is generated when the score exceeds the set threshold and the slope is greater than the minimum growth rate.
[0016] Furthermore, the scenario-resource-action template is pre-deployed on the chain, which maps the risk threshold value to the resource demand ratio through a piecewise function and embeds a multi-signature permission tag. The deployment intention is encapsulated as a seven-segment JSON-LD document, and the document hash is written to the permission chain to synchronize the side chain broadcast.
[0017] Furthermore, the sidechain node allocates the intention according to the MTU fragmentation and inserts the chain hash endorsement, uses a zero round-trip handshake to complete the identity negotiation and receive the target subsystem status message; High-priority traffic uses an exponential backoff retransmission strategy, and low-priority traffic uses a linear backoff strategy.
[0018] Furthermore, the execution subsystem integrates local real-time telemetry, neighboring shared status and historical receipts to construct a state tensor, generates an influence coefficient matrix through a graph attention network, and rollingly optimizes multi-objective functions under the edge-cloud collaborative framework to form a control sequence, and records performance receipts on the chain after execution.
[0019] Furthermore, receipts are retrieved in the permission chain through a double-level index of Bloom filter and skip list, and an incremental patch is generated after calculating the new quality score and written into the local state tensor. At the same time, the node trust weight is dynamically adjusted according to the patch quality.
[0020] Furthermore, weighted deep separable convolution is used to fuse the most recent patches to form a new tensor, and the patch coverage and trust weight increase are used to determine whether differential shearing training is triggered. After training, the new structural fingerprint and model version signature are output and cached for subsequent federated aggregation.
[0021] The resilient city resource allocation system based on blockchain and edge computing includes: The alignment and normalization module performs spatiotemporal alignment and semantic normalization on multi-source real-time data, generates a local state tensor containing self-checking metadata, and caches it in a ring buffer queue in the secure zone for persistent storage. The gradient aggregation module forms a gradient summary by combining clipped gradients with differential privacy masks. After dynamic trust weighted aggregation, the model version is signed synchronously and iteratively, and a consistent weight vector for the entire network is output for use in the next round. The hash consensus module concatenates the compressed prediction tuple with the structural fingerprint and model signature to generate a prediction hash, broadcasts it in batches according to priority, and writes it into the permission chain through Byzantine consensus to obtain a timestamp and synchronize the mark; The risk assessment module runs a dual-threshold assessment on the weighted risk curve within the sliding window. When the conditions are met, it instantiates the multi-signature template to generate the deployment intention and broadcasts it to the sidechain message bus in real time. The decision-making distribution module receives sharded documents through a zero-round-trip handshake. The adaptive decision driver integrates multi-source state rolling optimization control sequences and distributes them in parallel with cloud-based corrections, and records performance receipts on the chain. The patch training module retrieves receipts, calculates quality scores, generates incremental patch weights, and fuses them into tensors. It triggers differential shear training based on patch coverage and trust weight increases, and caches new fingerprints and versions for federated aggregation.
[0022] (3) Beneficial effects The present invention provides a method and system for allocating resilient urban resources based on blockchain and edge computing, which has the following beneficial effects: With structural fingerprints, model version signatures and permission chain consensus as the main lines, data collection, prediction generation, risk assessment, deployment and implementation, and feedback learning are connected from beginning to end, forming a complete governance chain from on-site perception to on-chain decision-making to closed-loop self-evolution, greatly improving the forward-looking insight and response consistency of urban public services to emergencies.
[0023] The combination of lightweight extraction at the edge nodes and federated training enables massive terminals to continuously contribute incremental knowledge without exposing original information. The linkage of Byzantine filtering, structural fingerprinting, and dynamic trust weights not only suppresses malicious data but also incentivizes high-quality nodes, promoting high-trust collaboration in a decentralized environment and jointly building a secure and privacy-friendly city-level learning ecosystem.
[0024] The dual-layer mechanism of permissioned chain and side chain allows important decision-making transactions to be written into the main chain for evidence storage, while high-frequency control flows pass through the side chain at high speed; sharded parallel accounting, seven-segment document path and multi-signature permission cross-verification complement each other, ensuring the immutability and traceability of cross-departmental resource allocation, and reducing main chain congestion through flexible off-chain communication.
[0025] The adaptive threshold curve, coverage trigger strategy and differential shear training jointly construct a multi-layer dynamic tuning system: the risk assessment curve automatically bends according to the scenario to avoid false alarms, the patch trigger logic uses multiple indicators to prevent wasted computing power, and the model update adopts differential freezing to accelerate convergence and avoid forgetting. The three are connected to ensure that the system maintains low disturbance during daily stable periods and agile transitions during extreme shocks, reflecting the coordinated balance of resilience and stability.
[0026] Scenario templates, resource quantitative mapping and adaptive decision drivers jointly achieve the precise implementation of "intention-action"; template version hashing allows the allocation logic itself to enter the blockchain governance domain, and the resource segmentation function makes the allocation intensity and risk level linear-quadratic progressive. The adaptive driver then fine-tunes the execution amount according to the on-site status, and multi-layer gradient control avoids a one-size-fits-all approach.
[0027] The feedback receipt quality assessment function introduces vector norm and matrix projection, integrating error amplitude and directional consistency with only a single adjustable coefficient, effectively filtering out noise; patch weights incorporate freshness decay and are dynamically injected into the model through deep separable convolution, achieving a reasonable decrease in data value over time and continuous evolution of the model with the environment. Ultimately, the intelligence of the entire network increases cumulatively with the length of operation, presenting a long-term gain effect of cross-layer self-driving and collaborative optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 This is a flow chart of the resilient city resource allocation method of the present invention; Figure 2 This is a schematic diagram of the results of the resilient city resource allocation system of the present invention. DETAILED DESCRIPTION
[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0030] See also Figure 1 The present invention provides a method and system for allocating resilient urban resources based on blockchain and edge computing, including: The real-time operation of resilient cities places extremely high demands on the integrity, timeliness, and credibility of information flows. Especially in extreme weather conditions or sudden surges in passenger flow, if key situational features cannot be captured and analyzed promptly at the source of the data, any subsequent federated training, on-chain consensus, and resource allocation will lose their accurate benchmarks. Therefore, this invention sets edge node feature extraction as the first checkpoint of the entire method. With the help of lightweight models and unified semantic templates, while ensuring privacy and computing power friendliness, the original multi-source data is upgraded to a local state tensor that can directly participate in downstream collaboration, laying a foundation for temporal and spatial consistency, semantic consistency, and security consistency for the entire link.
[0031] Step 1: After the edge node completes the spatiotemporal correction, semantic unification, and security isolation of the distributed and heterogeneous real-time observation stream, it lightweight compresses it to generate a unified and trusted local state tensor and caches it in the local security zone, laying a consistent and high-quality data foundation for subsequent federated training and blockchain collaboration.
[0032] The step 1 includes the following: Step 101: Spatiotemporal semantic alignment and safe frame modeling Aiming at spatiotemporal, semantic, and security alignment, the distributed perception sources are aggregated in real time, and traceable, highly consistent raw data orchestration is completed within the edge nodes, providing clean input for subsequent feature extraction. The following features are included: City-level sensing networks often experience data fragmentation due to differences in device vendors, inconsistent messaging protocols, and clock drift, making it difficult for back-end algorithms to form a globally consistent view within millisecond windows. Edge nodes first utilize the highly stable reference clock provided by their local oven-controlled crystal oscillator to perform microsecond-level corrections on the raw timestamps of connected traffic flow meters, weather stations, and energy meters. Kalman filtering is also used to dynamically correct the coordinate differences between GPS tracks and fixed base station coordinates, ensuring sub-meter accuracy of trajectory data relative to the static reference coordinate system, thereby achieving consistent spatiotemporal annotation across sensors. Through dual hardware-algorithm alignment, clock and coordinate errors are prevented from interfering with subsequent feature window segmentation.
[0033] The corrected raw data vectors are automatically matched to a unified field through the semantic template mapping layer. For example, WindSpeed (km / h) is mapped to WS as a wind speed metric. Synonymous merging is then performed on anomalous fields. This process utilizes a weighted graph convolutional network with minimal storage and adaptively adjusts the field similarity threshold based on historical mapping confidence. This reduces template maintenance costs and allows for automatic scalability as devices are introduced. This allows for cross-vendor field semantic exchange without compromising privacy, eliminating naming ambiguity for feature extraction.
[0034] To prevent the leakage of original sensitive data, the node writes the corrected and mapped streaming data into a local security zone - this zone is encapsulated by a trusted execution environment, which uses a circular buffer queue and a one-time key encrypted storage, while only exposing the summary to the external monitoring process.
[0035] Data integrity is verified using Merkle tree incremental hashing, enabling even the slightest tampering to be diagnosed within milliseconds. Hard isolation combined with key rotation ensures confidentiality and integrity during data transfer at the edge, supporting subsequent hash fingerprint generation.
[0036] When the buffer queue accumulates to the set window, the node generates the original status frame in a unified format :
[0037] Where: original data vector : Single sensor In time slice The correction vector of , whose value range is the upper limit of each indicator; used for subsequent convolution window processing; Window number : Sliding window label; the value range is a positive integer; used for time series slicing; Total number of sensors : The number of active sensing sources of the current node; the value range is a positive integer; used for column splicing boundaries When used, multi-source observations are spliced into a unified high-dimensional frame, which facilitates the next step of directly extracting features according to the tensor dimension. Through the four-step continuous operation of spatiotemporal coupling, semantic mapping, security isolation, and frame modeling, highly heterogeneous and potentially distorted original streams are unified into a structured and reliable original state frame. , significantly reducing the first-frame latency of fragment analysis. Furthermore, a ring buffer and partition key rotation, combined with Merkle incremental hashing, create a data fidelity mechanism that relies solely on edge nodes, eliminating the need for centralized certificate distribution and reducing the management costs of large-scale urban deployments. Semantic templates, which rely on the self-growing knowledge graph, also automatically learn fields when new devices are online, eliminating manual data entry bottlenecks. This gives the city perception network "plug-and-play" elastic scalability, improving the overall efficiency and security of data source access.
[0038] Step 102: Lightweight feature compression and tensor generation Based on the original state frame of the local safe zone, a lightweight convolution-attention hybrid network that can be afforded by low computing power is used to extract multi-scale spatiotemporal semantic features, which are finally assembled into a local state tensor as input for cross-node federated training. Directly inputting high-dimensional original frames into subsequent models not only consumes huge computing power, but may also write invalid noise into the chain, wasting bandwidth and storage. Therefore, information compression must be completed in advance at the edge node while retaining key prediction signals.
[0039] The node loads the depth-wise separable convolution to first scale the column channels and then pass the attention weights:
[0040] Assign different significance to each channel, retain the top percentile channels and discard long-tail noise. This significantly reduces the feature dimension without introducing a large model, freeing up computing power for subsequent time series modeling. Among them: channel attention weight : The value range is 0 to 1, used for channel screening; weight vector : Model trainable parameters, the value range is a real number vector; activation function : Use Swish activation; the output value range is positive real number, enhancing nonlinearity; Applying gated recurrent units on compressed features, through the gate vector :
[0041] Adaptively capture short-term fluctuations and slow trends and integrate them into memory units.
[0042] Gate Vector : Timing selection factor, the value range is , used to weigh fast and slow dynamics; Fusion weight : A trainable scalar with a value range of , used to adjust memory decay; Weight Matrix : Model parameters, the value range is a real number matrix, used to map feature dimensions; Bias vector : Model parameter, the value range is real number, used to eliminate linear offset; Thus, gating is used to suppress transient spike noise while preserving trend information, thereby enhancing the sensitivity of the tensor to early signs of extreme events.
[0043] Will continue The gated outputs are stacked along the newly added time dimension to obtain the local state tensor :
[0044] Where: local state tensor : 3D tensor; dimension is ; used for federated training input; Time window : tensor time depth; the value range is a positive integer, which determines the length of short-term memory; It is a tensor stacking operator that sequentially concatenates input vectors along the newly introduced time dimension, preserving the original channel layout and automatically adding metadata for subsequent verification by the morphology self-check module. Compression channels : The number of channels retained after attention screening, the value range is a positive integer, which affects the feature density; Among them, the tensor morphology self-check module ensures dimension alignment through metadata verification to prevent abnormal frames from causing subsequent training gradient explosion or convergence failure.
[0045] Double hashing of tensors to generate structural fingerprints :
[0046] Where: structural fingerprint : Hash value, the value range is a fixed-length bit string, used for integrity verification before writing on the chain; One-time hash function : Lightweight, high-speed asymmetric hashing (such as BLAKE3); secondary hashing function : A hash with higher collision resistance (such as SHA-3-256) will The output is hashed again as input; When in use, a unique fingerprint is generated for quick comparison during subsequent permission chain consensus, reducing on-chain storage pressure while ensuring tensor consistency.
[0047] Through the spatiotemporal coupling-semantic mapping-security isolation-frame modeling chain operation in step 101, multi-source observations are quickly cleaned and merged into original state frames within the edge node, solving the dual hidden dangers of data fragmentation and privacy leakage; then, with the help of the channel attention compression-temporal gated embedding-tensor assembly-fingerprint encryption process in step 102, redundant high-dimensional data is compressed into a local state tensor with a unique structural fingerprint, providing high signal-to-noise ratio and traceable input for subsequent federated training.
[0048] The original state frame output by the previous step Become the next step to build the local state tensor Direct materials; structural fingerprint generated after the completion of the latter step With tensors This will be used as the gradient summary mapping benchmark in step S2 to ensure that the model iteration process corresponds to the data source.
[0049] Complete the original state frame under the limited computing power of the edge node The efficient compression removes redundant features while retaining key signals, reducing the communication burden and decoding time required for subsequent federated training. The gated recurrent unit introduces a trainable decay constant, giving the model self-regulation capabilities, reducing the memory burden during stable events, improving sensitivity during periods of imminent risk, and achieving dynamic allocation of computing resources. Morphological self-checking and meta-tag design ensure that local state tensors Quality is perceptible, allowing poor-quality data to be rejected early in the chain, avoiding garbage in and garbage out. The introduction of double hash fingerprints not only provides integrity verification but also reduces block size through short hash codes, improving permissioned chain throughput.
[0050] Resilient cities need to map rapidly changing on-site situations into coordinated and consistent predictive models in a timely manner. If the predictive models are to evolve simultaneously in different blocks without leaking any sensitive data, they must rely on federated training completed at the edge.
[0051] Step 2: Securely aggregate the gradient summaries calculated by each edge node based on the local state tensor, and generate a consistent iterative model version identifier for the entire network within a short time window, laying a unified model foundation for subsequent on-chain evidence storage and allocation intention assessment.
[0052] The second step includes the following: Step 201: Gradient summary secure extraction and trust encoding The number of city-level sensing nodes is huge and heterogeneous. If the complete gradient is uploaded directly, it will consume network bandwidth and expose privacy. Therefore, a concise and secure gradient summary mechanism is urgently needed. At the same time, the data distribution of different nodes is obviously different. The traditional mean aggregation is easily affected by the data dominance of main roads or crowded areas. It is necessary to suppress local bias through interpretable weights. Therefore, the following method is adopted: each node uses the local state tensor As input, a loss function echelon is constructed through a micro-batch self-replay strategy; An adaptive temperature modulation coefficient is introduced at the end of the loss function chain to make the gradient direction sensitive to rare but high-impact scenarios. The gradient vector derived from this is coordinate sheared to retain only the components whose amplitude is above the dynamic threshold inside the node, forming the initial screening gradient set:
[0053] Where: , gradient clipping operator. If the absolute value of any component of the input gradient exceeds the threshold , it is truncated to the threshold boundary, otherwise it keeps the original value; the gradient vector after clipping :Node in time slice Calculated post-shear gradient; Loss Function : Edge nodes for local state tensors The training objective you choose (e.g. weighted cross entropy or smoothed L1). Model layer weights : Federal Model The layer's parameter matrix or vector; Clipping Threshold : The lower bound of the node adaptive setting.
[0054] To prevent attackers from reconstructing local data distribution through multiple rounds of gradients, nodes need to Superimpose Laplace noise and use structural fingerprint A pseudo-random generator is driven by the seed to ensure that the noise in the same time slice remains statistically independent between different nodes; at the same time, a bidirectional noise compensation strategy is used to offset the noise component at the subsequent aggregation end to ensure the global convergence speed.
[0055] Nodes calculate trust weights based on their historical consensus contributions, local data novelty, and network latency. They then use threshold Huffman coding to exponentially compress masked gradients, uploading only the sign and relative amplitude index pairs to achieve a byte-level gradient summary. The compression result, combined with the weights, is packaged into a node gradient summary package and pushed to upstream nodes in the ring interconnection topology for aggregation.
[0056] When used, it can reduce the computing power burden of edge nodes. For the first time, in edge federation scenarios, "rare high-impact samples" are explicitly injected into the gradient direction through temperature modulation, allowing the model to get training opportunities in advance when facing extreme scenarios; the idea of binding differential privacy masks and structural fingerprints doubly associates noise seeds with data integrity, overcoming the inherent unverification problem caused by the independent generation of traditional noise; threshold Huffman coding and trust weights are bidirectionally coupled, integrating communication compression and node contribution adjustment, saving bandwidth and forming self-driven incentives.
[0057] Step 202: Byzantine filtering and weighted consistent aggregation In a decentralized environment, it's difficult to ensure model consistency solely through point-to-point broadcasting. Lack of robust aggregation can amplify the impact of abnormal or malicious nodes. Therefore, after the gradient summary stream enters the aggregation layer, robust merging must be achieved through Byzantine filtering and weight tuning, and iterative model version identifiers must be generated in real time. A weighted cosine similarity matrix is introduced to compare the directions of gradient summaries pair by pair. When the angle between a summary and the weighted center vector of all summaries is greater than a threshold, the summary is marked as suspicious. The node set automatically initiates a quick vote. If two-thirds of the nodes agree, the summary is removed and its trust weight is lowered to ensure that malicious or abnormal data cannot influence the model.
[0058] After filtering, the aggregation coefficient is allocated using a soft gating mechanism based on the trust weight uploaded by each node, and hierarchical averaging is performed: first, local averaging is performed within the homogeneous data cluster, and then the local results are linearly integrated according to the global weight to obtain a new iterative weight vector :
[0059] Where: New weight vector : This round of network-wide consistent model parameters; node weight : Soft gating coefficient after filtering adjustment; node weight vector :node The amount of weight update after decoding; the total number of nodes : The number of valid nodes participating in the current aggregation.
[0060] The aggregator adds the new weight vector Perform consecutive block hashing to generate a signature sequence of increasing length; The node verifies the consistency of the model based on this, without having to compare all parameters, reducing communication costs. This signature is subtracted from the previous version signature. If the difference hash is lower than the threshold, it is marked as a micro-iteration; otherwise, it is marked as a macro-iteration, triggering the subsequent threshold evaluation function to re-adjust the threshold.
[0061] Finally, the aggregator broadcasts the signature sequence along with the version number and the generated timestamp to the entire network, and the node then sends the new weight vector Write the local model snapshot, update the local state machine, and record the difference between the previous version number and the current version number in the metadata, providing a complete genealogy for subsequent on-chain evidence storage and fault rollback.
[0062] When used, the model weights can still reach each node quickly and reliably under harsh network conditions and potential attacks, and digital signatures are used to ensure that any subsequent prediction summaries can be associated with a unique model version identifier.
[0063] This step 2 condenses the information contained in the local state tensor into a secure and exchangeable gradient summary through the computational compression and privacy masking of step 201. Then, in step 202, Byzantine filtering is used to ensure the credibility of the summary, a dynamic weighting strategy is used to balance the influence of nodes, and hash signatures are used to complete the consistent version broadcast. Finally, all nodes in the entire network synchronously obtain the iterative model version identifier.
[0064] When used, the phased penalty mechanism of Byzantine filtering changes the crude strategy of discovery and elimination, and reduces the misjudgment rate and the probability of benign nodes being accidentally damaged through continuous rounds of verification; the aggregation method of local averaging of homogeneous clusters and then global soft gating breaks the traditional single-layer weight averaging idea, making the data contribution of different areas of the city fairer and more in line with local reality; rolling hash signatures and macro-micro iteration distinctions achieve lightweight model version management and self-adjustment of event sensitivity, solving the problem that traditional models cannot quickly mark important transitions; differential patch snapshots ensure that the historical lineage of the model can be traced, while avoiding the storage explosion caused by frequent chain writes.
[0065] After federated training outputs model weights and version signatures that are consistent across the entire network in step 2, if the prediction information obtained by each edge node based on the new model reasoning cannot be written into the permission chain in a timely manner and a trusted time sequence is attached, then the on-chain smart contract will not be able to perform threshold assessment based on this, which will lead to a delay in the generation of deployment intentions and weaken the pre-emptive response capabilities of urban public services.
[0066] Step 3: The prediction summary generated based on the latest model weight inference and the model version signature are hashed and written into the permission chain, and the transaction is strictly time-stamped through the Byzantine fault-tolerant protocol to build a unified and tamper-proof prediction sequence across nodes.
[0067] The step three includes the following: Step 301: Prediction summary packaging and transaction generation The operating status of a city is highly dynamic. Only by allowing each edge node to perform real-time inference and generate a structured prediction summary based on the latest local model weights, and then securely encapsulate it into a transaction package, can the on-chain data maintain a high-fidelity mapping of the on-site situation. Therefore, this step revolves around four technical points: local reasoning, uncertainty quantification, hash encapsulation, and transaction generation.
[0068] Edge nodes load global weight parameters After that, the current local state tensor Perform forward inference to obtain the prediction vector:
[0069] Monte Carlo Dropout is also used to sample the output distribution multiple times, calculate the predicted mean and quantile width, and obtain a confidence interval for downstream threshold assessment. This approach not only preserves the numerical prediction but also injects confidence information in advance, allowing the smart contract to dynamically adjust the judgment rules based on the confidence level.
[0070] Where: prediction vector : Quantitative prediction of future time periods by nodes; Model Function : Load the inference graph of the latest weights. The function contains modules such as channel attention layer, gated recurrent unit, and fully connected mapping. It is encapsulated in an end-to-end mapping of input tensor → output prediction vector to ensure that the inference logic of different edge nodes is consistent under the same weight version. To prevent on-chain storage redundancy, the node compresses the predicted mean and quantile width into two scalars through double exponential smoothing, and then combines the prediction time window length and geographic label to form a compressed tuple. This compression retains the main information but significantly reduces the amount of chain bytes written, providing bandwidth space for large-scale node concurrent writing.
[0071] The node compresses the tuple , structural fingerprint And the model version signature sequence top hash After splicing in a predetermined order, perform one-way hashing to generate a predicted hash :
[0072] This hash is bound to the transaction number, and any subsequent node only needs to compare the predicted hash The consistency of data content, source fingerprint and model version can be verified at one time.
[0073] Where: predicted hash : transaction content integrity check value; compressed tuple : Predict mean, quantile width, time window and geographic label; Eventually, the node will compress the tuple , structural fingerprint And the model version signature sequence top hash And the local node logo is packaged into a transaction, based on the trust weight Priority tags are set for transactions; the transaction header also carries a micro-iteration or macro-iteration flag to guide the next step in dynamically adjusting voting rounds in the consensus sorting.
[0074] When in use, step 301 completes the conversion from real-time data to verifiable on-chain transactions through the chain operation of local reasoning-compression-hash encapsulation-priority transaction, ensuring that the prediction summary still has the triple features of source traceability, version verification and priority perception at the minimum byte size.
[0075] When used, by introducing Monte Carlo sampling and double exponential smoothing compression on the edge node side, the solution quantifies uncertainty information into the prediction summary without increasing inference latency, making the on-chain data both numerical and confident. The hash encapsulation brought by the binding of structural fingerprints and version signatures ensures that any transaction can be traced back to a specific data batch and model iteration, solving the pain point of traditional prediction write chains lacking clear version associations; priority labeling combines the dual factors of trust weight and scenario severity to provide a clear criterion for subsequent high-concurrency transaction sorting, avoiding the problem of key transactions being overwhelmed by simple FIFO queues in the past.
[0076] Step 302: Layered consensus and sequential write chain Prediction summary transactions need to be written to the chain quickly under the strong Byzantine assumption, otherwise the threshold evaluation will be blocked. Traditional PBFT is prone to communication explosion in scenarios with many nodes and frequent messages. Therefore, this step reshapes the consensus process through four technical points: layered broadcast - threshold voting - time lock - multi-copy confirmation.
[0077] After a transaction enters the consensus network, it is first batched within the homogeneous cluster according to node priority. The transaction sorting within the cluster uses a local logical clock to avoid the overhead of clock synchronization across the entire network. The batch threshold can be dynamically expanded. When the network load increases, the batch size is actively increased to reduce the number of broadcasts and maintain stable latency across the entire network.
[0078] After the cluster representative node broadcasts the batch transaction to the entire network, each node votes based on coverage. When a certain percentage of confirmation packets exceed a stable threshold, the next round begins. If the transaction header indicates a macro iteration, the system automatically adds an additional round of voting to prevent malicious nodes from influencing important model transitions.
[0079] By introducing a verifiable delay function, a time lock is assigned to each batch of transactions to ensure that no new transactions can be queued before the earliest unlocking point; at the same time, Byzantine filtering is performed on transactions within the batch. If a predicted hash is detected, If there is a contradiction with historical records, abnormal nodes will be automatically marked and their future voting weight will be reduced.
[0080] After a batch passes the final vote, multiple accounting nodes write transactions in parallel in independent shards and exchange block hashes. Only when all shards return consistent hashes will consensus be declared complete and the block number and timestamp broadcast. This mechanism reduces the probability of single-chain congestion and enhances fault isolation.
[0081] When in use, step 302 redesigns the Byzantine fault-tolerant process through four chained actions, reducing communication complexity to a hierarchical scale while ensuring the security threshold, thus achieving low-latency on-chain access for highly concurrent predictive transactions. Hierarchical broadcasting responds to network fluctuations through dynamic batch scaling, reducing communication costs. At the same time, the batch indexing and shard writing design allow nodes to maintain low-latency consensus even in hyper-concurrency scenarios. Threshold voting introduces a confidence dimension and macro-iteration safety level, allowing the algorithm to automatically enhance defenses during important model transitions, reflecting scenario-oriented self-awareness of importance. The timing lock of the verifiable delay function and the linkage of version signature verification block preemptive attacks and version rollback vulnerabilities. The shard multi-copy writing and patch block mechanism refines the fault isolation granularity to the logical shard, significantly improving the continuous availability of the permissioned chain under poor network or hardware failure conditions.
[0082] In step 301, the real-time prediction vector is compressed and combined with the structural fingerprint and model version signature to generate a prediction hash, which is then packaged into a prioritized transaction. Then, in step 302, the transaction completes Byzantine consensus and is written to the permission chain using four levels of security: hierarchical batch broadcast, multi-round threshold voting, time locks, and sharded multi-replication. This ensures that a prediction summary, just tens of bytes long, is inextricably and securely bound to its source data and model version, and receives a consistent timestamp across the entire network.
[0083] Step 3 has hashed the predictions from each edge node, bound model version signature, and structure fingerprint Written into the permissioned chain in strict chronological order, a trusted prediction stream covering the city's real-time situation is formed. If the degree of fluctuation of these prediction streams cannot be assessed on the chain in a localized manner and cross-departmental deployment cannot be triggered immediately, it will only fall into an inefficient cycle of post-event remediation. Step 4 uses the continuous prediction summary as input, finely stratifies the risk level through the threshold evaluation function, and then synthesizes a deployment intention with a verifiable path within the smart contract, allowing execution subsystems such as transportation, energy, and medical care to respond synchronously from the same trusted source. Due to the high diversity of urban scenarios, thresholds cannot be static; therefore, the following solution is adopted: Step 4: Adaptively calculate the risk score based on the continuous prediction summary in the permission chain, so that the smart contract can instantly generate a deployment intention with a verifiable path and submit it to the sidechain message bus when the threshold is reached.
[0084] The step 4 includes the following contents: Step 401: Continuous prediction risk assessment and trigger determination Single-point predictions are often affected by occasional noise. If the first anomaly is directly used as a trigger signal, frequent scheduling will occur. Conversely, if the threshold is too high, the opportunity for handling will be missed. Therefore, it is necessary to integrate multi-window sequences, node trust weights and scenario semantics to make a stable and explainable quantitative assessment of risks.
[0085] The smart contract on the chain first extracts the length of Sliding window .because Just a hash, the contract calls an external oracle to map it back to a compressed prediction tuple and trust weight Each record within the window is sorted by node trust weight and archived in a homogeneous cluster sub-buffer, ensuring the stability and traceability of subsequent calculations. By clustering and archiving, complementary information is aggregated in advance, reducing the complexity of subsequent function operations.
[0086] The contract calculates the risk benchmark for each scenario (transportation, energy, safety) within the window. Set the scenario weight Preset by the regulatory authorities, the trust-weighted forecast mean is as follows:
[0087] After calculation, enter the nonlinear threshold function:
[0088] in, and Online correction by season and time period; It is the output of the nonlinear threshold function, which maps the weighted predicted mean to the risk scale through an exponential curve, and is used for subsequent comparison between the global risk accumulation and the threshold.
[0089] is the number of scene nodes, in the time slice For the scene The number of edge nodes that successfully uploaded the prediction summary and passed the filtering. It is a positive integer and can vary with the scenario and network status.
[0090] is the weighted prediction mean of the scene, described in time slices Inside, scene The average prediction value uploaded by all valid edge nodes (such as transportation, energy, security, etc.) is weighted by the trust weight, reflecting the overall risk level of the scenario in the current window; Trust Weight :node The soft gating weight determined in step 2 has a value range of 0 to 1 and is used to reflect the credibility of the prediction; Predicted mean :node In time slice Smoothed forecast value of ; real number; used to assess risk intensity; Scene Weight : Scene Management priority; positive real number; used to multiply the risk value into the global synthesis; : Scene Upper limit risk coefficient; positive real number; used to control the top saturation value of the threshold; : Scene Sensitivity coefficient; positive real number; used to adjust the steepness of the curve; When used, the nonlinear threshold curve allows the system to remain stable in low-risk sections and quickly approach the upper limit in high-risk sections, taking into account both stability and sensitivity.
[0091] Contract pair continuous window Perform weighted accumulation, where the historical window weight decays exponentially; at the same time, if a node has The trust weight of the item marked as abnormal by the Byzantine filter in this window will be linearly reduced and participate in this round of fusion, and the final global risk score is:
[0092] Where: exponential decay coefficient : ;The impact of decaying memory on the long-term window; Global risk score : Used to compare with the threshold to determine whether it is triggered; is the window length, is the lagging index; For the scene In time slice Risk scale calculated by nonlinear threshold function; When used, the dual weighting of dynamic trust and exponential decay can quickly respond to the latest situation without being misled by short-term anomalies.
[0093] When the global risk score Exceeding the scene threshold And the increase is higher than the slope threshold When the contract is triggered, it marks the trigger as established and records the trigger timestamp; at the same time, if the model version signature If it is different from the previous trigger event version, a model transition tag is added, and the trigger signal then enters step 402.
[0094] In use, dual threshold determination prevents slow drift triggering and avoids repeated on-off switching at the edge of oscillation. A three-layer buffering approach sorts the prediction sequence across multiple dimensions, both semantically and temporally, significantly enhancing the contextual integrity of risk assessment. The coordinated adaptation of dynamic weights and threshold curves allows the system to maintain a consistent match between urban rhythms and emergencies without manual intervention. The combination of exponential decay and a cool-off period lock algorithmically suppresses chained false triggering, resolving the issue of repeated alarms in noisy environments with traditional threshold systems.
[0095] Step 402: Multi-signature deployment intention generation and path proof Once a trigger event is established, resources need to be coordinated across departments. However, different systems have very different requirements for resource units, scheduling delays, and execution permissions. Therefore, a structured deployment intention is needed that can not only embed quantified resource requirements but also come with multi-level permissions and verifiable paths to ensure that each execution subsystem is trusted and easy to parse.
[0096] Several scenario-resource-action ternary templates are pre-deployed on the chain. When the trigger signal enters the contract, the template is first located according to the scenario label, and then the global risk score is calculated. Fill in the resource demand percentage field; the contract queries the real-time resource balance through the interface to ensure that the generated demand does not exceed the current available limit. The template design ensures a unified output structure and is easy to parse across multiple systems.
[0097] Resource demand ratio According to the piecewise function:
[0098] Map risk-exceeding threshold segments to linear or quadratic growth demands.
[0099] Where: Parameter : linear slope, positive real number, controls the initial response speed; parameter : quadratic coefficient, positive real number, controls the growth rate of high-risk sections; threshold expansion : The inflection point from the linear to quadratic segment is a positive real number that defines the boundary of the risk interval; When used, segmented mapping allows resource scheduling to be gentle at low and medium risks, and quickly increased at high risks.
[0100] The contract embeds multi-level permission tags in the resource demand list: the municipal competent department has the main control right, and the district-level departments and enterprise operators have the coordination right; through the multi-signature mechanism on the chain, each type of resource must be signed by more than half of its permission set before it is broadcast on the side chain. This labeling process calls the node identity certificate and model version signature Verification ensures that the call chain is traceable. The multi-signature permission system prevents a single entity from accidentally triggering a large amount of resource waste.
[0101] The contract will allocate intention This is encapsulated as a JSON-LD document, containing a five-step path: source prediction hash, model version, threshold function, resource list, and permission signature. The document hash is written back to the permission chain and simultaneously pushed to the sidechain message bus. Upon receiving the message, the execution subsystem can quickly verify the document hash and permission signature on the permission chain to determine the execution order. This dual-write of the document and hash enhances the verifiability and persistence of deployment intent.
[0102] Asynchronous iteration of templates combined with version hashing allows the deployment logic itself to enter the blockchain traceability system, achieving equal credibility of processes and data; the segmented mapping of resource requirements and the feedback closed correction mechanism ensure that the deployment scale is gradually optimized with the actual execution results, rather than remaining unchanged; the multi-signature authority with an emergency proxy mechanism can maintain the flow of instructions in the event of large-scale failures or single department offline, reflecting resilience; the final seven-segment document path solidifies the source, logic, authority, and version into an indivisible whole, providing unprecedented transparency and verifiability for cross-system automatic execution.
[0103] Step 4: Couple the sliding window prediction sequence, node trust weight and scenario weight through step 401, and calculate the global risk score through the nonlinear threshold curve and exponential decay fusion. Then, step 402 instantiates the smart contract template based on the trigger signal and the model version signature, quantifies the resource requirements by segment mapping, injects multi-signature permission annotations, and finally forms a deployment intention including the source-logic-permission full chain path. This is simultaneously stored and broadcasted on the permissioned chain and sidechain. The model version signature and source prediction hash within the deployment intent directly allow the execution subsystem to trace back to the specific prediction window and weight iteration, thus maintaining two-way transparency of resource actions and algorithm evolution. A cross-authority mechanism ensures that no single point of misjudgment can monopolize the deployment process.
[0104] Allocation Intention The source prediction hash, model version signature, and multi-signature permissions are delivered to each execution subsystem through the sidechain message bus. However, if the subsystem cannot accurately re-arrange resources under real-time working conditions, legacy constraints, and cross-system coupling, instructions will be left hanging or execution deviations will occur, thereby weakening the resilience of the entire link.
[0105] Step 5: Transmit the allocation intention generated on the chain to each execution subsystem securely and with low latency, driving it to complete resource rescheduling and transmit the operating status back in real time, thus achieving allocation closure and leaving traces on the performance chain.
[0106] The step five includes the following: Step 501: Robust fragment transmission and two-way handshake The sidechain message bus connects numerous execution subsystems, including traffic signal controllers, smart distribution stations, drainage pump SCADA, and automated medical supply warehouses. These systems have significant differences in network protocols, clock accuracy, and security levels. Directly broadcasting deployment intentions can cause some subsystems to be unable to recognize or fail authentication. Therefore, a multi-layer message encapsulation and end-to-end confirmation mechanism are required to ensure that the intention reaches the target end intact and securely and is correctly interpreted.
[0107] After receiving a seven-segment document, the sidechain node fragments it into segments according to the MTU, assigning a sequence number and segment hash to each segment. The overall document hash and time stamp are inserted at the beginning and end of each batch of segments. This fragment tuple forms a directed segment chain, allowing any missing segments to be quickly located through missing number detection. The system utilizes linear redundancy based on Luby transcoding, enabling the destination to reconstruct the original document even if a few segments are lost. This segment-redundancy chain ensures message integrity even in environments with wireless link jitter or multipath interference.
[0108] The execution subsystem initiates a zero-round-trip handshake: The sidechain node encrypts the first packet of the deployment intention shard with the subsystem's public key. Upon receipt, the subsystem directly decrypts and verifies it with its private key, eliminating the need for multiple round trips in traditional TLS. If verification succeeds, a status message containing the system clock, current load, and expected latency is immediately sent as a handshake confirmation. The zero-round-trip handshake reduces initial connection latency and ensures unique identity mapping using public and private keys.
[0109] Sidechain nodes read priority flags based on the scenario tag of the intended dispatch: high-priority traffic uses a skewed exponential backoff strategy with shorter timeouts and concurrent retransmissions; normal traffic uses a linear backoff strategy to ensure the bus isn't overwhelmed by frequent retransmissions. This hierarchical backoff prevents high-risk scenario information from being delayed by network congestion, and also prevents normal traffic from being starved.
[0110] After the subsystem reconstructs the document, it verifies each of the template version hash, permission signature, and resource list in the path segment. If any field fails verification, a rejection reason code is immediately fed back to the sidechain node, and a rejection receipt is written to the permission chain for rapid intervention by upstream regulators. This two-way feedback chain ensures on-chain evidence of failures, preventing silent failures.
[0111] The combination of multi-chain shard endorsement and linear redundant coding allows for one-time reconstruction of messages even in noisy environments or when some base stations lose power, significantly improving the survival rate of deployment commands in extreme scenarios. The zero-round-trip handshake, leveraging load feedback dynamic rate control, enables simultaneous communication handshakes and resource awareness, resolving the congestion issues caused by traditional handshakes that ignore differences in target end capabilities. Multi-level timeouts and self-learning backoffs enable dynamic self-regulation of all-weather traffic, fully demonstrating its adaptive and self-protective features. Secondary verification incorporates both logical and physical constraints into verification, ensuring document legitimacy while preventing commands from being directed to inoperable objects, enhancing system resilience.
[0112] Step 502: Adaptive drive optimization and on-chain receipt The hardware topology, control strategy and resource constraints of each execution subsystem vary greatly. The fixed instructions issued by the traditional hub cannot adapt to dynamic working conditions. The adaptive decision-making driver needs to calculate the control sequence based on the intention on the chain and the local state, and at the same time evaluate the potential impact of the action on other systems. Ultimately, it executes resource rescheduling with the minimum coupling cost and fills the process indicators back into the chain to achieve closed-loop optimization.
[0113] The driver first pulls local real-time telemetry Share state with neighboring systems and get the most recent Round execution receipt , then construct the state fusion tensor :
[0114] The cross-system coupling relationship is extracted through the graph attention network to obtain the influence coefficient matrix .
[0115] Where: Influence coefficient matrix : Describes the impact of resource actions on neighboring systems; the element range is 0 to 1 and is used for subsequent cost evaluation; When used, tensors can be fused to create a panoramic view, providing a unified data base for subsequent optimization.
[0116] The driver solves the multi-objective function in the receding time domain:
[0117] Constrained resource margin ; To predict the rolling step size, is the step index, is the time reference; Control Sequence :future The step resource scheduling amount, the value range is given by the upper and lower bounds of resource availability; Cost Items : related to the error of the allocation target indicator, a positive real number; Cost Items : the energy cost of executing the action, a positive real number; Cost Items : Cross-system interference penalty, calculated by the influence coefficient matrix; Weight , , : Priority coefficient set by the manager, a positive real number; When used, multi-objective optimization takes into account performance, energy consumption and coordination, and output operations can be implemented.
[0118] The local driver uses a heuristic greedy algorithm to generate an initial solution and quickly sends part of the control quantity to ensure timeliness; at the same time, the state fusion tensor When the initial solution is pushed to the cloud, the cloud asynchronously runs the mixed integer programming to make fine corrections to the remaining control variables and overwrite them in the next rolling window.
[0119] During the execution process, the embedded sampler collects key indicators in seconds, and the driver calculates the performance vector locally. and the proportion of resource requirements for deployment intention Calculating execution deviation , then 、 It is written into the permission chain together with the control sequence hash to form a tamper-proof receipt, and the trace left on the chain closes the execution process to the evaluation-optimization long chain.
[0120] In use, the fusion of tensor multimodal alignment and topological sparsification gating ensures accurate and low-redundancy coupling strength measurement, providing high signal-to-noise ratio input for multi-objective optimization. Switching penalties and on-chain adjustable weights organically combine the flexible control of daily operations and maintenance with the rigid requirements of extreme events. Edge-to-cloud hot start and metadata synchronization innovatively resolve the "edge first action, cloud optimization" timing conflict while ensuring that the correction sequence is not lagging behind. Execution monitoring utilizes a dual-alert strategy and on-chain receipts to effectively expose execution anomalies as early as possible and incorporate them into the next round of weight fine-tuning, achieving a continuous closed loop of evaluation, execution, and learning.
[0121] Step 5: Through step 501, a sharded redundant transmission, zero round-trip handshake, multi-level timeout and secondary verification mechanism is constructed for the multi-protocol execution subsystem to ensure that the deployment intention reaches the target end completely and safely in the complex network; then step 502 performs rolling optimization based on the multi-source state fusion tensor, generates an executable control sequence through edge-cloud collaborative solution, and locks the operation status and performance indicators with on-chain receipts, realizing a closed loop from intention to execution and then to feedback. The influence coefficient matrix generated during operation , execution deviation and performance vector It will directly provide data support for the next round of threshold curve adaptation and trust weight fine-tuning, thereby fully threading the allocation link and evaluation link on the permission chain, ensuring the long-term self-evolution and resilience improvement of the solution.
[0122] After completing the resource rescheduling, the execution subsystem writes the control sequence hash and performance vector through the chain receipt Deviation from execution If this information cannot be promptly and reliably aggregated into local state tensors and converted into trainable samples by edge nodes, the prediction-execution-learning loop cannot be closed, and federated training cannot quickly adapt to the latest working conditions. Therefore, the following solution is adopted: Step 6: Map the on-chain receipt to an incremental patch of the local state tensor and adaptively update the model trust weight, which then triggers a new round of micro-batch federated training on the edge node to achieve a coherent closure of prediction-execution-learning. Step 601: High-quality receipt screening and patch construction The on-chain receipt flow contains multi-dimensional indicators from different execution subsystems, including direct performance vectors , there are also deviation values and control sequence hashing. Edge nodes must quickly identify receipts belonging to their own prediction windows, assess their credibility, and write high-quality data to the local patch queue; otherwise, federated training will be mixed with noise or even incorrect labels, causing model degradation.
[0123] The edge node retrieves the receipt from the permission chain through the structure fingerprint-model version signature-timestamp triple index, matching the following conditions:
[0124] Add receipts that meet the conditions to the candidate set ; Where: 、 : Time slice and The structural fingerprint on it uniquely identifies the prediction data batch of this node; 、 : Model version signature, corresponding to the iterative model weight hash; is the logical AND operator; Time tolerance window : Allowed receipt delay range, a positive integer in seconds; Calculate the quality score for each candidate receipt:
[0125] like then discard; Where: threshold : discard threshold; quality score :scope ,The larger the value, the higher the credibility of the receipt, which is used to determine the patch weight; Increment Vector : Dimension-by-dimensional error between the measured and predicted values, real number vector; Two-norm : comprehensive measurement error magnitude, non-negative real number; Execution Vector : Measured performance vector from on-chain receipts; real number vector; Prediction vector : prediction results recorded locally by edge nodes; real number vector; Scene projection matrix : A diagonal positive definite matrix whose elements are scene importance coefficients. It remains unchanged for a long time after offline configuration and is used to emphasize key indicators. Adjustable coefficient : A positive real number (recommended 0.1~1), which controls the error suppression strength; the only newly introduced weight; Sigmoid function : Ensure that the output falls between 0 and 1, and increase the resolution in the middle range; For receipts that pass quality assessment, incremental vectors are extracted. The incremental patches provide positioning and strength information for error injection, where:
[0126] And mapped to the local state tensor dimension to generate a patch . Patch comes with weights Used for subsequent convolution-attention integration.
[0127] Increment Vector : actual-prediction difference, real vector; patch weight : Receipt quality weight; range ; Adjust the node trust weight based on the receipt credibility:
[0128] in, is the mean quality within the window, is the learning rate, a positive real number, less than 1; 、 are the trust weights of new and old nodes respectively; The quality score of a single receipt; When in use, the trust weight is adjusted in real time to provide more accurate node importance for the next round of federated training. Through the skip list-Bloom dual-level search and bucket-archive design, the receipt query is reduced from O(N) to an amortized approximation of O(logN), significantly improving the real-time performance of edge nodes under high chain load; the quality evaluation function integrates vector norm, matrix projection and Sigmoid, using only one adjustable coefficient. It simultaneously characterizes the error magnitude and directional alignment, significantly reducing parameter tuning costs while maintaining sensitivity; incremental patch mapping incorporates freshness decay, allowing data value to naturally decrease over time and suppressing the negative drag of outdated information on the model; Nesterov-style weight updates allow trust weights to quickly align with actual performance while avoiding rating fluctuations.
[0129] Step 602: Patch fusion training trigger and version preparation After the patch is written into the local state tensor, if it is not fused through lightweight noise suppression and re-encoding, the measurement outliers will be amplified. At the same time, triggering a new round of micro-batch training requires determining the best start time based on the patch coverage and weight distribution to avoid wasting computing resources.
[0130] Edge nodes closest to Patches Perform weighted depthwise separable convolution, maintain the original tensor backbone and introduce error information to achieve dynamic calibration:
[0131] Where: fusion tensor : The new input tensor after patch absorption; balance factor : ; is the patch weight; It is a depth-wise separable convolution; For patches; is the window depth; is the step index; Coverage is calculated to ensure that training starts when there are sufficient patches and node reputations change significantly, improving sample effectiveness, where:
[0132] like And the highest trust weight increase in the window , a new round of micro-batch self-replay training is triggered.
[0133] Where: coverage threshold : positive real number; trust weight increase threshold : positive real number; When a new training round begins, the node will Round gradient mean For reference, the current gradient Perform differential shearing to speed up convergence and keep the model stable:
[0134] Where: Differential shear gradient : Remove stable direction noise; is the clipping operator; After training is completed, the node generates a new gradient summary and model version identifier , and is also the fusion tensor of this round Calculating new structural fingerprints Cache both and call them directly when federated aggregation is enabled in step S2 to reduce latency, thereby preparing the version signature and fingerprint in advance and ensuring a seamless transition to the next round of processes.
[0135] When used, weighted depthwise separable convolution directly binds the convolution kernel size to the patch quality, which not only saves computing power but also enables dynamic information integration, embodying the combination of lightweight and adaptability; the three-state trigger finite state machine makes the training start timing more explainable, solving the problem of frequent false triggering or sluggishness of traditional fixed window or single threshold strategies in actual deployment; the dual constraints of differential shearing and frozen baseline allow the model to efficiently learn the latest deviations while maintaining historical stability, reducing catastrophic forgetting; hashing and adding the convolution kernel sparsity rate allow the version signature to naturally include model complexity measurement, providing a new dimension indicator for prediction compression and consensus sorting.
[0136] Step 6 uses the structural fingerprint, model version, and time window ternary indexes in step 601 to precisely match the receipt. A quality assessment function is then used to filter noise, and the data is written to the local state tensor in the form of incremental patches. Node trust weights are dynamically corrected, allowing the feedback data to be purified and weighted first. Subsequently, through step 602, deep separable convolutional fusion, multi-metric triggering strategies, and differential shear training, the patch information is instantly converted into model weight update potential. A new structural fingerprint and version signature are generated in advance, caching the data for the next round of federated training. This connects the actual performance of the execution layer with the tensor input of the perception layer, forming a self-driven closed loop of continuous prediction, execution, and learning. Furthermore, dynamic trust weights self-correct with feedback, providing a more accurate contribution measurement for cross-node aggregation, ensuring that the synergistic benefits of the entire network accumulate over time rather than decay.
[0137] See also Figure 2 The present invention provides a resilient city resource allocation system based on blockchain and edge computing, including: The alignment and normalization module performs spatiotemporal alignment and semantic normalization on multi-source real-time data, generates a local state tensor containing self-checking metadata, and caches it in a ring buffer queue in the secure zone for persistent storage. The gradient aggregation module forms a gradient summary by combining clipped gradients with differential privacy masks. After dynamic trust weighted aggregation, the model version is signed synchronously and iteratively, and a consistent weight vector for the entire network is output for use in the next round. The hash consensus module concatenates the compressed prediction tuple with the structural fingerprint and model signature to generate a prediction hash, broadcasts it in batches according to priority, and writes it into the permission chain through Byzantine consensus to obtain a timestamp and synchronize the mark; The risk assessment module runs a dual-threshold assessment on the weighted risk curve within the sliding window. When the conditions are met, it instantiates the multi-signature template to generate the deployment intention and broadcasts it to the sidechain message bus in real time. The decision-making distribution module receives sharded documents through a zero-round-trip handshake. The adaptive decision driver integrates multi-source state rolling optimization control sequences and distributes them in parallel with cloud-based corrections, and records performance receipts on the chain. The patch training module retrieves receipts, calculates quality scores, generates incremental patch weights, and fuses them into tensors. It triggers differential shear training based on patch coverage and trust weight increases, and caches new fingerprints and versions for federated aggregation.
[0138] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0139] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0140] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is only for some logical functions. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0141] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0142] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A resilient city resource allocation method based on blockchain and edge computing, characterized by: include, Complete spatiotemporal alignment and semantic normalization of multi-source real-time data, generate local state tensors containing self-checking metadata, and cache them in the ring buffer queue in the secure zone for persistent storage; The gradient summary is formed by combining clipping gradient with differential privacy mask, and the dynamic trust weight is weighted and aggregated to synchronize the iterative model version signature and output the network-wide consistent weight vector for use in the next round; The compressed prediction tuple is concatenated with the structural fingerprint and model signature to generate a prediction hash, which is broadcast in batches according to priority and written into the permission chain through Byzantine consensus to obtain a timestamp and synchronization mark. A dual-threshold judgment is performed on the weighted risk curve within the sliding window. When the conditions are met, a multi-signature template is instantiated to generate a deployment intention and broadcasted to the sidechain message bus for real-time delivery. Sharded documents are received through a zero-round-trip handshake, and the adaptive decision driver integrates multi-source state rolling optimization control sequences and issues them in parallel with cloud-based corrections, with performance receipts recorded on-chain. The retrieval receipt calculates the quality score and generates incremental patch weights, which are then fused into a tensor. The patch coverage and trust weight increase are used to determine whether differential clipping training is triggered and the new fingerprint and version are cached for federated aggregation.
2. The method for allocating resilient urban resources based on blockchain and edge computing according to claim 1 is characterized by: The external sensor message timestamp is corrected in microseconds through a constant temperature crystal oscillator, and the moving coordinates are dynamically patched in conjunction with a Kalman filter. A semantic template with feedback is used to merge multiple vendor fields into a unified indicator, and the corrected data is then written into a ring buffer queue protected by a one-time key to ensure the spatiotemporal consistency and confidentiality integrity of the original state frame.
3. The method for allocating resilient urban resources based on blockchain and edge computing according to claim 2 is characterized by: It uses depth-wise separable convolution combined with channel attention weights to filter out redundant features, and integrates short-term fluctuations and long-term trends through gated recurrent units. After stacking the continuous gated outputs into a local state tensor along the newly added time dimension, double hashing is performed to generate the structural fingerprint and a one-to-one mapping between the tensor and the fingerprint is cached locally.
4. The method for allocating resilient urban resources based on blockchain and edge computing according to claim 3 is characterized by: When calculating the local gradient, a temperature modulation coefficient is introduced to enhance the gradient amplitude of rare high-impact samples. The gradient vector is amplitude clipped and then superimposed with differential privacy noise based on structural fingerprints. Threshold Huffman coding is used to generate byte-level gradient summaries.
5. The method for allocating resilient urban resources based on blockchain and edge computing according to claim 4 is characterized by: The aggregation layer constructs a weighted cosine similarity matrix for the uploaded gradient summary, detects abnormal nodes with angles exceeding the threshold, and lowers their trust weights; After filtering, local averaging of homogeneous clusters and global fusion with soft gating are used to generate new weights, and rolling hashing is used to generate the model version signature sequence.
6. The method for allocating resilient urban resources based on blockchain and edge computing according to claim 5 is characterized by: After loading the global weight inference on the local state tensor, the confidence interval is obtained through Monte Carlo sampling and compressed into a prediction tuple, which is then concatenated with the structural fingerprint and model signature to generate a prediction hash, and the transaction priority is set according to the trust weight.
7. The method for allocating resilient urban resources based on blockchain and edge computing according to claim 6 is characterized by: Predicted hash transactions are batched within the homogeneous cluster and broadcasted in layers to enter the Byzantine fault tolerance process of the entire network; The voting rounds are automatically adjusted according to the transaction macro iteration flag, and the block hash is cross-checked after the multi-shard accounting nodes write to the permission chain in parallel.
8. The method for allocating resilient urban resources based on blockchain and edge computing according to claim 7 is characterized by: The smart contract applies a nonlinear threshold function to the risk value of each scenario within a sliding window, accumulates the historical window with exponential decay, and then calculates the global risk score based on the scenario weight. A trigger signal is generated when the score exceeds the set threshold and the slope is greater than the minimum growth rate.
9. The method for allocating resilient urban resources based on blockchain and edge computing according to claim 8 is characterized by: Pre-deploy scenario-resource-action templates on the chain, which use piecewise functions to map the risk threshold value to the resource demand ratio and embed multi-signature permission tags; The deployment intention is encapsulated as a seven-segment JSON-LD document, and the document hash is written to the permission chain to synchronize the side chain broadcast.
10. The method for allocating resilient urban resources based on blockchain and edge computing according to claim 9 is characterized in that: The sidechain node allocates the intention according to the MTU fragmentation and inserts the chain hash endorsement, uses a zero round-trip handshake to complete the identity negotiation and receive the target subsystem status message; High-priority traffic uses an exponential backoff retransmission strategy, and low-priority traffic uses a linear backoff strategy.
11. The method for allocating resilient urban resources based on blockchain and edge computing according to claim 10 is characterized in that: The execution subsystem integrates local real-time telemetry, neighboring shared status and historical receipts to construct a state tensor, generates an influence coefficient matrix through a graph attention network, and rollingly optimizes multi-objective functions under the edge-cloud collaborative framework to form a control sequence, and records performance receipts on the chain after execution.
12. The method for allocating resilient urban resources based on blockchain and edge computing according to claim 11 is characterized in that: Receipts are retrieved from the permission chain through a Bloom filter and skip list dual-level indexing. After calculating a new quality score, an incremental patch is generated and written into the local state tensor. At the same time, the node trust weight is dynamically adjusted based on the patch quality. Use weighted depthwise separable convolution to fuse the nearest patches to form a new tensor, and trigger differential shear training based on patch coverage and confidence weight increase. After training is completed, the new structure fingerprint and model version signature are output and cached for subsequent federated aggregation.
13. A resilient urban resource allocation system based on blockchain and edge computing, characterized by: include, The alignment and normalization module performs spatiotemporal alignment and semantic normalization on multi-source real-time data, generates a local state tensor containing self-checking metadata, and caches it in a ring buffer queue in the secure zone for persistent storage. The gradient aggregation module forms a gradient summary by combining clipped gradients with differential privacy masks. After dynamic trust weighted aggregation, the model version is signed synchronously and iteratively, and a consistent weight vector for the entire network is output for use in the next round. The hash consensus module concatenates the compressed prediction tuple with the structural fingerprint and model signature to generate a prediction hash, broadcasts it in batches according to priority, and writes it into the permission chain through Byzantine consensus to obtain a timestamp and synchronize the mark; The risk assessment module runs a dual-threshold assessment on the weighted risk curve within the sliding window. When the conditions are met, it instantiates the multi-signature template to generate the deployment intention and broadcasts it to the sidechain message bus in real time. The decision-making distribution module receives sharded documents through a zero-round-trip handshake. The adaptive decision driver integrates multi-source state rolling optimization control sequences and distributes them in parallel with cloud-based corrections, and records performance receipts on the chain. The patch training module retrieves receipts, calculates quality scores, generates incremental patch weights, and fuses them into tensors. It triggers differential shear training based on patch coverage and trust weight increases, and caches new fingerprints and versions for federated aggregation.
Citation Information
Patent Citations
Cross-platform social privacy collaborative protection system based on federal learning and block chain
CN120257367A
Right and interest exchange verification and confirmation system
CN120337188A
Risk control credit monitoring method based on cloud computing
CN120338944A
Digital right near-field real-time cancel-after-verification system and method based on edge calculation
CN120355464A
Supply chain finance ai daas algorithm warehouse platform based on blockchain
WO2022179008A1
Cited By
Data storage method for artificial intelligence learning mode
CN120723945A
Data storage method for artificial intelligence learning mode
CN120723945B
Low-overhead in-band whole-network telemetering method and system based on compressed sensing
CN120880974A
Multi-platform data distribution method and system based on dynamic mapping
CN121000781A
Carbon capture process intelligent diagnosis control method and system based on AI decision
CN121165670A