CN-122001826-A - Multi-state node conversion method and system based on block chain
Abstract
The invention discloses a multi-state node conversion method and a system based on a blockchain, which relate to the technical field of node conversion and comprise the following steps of constructing a node steady-state identification model, continuously monitoring trigger conditions generated in the node operation process, calculating the change slope of the trigger conditions, comparing the change slope with the threshold value difference at the last moment, outputting the current transient confidence coefficient result of the node, establishing a self-adaptive filtering window based on the transient confidence coefficient result, dynamically adjusting a boundary in the self-adaptive filtering window, weakening a low-confidence coefficient trigger signal, and only outputting an effective trigger signal after boundary screening. The invention improves the accuracy and jitter resistance of node state judgment through a steady state identification and dynamic filtering mechanism, combines aggregation buffering, load prediction and probability convergence control, realizes high-reliability execution and resource controllability of state switching, and enhances the stability, intelligence and traceability of node management.
Inventors
- Pu Xiangchao
- ZHANG LONG
- YUAN YANCHUN
- YANG SONGYUAN
- FAN HUAYU
- Zhu Qiuquan
- Diao Yuzhuo
- LIU XIA
Assignees
- 南阳商祺数贸科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20250922
Claims (9)
- 1. The multi-state node conversion method based on the block chain is characterized by comprising the following steps of: Constructing a node steady-state identification model, continuously monitoring a trigger condition generated in the node operation process, calculating a change slope of the trigger condition, comparing the change slope with a threshold value difference at the previous moment, and outputting a current transient confidence result of the node; establishing an adaptive filtering window based on a transient confidence result, dynamically adjusting a boundary in the adaptive filtering window, weakening a low confidence triggering signal, and only outputting an effective triggering signal after boundary screening; Based on the effective trigger signal output by the self-adaptive filter window, setting a node time sequence aggregation buffer zone, and folding a plurality of trigger instructions in the same filter window time range into a single event in the node time sequence aggregation buffer zone; based on a single event output by the node time sequence aggregation buffer zone, calling a node layered load prediction mechanism, estimating a computing resource required by state judgment corresponding to the single event, and planning and judging an execution limit in advance according to an estimated result; Asynchronous pre-verification is carried out on a state transition path triggered by a single event based on a judging execution limit determined by a layered load prediction mechanism, and a potential reverse instruction is removed by carrying out simulation exercise on the state transition path to generate a pre-verified state transition event; Based on the pre-checked state transition event, a conditional transition probability diagram is established, the state transition is modeled as a probability evolution process, the state transition operation is executed only when the distribution result of the conditional transition probability diagram reaches stable convergence, and the transient jump caused by high-frequency inversion triggering is shielded.
- 2. The blockchain-based multi-state node transformation method of claim 1, wherein the step of constructing a node steady state recognition model to output transient confidence results comprises: continuously acquiring original data of a trigger condition in the node operation process, carrying out time-sequence storage on the trigger condition in a fixed sampling period, and carrying out normalization processing on the trigger condition to obtain a trigger condition sequence; calculating a change slope of the trigger condition for the numerical change between two adjacent sampling points based on the trigger condition sequence, and forming a slope sequence; comparing the current slope in the slope sequence with the threshold value difference at the previous moment, judging that the slope is stable when the absolute value of the current slope is smaller than the threshold value difference, and judging that the slope fluctuates when the absolute value of the current slope is larger than the threshold value difference; and outputting the current transient confidence coefficient result of the node according to the comparison result, and carrying out weighted average calculation on the confidence coefficient results at a plurality of continuous moments before outputting to obtain a smooth transient confidence coefficient curve.
- 3. The blockchain-based multi-state node transformation method of claim 2, wherein the confidence results at consecutive times are weighted average calculated using the confidence values at the last five times and weighted according to weights of 0.5, 0.2, 0.15, 0.1 and 0.05 to obtain a smooth transient confidence curve.
- 4. The blockchain-based multi-state node conversion method of claim 2, wherein the step of establishing an adaptive filter window based on the transient confidence result and outputting a valid trigger signal comprises: after obtaining a transient confidence coefficient curve, initializing a time range and an initial boundary value of a self-adaptive filter window by taking the transient confidence coefficient curve as input, and setting an upper limit boundary and a lower limit boundary according to an average value of the transient confidence coefficient; after the initialization of the self-adaptive filter window is completed, when each new sampling period arrives, filling the latest transient confidence coefficient result into the filter window, removing the earliest transient confidence coefficient data, and adjusting the upper limit boundary and the lower limit boundary according to the average value and the standard differential state of the window; After finishing the dynamic adjustment of the boundary, classifying the transient confidence points in the window according to the upper limit boundary and the lower limit boundary, removing the trigger signals lower than the lower limit boundary, directly outputting the trigger signals higher than the upper limit boundary, and determining whether the trigger signals between the upper limit boundary and the lower limit boundary are effective trigger signals after the calculation of the sliding average.
- 5. The blockchain-based multi-state node conversion method of claim 4, wherein the step of setting the node timing aggregate buffer and collapsing into a single event based on the valid trigger signal output by the adaptive filter window comprises: after obtaining the effective trigger signal output by the self-adaptive filter window, setting the time length and the upper limit of the capacity of the time sequence aggregation buffer zone, and storing the effective trigger signal into the time sequence aggregation buffer zone according to the time stamp sequence; Detecting repeated trigger instructions in the same filtering window time range in the time sequence aggregation buffer zone, and merging and marking the detected repeated trigger instructions; After the merging mark is completed, folding the merging mark into a single event according to the occurrence times and the timestamp range of the repeated instruction, and recording the weight value, the starting time and the ending time of the single event; after the single event is generated, the folded event queue is output as input data of a subsequent state judgment link, and the time sequence aggregation buffer area is updated in the output process.
- 6. The blockchain-based multi-state node conversion method of claim 1, wherein invoking the hierarchical load prediction mechanism and scheduling in advance the decision execution units based on a single event output by the node timing aggregate buffer comprises: After the node time sequence aggregation buffer zone outputs a single event, extracting a starting time stamp, an ending time stamp, duration, an accumulated weight value and a trigger type of the single event, and performing numerical coding on the trigger type to form a feature vector; After the feature vector is obtained, inputting the feature vector into a first-layer quick estimation link of a layered load prediction mechanism, calculating an initial load coefficient according to the duration and the accumulated weight value, and dividing a single event into low-load, medium-load or high-load events; After finishing the quick estimation, inputting the feature vector into a second layer fine calculation link of a hierarchical load prediction mechanism, and outputting the required CPU time slice number, memory overhead and disk access times by combining the event trigger type and the history judgment overhead; After the refined prediction result is obtained, the execution limit of state judgment is planned in advance according to the predicted resource value, the priority is set in combination with the event triggering type, and the execution limit result is recorded into a judgment schedule to be used as the input of the follow-up asynchronous pre-verification.
- 7. The blockchain-based multi-state node conversion method of claim 6, wherein asynchronously pre-checking a single event-triggered state transition path based on a decision execution limit determined by a hierarchical load prediction mechanism and generating a pre-checked state transition event comprises: After the judging execution limit output by the layered load prediction mechanism is obtained, the execution limit is used as a resource constraint condition, the state migration path corresponding to the single event is subjected to initialization modeling, and only migration paths which can be completed within the execution limit range are reserved; after the migration path initialization modeling is completed, carrying out asynchronous pre-verification on the reserved migration path, detecting whether an inversion instruction exists in the reserved migration path through simulation exercise, and stopping continuous simulation of the path when the accumulated resource consumption approaches the upper limit of the execution limit; After the asynchronous pre-verification is completed and the potential reverse instruction is eliminated, converting the migration path which is drilled through into a pre-verified state migration event, wherein the state migration event comprises a starting state, a target state, actual resource consumption, execution duration and confidence score, and outputting the pre-verified event queue as the input of a conditional transition probability graph.
- 8. The blockchain-based multi-state node transformation method of claim 7, wherein the step of creating a conditional transition probability map based on the pre-checked state transition event and performing the state transition operation when the distribution result stably converges comprises: After the pre-checked state transition event is obtained, mapping the initial state, the target state, the execution time, the resource consumption and the confidence score of the event into edges in the conditional transition probability map, and taking the confidence score as an initial transition probability value; After a conditional transition probability map is established, carrying out normalization processing on confidence values of a plurality of edges starting from the same initial state, so that the sum of probabilities of the transition edges is 1, and obtaining standardized transition probability; after normalization processing is completed, introducing a time dimension and a dynamic iteration mechanism, taking the current node state as an initial distribution vector, and generating a state probability evolution sequence by multiplying the current node state with a conditional transition probability matrix; And after the evolution sequence is obtained, carrying out convergence detection on the continuous iteration result, judging that the continuous iteration result is stably converged when the Euclidean distance or entropy change is lower than a preset threshold value, selecting a target state with highest probability as a final switching result after the convergence, and writing the convergence probability distribution into a block chain.
- 9. A multi-state node conversion system based on a block chain, which is used for realizing the multi-state node conversion method based on the block chain as claimed in any one of the claims 1-8, and is characterized by comprising a steady state identification module, an adaptive filtering module, a time sequence aggregation module, a layered prediction module, an asynchronous pre-verification module and a probability convergence module; The steady-state identification module is used for constructing a node steady-state identification model, continuously monitoring a trigger condition generated in the node operation process, calculating a change slope of the trigger condition, comparing the change slope with a threshold value difference at the last moment, and outputting a current transient confidence result of the node; The self-adaptive filtering module establishes a self-adaptive filtering window based on a transient confidence coefficient result, dynamically adjusts a boundary in the self-adaptive filtering window, weakens a low confidence coefficient trigger signal, and only outputs an effective trigger signal after boundary screening; the time sequence aggregation module is used for setting a node time sequence aggregation buffer zone based on an effective trigger signal output by the self-adaptive filter window and folding a plurality of trigger instructions in the same filter window time range into a single event in the node time sequence aggregation buffer zone; The hierarchical prediction module is used for calling a node hierarchical load prediction mechanism based on a single event output by the node time sequence aggregation buffer zone, predicting the computing resources required by state judgment corresponding to the single event, and planning and judging the execution limit in advance according to the prediction result; The asynchronous pre-verification module performs asynchronous pre-verification on the state transition path triggered by a single event based on the judging execution limit determined by the layered load prediction mechanism, and eliminates a potential reverse instruction by performing simulation exercise on the state transition path to generate a pre-verified state transition event; The probability convergence module establishes a conditional transition probability map based on the pre-checked state transition event, models the state transition as a probability evolution process, executes state transition operation only when the distribution result of the conditional transition probability map reaches stable convergence, and shields instant jump caused by high-frequency inversion triggering.
Description
Multi-state node conversion method and system based on block chain Technical Field The invention relates to the technical field of node conversion, in particular to a multi-state node conversion method and system based on a blockchain. Background The multi-state node state conversion based on the blockchain refers to that under the distributed network environment, transparent and non-tamperable state conversion rules and triggering conditions are defined on the blockchain, so that the nodes can be orderly switched between different running states. For example, the node may have an "initialized, running, failed, restored" state, and when certain conditions are met (e.g., heartbeat detection anomalies, data consistency check failure, or a restart threshold is reached), the system automatically completes state switching according to rules previously written to the blockchain. Because the block chain is provided with a distributed consensus mechanism, the confirmation and the record of a plurality of nodes are needed to be obtained for each state transition, the risk brought by single-point decision can be avoided, the overt, traceable and non-tamperable transition process is ensured, and the state switching of the nodes in the whole network is more stable, safe and smooth. Therefore, the transparency and the reliability of node management are improved, and the self-adaption and the robustness of the system in the face of faults or complex environments are effectively enhanced. The prior art has the following defects: In the prior art, node state transitions typically rely on preset trigger conditions to drive the switching of the operating state. However, in a scenario where dynamic fluctuation is severe, the trigger condition may occur in an inverse phase, that is, a certain condition is negated in a very short time just being satisfied, resulting in a node frequently receiving a large number of invalid handover instructions in a short time. Such instructions cannot logically bring about effective state update, but still are analyzed and executed one by the determination module, thereby causing high-frequency consumption of computing resources. When such conflicts are continuously accumulated in a large-scale node environment, overload of a judging process is extremely easy to cause, and finally, the problems of resource exhaustion, response delay and even state transition link paralysis occur, so that the reliability and stability of the prior art under a complex dynamic environment are seriously weakened. The above information disclosed in the background section is only for enhancement of understanding of the background of the disclosure and therefore it may include information that does not form the prior art that is already known to a person of ordinary skill in the art. Disclosure of Invention The present invention is directed to a multi-state node conversion method and system based on blockchain, so as to solve the above-mentioned problems in the background art. In order to achieve the above purpose, the invention provides a multi-state node conversion method based on block chain, comprising the following steps: Constructing a node steady-state identification model, continuously monitoring a trigger condition generated in the node operation process, calculating a change slope of the trigger condition, comparing the change slope with a threshold value difference at the previous moment, and outputting a current transient confidence result of the node; establishing an adaptive filtering window based on a transient confidence result, dynamically adjusting a boundary in the adaptive filtering window, weakening a low confidence triggering signal, and only outputting an effective triggering signal after boundary screening; Based on the effective trigger signal output by the self-adaptive filter window, setting a node time sequence aggregation buffer zone, and folding a plurality of trigger instructions in the same filter window time range into a single event in the node time sequence aggregation buffer zone, so as to reduce the processing pressure of subsequent state judgment; based on a single event output by the node time sequence aggregation buffer zone, calling a node layered load prediction mechanism, estimating a computing resource required by state judgment corresponding to the single event, and planning and judging an execution limit in advance according to an estimated result; Asynchronous pre-verification is carried out on a state transition path triggered by a single event based on a judging execution limit determined by a layered load prediction mechanism, and a potential reverse instruction is removed by carrying out simulation exercise on the state transition path to generate a pre-verified state transition event; Based on the pre-checked state transition event, a conditional transition probability diagram is established, the state transition is modeled as a probability evolution process, and the