A water conservancy large model data security sharing and analysis method and system and a storage medium

By combining adaptive erasure coding and a blockchain federated learning framework with smart contract-driven access control, the security and transparency issues in water conservancy data sharing are resolved, enabling secure sharing and efficient analysis of large-scale water conservancy models and supporting various water conservancy applications.

CN122240031APending Publication Date: 2026-06-19ANHUI & HUAI RIVER WATER RESOURCES RES INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI & HUAI RIVER WATER RESOURCES RES INST
Filing Date
2026-04-02
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Water conservancy data sharing faces risks such as data leakage, single point of failure, and lack of security and transparency in model training, making it difficult to meet the safety protection and regulatory requirements of the water conservancy industry.

Method used

By employing an adaptive erasure coding mechanism, a blockchain-enhanced federated learning framework, and a smart contract-driven access control mechanism, we can achieve encrypted data storage, model training, and risk emergency response, ensuring data security and transparency in model training.

🎯Benefits of technology

It improves the security and reliability of water conservancy data, enables collaborative utilization across institutions and regions, enhances the training efficiency and intelligent analysis capabilities of large-scale water conservancy models, and supports key applications such as reservoir operation and management, flood early warning, and water resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240031A_ABST
    Figure CN122240031A_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, and storage medium for secure sharing and analysis of large-scale water conservancy model data. The method includes: real-time acquisition of hydrological monitoring data and classification by security level; dynamic configuration of erasure coding parameters based on data sensitivity; encoding and sharding the data and encrypting and storing it to participating nodes to generate data blocks; generating multi-dimensional data fingerprints for each data block and accessing the data block; after accessing the data block, constructing a blockchain-enhanced federated learning training framework; each participating node independently trains the large-scale water conservancy model using its local erasure-coded sharded data. The blockchain-enhanced federated learning framework ensures the security and traceability of the model training process, enabling cross-institutional and cross-regional collaborative utilization of water conservancy data while ensuring data privacy and security, significantly improving the training efficiency and intelligent analysis capabilities of the large-scale water conservancy model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water conservancy big data technology, specifically to a method, system, and storage medium for secure sharing and analysis of water conservancy big data models. Background Technology

[0002] With the rapid development of technologies such as the Internet of Things and remote sensing monitoring, the water conservancy industry has accumulated massive amounts of hydrological monitoring data, including multi-dimensional data such as water level, flow, rainfall, and water quality. This data is of great value for key applications such as reservoir scheduling, flood warning, and water resource management. However, water conservancy data is often distributed across different management agencies and geographical regions, resulting in data silos. Furthermore, it involves sensitive information, and direct sharing faces many challenges such as data security, privacy protection, and access control.

[0003] Existing methods for water resources data sharing and large-scale model training mainly suffer from the following technical bottlenecks: 1. Traditional centralized data sharing models require all participants to upload raw data to a central node, which poses a risk of data leakage and is difficult to meet the water conservancy industry's security protection requirements for sensitive data, lacking fine-grained access control and permission management mechanisms.

[0004] 2. Water conservancy monitoring data has requirements for long-term preservation and high reliability. Existing centralized storage solutions have the risk of single point of failure and lack differentiated redundancy protection mechanisms for data of different sensitivity levels, making it difficult to achieve a balance between storage costs and data reliability.

[0005] 3. Although federated learning can achieve collaborative training without data leaving the domain, existing solutions lack an effective verification mechanism for model parameter gradients, are susceptible to poisoning attacks, and lack transparency and traceability in the model training process, making it difficult to meet the regulatory and auditing requirements of the water conservancy industry. Summary of the Invention

[0006] This invention proposes a method, system, and storage medium for secure sharing and analysis of large-scale water conservancy model data, in order to solve the problems mentioned in the background.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: A method for secure sharing and analysis of large-scale water conservancy model data, comprising the following steps: S1. Collect hydrological monitoring data in real time and classify it by security level. Dynamically configure erasure coding parameters according to data sensitivity, encode and fragment the data, encrypt and store it to the participating nodes, and generate data blocks. S2. Generate a multi-dimensional data fingerprint for each data block and access the data block; S3. After accessing the data block, construct a blockchain-enhanced federated learning training framework, and each participating node independently trains the large-scale water conservancy model using local erasure coding sharded data. S4. Update the water conservancy big data model, and store the information of the water conservancy big data model on the blockchain; S5. Deploy the updated large-scale water conservancy model to the inference engine; S6. Establish a smart contract-driven emergency response mechanism. When the large-scale water conservancy model in the inference engine detects a risk event, the smart contract is automatically triggered to adjust data access permissions and erasure coding reassembly thresholds for rapid emergency response.

[0008] Preferably, step S1 includes the following steps: S11. Collect hydrological monitoring data in real time and classify the collected hydrological monitoring data into different levels of density using a sensitivity comprehensive scoring function; The sensitivity comprehensive scoring function is as follows:

