Federal learning-based cross-regional gas safety situation awareness method and system

By constructing a three-level federated meta-learning architecture, virtual fault samples are generated and small-sample adaptation training is performed. Combined with cross-domain knowledge transfer and adaptive regularization, the problems of insufficient samples and poor stability in cross-regional gas safety situation awareness are solved, and accurate identification and risk assessment are achieved.

CN121960192APending Publication Date: 2026-05-01CHONGQING GAS GROUP CO LTD SHAPINGBA BRANCH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING GAS GROUP CO LTD SHAPINGBA BRANCH
Filing Date
2026-01-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing cross-regional gas safety situational awareness technologies face the bottleneck of small sample learning, with insufficient total sample size, scarce key fault samples, poor adaptability of federated learning, lack of targeted regularization strategies, and fragmentation of cross-regional features, resulting in model overfitting, poor stability, and weak generalization ability.

Method used

A three-level federated meta-learning architecture is constructed, a generative adversarial network is introduced to generate virtual fault samples, a model-independent meta-learning algorithm is used for intra-domain small sample adaptation training, a cross-domain knowledge transfer algorithm is designed to realize multi-region small sample feature sharing and fusion, and a small sample adaptive regularization strategy is proposed to dynamically adjust the regularization coefficient to suppress overfitting.

Benefits of technology

It has achieved accurate identification, risk assessment and evolution prediction of cross-regional gas safety situation, improved the stability and generalization ability of the model, and solved the problems of insufficient regional samples and scarce key fault samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121960192A_ABST
    Figure CN121960192A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-regional fuel gas safety situation awareness method and system based on federated learning, and belongs to the technical field of fuel gas safety monitoring, and the method comprises the steps: constructing a three-level federated element learning architecture; a generative adversarial network is introduced into the edge acquisition layer to construct a virtual fault sample generation module, and scarce fault samples are expanded; the regional federated element learning layer adopts a model-independent element learning algorithm to realize intra-domain small sample rapid adaptation training; a cross-domain knowledge migration algorithm is designed on the cross-region federated fusion layer, and multi-region small sample feature sharing and fusion are achieved; putting forward a small sample adaptive regularization strategy, and dynamically adjusting regularization coefficient to suppress overfitting of the model; and finally realizing accurate identification, risk assessment and evolution prediction of the cross-regional gas safety situation based on the global model. According to the method, the problems of model over-fitting, poor stability and weak generalization ability caused by insufficient regional samples and scarcity of key fault samples in cross-regional gas safety situation awareness are solved, and accurate identification, risk assessment and evolution prediction of the cross-regional gas safety situation are realized.
Need to check novelty before this filing date? Find Prior Art

Description

A Cross-Regional Gas Safety Situation Awareness Method and System Based on Federated Learning Technical Field

[0001] This invention relates to the field of gas safety monitoring technology, and in particular to a cross-regional gas safety situational awareness method and system based on federated learning. Background Technology

[0002] Gas safety is a core component of urban public safety. Interconnectivity of gas pipelines across regions makes single-point failures prone to triggering cascading risks. However, existing cross-regional gas safety situational awareness technologies face significant bottlenecks in small-sample learning: Insufficient total sample size: The amount of monitoring data from a single gas company / regional monitoring node is limited, especially in low-density areas such as mountainous regions and remote urban areas, where the effective training sample size is far below the model convergence requirements; Scarcity of key fault samples: Key faults such as gas leaks and valve jamming are low-probability events, resulting in very few labeled fault samples accumulated in each region, making it difficult for the model to learn effective fault features; Poor adaptability of federated learning: Existing federated learning schemes are designed based on large-sample assumptions and are not optimized for small-sample scenarios. Direct application leads to model overfitting, poor stability, and insufficient cross-regional generalization ability; Lack of targeted regularization strategies: General regularization strategies are not dynamically adjusted based on sample size. Insufficient regularization strength in small-sample areas easily leads to overfitting, while excessive strength in large-sample areas results in a loss of model accuracy; Fragmented cross-regional features: The distribution of small-sample data features varies greatly across different regions, lacking an effective cross-domain knowledge transfer mechanism, making it impossible to share small-sample features. Summary of the Invention

