Production behavior water footprint tracking method based on hydraulic entropy feature and block chain consensus verification
Through the combination of high-precision sensors and blockchain consensus verification, accurate tracking of the water footprint of production behaviors in high-water-consuming industries is achieved, solving the problems of inaccurate identification and data tampering in traditional methods, and achieving highly reliable water resource management and transparent circulation.
Patent Information
- Application Number
- CN202510759159.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-05-30
- Filing Date
- 2025-06-09
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-06-09
Smart Images

Figure CN120634770A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of water use behavior analysis and production behavior identification, and specifically relates to a method and system for tracking the water footprint of production behavior based on hydraulic entropy value characteristics and blockchain consensus verification. The method is suitable for the accurate identification of water use behavior in high-water-consuming industries and the flow management of water resource consumption in the production chain. Background Art
[0002] Global water scarcity is becoming increasingly severe, and water footprint tracking technology has become a crucial tool for optimizing water resource management and promoting sustainable development. Traditional methods for identifying water use behavior are inaccurate when dealing with complex operating conditions, particularly in the production environments of high-water-consuming industries. Some companies are beginning to adopt water footprint tracking technology to track water consumption throughout the production and supply chain, but the following issues remain:
[0003] (1) Traditional methods are often unable to effectively capture and analyze nonlinear hydraulic characteristics in scenarios such as equipment start-up and shutdown, and sudden load changes, resulting in a high rate of misjudgment of water use behavior;
[0004] (2) In the existing technology, data collection and authentication are separated. Sensor data needs to be uploaded to the central server and then manually reviewed. There is a risk of tampering in the middle link, making it difficult to ensure the credibility of the recognition results.
[0005] (3) Existing technologies mostly focus on the water consumption statistics of single-point processes, lack a mechanism for transferring production water consumption across processes, and make it difficult to achieve collaborative water resource management at the supply chain level.
[0006] Therefore, the present invention proposes a method and system for tracking the water footprint of production behavior based on hydraulic entropy characteristics and blockchain consensus verification. By combining hydraulic entropy characteristic analysis with blockchain consensus verification, the integrated tracking, analysis and storage of the water footprint of production behavior is realized, and the accurate identification of water use behavior under complex working conditions and high-reliability water resource consumption management of the production chain are achieved. Summary of the Invention
[0007] Based on the shortcomings of the above-mentioned water use behavior collection and identification technology, the present invention provides a method and system for tracking the water footprint of production behavior based on hydraulic entropy value characteristics and blockchain consensus verification. By combining multi-scale hydraulic entropy value characteristic analysis with blockchain consensus verification, accurate tracking of the water footprint of production behavior is achieved, so as to carry out real-time, reliable and traceable water resource consumption management of the production chain.
[0008] To achieve the above objectives, the present invention adopts a technical solution: a method for tracking the water footprint of production behavior based on hydraulic entropy characteristics and blockchain consensus verification, the specific steps of which include:
[0009] Step 1: Install high-precision sensors at key locations of water-using units, and collect the characteristics of pipeline water pressure, flow, flow velocity and other data at different time scales in real time through high-frequency, medium-frequency and low-frequency triple sampling sequence processing layers.
[0010] S11: Install high-precision sensors at key locations such as industrial water pipes and equipment water inlets to collect data such as pipeline water pressure, flow rate, and flow velocity.
[0011] Optionally, the synchronization acquisition device uses an electrical pulse signal.
[0012] S12: Design a triple sampling sequence processing layer to capture the characteristics of water pressure, flow and other data at different time scales in real time through high-frequency, medium-frequency and low-frequency triple sampling.
[0013] Furthermore, the triple sampling sequence processing layer includes a high-frequency sampling layer, a medium-frequency sampling layer, and a low-frequency sampling layer, which respectively capture data features at different time scales.
[0014] Specifically, the high-frequency sampling layer captures transient fluctuations in data such as water pressure and flow, with a short sampling interval, and captures sudden changes in water flow caused by valve switching and equipment start-up and shutdown; the medium-frequency sampling layer captures operation cycle characteristics, with a moderate sampling interval, and is used to identify periodic operations such as equipment cleaning and cooling cycles; the low-frequency sampling layer captures long-term trends in data such as water pressure and flow, with a longer sampling interval, and can monitor the water consumption trends of equipment operation throughout the day and product production.
[0015] Step 2: Based on the on-chain and off-chain collaborative verification architecture, design the entropy feature extraction function of the off-chain edge computing node. By building a multi-dimensional entropy calculation model, calculate the primary entropy value and generate a multi-dimensional entropy feature vector. Dynamically adjust the entropy weight through the sliding window variance detector to calculate the comprehensive entropy feature vector.
[0016] S21: Deploy edge computing equipment close to the data source and input the collected data such as pipeline water pressure and flow into the edge processing module.
[0017] Specifically, the edge processing module includes a multi-dimensional entropy value calculation unit and a feature entropy value processing unit.
[0018] S22: Construct a multidimensional entropy value calculation model in the multidimensional entropy value calculation unit, calculate the entropy value feature and fuse it with the time series to form a multidimensional entropy value feature vector under the time series.
[0019] Furthermore, the multidimensional entropy calculation model includes three entropy calculation methods: multi-scale permutation entropy, time-frequency domain wavelet entropy, and adaptive fuzzy entropy, which are used to calculate entropy features of different scales and frequency bands.
[0020] (1) Multiscale permutation entropy is a nonlinear time series analysis method that decomposes a time series into multiple time domain scales, calculates the permutation entropy value at each scale, and combines them to obtain the complexity characteristics of the entire time series. Specifically, the calculation steps of multiscale permutation entropy include:
[0021] First, normalize and denoise the time series, then perform wavelet decomposition on the time series to obtain approximate coefficient sequences at different scales. Arrange the approximate sequences to obtain permutation sequences at different scales. Calculate the permutation entropy value at each scale and combine the permutation entropy values at different scales to obtain the multi-scale permutation entropy value of the entire sequence. The relevant formula principle is as follows:
[0022]
[0023] Among them, m is the dimension, H d is the multi-scale permutation entropy under dimension m, π is the permutation pattern, and p(π) is the probability of the permutation entropy occurring.
[0024] (2) The time-frequency domain wavelet entropy combines the time-frequency localization characteristics of wavelet analysis with the concept of entropy, enabling it to better describe the complexity and randomness of signals at different scales. Specifically, the calculation steps of the time-frequency domain wavelet entropy include:
[0025] First, the signal is decomposed into wavelet to obtain a series of wavelet coefficients, the probability distribution of each wavelet coefficient is calculated, and finally the entropy value is calculated based on the probability distribution.
[0026]
[0027] Among them, H s is the wavelet entropy in the time-frequency domain, p(k) is the energy probability of the kth subband, k is the number of subband sequences, j is the number of sample sequences,
[0028] (3) Adaptive fuzzy entropy combines fuzzy membership functions with adaptive parameter adjustment to measure the probability of a time series generating new patterns when the dimension changes. The greater the probability of a sequence generating new patterns, the higher the complexity of the sequence. Specifically, the calculation steps of adaptive fuzzy entropy include:
[0029]
[0030] Where i, j are the number of sequences of different samples, m is the dimension, r is the adaptive similarity tolerance threshold, n is the similarity tolerance boundary gradient, N is the total number of time series, and D is the fuzzy metric similarity. z is the adaptive fuzzy entropy.
[0031] S23: Use a sliding window variance detector to monitor entropy changes in real time, dynamically adjust the fusion weight based on the variance, and output the comprehensive entropy feature vector under the time series. The specific steps include:
[0032] S231: Extracting the entropy value sequence of the M most recent time points at time t based on the sliding window method;
[0033] Specifically, select a starting position t, initialize the window size, and calculate the initial entropy value. Move the window forward one position and update the entropy value within the window. Repeat this operation M times to obtain a sequence of M entropy values.
[0034] S232: Calculate the variance of each type of entropy value within the window to reflect the degree of dispersion of each entropy value; calculate the mean of each type of entropy value and calculate the variance respectively. The larger the variance, the greater the degree of dispersion of the entropy value. The formula involved is as follows:
[0035]
[0036] Among them, B is the number of windows, H is the entropy value, and V is the corresponding entropy value variance.
[0037] S233: Dynamically calculate the weight of each entropy feature based on the variance;
[0038] Specifically, Softmax weighting is used to amplify the variance difference, and the weight distribution of each entropy value is dynamically controlled by adjusting the temperature coefficient. The formula involved is as follows:
[0039]
[0040] where δ a is the variance of the ath characteristic entropy value, Γ is the temperature coefficient of the control weight distribution, δ l is the variance of the lth characteristic entropy value, A is the total number of characteristic entropy value variances, ω a is the weight of the a-th feature entropy value.
[0041] S234: After normalizing the three types of entropy values, perform weighted fusion based on their respective weights and output the comprehensive entropy value feature vector under the time series. The formula principle involved is as follows:
[0042]
[0043] in, is the normalized multi-scale permutation entropy, ranging from 0 to 1. ln(m!) represents the theoretical maximum value of the permutation entropy.
[0044]
[0045] in, is the normalized wavelet entropy in the time-frequency domain, and L is the total number of subbands.
[0046]
[0047] in, is the normalized adaptive fuzzy entropy, and ln(m!) represents the theoretical maximum value of the permutation entropy.
[0048]
[0049] Among them H d,s,z is the comprehensive characteristic entropy value, ω d ,ω s ,ω z They are the weights of multi-scale permutation entropy, time-frequency domain wavelet entropy, and adaptive fuzzy entropy respectively.
[0050] S24: Reduce the dimension and compress the comprehensive entropy value feature vector through principal component analysis, and output it to the memory to reduce the subsequent storage pressure on the chain.
[0051] Step 3: Based on the on-chain and off-chain collaborative verification architecture, the on-chain smart contract performs cross-node feature consistency verification; a self-update mechanism for the trusted feature library is designed. When a new feature is verified as a trusted feature, the template library is automatically updated; abnormal features trigger alarms, and multi-party signatures are stored for audit traceability; based on the random forest model, different working conditions are associated with entropy value features to build a working condition identification module.
[0052] S31: The off-chain edge node uploads the output feature entropy value vector to the blockchain network.
[0053] S32: The on-chain smart contract executes blockchain consensus verification, compares the entropy feature vectors submitted by multiple edge nodes, and performs cross-node feature consistency verification.
[0054] Specifically, the operation steps of the smart contract include:
[0055] S321: The on-chain smart contract receives entropy feature data from multiple edge nodes, calculates the cosine similarity between each node, and selects highly similar node pairs to form a set C;
[0056] Specifically, for the entropy feature vectors of J edge nodes, the cosine similarity calculation formula between any two nodes p and q is as follows:
[0057]
[0058] Among them, S p,q is the similarity between nodes p and q; v p and v q is the entropy feature vector of nodes p and q; ‖v p ‖ and ‖v q ‖ is the vector vp and v q The Euclidean norm of ,
[0059] C={q≠p|S p,q ≥T}
[0060] Among them, T is the similarity threshold, which is usually set to 0.8 to 0.9.
[0061] S322: If the number of nodes in set C exceeds K, the smart contract performs weighted voting based on the dynamic weight mechanism of each node. If the voting results reach a consensus, it is determined to be a trusted feature and the trusted feature library self-update mechanism is triggered;
[0062] Furthermore, the dynamic weighted voting mechanism includes the following steps:
[0063] (1) Set the weight factor to calculate the comprehensive weight
[0064] a. Historical credibility weight w1:
[0065]
[0066] Among them, P1 is the pass judgment ratio of node q’s historical participation in consensus,
[0067] b. Real-time consistency weight w2:
[0068]
[0069] in, is the average similarity between node q and set C, T is the similarity threshold 55,
[0070] c. Online stability weight w3:
[0071]
[0072] Among them, P2 is the proportion of time that node q remains online and reports data on time during the monitoring period,
[0073] For the set C of highly similar node pairs, calculate the voting weight w of each node q , and normalize it to get w′ q , the specific calculation formula is as follows:
[0074] w q =w1+w2+w3
[0075]
[0076] (2) Weighted Voting and Consensus Decision
[0077] The smart contract calculates the average similarity of each node Automatically assign "agree" or "disagree" and calculate the weighted agreement rate R. The calculation formula is as follows:
[0078]
[0079] When R exceeds the consensus rate threshold α, the node feature is determined to be a credible feature, triggering the credible feature library self-update mechanism.
[0080] S323: If the similarity between a certain node feature k and most nodes is less than the threshold T, it is determined to be an abnormal feature and the abnormality detection mechanism is triggered.
[0081] S33: Establish a self-update mechanism for the trusted feature library: Write the features that meet the trusted feature judgment conditions into the trusted feature library, generate a new version of the feature template, and record it on the blockchain as a comparison benchmark for subsequent consistency verification.
[0082] S34: Establish an anomaly detection mechanism: Store the abnormal features collected by the triggering anomaly detection mechanism into the blockchain evidence library, and use multi-party signatures for evidence storage to ensure data traceability.
[0083] S35: Based on the random forest model, different working conditions are associated with entropy features to establish a working condition identification module. The specific steps include:
[0084] S351: extracting historical entropy value feature vectors and marking corresponding working conditions;
[0085] Specifically, different working conditions include normal production, equipment maintenance, abnormal leakage, etc.
[0086] S352: The entropy feature vector and its operating conditions are used as a training set and input into the random forest model to train the classification model, and the model parameters are adjusted through cross-validation;
[0087] S353: Convert the multi-condition output of the classification model into a probability distribution matrix, and set the corresponding probability threshold to represent the possibility of each condition. When the implementation prediction probability exceeds the threshold, the system is considered to be in this condition.
[0088] Step 4: Call the working condition identification module to analyze the real-time entropy value characteristics, calculate the water entropy value of each stage of the production chain, and realize the unique record of water footprint credentials through blockchain smart contracts; build a water footprint dynamic path map based on the production timeline, entropy value intensity, and water resource flow path, and build a reverse tracing mechanism to return the complete water footprint chain through product ID query.
[0089] S41: When the product enters the key process, the system first calls the entropy feature calculation module to extract and process the entropy feature vector, and then calls the working condition identification module to calculate the water entropy value of this stage based on the actual water consumption data of the process.
[0090] S42: Analyze the current entropy value characteristics through smart contracts and update the trusted feature library in real time; calculate and accumulate the water footprint increment of the product in this stage and update the water footprint; write the water footprint attributes into the blockchain to generate a unique water footprint certificate to ensure that it cannot be tampered with.
[0091] The calculation formula for the incremental accumulation of water footprint is as follows:
[0092] WF=WF total +WF physical +γ×WF stage
[0093] Among them, WF total WF is the cumulative water footprint associated with the product ID; physical Direct water consumption in the current stage; WF stage is the water consumption in the current stage, WF stage =‖v stage ‖;‖v stage ‖ is the current water resource entropy characteristic vector v stage The Euclidean norm of γ is the dynamic adjustment parameter for different working conditions.
[0094] Specifically, the water footprint certificate includes basic information (such as certificate ID, product ID, process information, production time), water footprint data (such as water resource consumption details in each production stage, direct water consumption in each stage, and the total accumulated water footprint after update), entropy characteristics and working condition information, credible evidence information, and associated abnormal records.
[0095] S43: Based on the production timeline (X-axis), entropy intensity (Y-axis), and water resource flow path (Z-axis), a 3D topology map is drawn in real time to dynamically display the flow path and intensity changes of the water footprint.
[0096] Specifically, the X-axis represents the process completion time or production progress percentage, the Y-axis reflects the oscillation intensity of the operating status with the entropy norm, and the Z-axis arranges the process nodes at equal intervals and indicates the water flow direction and flow rate with directed lines.
[0097] S44: Build a reverse traceability mechanism: query the blockchain through the final product ID, and the smart contract returns the complete water footprint chain certificate information according to the on-chain records, including the entropy value change curve of each process, water consumption details and the signatures of the blockchain nodes involved in the verification.
[0098] Specifically, the query process is as follows: each product is assigned a unique QR code, and consumers scan the code to send the product ID to the blockchain; the smart contract retrieves all water footprint certificates associated with the ID, including text, path maps, and entropy analysis reports.
[0099] An electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method for tracking the water footprint of production behavior based on hydraulic entropy characteristics and blockchain consensus verification is implemented.
[0100] A computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned production behavior water footprint tracking method based on hydraulic entropy value characteristics and blockchain consensus verification.
[0101] The present invention achieves accurate tracking of the water footprint of production behavior by combining multi-scale hydraulic entropy feature analysis with blockchain consensus verification.
[0102] Compared with the prior art, the present invention has the following beneficial effects:
[0103] The present invention adopts high-precision sensors and triple samplers to collect data from key water usage nodes, and uses high-frequency, medium-frequency, and low-frequency triple sampling layers to capture the transient fluctuations, periodic operations, and long-term trends of node water usage changes, respectively, solving the problem of insufficient sensitivity of traditional single sampling methods to nonlinear hydraulic characteristics.
[0104] This method constructs a multidimensional entropy calculation model, calculating multi-scale permutation entropy, time-frequency domain wavelet entropy, and adaptive fuzzy entropy to form a multidimensional entropy feature vector. It also introduces a sliding window variance detector to monitor entropy changes in real time and automatically adjust feature weights to obtain comprehensive entropy features, ensuring robustness in different production scenarios. Compared to traditional single entropy methods, this method improves the accuracy of identifying water use behavior under complex operating conditions such as transient equipment fluctuations, process switching, and sudden load changes. It overcomes the traditional statistical model's reliance on steady-state conditions and adapts to the high-noise, nonlinear, and highly time-varying characteristics of industrial sites.
[0105] This invention adopts an on-chain and off-chain collaborative architecture. On the one hand, it deploys edge computing devices off-chain, calculates the comprehensive entropy characteristics of each node based on the edge processing module, and filters some redundant data to reduce the on-chain storage load; on the other hand, it performs cross-node feature consistency verification through on-chain smart contracts to ensure the integrity of data written to the blockchain.
[0106] Based on the blockchain consensus mechanism, this invention links key data such as entropy characteristics, water consumption, and timestamps to form an unalterable water footprint traceability chain, greatly enhancing tamper resistance. Through smart contracts, water footprint credential updates are automatically triggered, and a multi-party signature trusted feature library mechanism is established. Both trusted and abnormal features must be jointly verified by multiple nodes before they can be stored, significantly improving data credibility. Compared to the traditional unilateral evidence storage model, this invention solves the problems of traditional centralized databases being easily tampered with and the high cost of data mutual trust among multiple parties in the supply chain.
[0107] This paper designs a 3D water footprint topology map based on the production timeline (X-axis), entropy intensity (Y-axis), and water resource flow path (Z-axis). This intuitively displays the dynamic flow relationship of the water footprint and improves regulatory transparency. It also establishes a water footprint reverse tracing mechanism that supports automatic calculation and unique evidence storage of the water footprint of a product throughout its life cycle, enabling reverse tracing of the entire water footprint process and rapid location of abnormal processes. Compared to traditional water footprint tracking methods, this paper breaks through the static limitations of traditional paper certificates and achieves dynamic binding of water footprints and transparent cross-industry circulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0108] Figure 1 This is a flowchart of a production behavior water footprint tracking method based on hydraulic entropy characteristics and blockchain consensus verification.
[0109] Figure 2 A three-dimensional topological diagram of the flow path and intensity change of a water footprint.
[0110] Figure 3 This is a schematic diagram of the structure of a production behavior water footprint tracking device based on hydraulic entropy characteristics and blockchain consensus verification.
[0111] Figure 4 The figure is a schematic diagram of the physical structure of an electronic device. DETAILED DESCRIPTION
[0112] The technical solutions of the present invention are described clearly and completely below in conjunction with specific embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.
[0113] Example: The technical solution adopted by the present invention is: a method for tracking the water footprint of production behavior based on hydraulic entropy characteristics and blockchain consensus verification, the specific steps of which include:
[0114] To achieve the above objectives, the present invention adopts a technical solution: a method for tracking the water footprint of production behavior based on hydraulic entropy characteristics and blockchain consensus verification, the specific steps of which include:
[0115] Step 1: Install high-precision sensors at key locations of water-using units. Through the high-frequency, medium-frequency, and low-frequency triple sampling sequence processing layers, the characteristics of pipeline water pressure, flow, flow velocity and other data at different time scales are collected in real time to obtain the long time series data set X0 (water pressure, flow, flow velocity) of pipeline water pressure and flow.
[0116] S11: Install high-precision sensors at key locations such as industrial water pipes and equipment water inlets to collect data such as pipeline water pressure and flow.
[0117] Optionally, the synchronization acquisition device uses an electrical pulse signal.
[0118] S12: Design a triple sampling sequence processing layer to capture the characteristics of water pressure, flow, flow velocity and other data at different time scales in real time through high-frequency, medium-frequency and low-frequency triple sampling.
[0119] Furthermore, the triple sampling sequence processing layer includes a high-frequency sampling layer, a medium-frequency sampling layer, and a low-frequency sampling layer, which respectively capture data features at different time scales.
[0120] Specifically, the high-frequency sampling layer captures transient fluctuations in data such as water pressure and flow, with a sampling interval of 60 seconds, to capture sudden changes in water flow caused by valve switching and equipment start-up and shutdown; the medium-frequency sampling layer captures operation cycle characteristics, with a sampling interval of 15 minutes, to identify periodic operations such as equipment cleaning and cooling cycles; the low-frequency sampling layer captures long-term trends in data such as water pressure and flow, with a sampling interval of 1 hour, to monitor water consumption trends in equipment operation throughout the day and product production.
[0121] Step 2: Based on the on-chain and off-chain collaborative verification architecture, design the entropy feature extraction function of the off-chain edge computing node. By constructing a multi-dimensional entropy calculation model, calculate the primary entropy value and generate a multi-dimensional entropy feature vector. Dynamically adjust the entropy weights through a sliding window variance detector to calculate the weighted comprehensive entropy feature vector.
[0122] S21: Deploy edge computing devices close to the data source and input the collected pipeline data into the edge processing module.
[0123] Furthermore, the edge processing module includes a multi-dimensional entropy value calculation unit and a feature entropy value processing unit.
[0124] Specifically, edge computing devices are deployed at key nodes (such as water-intensive plants, chemical plants, and food processing plants) to aggregate and initially process sensor data. Each edge node receives a raw dataset X0 of water pressure, flow, and other data from nearby processes (e.g., power plant A, chemical plant B, and food processing plant C).
[0125] S22: Construct a multidimensional entropy calculation model in the multidimensional entropy calculation unit, calculate the entropy features and fuse them with the time series to form a multidimensional entropy feature vector X under the time series. Q,t (H d,t ,H s,t ,H z,t ).
[0126] Furthermore, the multidimensional entropy calculation model includes three entropy calculation methods: multi-scale permutation entropy, time-frequency domain wavelet entropy, and adaptive fuzzy entropy, which are used to calculate entropy features of different scales and frequency bands.
[0127] (1) Multiscale permutation entropy is a nonlinear time series analysis method that decomposes a time series into multiple time domain scales, calculates the permutation entropy value at each scale, and combines them to obtain the complexity characteristics of the entire time series. Specifically, the calculation steps of multiscale permutation entropy include:
[0128] First, normalize and denoise the time series, then perform wavelet decomposition on the time series to obtain approximate coefficient sequences at different scales. Arrange the approximate sequences to obtain permutation sequences at different scales. Calculate the permutation entropy value at each scale and combine the permutation entropy values at different scales to obtain the multi-scale permutation entropy value of the entire sequence. The relevant formula principle is as follows:
[0129]
[0130] Among them, m is the dimension, H d is the multi-scale permutation entropy under dimension m. π is the permutation pattern. p(π) is the probability of the permutation entropy occurring.
[0131] (2) The time-frequency domain wavelet entropy combines the time-frequency localization characteristics of wavelet analysis with the concept of entropy, enabling it to better describe the complexity and randomness of signals at different scales. Specifically, the calculation steps of the time-frequency domain wavelet entropy include:
[0132] First, the signal is decomposed into wavelet to obtain a series of wavelet coefficients, the probability distribution of each wavelet coefficient is calculated, and finally the entropy value is calculated based on the probability distribution.
[0133]
[0134] Among them, H s is the wavelet entropy in the time-frequency domain, p(k) is the energy probability of the kth subband, k is the number of subband sequences, j is the number of sample sequences,
[0135] (3) Adaptive fuzzy entropy combines fuzzy membership functions with adaptive parameter adjustment to measure the probability of a time series generating new patterns when the dimension changes. The greater the probability of a sequence generating new patterns, the higher the complexity of the sequence. Specifically, the calculation steps of adaptive fuzzy entropy include:
[0136]
[0137] Where i, j are the number of sequences of different samples, m is the dimension, r is the adaptive similarity tolerance threshold, n is the similarity tolerance boundary gradient, N is the total number of time series, and D is the fuzzy metric similarity. z is the adaptive fuzzy entropy.
[0138] S23: Use a sliding window variance detector to monitor entropy changes in real time, dynamically adjust the fusion weight based on the variance, and output the comprehensive entropy feature vector H under the time series. c,t The specific steps include:
[0139] S231: Set the window length M=50, and extract the entropy value sequence of the 50 most recent time points at time t based on the sliding window method;
[0140] Specifically, we select a starting position t, initialize the window size, and calculate the initial entropy value. We then move the window forward one position and update the entropy value within the window. We repeat this process 50 times to obtain a sequence of 50 entropy values.
[0141] S232: Calculate the variance of each type of entropy value in the window to reflect the degree of dispersion of each entropy value;
[0142] Calculate the mean of each type of entropy value and the variance respectively. The larger the variance, the greater the degree of entropy dispersion. The formula involved is as follows:
[0143]
[0144] Among them, B is the number of windows, H is the entropy value, and V is the corresponding entropy value variance.
[0145] When the operating mode changes (e.g., purge is turned on), the variance of the flow and pressure isentropic values increases significantly.
[0146] S233: Dynamically calculate the weight of each entropy feature based on the variance;
[0147] Specifically, Softmax weighting is used to amplify variance differences. By adjusting the temperature coefficient, the weight distribution of each entropy value is dynamically controlled to amplify the impact of abnormal changes. The formula involved is as follows:
[0148]
[0149] where δ ais the variance of the ath characteristic entropy value, Γ is the temperature coefficient of the control weight distribution, δ l is the variance of the lth characteristic entropy value, A is the total number of characteristic entropy value variances, ω a is the weight of the a-th feature entropy value.
[0150] S234: After normalizing the three types of entropy values, perform weighted fusion based on their respective weights and output the entropy value feature vector H under the time series c,t , which is used to represent the comprehensive characteristics of the system's operating status at the current moment. The formula involved is as follows:
[0151]
[0152] in, is the normalized multi-scale permutation entropy, ranging from 0 to 1. ln(m!) represents the theoretical maximum value of the permutation entropy.
[0153]
[0154] in, is the normalized wavelet entropy in the time-frequency domain, and L is the total number of subbands.
[0155]
[0156] in, is the normalized adaptive fuzzy entropy, and ln(m!) represents the theoretical maximum value of the permutation entropy.
[0157]
[0158] Among them H d,s,z is the comprehensive characteristic entropy value, ω d ,ω s ,ω z are the weights of multi-scale permutation entropy, time-frequency domain wavelet entropy, and adaptive fuzzy entropy respectively. Q,t (,H s,t ,H z,t )
[0159] Specifically, taking power plant A as an example, the normalized multi-scale permutation entropy, normalized time-frequency domain wavelet entropy, and normalized adaptive fuzzy entropy at moments t1, t2, and t3 in the time series are calculated respectively, and the comprehensive entropy value features are calculated based on the obtained weights;
[0160] Taking time t1 as an example, the values of normalized multi-scale permutation entropy, normalized time-frequency domain wavelet entropy, and normalized adaptive fuzzy entropy are H d,t1 =0.78, H s,t1 =0.84, H z,t1 =0.76; the weights of the three are ω d,t1=0.35,ω s,t1 =0.45,ω z,t1 =0.2, then the comprehensive characteristic entropy value H c,t1 =0.803. The calculation process at time t2 and t3 is the same as that at time t1, and finally the comprehensive entropy value characteristics at time t1, t2, and t3 can be obtained.
[0161] <![CDATA[H d ]]> <![CDATA[H s ]]> <![CDATA[H z ]]> <![CDATA[ω d ]]> <![CDATA[ω s ]]> <![CDATA[ω z ]]> <![CDATA[H d,s,z ]]> <![CDATA[At time t1]]> 0.78 0.84 0.76 0.35 0.45 0.20 0.803 <![CDATA[Time t2]]> 0.76 0.85 0.72 0.32 0.50 0.18 0.798 <![CDATA[Time t3]]> 0.73 0.82 0.78 0.30 0.48 0.22 0.784
[0162] S24: Reduce the dimension and compress the entropy feature vector through principal component analysis, and output it to the memory to reduce the subsequent storage pressure on the chain.
[0163] Step 3: Based on the on-chain and off-chain collaborative verification architecture, the on-chain smart contract performs cross-node feature consistency verification; a self-update mechanism for the trusted feature library is designed. When a new feature is verified as a trusted feature, the template library is automatically updated; abnormal features trigger alarms, and multi-party signatures are stored for audit traceability; based on the random forest model, different working conditions are associated with entropy value features to build a working condition identification module.
[0164] S31: The off-chain edge node uploads the output feature entropy value vector to the blockchain network.
[0165] S32: The on-chain smart contract executes blockchain consensus verification, compares the entropy feature vectors submitted by multiple edge nodes, and performs cross-node feature consistency verification.
[0166] Specifically, the operation steps of the smart contract include:
[0167] S321: The on-chain smart contract receives entropy feature data from multiple edge nodes, calculates the cosine similarity between each node, and selects node pairs with similarity greater than a threshold T = 0.85 to form a set C;
[0168] Specifically, for the entropy feature vectors of J edge nodes, the cosine similarity calculation formula between any two nodes p and q is as follows:
[0169]
[0170] Among them, S p,q is the similarity between nodes p and q; v p and v q is the entropy feature vector of nodes p and q; ‖v p ‖ and ‖v q ‖ is the vector v p and v q The Euclidean norm of ,
[0171] C={q≠p|S p,q ≥T}
[0172] Among them, T is the similarity threshold, which is 0.85 here.
[0173] S322: If the number of nodes in set C exceeds K = 3, the smart contract performs weighted voting based on the dynamic weight mechanism of each node. The voting weight comprehensively considers factors such as the node's historical credibility, real-time consistency, and online stability. The smart contract calculates the weighted agreement rate and compares it with the consensus threshold α = 0.85. When the agreement rate exceeds the threshold, the entropy feature is determined to be a trustworthy feature and the trustworthy feature library self-update mechanism is triggered;
[0174] Furthermore, the dynamic weighted voting mechanism includes the following steps:
[0175] (1) Set the weight factor to calculate the comprehensive weight
[0176] a. Historical credibility weight w1:
[0177]
[0178] Among them, P1 is the pass judgment ratio of node q’s historical participation in consensus,
[0179] b. Real-time consistency weight w2:
[0180]
[0181] in, is the average similarity between node q and set C,
[0182] c. Online stability weight w3:
[0183]
[0184] Among them, P2 is the proportion of time that node q remains online and reports data on time during the monitoring period,
[0185] For the set C of highly similar node pairs, calculate the voting weight w of each node q , and normalize it to get w′ q , the specific calculation formula is as follows:
[0186] w q =w1+w2+w3
[0187]
[0188] (2) Weighted Voting and Consensus Decision
[0189] The smart contract calculates the average similarity of each node Automatically assign "agree" or "disagree" and calculate the weighted agreement rate R. The calculation formula is as follows:
[0190]
[0191] When R exceeds the consensus rate threshold α=0.85, the node feature is determined to be a credible feature, triggering the credible feature library self-update mechanism.
[0192] S323: If the similarity between a certain node feature and less than or equal to K=3 nodes is less than the threshold value 0.85, it is determined to be an abnormal feature and the abnormality detection mechanism is triggered.
[0193] Specifically, take the example of the on-chain smart contract receiving the entropy feature vectors from four edge nodes A, B, C, D, and E. A =[1.0,0.00], V B =[0.90,0.20], V C =[0.87,0.30], V D =[0.86,0.50], V D =[0.88,0.40]; Taking node A as the benchmark, calculate the cosine similarity of each pair of nodes, S A,B =0.976, S A,C =0.946, S A,D =0.864, S A,E =0.91; filter all nodes with similarity higher than 0.85 to node A to form set C, C = {B, C, D, E}, | C | = 4 > K (= 3); for each node in set C, calculate its similarity with the other three nodes and take the average,
[0194] The three weights of each node are calculated, and the historical pass rate P1 and online rate index P2 of each node are set as follows:
[0195] node P1 P2 B 95% 98% C 80% 96% D 65% 89% E 92% 99%
[0196] Substituting the values into the table below, we get the three weights of each node:
[0197] node <![CDATA[w1]]> <![CDATA[w2]]> <![CDATA[w3]]> <![CDATA[w′ q ]]> B 1.2 1.831 1.2 4.231 C 1.0 1.938 1.0 3.938 D 0.8 1.842 0.8 3.442 E 1.2 1.927 1.2 4.327
[0198] Sum the three weights of each node and normalize them, ∑w q =15.938,∑w′ B =0.265,∑w′ C =0.247,∑w′ D =0.216,∑w′ E =0.271.
[0199] If and only if the average similarity of the nodes Vote in favor q= 1. All here All are ≥0.85, so all voted "agree", then R=∑ q∈C w′ q ×1=1.0≥α, the contract determines that the feature set is "trustworthy" and triggers the self-update mechanism of the trusted feature library.
[0200] S33: Establish a self-update mechanism for the trusted feature library: Write the features that meet the trusted feature judgment conditions into the trusted feature library, generate a new version of the feature template, and record it on the blockchain as a subsequent comparison benchmark.
[0201] S34: Establish an anomaly detection mechanism: Store the abnormal features collected by the triggering anomaly detection mechanism into the blockchain evidence library, and use multi-party signatures for evidence storage to ensure data traceability.
[0202] S35: Based on the random forest model, different working conditions are associated with entropy features to establish a working condition identification module. The specific steps include:
[0203] S351: Extract the entropy value feature vectors that have passed consistency verification from the "Trusted Feature Library" and mark them as working conditions such as "normal production" or "equipment maintenance"; extract the marked abnormal entropy value feature vectors from the "Abnormal Evidence Library" and mark them as abnormal working conditions such as "abnormal leakage" and "sensor failure".
[0204] S352: The entropy value feature vector and its operating conditions are used as a training set, input into a random forest model to train a classification model, and the model parameters are adjusted through cross-validation;
[0205] S353: Convert the multi-condition output of the classification model into a probability distribution matrix, and set the corresponding probability threshold to represent the possibility of each condition. When the implementation prediction probability exceeds the threshold, the system is considered to be in this condition.
[0206] Step 4: Call the working condition identification module to analyze the real-time entropy value characteristics, calculate the water entropy value of each stage of the production chain, and realize the unique record of water footprint credentials through blockchain smart contracts; build a water footprint dynamic path map based on the production timeline, entropy value intensity, and water resource flow path, and build a reverse tracing mechanism to return the complete water footprint chain through product ID query.
[0207] S41: When a product enters a critical process (such as cleaning or cooling, which are water-intensive or sensitive to changes), the system first calls the entropy feature analysis module deployed in the off-chain edge device to extract and process the entropy feature vector of the current process in real time. This feature vector is input into the deployed random forest classification model, which outputs the current operating condition label. This operating condition label is used as one of the conditions in the water consumption calculation formula to dynamically adjust the calculation parameters to accurately estimate the incremental water consumption of the process.
[0208] S42: Analyze the current entropy value characteristics through smart contracts and update the trusted feature library in real time; calculate and accumulate the water footprint increment of the product in this stage and update the water footprint; write the water footprint attributes into the blockchain to generate a unique water footprint certificate to ensure that it cannot be tampered with.
[0209] The calculation formula for the incremental accumulation of water footprint is as follows:
[0210] WF=WF total +WF physical +γ×WF stage
[0211] Among them, WF total WF is the cumulative water footprint associated with the product ID; physical Direct water consumption in the current stage; WF stage is the water consumption at the current stage, WF stage =‖v stage ‖;‖v stage ‖ is the current water resource entropy characteristic vector v stage The Euclidean norm of γ is the dynamic adjustment parameter for different working conditions.
[0212] Specifically, the water footprint certificate includes basic information (such as certificate ID, product ID, process information, production time), water footprint data (such as water resource consumption details in each production stage, direct water consumption in each stage, and the total accumulated water footprint after update), entropy characteristics and working condition information, credible evidence information, and associated abnormal records.
[0213] S43: Based on the production timeline (X-axis), entropy intensity (Y-axis), and water resource flow path (Z-axis), a 3D topology map is drawn in real time to dynamically display the flow path and intensity changes of the water footprint.
[0214] Specifically, the X-axis (production timeline) can use the absolute timestamps of each process's completion or normalize the overall production progress to a percentage between 0 and 100%. The Y-axis (entropy intensity) takes the entropy norm corresponding to each process, with larger values indicating greater system fluctuations or anomalies. The Z-axis (water resource flow path) projects each process node at equal distances and connects them with directed lines. The line width is scaled by the actual water flow rate. The direction of the line along the +Z axis represents forward production flow, while the direction along the –Z axis represents return circulation or water recovery flow. Users can rotate, zoom, or pan the diagram to comprehensively view the water footprint flow direction and fluctuation intensity between different processes.
[0215] Figure 2This is a three-dimensional topological diagram illustrating the flow path and intensity of a water footprint, showing the changes in the water footprint at each production node during the production process of a product. The horizontal axis at the bottom represents production time, the vertical axis represents entropy intensity, and the vertical axis perpendicular to the bottom represents the flow path of water resources. The direction of the arrow indicates the direction of water flow, and the width of the arrow represents the actual amount of water used.
[0216] S44: Build a reverse traceability mechanism: query the blockchain through the final product ID, and the smart contract returns the complete water footprint chain certificate information according to the on-chain records, including the entropy value change curve of each process, water consumption details and the signatures of the blockchain nodes involved in the verification.
[0217] Specifically, the query process is as follows: each product is assigned a unique QR code, and consumers scan the code to send the product ID to the blockchain; the smart contract retrieves all water footprint certificates associated with the ID, including text, path maps, and entropy analysis reports.
[0218] Take a plastic processing product with ID NA2024-001 as an example:
[0219] Product ID NA2024-001 Cumulative water footprint 3100L Maximum Entropy (Abnormal) Process Midsole injection molding (0.72) Optimal entropy process Assembly packaging (0.29) Number of abnormal events 1 time (short-term abnormality in cooling water circulation) Last Updated 2024-07-20 18:35UTC
[0220] Process time Place Water consumption Entropy state Raw material glue 2024-06-01 Rubber Plantation in City A 1500L 0.40 good Midsole injection molding 2024-06-15 B City Injection Molding Factory 800L 0.72 warn Hot Press Forming 2024-07-10 C City Hot Pressing Center 500L 0.35 Stablize Assembly packaging 2024-07-20 D City Assembly Center 300L 0.29 excellent
[0221] Figure 3 A schematic diagram of the structure of a production behavior water footprint tracking device based on hydraulic entropy characteristics and blockchain consensus verification provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the device includes:
[0222] The multi-data acquisition layer 201, edge processing layer 202, blockchain evidence layer 203, and application interaction layer 204 are used. The multi-data acquisition layer 201 controls the multimodal sensor group and triple sampling controller to collect real-time features of pipeline water pressure, flow, and other data at different time scales, providing raw input for characteristic entropy calculation. The edge processing layer 202 controls edge computing nodes to extract multidimensional entropy feature vectors using a multidimensional entropy calculation model and dynamically adjust entropy weights using a sliding window variance detector to calculate weighted entropy features, reducing on-chain load. The blockchain evidence layer 203 implements cross-node data feature consistency verification and unique water footprint evidence. Production water footprints are recorded through a water footprint certificate management contract, and disputed data are stored through an anomaly evidence contract. The application interaction layer 204 provides visual interaction and regulatory tools, constructing a dynamic water footprint path map based on production timelines, entropy intensity, and water resource flow paths, and establishing a reverse tracing mechanism to return a complete water footprint chain through product ID queries.
[0223] The device embodiments provided in the embodiments of the present invention are intended to implement the above-mentioned method embodiments. For specific processes and detailed contents, please refer to the above-mentioned method embodiments, which will not be repeated here.
[0224] Figure 4 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 301, a communication interface 302, a memory 303, and a computer program stored in the memory 303 and configured to be executed by the processor 301. The communication interface 302 can be used for information transmission within the electronic device. The processor 301 can call the computer program in the memory 303, and when executing the computer program, implement the production behavior water footprint tracking method based on hydraulic entropy characteristics and blockchain consensus verification as described in the above embodiment.
[0225] Preferably, the computer program can be divided into one or more modules (such as computer program 1, computer program 2, ...), and the one or more modules are stored in the memory 303 and executed by the processor 301. The one or more modules / units can be a series of computer program instruction segments that can perform specific functions. The instruction segments are used to describe the execution process of the computer program in the terminal device, specifically including: based on a multidimensional entropy calculation model, calculating entropy features and forming a multidimensional entropy feature vector under a time series; using a sliding window variance detector to monitor entropy changes in real time, dynamically adjusting fusion weights based on variance, and outputting a weighted entropy feature vector under a time series; performing cross-node feature consistency verification based on on-chain smart contracts, recording production water footprints through water footprint certificate management contracts, and storing dispute data through abnormal evidence contracts; constructing a water footprint dynamic path map based on the production timeline, entropy intensity, and water resource flow path, and constructing a reverse tracing mechanism to return a complete water footprint chain through product ID query.
[0226] The processor 301 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., or the processor 301 can also be any conventional processor. The processor 301 is the control center of the terminal device, and uses various interfaces and lines to connect the various parts of the terminal device.
[0227] The memory 303 mainly includes a program storage area and a data storage area. The program storage area can store an operating system, at least one application required for a function, etc., and the data storage area can store related data, etc. In addition, the memory 303 can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card, a flash memory card, etc., or the memory 303 can also be other volatile solid-state storage devices. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the above-mentioned method embodiments of the present invention.
[0228] An embodiment of the present invention also provides a computer-readable storage medium, which includes a stored computer program. When the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the production behavior water footprint tracking method based on hydraulic entropy value characteristics and blockchain consensus verification described in the above embodiment.
[0229] The device embodiments described above are merely illustrative. 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 the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0230] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or certain parts of the embodiment.
Claims
1. A method for tracing water footprint of production behavior based on hydraulic entropy characteristics and blockchain consensus verification, characterized by: The method comprises the following steps: Step 1: Install high-precision sensors at key locations of water-using units, and collect the characteristics of pipeline water pressure, flow rate, flow velocity and other data at different time scales in real time through high-frequency, medium-frequency and low-frequency triple sampling sequence processing layers. Step 2: Based on the on-chain and off-chain collaborative verification architecture, design the entropy feature extraction function of the off-chain edge computing node. By building a multi-dimensional entropy calculation model, calculate the primary entropy value and generate a multi-dimensional entropy feature vector; dynamically adjust the entropy weight through the sliding window variance detector, and calculate the comprehensive entropy feature vector. Step 3: Based on the on-chain and off-chain collaborative verification architecture, the on-chain smart contract performs cross-node feature consistency verification; a self-update mechanism for the trusted feature library is designed. When a new feature is verified as a trusted feature, the template library is automatically updated; abnormal features trigger alarms and multi-party signatures are stored for audit traceability; based on the random forest model, different working conditions are associated with entropy features to build a working condition identification module. Step 4: Call the working condition identification module to analyze the real-time entropy value characteristics, calculate the water entropy value of each stage of the production chain, and realize the unique record of water footprint credentials through blockchain smart contracts; build a water footprint dynamic path map based on the production timeline, entropy value intensity, and water resource flow path, and build a reverse tracing mechanism to return the complete water footprint chain through product ID query.
2. The method for tracing water footprint of production behavior based on hydraulic entropy characteristics and blockchain consensus verification according to claim 1 is characterized in that: Step 1 is as follows: S11: Install high-precision sensors at key locations such as industrial water pipes and equipment water inlets to collect pipeline water pressure, flow rate, and flow velocity data, and simultaneously collect equipment power pulse signals. S12: Design a triple sampling sequence processing layer. Through high-frequency, medium-frequency, and low-frequency triple sampling, it captures the characteristics of water pressure, flow, and other data at different time scales in real time. The high-frequency sampling layer captures transient fluctuations in water pressure and flow data. The sampling interval is short, capturing sudden changes in water flow caused by valve opening and closing, and equipment startup and shutdown. The medium frequency sampling layer captures the characteristics of the operation cycle, with a moderate sampling interval, and is used to identify periodic operations such as equipment cleaning and cooling cycles; The low-frequency sampling layer captures the long-term trends of data such as water pressure and flow. The sampling interval is long, which can monitor the water consumption trends of equipment operation and product production throughout the day.
3. The method for tracing water footprint of production behavior based on hydraulic entropy characteristics and blockchain consensus verification according to claim 1 is characterized in that: Step 2 is as follows: S21: Deploy edge computing equipment near the data source and input the collected pipeline water pressure, flow and other data into the edge processing module. The edge processing module includes a multi-dimensional entropy value calculation unit and a feature entropy value processing unit. S22: Construct a multidimensional entropy calculation model in the multidimensional entropy calculation unit, calculate the entropy features and fuse them with the time series to form a multidimensional entropy feature vector under the time series. The multidimensional entropy calculation model includes three entropy calculation methods: multi-scale permutation entropy, time-frequency domain wavelet entropy, and adaptive fuzzy entropy, which are used to calculate entropy features of different scales and frequency bands. (1) Multiscale permutation entropy is a nonlinear time series analysis method that decomposes the time series into multiple time domain scales, calculates the permutation entropy value at each scale, and combines them to obtain the complexity characteristics of the entire time series. Specifically, the calculation steps of multiscale permutation entropy include: First, the time series is normalized and denoised, and then the time series is decomposed by wavelet to obtain approximate coefficient sequences at different scales. The approximate sequences are arranged to obtain permutation sequences at different scales. The permutation entropy value at each scale is calculated and the permutation entropy values at different scales are combined to obtain the multi-scale permutation entropy value of the entire sequence. The relevant formula principle is as follows: Among them, m is the dimension, H d is the multi-scale permutation entropy under dimension m, π is the permutation pattern, p(π) is the probability of permutation entropy occurrence, (2) The time-frequency domain wavelet entropy combines the time-frequency localization characteristics of wavelet analysis with the concept of entropy, enabling it to better describe the complexity and randomness of signals at different scales. Specifically, the calculation steps of the time-frequency domain wavelet entropy include: First, perform wavelet decomposition on the signal to obtain a series of wavelet coefficients, calculate the probability distribution of each wavelet coefficient, and finally calculate the entropy value based on the probability distribution. Among them, H s is the wavelet entropy in the time-frequency domain, p(k) is the energy probability of the kth subband, k is the number of subband sequences, j is the number of sample sequences, (3) Adaptive fuzzy entropy combines fuzzy membership functions with adaptive parameter adjustment to measure the probability of a time series generating a new pattern when the dimension changes. The greater the probability of a sequence generating a new pattern, the higher the complexity of the sequence. The calculation steps of adaptive fuzzy entropy include: Among them, i, j are the number of sequences of different samples, m is the dimension, r is the adaptive similarity tolerance threshold, n is the similarity tolerance boundary gradient, N is the total number of time series, D is the fuzzy metric similarity, H z is the adaptive fuzzy entropy, S23: Use a sliding window variance detector to monitor entropy changes in real time, dynamically adjust the fusion weight based on the variance, and output the comprehensive entropy feature vector under the time series. The specific steps include: S231: Extract the entropy value sequence of the M time points closest to time t based on the sliding window method; specifically, select the starting position t, initialize the window size, calculate the initial entropy value, move the window forward by one position, update the entropy value in the window, repeat the operation M times and finally obtain M entropy value sequences. S232: Calculate the variance of each type of entropy value in the window to reflect the degree of dispersion of each entropy value; calculate the mean of each type of entropy value and calculate the variance respectively. The larger the variance, the greater the degree of dispersion of the entropy value. The formula involved is as follows: Among them, B is the number of windows, H is the entropy value, and V is the corresponding entropy value variance; S233: Dynamically calculate the weight of each entropy feature based on the variance; Specifically, Softmax weighting is used to amplify the variance difference, and the weight distribution of each entropy value is dynamically controlled by adjusting the temperature coefficient. The formula involved is as follows: where δ a is the variance of the ath characteristic entropy value, Γ is the temperature coefficient of the control weight distribution, δ l is the variance of the lth characteristic entropy value, A is the total number of characteristic entropy value variances, ω a is the weight of the a-th feature entropy value, S234: After normalizing the three types of entropy values, perform weighted fusion based on their respective weights to output the comprehensive entropy value feature vector under the time series. The formula principle involved is as follows: in, is the normalized multi-scale permutation entropy, with a value range of [0,1], and ln(m!) represents the theoretical maximum value of the permutation entropy. in, is the normalized time-frequency domain wavelet entropy, L is the total number of subbands, in, is the normalized adaptive fuzzy entropy, ln(m!) represents the theoretical maximum value of permutation entropy, Among them H d,s,z is the comprehensive characteristic entropy value, ω d ,ω s ,ω z They are the weights of multi-scale permutation entropy, time-frequency domain wavelet entropy, and adaptive fuzzy entropy, S24: Reduce the dimension and compress the comprehensive entropy value feature vector through principal component analysis, and output it to the memory to reduce the subsequent storage pressure on the chain.
4. The method for tracing water footprint of production behavior based on hydraulic entropy characteristics and blockchain consensus verification according to claim 1 is characterized in that: Step 3 is as follows: S31: The edge node off the chain uploads the output feature entropy value vector to the blockchain network. S32: On-chain smart contracts execute blockchain consensus verification, compare the entropy feature vectors submitted by multiple edge nodes, and perform cross-node feature consistency verification. The operation steps of the smart contract include: S321: The on-chain smart contract receives entropy feature data from multiple edge nodes, calculates the cosine similarity between each node, and selects highly similar node pairs to form a set C; Specifically, for the entropy feature vectors of J edge nodes, the cosine similarity calculation formula between any two nodes p and q is as follows: Among them, S p,q is the similarity between nodes p and q; v p and v q is the entropy feature vector of nodes p and q; ‖v p ‖ and ‖v q ‖ is the vector v p and v q The Euclidean norm of , C={q≠p|S p,q ≥T} Among them, T is the similarity threshold, which ranges from 0.8 to 0.
9. S322: If the number of nodes in set C exceeds K, the smart contract performs weighted voting based on the dynamic weight mechanism of each node. If the voting results reach a consensus, it is determined to be a trusted feature and the trusted feature library self-update mechanism is triggered; The dynamic weight voting mechanism includes the following steps: (1) Set the weight factor to calculate the comprehensive weight a. Historical credibility weight w1: Among them, P1 is the pass judgment ratio of node q’s historical participation in consensus, b. Real-time consistency weight w2: in, is the average similarity between node q and set C, T is the similarity threshold 55 c. Online stability weight w3: Among them, P2 is the proportion of time that node q remains online and reports data on time during the monitoring period, For the set C of highly similar node pairs, calculate the voting weight w of each node q , and normalize it to get w ′ q , the specific calculation formula is as follows: (2) Weighted Voting and Consensus Decision The smart contract calculates the average similarity of each node Automatically assign "agree" or "disagree" and calculate the weighted agreement rate R. The calculation formula is as follows: When R exceeds the consensus rate threshold α, the node feature is determined to be a credible feature, triggering the credible feature library self-update mechanism. S323: If the similarity between a node feature k and most nodes is less than the threshold T, it is determined to be an abnormal feature and the abnormality detection mechanism is triggered. S33: Establish a self-update mechanism for the trusted feature library: Write the features that meet the trusted feature judgment conditions into the trusted feature library, generate a new version of the feature template, and record it on the blockchain as a comparison benchmark for subsequent consistency verification. S34: Establish an anomaly detection mechanism: store the anomaly features collected by the anomaly detection mechanism in the blockchain evidence library, and use multi-party signatures for evidence storage to ensure data traceability. S35: Based on the random forest model, different working conditions are associated with entropy features to establish a working condition identification module. The specific steps include: S351: extracting historical entropy value feature vectors and marking corresponding working conditions; Specifically, different working conditions include normal production, equipment maintenance, abnormal leakage, etc. S352: The entropy feature vector and its operating conditions are used as a training set and input into the random forest model to train the classification model, and the model parameters are adjusted through cross-validation; S353: Convert the multi-condition output of the classification model into a probability distribution matrix, and set the corresponding probability threshold to represent the possibility of each condition. When the implementation prediction probability exceeds the threshold, the system is considered to be in this condition.
5. The method for tracing water footprint of production behavior based on hydraulic entropy characteristics and blockchain consensus verification according to claim 1 is characterized in that: Step 4 is as follows: S41: When the product enters the key process, the system first calls the entropy feature calculation module to extract and process the entropy feature vector, and then calls the working condition identification module to calculate the water entropy value of this stage based on the actual water consumption data of the process. S42: Analyze the current entropy value characteristics through smart contracts and update the trusted feature library in real time; calculate and accumulate the water footprint increment of the product in this stage and update the water footprint; write the water footprint attributes into the blockchain and generate a unique water footprint certificate to ensure that it cannot be tampered with. The calculation formula for the incremental accumulation of water footprint is as follows: WF=WF total +WF physical +γ×WF stage Among them, WF total WF is the cumulative water footprint associated with the product ID; physical Direct water consumption in the current stage; WF stage is the water consumption in the current stage, WF stage =‖v stage ‖;‖v stage ‖ is the current water resource entropy characteristic vector v stage The Euclidean norm of γ is the dynamic adjustment parameter for different working conditions. The water footprint certificate includes basic information, water footprint data, entropy characteristics and working condition information, credible evidence information, and associated abnormal records. S43: Based on the production timeline (X-axis), entropy intensity (Y-axis), and water resource flow path (Z-axis), a 3D topology map is drawn in real time to dynamically display the flow path and intensity changes of the water footprint. The X-axis represents the process completion time or production progress percentage, the Y-axis reflects the oscillation intensity of the operating state with the entropy norm, and the Z-axis arranges the process nodes at equal intervals and indicates the water flow direction and flow rate with directed lines. S44: Build a reverse traceability mechanism: query the blockchain through the final product ID, and the smart contract returns the complete water footprint chain certificate information according to the on-chain records, including the entropy value change curve of each process, water consumption details and the signatures of the blockchain nodes involved in the verification.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the production behavior water footprint tracking method based on hydraulic entropy value characteristics and blockchain consensus verification as described in any one of claims 1 to 5 above is implemented.
7. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by the processor, a method for tracking the water footprint of production behavior based on hydraulic entropy characteristics and blockchain consensus verification is implemented as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Flow identification method and device based on sequence entropy, and storage medium
CN111901324A
Managing transboundary water use using a distributed ledger and machine learning
US20210248692A1
Cited By
Mobile payment encryption system based on data random algorithm
CN120822954A
A mobile payment encryption system based on data random algorithm
CN120822954B