[0009] in, The overall sensitivity score of the data. As a privacy importance index, it assesses the impact of data breaches on the privacy of individuals or organizations; The representative business criticality score measures the importance of data to water conservancy business decisions; The weight coefficients representing the three dimensions satisfy the following conditions: , This represents the time-sensitivity decay factor, indicating how the sensitivity of data changes over time. S12. After the hydrological monitoring data is classified by density level, correction codes are applied using a dynamic calculation formula. The dynamic calculation formula is as follows:

[0010]

[0011] in This indicates the total number of fragments, which is all the fragments generated after the original data is encoded; This indicates the number of redundant shards, used for fault tolerance and data recovery; This represents the minimum number of data fragments required for data reconstruction, i.e., the minimum number of fragments needed to restore the original data. , This represents the baseline parameter value, an initial value set based on historical experience. , This represents the sensitivity adjustment factor, which controls the intensity of the sensitivity's influence on the parameter. S13. After hydrological monitoring data is encoded with erasure coding, a set of fragments is obtained. The set of fragments generates a symmetric key through an improved key derivation function. The symmetric key is then divided and distributed to multiple participating nodes to form data blocks. The key derivation function is as follows:

[0012] in Represents the derived symmetric encryption key. Derived function for key. The system master key is securely stored in the key management center. Use random salt values ​​to prevent rainbow table attacks. The data sensitivity score, as a derived parameter, enhances the correlation between the key and the data. This represents data context information, including metadata such as timestamps and data source identifiers.

[0013] Preferably, step S2 includes the following steps: S21. Generate a multi-dimensional data fingerprint for each data block, and form a chain structure by temporal association between adjacent data blocks; The multi-dimensional data fingerprint is as follows:

[0014] in Represents data blocks fingerprints, This represents the Merkle tree root hash function, providing efficient partial verification capabilities. The hash value representing the data content. Represents metadata hash, containing {timestamp, data source, data type, sensitivity score}. This indicates the source, processing flow, and dependencies of the recorded data; The chain structure is as follows:

[0015] in Chain fingerprints representing time points, Indicates time Data blocks, Represents the fingerprint of the current data block. This represents the fingerprint of the previous data block. Indicates time interval, Represents a cryptographic hash function; S22. Accessing data blocks through an attribute-based encryption-based access control function mechanism; The permission management function is as follows:

[0016]

[0017] in This indicates the user's decision regarding data access; 1 indicates permission, and 0 indicates denial. This is a permission verification function that returns a boolean value (True / False), taking into account user attributes, access time, and geographical location. Indicates the user identifier that initiated the access request. Indicates the identifier of the data block being requested for access. Indicates the timestamp of the access request being initiated. Indicates the geographical location from which the access request originated; On behalf of users The Each attribute value, for example "Senior Engineer"; Representing data The first requirement Each attribute domain, for example "Water Resources Bureau"; Representing data The effective access time window; Representing data The set of geographical locations that are allowed to be accessed.

[0018] Preferably, step S3 includes the following steps: S31. Construct a blockchain-enhanced federated learning training framework, in which each participating node uses an improved gradient descent algorithm to train the large-scale water conservancy model. The improved gradient descent algorithm is as follows:

[0019] in This represents the loss function after adding privacy protection. Represents the original loss function. This represents the L2 regularization coefficient, used to prevent overfitting. The square of the L2 norm of the parameter, This represents Gaussian noise, achieved by adding carefully calibrated noise to the loss function; S32. After local training is completed, the node calculates the gradient of the model parameters, and then uploads it to the blockchain after compression and signing. The formula for calculating the gradient of the model parameters is as follows:

[0020] in This represents the compressed gradient, containing only the important components. The gradient vector is represented by the first... One portion, Indicates the return of the gradient The Middle Large absolute values ​​are used as thresholds.

[0021] Preferably, step S4 includes the following steps: S41. Update the trained hydraulic large model and dynamically adjust the learning rate based on the aggregation quality. The update formula for the large-scale water conservancy model is as follows:

[0022] in Indicates the first Global model parameters of the wheel, Indicates the first The global learning rate of the round. The parameter update amount represents the aggregation, and the global learning rate is adaptively adjusted according to the aggregation quality and training progress. The formula for calculating the global learning rate is as follows:

[0023] in This represents the initial global learning rate. Indicates the first The aggregation quality score of the wheel, Indicates the target quality threshold. This represents the learning rate decay factor. This represents the exponential decay term, which decreases as the training rounds increase. The quality of the aggregation is evaluated based on the consistency between the gradients of each node and the aggregate gradient. The formula for calculating the aggregation quality score is as follows:

[0024] in Indicates the number of trusted nodes. Represents a node gradient, This represents the consistency variance parameter; S42. After each round of aggregation is completed, the system will package the model version information, performance indicators and proof of origin and put them on the blockchain.

[0025] Preferably, step S6 includes the following steps: S61. Real-time monitoring of various risks through a multi-level risk assessment model to calculate the comprehensive risk level; The overall risk level is as follows:

[0026] in This represents the overall risk level score, with a value range of [0,1]. Indicates risk type index, Indicates flood risk. Indicates drought risk. Indicates water quality risk; Indicates the first The weighting coefficients of risk categories reflect the relative importance of different risk types; Indicates the first The probability of such risks occurring is predicted in real time using a large-scale water conservancy model, and takes values ​​of [0,1]. Indicates the first The potential impact of such risks is assessed by comprehensively considering factors such as economic losses, personnel safety, and the ecological environment. The multi-level risk assessment model is as follows:

[0027] in This indicates the emergency response stage determined based on the risk level. , , This indicates the preset risk classification threshold; This indicates that the system is operating normally during the monitoring phase, with only the monitoring frequency being increased. During the early warning phase, the system sends warning notifications to relevant personnel and prepares emergency resources. During the alert phase, the system expands access permissions for key personnel and activates the emergency response plan. During an emergency response phase, the system fully removes access restrictions to maximize response speed. S62. When the overall risk level reaches the alarm or emergency response stage, the smart contract automatically executes the permission extension operation to switch the system from normal permission mode to emergency permission mode. S63. All permission adjustment operations are recorded on the blockchain. When the risk subsides, the smart contract automatically restores the normal permission mode.

[0028] Preferably, the method further includes: S7. When an authorized user requests data access, the smart contract verifies the user's permissions and guides the user to collect a sufficient number of erasure code fragments, which are then decrypted and reassembled to obtain the complete data.

[0029] Preferably, step S7 includes the following steps: S71. In normal mode, when an authorized user needs to access water conservancy data, after strict permission verification by the smart contract, the smart contract will guide the user to collect a sufficient number of erasure coding fragments from the distributed storage nodes. The encrypted fragments collected by the user are decrypted and processed by the erasure coding reassembly algorithm to restore the complete original data. S72. When a user submits an access request, they need to provide information such as identity credentials, access purpose, timestamp, and geographical location. The smart contract calls the permission management function to check whether the user attributes meet the data access policy, and at the same time verify whether the access time is within the allowed time window and whether the access location meets the geographical location restrictions. The user accesses multiple storage nodes in parallel to download the encrypted database according to the scheme provided by the smart contract.

[0030] A system for secure sharing and analysis of large-scale water conservancy model data includes: The acquisition and processing module is used to acquire hydrological monitoring data in real time and classify it by density level. It dynamically configures erasure coding parameters according to data sensitivity, encodes and fragments the data, encrypts and stores it to the participating nodes, and generates data blocks. The fingerprint generation module is used to generate multi-dimensional data fingerprints for each data block and to access the data block. The training module is used to build a blockchain-enhanced federated learning training framework after accessing data blocks. Each participating node independently trains the large-scale water conservancy model using local erasure coding sharded data. The model update module is used to update the large-scale water conservancy model, and the information of the large-scale water conservancy model is stored on the blockchain for evidence. The deployment module is used to deploy the updated large-scale water conservancy model to the inference engine. The risk response module is used to establish a smart contract-driven emergency response mechanism. When the large-scale water conservancy model in the inference engine detects a risk event, the smart contract is automatically triggered to adjust data access permissions and erasure coding reassembly thresholds for rapid emergency response.

[0031] The data access module is used to authorize users to apply for data access. After the smart contract verifies the user's permissions, it guides the user to collect a sufficient number of erasure code fragments, which are then decrypted and reassembled to obtain the complete data.

[0032] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0033] As can be seen from the above technical solution, the present invention provides a method for secure sharing and analysis of large-scale hydraulic model data. Compared with the prior art, the present invention has the following advantages: 1. This invention improves data security by implementing differentiated redundancy protection for data with different sensitivity levels through an adaptive erasure coding mechanism.

[0034] 2. This invention ensures the security and traceability of the model training process through a blockchain-enhanced federated learning framework. It enables cross-institutional and cross-regional collaborative utilization of water conservancy data while ensuring data privacy and security. This significantly improves the training efficiency and intelligent analysis capabilities of large-scale water conservancy models, providing secure and reliable data support and intelligent decision-making services for key applications such as reservoir operation and management, flood warning, water quality monitoring, and water resource scheduling optimization.

[0035] 3. This invention achieves fine-grained control and dynamic adjustment of data access through smart contract-driven permission management and emergency response mechanisms. It not only breaks through the limitations of traditional systems in data security sharing, federated learning protection and access control, but also realizes full lifecycle management of water conservancy large model training and application through model evolution on-chain evidence storage and audit tracing mechanisms. Attached Figure Description

[0036] Figure 1 This is a flowchart illustrating a method for secure sharing and analysis of large-scale water conservancy model data according to the present invention.

[0037] Figure 2 This is a simulation diagram of the data recovery performance under different erasure coding parameter configurations of the present invention.

[0038] Figure 3 The figure shows the simulation results of the model convergence performance under different training methods of this invention.