[0003] The purpose of this invention is to propose a cross-regional gas safety situation awareness method based on federated learning, which aims to solve the problems of insufficient total number of samples in a single region, scarcity of key fault samples leading to model overfitting, poor stability, weak generalization ability, and lack of targeted small sample optimization strategies in existing cross-regional gas safety situation awareness methods.

[0004] This invention is implemented as follows: a cross-regional gas safety situational awareness method based on federated learning. The method includes: constructing a three-level federated meta-learning architecture, comprising an edge acquisition layer, a regional federated meta-learning layer, and a cross-regional federated fusion layer; the edge acquisition layer collects multi-dimensional local gas data, and for scarce fault small sample data, uses an improved WGAN-GP model to generate virtual fault samples to expand the scarce samples, and performs desensitization preprocessing and feature pre-extraction on the expanded data to generate local gas feature vectors; the regional federated meta-learning layer receives the local gas feature vectors from the edge acquisition layers under its jurisdiction, uses a model-independent meta-learning algorithm for intra-domain small sample adaptation training, and generates regional-level gas safety situational awareness with small sample adaptation capabilities through a two-stage iteration of meta-training-meta-testing. A gas safety situation awareness model is generated. The cross-regional federated fusion layer receives regional situation model parameters uploaded by the regional federated meta-learning layers. Through a cross-domain knowledge transfer algorithm, it mines the common and differential features of small sample data from different regions, completing cross-regional small sample knowledge fusion to generate a global gas safety situation awareness model. Based on the distribution characteristics of small sample data, the adaptive regularization coefficient is dynamically adjusted, and a small sample adaptive regularization loss function is constructed to suppress overfitting of the global gas safety situation awareness model and improve model stability. Using the global gas safety situation awareness model, a multi-level awareness model is constructed, consisting of equipment anomaly identification, pipeline risk assessment, regional situation classification, and cross-regional evolution prediction. This model outputs the gas safety situation level, key fault identification results, risk tracing paths, and cross-regional evolution trends.

[0005] Another objective of this invention is to propose a cross-regional gas safety situational awareness system based on federated learning. The system includes: an architecture construction module for constructing a three-level federated meta-learning architecture, comprising an edge acquisition layer, a regional federated meta-learning layer, and a cross-regional federated fusion layer; an edge data processing module for acquiring multi-dimensional local gas data, generating virtual fault samples using an improved WGAN-GP model for scarce fault small-sample data, expanding the scarce samples, and performing desensitization preprocessing and feature pre-extraction on the expanded data to generate local gas feature vectors; and a regional model training module for receiving local gas feature vectors from the edge acquisition layer under its jurisdiction, performing intra-domain small-sample adaptation training using a model-independent meta-learning algorithm, and generating regional-level gas models with small-sample adaptation capabilities through a two-stage meta-training-meta-test iteration. The system comprises a safety situation model and a global model fusion module. The global model fusion module receives regional situation model parameters uploaded from the federated meta-learning layers of each region. Through a cross-domain knowledge transfer algorithm, it mines the common and differential features of small sample data from different regions, completing cross-regional small sample knowledge fusion to generate a global gas safety situation awareness model. A model optimization module dynamically adjusts the adaptive regularization coefficient based on the distribution characteristics of small sample data, constructs a small sample adaptive regularization loss function, suppresses overfitting of the global gas safety situation awareness model, and improves model stability. A situation awareness output module utilizes the global gas safety situation awareness model to construct a multi-level awareness model encompassing equipment anomaly identification, pipeline risk assessment, regional situation classification, and cross-regional evolution prediction. This model outputs the gas safety situation level, key fault identification results, risk tracing paths, and cross-regional evolution trends.

[0006] The beneficial effects of this invention: This invention proposes a cross-regional gas safety situation awareness method and system based on federated learning. The method includes: constructing a three-level federated meta-learning architecture; introducing a generative adversarial network into the edge acquisition layer to construct a virtual fault sample generation module to expand scarce fault samples; employing a model-independent meta-learning algorithm in the regional federated meta-learning layer to achieve rapid adaptation training of small samples within the domain; designing a cross-domain knowledge transfer algorithm in the cross-regional federated fusion layer to achieve feature sharing and fusion of small samples from multiple regions; proposing a small sample adaptive regularization strategy to dynamically adjust the regularization coefficient to suppress model overfitting; and finally, achieving accurate identification, risk assessment, and evolution prediction of cross-regional gas safety situation based on a global model. This invention solves the problems of model overfitting, poor stability, and weak generalization ability caused by insufficient regional samples and scarce key fault samples in cross-regional gas safety situation awareness, and achieves accurate identification, risk assessment, and evolution prediction of cross-regional gas safety situation. Attached Figure Description