[0039] Figure 4 This is a system block diagram of a water conservancy large model data security sharing and analysis system according to the present invention. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0041] like Figure 1 As shown in this embodiment, a method for secure sharing and analysis of large-scale water conservancy model data includes the following steps: S1. Collect hydrological monitoring data in real time and classify it by security level. Dynamically configure erasure coding parameters according to data sensitivity, encode and fragment the data, encrypt and store it to the participating nodes, and generate data blocks. S2. Generate a multi-dimensional data fingerprint for each data block and access the data block; S3. After accessing the data block, construct a blockchain-enhanced federated learning training framework, and each participating node independently trains the large-scale water conservancy model using local erasure coding sharded data. S4. Update the water conservancy big data model, and store the information of the water conservancy big data model on the blockchain; S5. Deploy the updated large-scale water conservancy model to the inference engine; S6. Establish a smart contract-driven emergency response mechanism. When the large-scale water conservancy model in the inference engine detects a risk event, the smart contract is automatically triggered to adjust data access permissions and erasure coding reassembly thresholds for rapid emergency response.

[0042] S7. When an authorized user requests data access, the smart contract verifies the user's permissions and guides the user to collect a sufficient number of erasure code fragments, which are then decrypted and reassembled to obtain the complete data.

[0043] Furthermore, S1 includes the following steps: S11. Real-time collection of hydrological monitoring data, including water level, flow rate, rainfall, water quality, etc., and classification of the collected hydrological monitoring data by density level using a sensitivity comprehensive scoring function; The sensitivity comprehensive scoring function is as follows:

[0044] in, The overall sensitivity score of the data. As a privacy importance index, it assesses the impact of data breaches on the privacy of individuals or organizations; The representative business criticality score measures the importance of data to water conservancy business decisions; The weight coefficients representing the three dimensions satisfy the following conditions: , This represents the time-sensitivity decay factor, indicating how the sensitivity of data changes over time.

[0045] in Represents the attenuation rate. This refers to the data storage duration. Based on the calculated sensitivity score, the system categorizes the data into four levels: highly sensitive, moderately sensitive, low sensitive, and public. S12. After the hydrological monitoring data is classified by density level, correction codes are applied using a dynamic calculation formula. The dynamic calculation formula is as follows:

[0046]

[0047] in This indicates the total number of fragments, which is all the fragments generated after the original data is encoded; Indicates the number of redundant shards, used for fault tolerance and data recovery; This represents the minimum number of data fragments required for data reconstruction, i.e., the minimum number of fragments needed to restore the original data. , This represents the baseline parameter value, an initial value set based on historical experience. , This represents the sensitivity adjustment factor, which controls the intensity of the sensitivity's influence on the parameter. like Figure 2 As shown, the experiment compared the data recovery success rates of four erasure coding parameter configurations (N, M, K) under different node failure rates. The results show that as the value of K increases, the system's tolerance to node failures significantly improves. When the node failure rate is 20%, the (20,15,15) configuration still maintains a recovery success rate of over 95%, while the (10,6,6) configuration drops to 78%. This verifies that dynamically configuring erasure coding parameters can flexibly balance storage redundancy and reliability according to data sensitivity.

[0048] To further improve system reliability, we also considered the availability of storage nodes and adaptively adjusted the number of redundant shards:

[0049] in This represents the adjusted number of redundant fragments. This represents the average availability of storage nodes, with a value range of [value missing]. , The availability compensation coefficient controls the compensation level when a node is unavailable. The dynamic configuration mechanism ensures that highly sensitive data has higher redundancy, and automatically increases redundant shards when node availability is low to improve data reliability.

[0050] S13. After hydrological monitoring data is encoded with erasure coding, a set of fragments is obtained. The set of fragments generates a symmetric key through an improved key derivation function. The symmetric key is then divided and distributed to multiple participating nodes to form data blocks. The key derivation function is as follows:

[0051] in Represents the derived symmetric encryption key. Derived function for key. The system master key is securely stored in the key management center. Use random salt values ​​to prevent rainbow table attacks. The data sensitivity score, as a derived parameter, enhances the correlation between the key and the data. This represents data context information, including metadata such as timestamps and data source identifiers.

[0052] Furthermore, S2 includes the following steps: S21. Generate a multi-dimensional data fingerprint for each data block, and form a chain structure by temporal association between adjacent data blocks; The multi-dimensional data fingerprint is as follows:

[0053] in Represents data blocks fingerprints, This represents the Merkle tree root hash function, providing efficient partial verification capabilities. The hash value representing the data content. Represents metadata hash, containing {timestamp, data source, data type, sensitivity score}. This indicates the source, processing flow, and dependencies of the recorded data; The chain structure is as follows:

[0054] in Chain fingerprints representing time points, Indicates time Data blocks, Represents the fingerprint of the current data block. This represents the fingerprint of the previous data block. Indicates time interval, Represents a cryptographic hash function; like Figure 3 As shown, the convergence performance of three schemes—centralized training, traditional federated learning, and blockchain-enhanced federated learning—was compared. Blockchain-enhanced federated learning achieved 90% accuracy after 50 training rounds, 15 rounds faster than traditional federated learning, and ultimately improved accuracy by 3.2 percentage points. This is attributed to the real-time verification of model parameters by blockchain smart contracts, which effectively filters out low-quality gradient updates, accelerates global model convergence, and improves final performance.

[0055] S22. Accessing data blocks through an attribute-based encryption-based access control function mechanism; The permission management functions are as follows:

[0056]

[0057] in This indicates the user's decision regarding data access; 1 indicates permission, and 0 indicates denial. This is a permission verification function that returns a boolean value (True / False), taking into account user attributes, access time, and geographical location. Indicates the user identifier that initiated the access request. Indicates the identifier of the data block being requested for access. Indicates the timestamp of the access request being initiated. Indicates the geographical location from which the access request originated; On behalf of users The Each attribute value, for example "Senior Engineer"; Representing data The first requirement Each attribute domain, for example "Water Resources Bureau"; Representing data The effective access time window; Representing data The set of geographical locations that are allowed to be accessed.

[0058] Furthermore, S3 includes the following steps: S31. Construct a blockchain-enhanced federated learning training framework, in which each participating node uses an improved gradient descent algorithm to train the large-scale water conservancy model. The improved gradient descent algorithm is as follows:

[0059] in This represents the loss function after adding privacy protection. Represents the original loss function. This represents the L2 regularization coefficient, used to prevent overfitting. The square of the L2 norm of the parameter, This represents Gaussian noise, achieved by adding carefully calibrated noise to the loss function; S32. After local training is completed, the node calculates the gradient of the model parameters, and then uploads it to the blockchain after compression and signing. The formula for calculating the gradient of the model parameters is as follows:

[0060] in This represents the compressed gradient, containing only the important components. The gradient vector is represented by the first... One portion, Indicates the return of the gradient The Middle Large absolute values ​​are used as thresholds.

[0061] To prevent malicious nodes from uploading fake gradients, the smart contract performs multi-dimensional verification on each gradient uploaded to the blockchain. The verification mechanism includes three checks, all of which must pass to prevent gradient explosion attacks and direction deviation attacks. Detection Item 1 - Norm Boundary Check: Preventing Gradient Explosion Attacks

[0062] Detection Item 2 - Directional Consistency Check: Prevents directional deviation attacks.

[0063] in , It returns a boolean value indicating whether the check passed. If it returns True: the gradient is normal and there is no attack; if it returns False: the gradient is abnormal and there may be an attack. The Euclidean norm representing the gradient. The maximum allowable norm; This represents the inner product of the current gradient and the mean of the historical gradients. This represents the minimum allowed cosine similarity. Even after verification, low-intensity attacks may still pass detection.

[0064] To address Byzantine nodes, a reputation-weighted Krum aggregation algorithm is proposed. This algorithm first selects a set of trustworthy nodes, and then performs weighted aggregation. The selection of the trustworthy node set is based on the principle of minimizing the distance between gradients.

[0065] in Indicates the total number of participating nodes. This represents the maximum number of Byzantine nodes the system can tolerate. Represents a set Size, Represents a node and nodes After selecting a set of trustworthy nodes by squaring the squared Euclidean distance of the gradient, a weighted aggregation is performed:

[0066] in This represents the aggregated global model parameters. Represents a combination of trusted nodes. Represents a node Submitted local model parameters, Represents a node In the The weights of the wheels are represented as follows:

[0067] in Represents a node In the The reputation value of the wheel ranges from [0,1]. Represents a node gradient distance score, This represents the distance penalty factor, which controls the impact of distance on the weights. This represents an exponentially decaying function, where the greater the distance, the smaller the weight.

[0068] Furthermore, S4 includes the following steps: S41. Update the trained hydraulic large model and dynamically adjust the learning rate based on the aggregation quality. The update formula for the large-scale hydraulic model is as follows:

[0069] in Indicates the first Global model parameters of the wheel, Indicates the first The global learning rate of the round. The parameter update amount represents the aggregation, and the global learning rate is adaptively adjusted according to the aggregation quality and training progress. The formula for calculating the global learning rate is as follows:

[0070] in This represents the initial global learning rate. Indicates the first The aggregation quality score of the wheel, Indicates the target quality threshold. This represents the learning rate decay factor. This represents the exponential decay term, which decreases as the training rounds increase. The quality of the aggregation is evaluated based on the consistency between the gradients of each node and the aggregate gradient. The formula for calculating the aggregate quality score is as follows:

[0071] in Indicates the number of trusted nodes. Represents a node gradient, This represents the consistency variance parameter; S42. After each round of aggregation is completed, the system will package the model version information, performance indicators and proof of origin and put them on the blockchain.