[0007] Figure 1 is a flowchart of the cross-regional gas safety situation awareness method based on federated learning according to a preferred embodiment of the present invention; Figure 2 is a structural diagram of the cross-regional gas safety situation awareness system based on federated learning according to a preferred embodiment of the present invention. Detailed Implementation

[0008] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. For ease of explanation, only the parts related to the embodiments of this invention are shown. It should be understood that the specific embodiments described herein are merely for explaining this invention and are not intended to limit this invention.

[0009] This invention proposes a method and system for cross-regional gas safety situation awareness based on federated learning. The method includes: constructing a three-level federated meta-learning architecture; introducing a generative adversarial network (GAN) at the edge acquisition layer to build a virtual fault sample generation module, expanding scarce fault samples; employing a model-independent meta-learning algorithm in the regional federated meta-learning layer to achieve rapid adaptation and training of small samples within the domain; designing a cross-domain knowledge transfer algorithm in the cross-regional federated fusion layer to achieve feature sharing and fusion of small samples from multiple regions; proposing a small-sample adaptive regularization strategy to dynamically adjust the regularization coefficient to suppress model overfitting; and finally, achieving accurate identification, risk assessment, and evolution prediction of cross-regional gas safety situation based on a global model. This invention solves the problems of model overfitting, poor stability, and weak generalization ability caused by insufficient regional samples and scarce key fault samples in cross-regional gas safety situation awareness, achieving accurate identification, risk assessment, and evolution prediction of cross-regional gas safety situation.

[0010] Figure 1 is a flowchart of a preferred embodiment of the cross-regional gas safety situational awareness method based on federated learning of the present invention. The method includes the following steps: S1: Constructing a three-level federated meta-learning architecture, which includes an edge acquisition layer, a regional federated meta-learning layer, and a cross-regional federated fusion layer. The edge acquisition layer is deployed at gas company stations or regional monitoring nodes to directly collect first-line gas data and focus on processing scarce fault samples. The regional federated meta-learning layer is deployed at the prefecture-level city gas supervision platform and uses meta-learning algorithms to achieve rapid adaptation of small samples within the domain. Meta-learning algorithms are a type of machine learning algorithm designed for small sample learning scenarios. Its core idea is to enable the model to "learn to learn," that is, to obtain a set of initial model parameters with strong generalization ability by pre-learning the common rules of multiple similar small sample tasks. When facing new small sample tasks, only a small number of labeled samples and a few gradient updates are needed to quickly adapt and generate a high-performance task model, thereby solving the problems of overfitting, slow convergence, and weak generalization ability of traditional machine learning algorithms in small sample scenarios.

[0011] The cross-regional federal fusion layer is deployed in provincial or cross-regional gas regulatory centers to achieve cross-regional small-sample knowledge transfer and fusion.

[0012] S2: The edge acquisition layer collects multi-dimensional local gas data. For scarce fault samples, an improved WGAN-GP model is used to generate virtual fault samples (ensuring a feature similarity of ≥90% with real samples) to expand the scarce samples. The expanded data (real + virtual samples) undergoes desensitization preprocessing and feature pre-extraction to generate local gas feature vectors. The scarce small sample data includes key faults, sensor faults, leaks, valve jamming, etc. The multi-dimensional data includes equipment operation data, pipeline monitoring data, gas consumption behavior data, environmental data, and fault event annotation data. The improved WGAN-GP model's generator input is random noise + basic features of gas equipment and pipelines, and the discriminator introduces a gradient penalty term. The generated virtual fault samples have a feature similarity of ≥90% with real samples. The pipeline network is a shorthand for gas pipeline network, specifically referring to a complete network system for gas transmission and distribution, composed of gas pipelines, pipe sections, nodes (valve nodes, pressure regulator nodes, junction nodes, etc.), and ancillary facilities (such as pipeline anti-corrosion layers and support structures).