[0072] S5. Deploy the updated large-scale water conservancy model to the inference engine; Specifically, in terms of reservoir operation and management, the model analyzes real-time operational data such as reservoir storage, inflow, and outflow, and provides optimal scheduling schemes through optimization algorithms to balance power generation benefits and flood control safety. Regarding flood early warning, the model integrates multi-source data such as upstream rainfall, water level, and flow, and uses a spatiotemporal graph neural network to predict the flood evolution process over the next 6-24 hours, issuing early warning signals and calculating the best response strategies. In terms of water quality monitoring, the model continuously monitors water quality indicators such as pH, dissolved oxygen, turbidity, and ammonia nitrogen, and identifies abnormal patterns through variational autoencoders. When a pollution event is detected, the model immediately locates the pollution source and assesses the diffusion range. In terms of water resource scheduling optimization, the model comprehensively considers the coordinated operation of multiple reservoirs and uses reinforcement learning algorithms to dynamically optimize water resource allocation schemes at the watershed scale under multiple constraints such as flood control, water supply, and ecology.

[0073] All intelligent analysis services are provided through a unified API interface, supporting real-time query, batch prediction, and customized analysis modes. The inference engine has a built-in model version management function, allowing flexible switching between different model versions according to business needs, and supports A / B testing to evaluate the actual performance of new models. To ensure high availability, the system employs a model replication mechanism, automatically switching to a backup node when an inference node fails, ensuring uninterrupted 24 / 7 operation of the intelligent water resources analysis service. Furthermore, the inference engine integrates a model performance monitoring module, tracking key indicators such as prediction accuracy and response latency in real time. Once a performance degradation is detected, a retraining process is automatically triggered to continuously optimize model quality.

[0074] Furthermore, S6 includes the following steps: S61. Real-time monitoring of various risks through a multi-level risk assessment model to calculate the comprehensive risk level; The overall risk level is as follows:

[0075] in This represents the overall risk level score, with a value range of [0,1]. Indicates risk type index, Indicates flood risk. Indicates drought risk. Indicates water quality risk; Indicates the first The weighting coefficients of risk categories reflect the relative importance of different risk types; Indicates the first The probability of such risks occurring is predicted in real time using a large-scale water conservancy model, and takes values ​​of [0,1]. Indicates the first The potential impact of such risks is assessed by comprehensively considering factors such as economic losses, personnel safety, and the ecological environment. The multi-level risk assessment model is as follows:

[0076] in This indicates the emergency response stage determined based on the risk level. , , This indicates the preset risk classification threshold; This indicates that the system is operating normally during the monitoring phase, with only the monitoring frequency being increased. During the early warning phase, the system sends warning notifications to relevant personnel and prepares emergency resources. During the alert phase, the system expands access permissions for key personnel and activates the emergency response plan. During an emergency response phase, the system fully removes access restrictions to maximize response speed. S62. When the overall risk level reaches the alarm or emergency response stage, the smart contract automatically executes the permission extension operation to switch the system from normal permission mode to emergency permission mode. Specifically, the permission matrix in emergency mode is obtained by applying a permission upgrade matrix to the normal permission matrix. The upgrade matrix is ​​differentiated based on user roles: key roles (such as emergency commanders and technical experts) have expanded permissions, while ordinary users' permissions remain unchanged. The magnitude of permission expansion is positively correlated with the risk level, using a hyperbolic tangent function for smooth adjustment—the higher the risk, the wider the data range accessible to key personnel. For example, an emergency commander who normally can only access data in their own region can access data in adjacent regions during medium-risk situations, and access all data in the entire watershed during high-risk situations. The calculation of the permission expansion increment comprehensively considers the degree to which the current risk exceeds the trigger threshold, the sensitivity coefficient configured by the administrator, and the non-linear characteristics of the hyperbolic tangent function, ensuring that permission adjustments are both responsive and not overly restrictive. All permission adjustment operations are recorded on the blockchain, and the smart contract automatically restores the normal permission mode when the risk subsides.

[0077] S63. All permission adjustment operations are recorded on the blockchain. When the risk subsides, the smart contract automatically restores the normal permission mode.

[0078] Furthermore, S7 includes the following steps: S71. In normal mode, when an authorized user needs to access water conservancy data, after strict permission verification by the smart contract, the smart contract will guide the user to collect a sufficient number of erasure coding fragments from the distributed storage nodes. The encrypted fragments collected by the user are decrypted and processed by the erasure coding reassembly algorithm to restore the complete original data. S72. When a user submits an access request, they need to provide information such as identity credentials, access purpose, timestamp, and geographical location. The smart contract calls the permission management function to check whether the user attributes meet the data access policy, and at the same time verify whether the access time is within the allowed time window and whether the access location meets the geographical location restrictions. The user accesses multiple storage nodes in parallel to download the encrypted database according to the scheme provided by the smart contract.

[0079] like Figure 4 As shown, a system for secure sharing and analysis of large-scale water conservancy model data includes: The acquisition and processing module is used to acquire hydrological monitoring data in real time and classify it by density level. It dynamically configures erasure coding parameters according to data sensitivity, encodes and fragments the data, encrypts and stores it to the participating nodes, and generates data blocks. The fingerprint generation module is used to generate multi-dimensional data fingerprints for each data block and to access the data block. The training module is used to build a blockchain-enhanced federated learning training framework after accessing data blocks. Each participating node independently trains the large-scale water conservancy model using local erasure coding sharded data. The model update module is used to update the large-scale water conservancy model, and the information of the large-scale water conservancy model is stored on the blockchain for evidence. The deployment module is used to deploy the updated large-scale water conservancy model to the inference engine. The risk response module is used to establish a smart contract-driven emergency response mechanism. When the large water conservancy model in the inference engine detects a risk event, the smart contract is automatically triggered to adjust data access permissions and erasure coding reassembly thresholds for rapid emergency response. The data access module is used to authorize users to apply for data access. After the smart contract verifies the user's permissions, it guides the user to collect a sufficient number of erasure code fragments, which are then decrypted and reassembled to obtain the complete data.

[0080] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0081] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk), etc.

[0082] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0083] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0084] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for secure sharing and analysis of large-scale hydraulic model data, characterized in that, Includes the following steps: S1. Collect hydrological monitoring data in real time and classify it by security level. Dynamically configure erasure coding parameters according to data sensitivity, encode and fragment the data, encrypt and store it to the participating nodes, and generate data blocks. S2. Generate a multi-dimensional data fingerprint for each data block and access the data block; S3. After accessing the data block, construct a blockchain-enhanced federated learning training framework, and each participating node independently trains the large-scale water conservancy model using local erasure coding sharded data. S4. Update the water conservancy big data model, and store the information of the water conservancy big data model on the blockchain; S5. Deploy the updated large-scale water conservancy model to the inference engine; S6. Establish a smart contract-driven emergency response mechanism. When the large-scale water conservancy model in the inference engine detects a risk event, the smart contract is automatically triggered to adjust data access permissions and erasure coding reassembly thresholds for rapid emergency response.

2. The method for secure sharing and analysis of large-scale water conservancy model data according to claim 1, characterized in that: S1 includes the following steps: S11. Collect hydrological monitoring data in real time and classify the collected hydrological monitoring data into different levels of density using a sensitivity comprehensive scoring function; The sensitivity comprehensive scoring function is as follows: in, The overall sensitivity score of the data. As a privacy importance index, Represents the business criticality score. These represent the weighting coefficients for the three dimensions. Represents the time-deterioration factor; S12. The hydrological monitoring data after the density classification is encoded using a dynamic calculation formula with correction codes. The dynamic calculation formula is as follows: in, Indicates the total number of fragments. Indicates the number of redundant fragments. This represents the minimum number of data fragments required for data reconstruction, i.e., the minimum number of fragments needed to restore the original data. , Represents the baseline parameter value. , Represents the sensitivity modulator; S13. After erasure coding of the hydrological monitoring data, a fragment set is obtained. The fragment set generates a symmetric key through an improved key derivation function. The symmetric key is then divided and distributed to multiple participating nodes to form data blocks. The key derivation function is as follows: in, Represents the derived symmetric encryption key. Derived function for key. This is the system master key. For random salt values, Represents data sensitivity score, Represents data context information.

3. The method for secure sharing and analysis of large-scale water conservancy model data according to claim 2, characterized in that: S2 includes the following steps: S21. Generate a multi-dimensional data fingerprint for each data block, and form a chain structure by temporal association between adjacent data blocks; The multi-dimensional data fingerprint is as follows: in, Represents data blocks fingerprints, Represents the Merkle tree root hash function. The hash value representing the data content. Represents metadata hash, This indicates the source, processing flow, and dependencies of the recorded data; The chain structure is as follows: in, Chain fingerprints representing time points, Indicates time Data blocks, Represents the fingerprint of the current data block. This represents the fingerprint of the previous data block. Indicates time interval, Represents a cryptographic hash function; S22. Accessing data blocks through an attribute-based encryption-based access control function mechanism; The permission management function is as follows: in, This indicates the user's decision regarding data access. This is the permission verification function. Indicates the user identifier that initiated the access request. Indicates the identifier of the data block being requested for access. Indicates the timestamp of the access request being initiated. Indicates the geographical location from which the access request originated; On behalf of users The Each attribute value Representing data The first requirement Each attribute domain Representing data The effective access time window Representing data The set of geographical locations that are allowed to be accessed.