[0013] The data anonymization preprocessing includes: anonymizing and hashing user identity information, encrypting and offsetting pipeline coordinates, de-identifying fault labeling data, and adding traceability identifiers to expanded virtual samples to distinguish between real and virtual data.

[0014] The feature pre-extraction uses a lightweight convolutional neural network (MobileNetV3), which optimizes the network structure for small sample data, reduces the number of convolutional layers, and improves feature extraction efficiency.

[0015] Furthermore, in some embodiments of the present invention, the improved WGAN-GP model can also be replaced by a gas fault-specific diffusion model (such as DDPM, LDM). Specifically, the edge acquisition layer collects multi-dimensional local gas data. For scarce fault small sample data, a gas fault-specific diffusion model (such as DDPM, LDM) is used to generate virtual fault samples. By gradually adding noise to real fault samples and learning the reverse denoising process, virtual fault samples (e.g., with feature similarity ≥90% with real samples) are generated. Then, the expanded data (real + virtual samples) undergoes desensitization preprocessing and feature pre-extraction to generate local gas feature vectors. During training, the model introduces prior knowledge of gas business (such as pipeline pressure change patterns and equipment fault association rules) as constraints to ensure that the generated virtual samples conform to the physical logic of the gas system.

[0016] S3: The regional federated meta-learning layer receives the local gas feature vectors from the edge acquisition layers under its jurisdiction, and uses the Model Independent Meta-Learning (MAML) algorithm for small-sample adaptation training within the domain. Through a two-stage iteration of meta-training and meta-testing, a regional-level gas safety situation model with small-sample adaptation capability is generated. The meta-training-meta-testing two-stage iteration process of the Model Independent Meta-Learning (MAML) algorithm includes: S31: In the meta-training stage, the small-sample data in the region is divided into multiple task subsets. Each task subset contains a support set and a query set. The regional model parameters are initialized, and the model parameters are updated through multi-task iteration to train the model's ability to quickly adapt to new small-sample tasks. S32: In the meta-testing stage, the model adaptation capability is verified using a small-sample query set that did not participate in the meta-training. If the model accuracy does not reach the preset threshold (≥85%), the iteration count is adjusted back to the meta-training stage until the model converges (the model accuracy stably reaches the preset threshold (e.g., ≥85%), and the model parameters no longer change significantly) to generate a regional-level situation model.

[0017] S4: The cross-regional federated fusion layer receives the regional situation model parameters (not the original data) uploaded by the federated meta-learning layers of each region. Through the cross-domain knowledge transfer algorithm, it mines the common and differential features of small sample data from different regions, completes the cross-regional small sample knowledge fusion, and generates a global gas safety situation awareness model. The specific implementation of the cross-domain knowledge transfer algorithm is as follows: a domain adaptive network (DAN) is used to align the feature distribution of different regions, calculate the maximum mean difference (MMD) of features between regions, and achieve cross-regional small sample feature transfer by minimizing the MMD. Its objective function is: Ltransfer=Ltask+λ×MMD(Fs,Ft); where Ltask is the situation awareness task loss, Fs is the source region feature, Ft is the target region feature, and λ is the transfer weight coefficient (value 0.1-0.5).

[0018] The objective function is the optimization criterion of the cross-domain knowledge transfer algorithm when performing cross-regional small sample feature transfer: by combining the "situational awareness task loss (Ltask)" with the "inter-regional feature difference penalty term (λ×MMD(Fs,Ft))," the algorithm can not only complete the task of gas safety situational awareness, but also achieve the alignment and transfer of small sample features in different regions by minimizing MMD, thus solving the problem of feature fragmentation in different regions under small sample scenarios and improving the cross-regional generalization ability of the global model.