4. The method for secure sharing and analysis of large-scale water conservancy model data according to claim 3, characterized in that: S3 includes the following steps: S31. Construct a blockchain-enhanced federated learning training framework, in which each participating node uses an improved gradient descent algorithm to train the large-scale water conservancy model. The improved gradient descent algorithm is as follows: in, This represents the loss function after adding privacy protection. Represents the original loss function. Represents the L2 regularization coefficient. The square of the L2 norm of the parameter, Indicates Gaussian noise; S32. After local training is completed, the node calculates the gradient of the model parameters, and then uploads it to the blockchain after compression and signing. The formula for calculating the gradient of the model parameters is as follows: in This represents the compressed gradient, containing only the important components. The gradient vector is represented by the first... One portion, Indicates the return of the gradient The Middle Large absolute values ​​are used as thresholds.

5. The method for secure sharing and analysis of large-scale water conservancy model data according to claim 4, characterized in that: S4 includes the following steps: S41. Update the trained hydraulic large model and dynamically adjust the learning rate based on the aggregation quality. The update formula for the large-scale hydraulic model is as follows: in, Indicates the first Global model parameters of the wheel, Indicates the first The global learning rate of the round. The parameter update amount represents the aggregation, and the global learning rate is adaptively adjusted according to the aggregation quality and training progress. The formula for calculating the global learning rate is as follows: in, This represents the initial global learning rate. Indicates the first The aggregation quality score of the wheel, Indicates the target quality threshold. This represents the learning rate decay factor. Indicates the exponentially decaying term; The formula for calculating the aggregation quality score is as follows: in, Indicates the number of trusted nodes. Represents a node gradient, This represents the consistency variance parameter; S42. After each round of aggregation is completed, the system will package the model version information, performance indicators and proof of origin and put them on the blockchain.

6. The method for secure sharing and analysis of large-scale water conservancy model data according to claim 5, characterized in that: S6 includes the following steps: S61. Real-time monitoring of various risks through a multi-level risk assessment model to calculate the comprehensive risk level; The overall risk level is as follows: in, This indicates the overall risk level score. Indicates risk type index, Indicates flood risk. Indicates drought risk. Indicates water quality risk. Indicates the first Weighting coefficients for risk classes Indicates the first The probability of such risks occurring Indicates the first The potential impact of this type of risk; The multi-level risk assessment model is as follows: in, This indicates the emergency response stage determined based on the risk level. , as well as This indicates the preset risk classification threshold. Indicates the monitoring phase. Indicates the early warning stage. Indicates the alarm phase. Indicates an emergency response phase; S62. When the overall risk level reaches the alarm or emergency response stage, the smart contract automatically executes the permission extension operation to switch the system from normal permission mode to emergency permission mode. S63. All permission adjustment operations are recorded on the blockchain. When the risk subsides, the smart contract automatically restores the normal permission mode.

7. The method for secure sharing and analysis of large-scale water conservancy model data according to claim 6, characterized in that: The method further includes: S7. When an authorized user requests data access, the smart contract verifies the user's permissions and guides the user to collect a sufficient number of erasure code fragments, which are then decrypted and reassembled to obtain the complete data.

8. The method for secure sharing and analysis of large-scale water conservancy model data according to claim 7, characterized in that: S7 includes the following steps: S71. In normal mode, when an authorized user needs to access water conservancy data, after strict permission verification by the smart contract, the smart contract will guide the user to collect a sufficient number of erasure coding fragments from the distributed storage nodes. The encrypted fragments collected by the user are decrypted and processed by the erasure coding reassembly algorithm to restore the complete original data. S72. When a user submits an access request, they need to provide information such as identity credentials, access purpose, timestamp, and geographical location. The smart contract calls the permission management function to check whether the user attributes meet the data access policy, and at the same time verify whether the access time is within the allowed time window and whether the access location meets the geographical location restrictions. The user accesses multiple storage nodes in parallel to download the encrypted database according to the scheme provided by the smart contract.

9. A system for secure sharing and analysis of large-scale hydraulic model data, employing the method for secure sharing and analysis of large-scale hydraulic model data as described in any one of claims 1-8, characterized in that, include: The acquisition and processing module is used to acquire hydrological monitoring data in real time and classify it by density level. It dynamically configures erasure coding parameters according to data sensitivity, encodes and fragments the data, encrypts and stores it to the participating nodes, and generates data blocks. The fingerprint generation module is used to generate multi-dimensional data fingerprints for each data block and to access the data block. The training module is used to build a blockchain-enhanced federated learning training framework after accessing data blocks. Each participating node independently trains the large-scale water conservancy model using local erasure coding sharded data. The model update module is used to update the large-scale water conservancy model, and the information of the large-scale water conservancy model is stored on the blockchain for evidence. The deployment module is used to deploy the updated large-scale water conservancy model to the inference engine. The risk response module is used to establish a smart contract-driven emergency response mechanism. When the large water conservancy model in the inference engine detects a risk event, the smart contract is automatically triggered to adjust data access permissions and erasure coding reassembly thresholds for rapid emergency response. The data access module is used to authorize users to apply for data access. After the smart contract verifies the user's permissions, it guides the user to collect a sufficient number of erasure code fragments, which are then decrypted and reassembled to obtain the complete data.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the steps of the method as described in any one of claims 1 to 8.