[0019] For example, in one embodiment of the present invention, taking Chengdu, Deyang and Mianyang as examples, after the regional federated meta-learning layers of the three cities complete the small sample adaptation training within the domain through the MAML algorithm, they only upload the regional situation model parameters (including model weights, optimized initial parameters, etc., not the original data, to protect privacy) to the cross-regional federated fusion layer. Among them, valve jamming samples are scarce in Chengdu, gas leak samples are abundant in Deyang (as the source region), and sensor fault samples are scarce in Mianyang (as the target region). The cross-regional federated fusion layer uses a cross-domain knowledge transfer algorithm combining Domain Adaptive Network (DAN) and Maximum Mean Difference (MMD) to achieve fusion. The objective function is Ltransfer=Ltask+λ×MMD(Fs,Ft) (Ltask ensures the basic capabilities of fault identification and risk assessment, Fs represents the features of the Deyang source area, Ft represents the features of the Chengdu-Mianyang target area, and λ is set to 0.1-0.5 to balance task performance and transfer effect). First, the fault features of the three locations are mapped to the same spatial alignment distribution through DAN. Then, MMD is calculated to quantify the differences and iteratively minimizes them. During the process, common and differentiated features are mined simultaneously: In terms of common features, cross-regional general features such as "sudden pressure drop + flow fluctuation" in gas leakage and "abnormal current + sudden vibration" in valve jamming are extracted to make up for the learning shortcomings of scarce samples in Chengdu-Mianyang. In terms of differentiated features, regional characteristics such as "lagging pressure regulation" in the Chengdu mountainous pipeline network, "fast risk propagation speed" in the Deyang plain pipeline network, and "peak load coupling risk" in the Mianyang urban pipeline network are accurately captured, and the algorithm is used to correct and adapt the feature differences. Finally, by integrating the two types of features, cross-regional small sample knowledge fusion is completed, generating a global gas safety situation awareness model that can be adapted to small sample scenarios and different chemical conditions in the three regions, and realizing unified cross-regional safety situation awareness.

[0020] S5: Based on the distribution characteristics of small sample data, dynamically adjust the adaptive regularization coefficient to construct a small sample adaptive regularization loss function, suppress overfitting of the global gas safety situation awareness model, and improve model stability; the small sample adaptive regularization coefficient ( The formula for calculating ) is: Where N is the effective sample size in the current region, and N0 is the sample size threshold (value 500-1000). , , To adjust parameters ( =0.8, , The smaller the sample size, the larger the regularization coefficient, and the stronger the effect of suppressing overfitting.

[0021] S6: Using the global gas safety situation awareness model, construct a multi-level awareness model that includes equipment anomaly identification, pipeline risk assessment, regional situation classification, and cross-regional evolution prediction, and output the gas safety situation level, key fault identification results, risk tracing path, and cross-regional evolution trend.

[0022] The multi-level perception model construction process of "equipment anomaly identification - pipeline risk assessment - regional situation classification - cross-regional evolution prediction" is as follows: S61: Match small sample fault features based on the global gas safety situation perception model to identify equipment anomaly types (such as leakage, valve jamming, sensor failure) and anomaly levels; S62: Associate equipment anomaly features with pipeline topology, and use graph neural networks to calculate the risk values ​​of pipe segments and nodes; In this embodiment of the invention, prior knowledge can be introduced to constrain risk calculation in small sample scenarios; the prior knowledge refers to deterministic knowledge related to gas safety, fault evolution, and pipeline risk that has been accumulated and verified through gas industry practices, historical fault statistics, pipeline design specifications, equipment operation rules, etc., before training with small sample data. This knowledge does not come from the currently scarce small sample training data, but rather serves as a constraint to supplement the insufficiency of small sample data, avoiding deviations or unreasonable results in risk calculation due to insufficient data volume and inadequate feature learning.

[0023] S63: Aggregate pipeline risk values ​​and combine them with the regional small sample failure rate to classify the regional situation; in this embodiment of the invention, the regional situation classification is divided into levels I-V; the response strategies corresponding to the regional situation levels are as follows: Level I (no risk): real-time monitoring only, no intervention required; Level II (low risk): push abnormal alerts to the regional gas supervision platform; Level III (medium risk): issue targeted inspection tasks (focusing on equipment with high incidence of small sample failures); Level IV (high risk): activate regional emergency response and close valves in the risky pipeline section; Level V (emergency risk): trigger cross-regional linkage early warning and allocate cross-regional emergency resources.

[0024] S64: Based on the characteristics of cross-domain migration and combined with the pipeline network connectivity, predict the evolution time and scope of cross-regional risks caused by small sample failures.

[0025] The cross-domain transfer features include common features of key faults in small samples across regions and transfer adaptation features of differentiated features between regions. The common features of key faults in small samples across regions refer to the universal fault characteristics extracted from key fault data in small samples across multiple regions (such as gas leaks, valve jamming, sensor malfunctions, etc.) using cross-domain knowledge transfer algorithms. For example, the combined features of "sudden drop in pipeline pressure + abnormal flow fluctuations" for gas leaks, and the combined features of "sudden change in equipment vibration frequency + abnormal opening and closing current" for valve jamming. These features, originally unable to be effectively learned by the model due to insufficient sample size in a single region, become universally applicable fault characteristics that the model can recognize after cross-domain transfer and the fusion of small sample data from multiple regions. This forms the basis for predicting the evolution of cross-regional risks.

[0026] The aforementioned inter-regional differentiated feature transfer and adaptation refers to the process of using cross-domain knowledge transfer algorithms to transfer differentiated features (such as the "pressure regulation lag" feature of mountainous pipeline networks and the "peak gas load impact" feature of urban pipeline networks) from one region (a region with relatively sufficient samples) to another region (a region with small samples), and then adapting the features accordingly. For example, the feature of "slow risk propagation when pipeline pressure is stable" in Jingyang District of Deyang City (a plain area) is transferred to Longquanyi District of Chengdu City (a mountainous region with small samples), and combined with prior knowledge of the topology of mountainous pipeline networks, it is adapted to the feature of "faster risk propagation when pipeline pressure fluctuates in mountainous areas." These features solve the problem that small sample areas cannot learn their own differentiated risk features due to insufficient data, and are a key basis for predicting the time and scope of cross-regional risk evolution.

[0027] Furthermore, the method in this embodiment of the invention also includes a model incremental update step: collecting new gas data (including real samples + new virtual samples) based on a sliding time window (e.g., window duration of 48 hours), and using a federated incremental meta-learning algorithm to iteratively update the global gas safety situation awareness model (generated by a cross-regional federated fusion layer and optimized by a small-sample adaptive regularization loss function); in this embodiment of the invention, the update frequency can be set to once every 12 hours to ensure the timeliness of the model in small-sample scenarios.

[0028] The described federated incremental meta-learning algorithm is a composite algorithm integrating federated learning, incremental learning, and meta-learning. It is applicable to the scenario of this invention where the global model needs to be iteratively updated based on newly added gas data (real samples + newly added virtual samples) within a sliding time window (e.g., a window length of 48 hours). Its core is to quickly adapt to incremental small samples within a federated framework where data in each region does not leave its local area, relying on the "learning to learn" capability of meta-learning. Through the incremental learning mechanism, parameters are iteratively updated only based on newly added data, while retaining historical learning results, eliminating the need to repeatedly train the entire dataset. This ensures data privacy and security, adapts to small gas sample scenarios, and efficiently achieves dynamic iterative optimization of the global model, maintaining its adaptability to newly added fault features.

[0029] Corresponding to the federated learning-based cross-regional gas safety situation awareness method described in the above embodiments, Figure 2 shows a structural block diagram of the federated learning-based cross-regional gas safety situation awareness system provided in this application embodiment. For ease of explanation, only the parts related to this application embodiment are shown. The system includes:

[0030] The architecture construction module is used to build a three-level federated meta-learning architecture, which includes an edge acquisition layer, a regional federated meta-learning layer, and a cross-regional federated fusion layer. The edge data processing module is used to collect multi-dimensional local gas data. For scarce fault small-sample data, an improved WGAN-GP model is used to generate virtual fault samples to expand the scarce samples. The expanded data undergoes desensitization preprocessing and feature pre-extraction to generate local gas feature vectors. The regional model training module receives the local gas feature vectors from the edge acquisition layers under its jurisdiction, uses a model-independent meta-learning algorithm for intra-domain small-sample adaptation training, and generates a regional-level gas safety situation model with small-sample adaptation capabilities through a two-stage meta-training-meta-test iteration. The global model fusion module receives the local gas feature vectors from each regional federated fusion layer. The regional situational awareness model parameters uploaded by the Bangyuan learning layer are used to mine the common and differential features of small sample data from different regions through a cross-domain knowledge transfer algorithm, thereby completing the cross-regional small sample knowledge fusion and generating a global gas safety situational awareness model. The model optimization module is used to dynamically adjust the adaptive regularization coefficient based on the distribution characteristics of small sample data, construct a small sample adaptive regularization loss function, suppress overfitting of the global gas safety situational awareness model, and improve model stability. The situational awareness output module is used to construct a multi-level awareness model of "equipment anomaly identification - pipeline risk assessment - regional situational classification - cross-regional evolution prediction" using the global gas safety situational awareness model, and output the gas safety situational level, key fault identification results, risk tracing path, and cross-regional evolution trend.

[0031] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by program instructions and related hardware. The program can be stored in a computer-readable storage medium, such as ROM, RAM, disk, optical disk, etc.

[0032] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A cross-regional gas safety situational awareness method based on federated learning, characterized in that, The method includes: constructing a three-level federated meta-learning architecture, comprising an edge acquisition layer, a regional federated meta-learning layer, and a cross-regional federated fusion layer; the edge acquisition layer collects multi-dimensional local gas data, and for scarce fault small sample data, uses an improved WGAN-GP model to generate virtual fault samples to expand the scarce samples, and performs desensitization preprocessing and feature pre-extraction on the expanded data to generate local gas feature vectors; the regional federated meta-learning layer receives the local gas feature vectors from the edge acquisition layers under its jurisdiction, uses a model-independent meta-learning algorithm for intra-domain small sample adaptation training, and generates a regional gas safety situation model with small sample adaptation capability through a two-stage iteration of meta-training-meta-test; the cross-regional federated fusion layer receives... The regional-level situational awareness model parameters uploaded by each region's federated meta-learning layer are used to mine the common and differential features of small sample data from different regions through a cross-domain knowledge transfer algorithm, thereby completing cross-regional small sample knowledge fusion and generating a global gas safety situational awareness model. Based on the distribution characteristics of small sample data, the adaptive regularization coefficient is dynamically adjusted to construct a small sample adaptive regularization loss function, which suppresses overfitting of the global gas safety situational awareness model and improves model stability. Using the global gas safety situational awareness model, a multi-level awareness model is constructed, consisting of equipment anomaly identification, pipeline risk assessment, regional situational classification, and cross-regional evolution prediction, outputting gas safety situational level, key fault identification results, risk tracing paths, and cross-regional evolution trends.

2. The cross-regional gas safety situational awareness method based on federated learning as described in claim 1, characterized in that, The edge acquisition layer is deployed at gas company stations or regional monitoring nodes to collect first-line gas data and process scarce fault samples; the regional federated meta-learning layer is deployed at the prefecture-level city gas supervision platform and uses meta-learning algorithms to achieve rapid adaptation of small samples within the region; the cross-regional federated fusion layer is deployed at the provincial or cross-regional gas supervision center to achieve cross-regional small sample knowledge transfer and fusion.

3. The cross-regional gas safety situational awareness method based on federated learning as described in claim 2, characterized in that, The method also includes a model incremental update step: collecting new gas data based on a sliding time window, and iteratively updating the global gas safety situation awareness model using a federated incremental meta-learning algorithm; the federated incremental meta-learning algorithm is a composite algorithm that integrates federated learning, incremental learning and meta-learning. Under the federated framework where data in each region does not leave the local area, it quickly adapts to incremental small samples by relying on meta-learning capabilities. Through the incremental learning mechanism, it iteratively updates parameters only based on new data and retains historical learning results, without having to repeat training on the full amount of data.

4. The cross-regional gas safety situational awareness method based on federated learning as described in claim 1, characterized in that, The scarce small sample data includes key faults, sensor faults, leaks, valve jamming, etc.; the multi-dimensional data includes equipment operation data, pipeline monitoring data, gas consumption behavior data, environmental data, and fault event annotation data; the improved WGAN-GP model has a generator input of random noise + basic features of gas equipment and pipeline, and a discriminator that introduces a gradient penalty term to generate virtual fault samples. The data anonymization preprocessing includes: anonymizing and hashing user identity information, encrypting and offsetting pipeline coordinates, de-identifying fault labeling data, and adding traceability identifiers to expanded virtual samples to distinguish between real and virtual data; the feature pre-extraction adopts a lightweight convolutional neural network, optimizes the network structure for small sample data, reduces the number of convolutional layers, and improves feature extraction efficiency.

5. The cross-regional gas safety situational awareness method based on federated learning as described in claim 4, characterized in that, The improved WGAN-GP model can also be replaced by gas fault-specific diffusion models, including DDPM and LDM.

6. The cross-regional gas safety situational awareness method based on federated learning as described in claim 1, characterized in that, The meta-training-meta-testing two-stage iterative process of the model-independent meta-learning algorithm includes: In the meta-training stage, small sample data within the region is divided into multiple task subsets, each containing a support set and a query set. Regional model parameters are initialized, and model parameters are updated through multi-task iterations to train the model's ability to quickly adapt to new small sample tasks. In the meta-testing stage, the model's adaptability is verified using a small sample query set that did not participate in meta-training. If the model accuracy does not reach a preset threshold, the iteration count is adjusted back to the meta-training stage until the model converges and generates a regional-level situational model.

7. The cross-regional gas safety situational awareness method based on federated learning as described in claim 1, characterized in that, The cross-domain knowledge transfer algorithm uses a domain adaptive network to align the feature distribution of different regions, calculates the maximum mean difference of features between regions, and achieves cross-regional small sample feature transfer by minimizing MMD. Its objective function is: Ltransfer=Ltask+λ×MMD(Fs,Ft); where Ltask is the situational awareness task loss, Fs is the source region feature, Ft is the target region feature, and λ is the transfer weight coefficient, which takes a value of 0.1-0.

5.

8. The cross-regional gas safety situational awareness method based on federated learning as described in claim 1, characterized in that, The formula for calculating the small-sample adaptive regularization coefficient is as follows: Where N is the effective sample size in the current region, and N0 is the sample size threshold, ranging from 500 to 1000. 、 、 To adjust the parameters.

9. The cross-regional gas safety situational awareness method based on federated learning as described in claim 1, characterized in that, The construction process of the multi-level perception model of "equipment anomaly identification - pipeline risk assessment - regional situation classification - cross-regional evolution prediction" is as follows: based on the global gas safety situation perception model, small sample fault features are matched to identify equipment anomaly types and anomaly levels. By associating abnormal characteristics of related equipment with pipeline topology, a graph neural network is used to calculate the risk values ​​of pipe segments and nodes. Aggregate the risk values ​​of the pipeline network and combine them with the regional small sample failure rate to classify the regional situation. Based on the characteristics of cross-domain migration and combined with the pipeline network connectivity, the evolution time and scope of cross-regional risks caused by small sample failures are predicted; the characteristics of cross-domain migration include the common characteristics of cross-regional small sample key failures and the migration adaptation characteristics of regional differences.

10. A cross-regional gas safety situational awareness system based on federated learning, characterized in that, The system includes: an architecture construction module for building a three-level federated meta-learning architecture, comprising an edge acquisition layer, a regional federated meta-learning layer, and a cross-regional federated fusion layer; an edge data processing module for collecting multi-dimensional local gas data, generating virtual fault samples using an improved WGAN-GP model for scarce fault small sample data, expanding the scarce samples, and performing desensitization preprocessing and feature pre-extraction on the expanded data to generate local gas feature vectors; a regional model training module for receiving local gas feature vectors from the edge acquisition layers under its jurisdiction, performing intra-domain small sample adaptation training using a model-independent meta-learning algorithm, and generating a regional-level gas safety situation model with small sample adaptation capability through a two-stage iteration of meta-training-meta-test; and a global model fusion module for receiving... The regional situation model parameters uploaded by each region's federated meta-learning layer are used to mine the common and differential features of small sample data from different regions through a cross-domain knowledge transfer algorithm, thereby completing cross-regional small sample knowledge fusion and generating a global gas safety situation awareness model. The model optimization module is used to dynamically adjust the adaptive regularization coefficient based on the distribution characteristics of small sample data, construct a small sample adaptive regularization loss function, suppress overfitting of the global gas safety situation awareness model, and improve model stability. The situation awareness output module is used to construct a multi-level awareness model of "equipment anomaly identification - pipeline risk assessment - regional situation classification - cross-regional evolution prediction" using the global gas safety situation awareness model, and output the gas safety situation level, key fault identification results, risk tracing path, and cross-regional evolution trend.