Hydrogen energy industry chain micro-service anomaly detection method and system based on rule chain

Through the rule chain method based on microservice architecture, the use of multi-layer dual-domain memory library and dynamic residual injection optimization memory library has solved the robustness and real-time problems of anomaly detection in the hydrogen energy industry chain, and achieved efficient abnormal data identification and rapid response.

CN120832504APending Publication Date: 2025-10-24SHANDONG COMP SCI CENTNAT SUPERCOMP CENT IN JINAN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510895175.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

Existing anomaly detection methods in the hydrogen energy industry chain are deficient in robustness, accuracy, real-timeness and flexibility. They are difficult to adapt to the characteristics of a wide variety of equipment and changing operating environments, and lack the ability to process high-frequency data.

Method used

A rule chain method based on microservice architecture is adopted to perform anomaly detection through five nodes, including collection, preprocessing, anomaly detection, rule judgment and feedback. A multi-layer dual-domain memory library and dynamic residual injection optimization memory library are used to build a multi-level and flexible detection system.

Benefits of technology

It improves the robustness, accuracy and real-time performance of anomaly detection in the hydrogen energy industry chain, achieves efficient abnormal data identification and rapid response, and ensures the high availability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832504A_ABST
    Figure CN120832504A_ABST
Patent Text Reader

Abstract

The invention provides a hydrogen energy industry chain micro-service anomaly detection method and system based on a rule chain, and relates to the field of hydrogen energy industry chain anomaly detection.The rule chain of a micro-service architecture is used for carrying out anomaly detection on time series data collected by different hydrogen energy industry chain links, and the rule chain comprises five nodes; the specific operation of each node is as follows: collecting time sequence data of different hydrogen energy industry chain links at the collection node; at the preprocessing node, the time sequence data is checked at the initial stage, and early warning is carried out on the data which does not conform to the rule; carrying out anomaly detection on the preprocessed time sequence data at an anomaly detection node to obtain an anomaly score; comparing the abnormal score with a preset threshold value at the rule judgment node to obtain a final detection result; at the feedback node, the detection result is displayed on the terminal; according to the method, abnormal data identification of different hydrogen energy industry chain links is dealt with, and the robustness, the accuracy, the real-time performance and the flexibility of detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of hydrogen energy industry chain anomaly detection, in particular to a hydrogen energy industry chain microservice anomaly detection method and system based on rule chain. BACKGROUND

[0002] Hydrogen energy, as a clean and efficient energy carrier, has attracted increasing attention worldwide. The hydrogen energy industry chain covers various aspects from hydrogen production, storage, transportation to application, and its application fields are wide, including fuel cell vehicles, industrial high-temperature processes, power generation, and distributed energy systems. In recent years, with technological progress and policy support, the hydrogen energy industry has shown rapid development momentum. However, in the hydrogen energy industry chain, each link involves the collection and monitoring of a large amount of real-time data, such as electrolytic cells, compressed storage tanks, transportation pipelines, and hydrogen refueling stations, which are equipped with various sensors to monitor temperature, pressure, flow rate, concentration, and other parameters. The real-time monitoring data of these equipment operating conditions often exhibit complex time series characteristics, and the data volume is huge, so how to achieve efficient and accurate anomaly detection is of great significance to ensure the safety and stability of hydrogen production and supply.

[0003] Traditional hydrogen energy industry chain anomaly detection methods mainly rely on simple threshold judgment or statistical analysis methods, such as local outlier factor, isolation forest, and support vector machine. These methods can preliminarily identify abnormal data points in some scenarios, but they have obvious limitations in the hydrogen energy industry chain. First, the operating state of equipment in the hydrogen energy industry chain is often influenced by multiple factors, and the data often exhibits superimposed effects of periodic fluctuations, trend changes, and transient impacts, making it difficult for a single threshold judgment to cover all abnormal situations comprehensively. Second, statistical feature-based detection methods rely on stable numerical distribution, but in actual operation, due to environmental, equipment aging, and operation fluctuation factors, the data distribution will change dynamically, making it difficult for the model to accurately capture abnormal signals. Third, although some machine learning or deep learning-based methods can learn complex time series patterns, they usually require a large amount of labeled data for training, while abnormal data in the hydrogen energy industry chain is often scarce and the types of abnormalities are complex and varied, making the model prone to overfitting or insufficient generalization ability. In addition, previous anomaly detection methods also have certain deficiencies in real-time performance and flexibility. Traditional methods often use a single model or fixed detection logic, which is difficult to adapt to the characteristics of a wide variety of equipment and varying operating environments in the hydrogen energy industry chain. In some key links, such as hydrogen compression storage and hydrogenation processes, the data collection frequency is extremely high, and the real-time performance requirement of the detection system is high. Traditional centralized detection systems are difficult to process massive data in a short time, thereby affecting the safe operation and accident prevention of equipment.

[0004] Therefore, the existing hydrogen energy industry chain anomaly detection technology has defects in robustness, accuracy, real-time performance and flexibility. SUMMARY

[0005] The present application proposes a rule chain-based hydrogen energy industry chain microservice anomaly detection method and system to address the above problems, identify abnormal data in different hydrogen energy industry chain links, and improve the robustness, accuracy, real-time performance and flexibility of detection.

[0006] According to some embodiments, the present application adopts the following technical solutions: A rule chain-based hydrogen energy industry chain microservice anomaly detection method uses a rule chain of a microservice architecture to perform anomaly detection on time series data collected from different hydrogen energy industry chain links, and the rule chain includes five nodes, and the specific operation of each node is as follows: At the collection node, time series data of different hydrogen energy industry chain links is collected; At the preprocessing node, preliminary investigation of the time series data is performed, and early warning is performed on data that does not meet the rules; At the anomaly detection node, anomaly detection is performed on the preprocessed time series data to obtain an anomaly score; At the rule judgment node, the anomaly score is compared with a preset threshold to obtain a final detection result; At the feedback node, the detection result is displayed on the terminal; The anomaly detection node is internally refined into a plurality of anomaly detection sub-modules for different hydrogen energy industry chain links, each anomaly detection sub-module is an independent microservice unit encapsulating a trained anomaly detection model, each microservice unit is responsible for anomaly detection tasks of a specific industry chain link, and the anomaly detection model sets a special memory module for each industry chain link through a multi-layer double-domain memory library, captures long-term dependencies through memory item reading and updating processes, and continuously optimizes the memory library through dynamic residual injection.

[0007] According to some embodiments, the present application adopts the following technical solutions: A rule chain-based hydrogen energy industry chain microservice anomaly detection system uses a rule chain of a microservice architecture to perform anomaly detection on time series data collected from different hydrogen energy industry chain links, and the rule chain includes five nodes, and the specific operation of each node is defined as a module, including: The collection module is configured to collect time series data of different hydrogen energy industry chain links; The preprocessing module is configured to perform preliminary investigation of the time series data and early warning on data that does not meet the rules; The anomaly detection module is configured to perform anomaly detection on the preprocessed time series data to obtain an anomaly score; The rule judgment module is configured to compare the abnormal score with a preset threshold to obtain a final detection result. The feedback module is configured to display the detection result on the terminal. The abnormal detection module is internally refined into multiple abnormal detection sub-modules for different hydrogen energy industry chain links, and each micro-service unit is responsible for the abnormal detection task of a specific industry chain link.

[0008] According to some embodiments, the present application adopts the following technical scheme: A computer program product comprising a computer program, which, when executed by a processor, implements the hydrogen energy industry chain micro-service abnormal detection method based on a rule chain.

[0009] According to some embodiments, the present application adopts the following technical scheme: A non-transitory computer-readable storage medium for storing computer instructions, which, when executed by a processor, implements the hydrogen energy industry chain micro-service abnormal detection method based on a rule chain.

[0010] According to some embodiments, the present application adopts the following technical scheme: An electronic device comprising a processor, a memory and a computer program, wherein the processor is connected to the memory, and the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to make the electronic device execute the hydrogen energy industry chain micro-service abnormal detection method based on a rule chain.

[0011] Compared with the prior art, the present application has the following advantages: The present application introduces a micro-service architecture, which independently deploys abnormal detection micro-services for each link of the hydrogen energy industry chain, realizes decoupling and flexible expansion, improves the overall concurrent processing capability of the system, and facilitates rapid positioning and repair when encountering large-scale data or local faults, thereby ensuring the high availability and real-time performance of the system.

[0012] The application adopts a detection strategy based on a rule chain, and constructs a series of hierarchical rules; simple threshold rules, local statistical rules and trend change rules are fused by weighting to form a multi-level and flexible adaptive detection system; for each key equipment in the hydrogen energy industry chain, the rule chain can dynamically adjust the threshold and judgment standard according to the historical data and real-time change of the equipment, so as to reduce the false alarm or missed alarm problem caused by a single rule while ensuring the detection accuracy.

[0013] The application introduces a multi-level feature extraction and decomposition method in the data preprocessing stage, decomposes the original data into trend, periodicity and random noise components, so that the potential abnormal features in the hydrogen energy production process can be captured more carefully; this method overcomes the problem that the traditional method only focuses on the overall characteristics of the data and ignores the internal multi-modal structure, so that the anomaly detection is more accurate. BRIEF DESCRIPTION OF DRAWINGS

[0014] The drawings accompanying the specification of the application form a part of the application and serve to provide further understanding of the application, the illustrative embodiments of the application and their description serve to explain the application without constituting an improper limitation thereof.

[0015] Figure 1 The flowchart of example 1. Figure 2 The rule chain structure diagram of example 1.

[0016] Figure 3 The feature extractor network structure diagram of example 1. Figure 4 The bidirectional encoder structure diagram of example 1. Figure 5 The multi-layer double-domain memory module network structure diagram of example 1. Figure 6 The residual update mechanism schematic diagram of example 1. Figure 7 The decoder network structure diagram of example 1. DETAILED DESCRIPTION

[0017] The application will be further described below in combination with the drawings and examples.

[0018] It should be pointed out that the following detailed description is exemplary and is intended to provide further explanation of the application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as generally understood by those skilled in the art to which the application belongs.

[0019] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments in accordance with the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, steps, operations, elements, components, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof.

[0020] Terminology: Time series anomaly detection: Time series anomaly detection refers to the process of identifying data points or segments that do not conform to historical or expected behavior in a data sequence with temporal dependencies. These anomalies may indicate system failures, data collection errors, or the occurrence of other special events.

[0021] Feature extraction network: In the anomaly detection task, the role of the feature extraction network is to extract feature representations related to the data from the input data. The feature extraction network can learn deep features in the data, providing feature information of the normal component. As the network level increases, the feature extraction network can capture higher-level semantic information, which is crucial for understanding data and helps improve the accuracy of anomaly detection.

[0022] Sliding window: Sliding window is a method of extracting local sub-sequences in time series data. By setting a fixed length window, then constantly sliding the window on the time series, the data within the window is extracted as an independent sample for analysis each time.

[0023] Embodiment 1 Background Art The deficiencies or problems described in the background art can be summarized as follows: 1. Existing anomaly detection methods are difficult to cover all abnormal situations comprehensively.

[0024] 2. Statistical feature-based detection methods rely on stable numerical distribution, but in actual operation, due to environmental, equipment aging and operation fluctuation factors, data distribution will change dynamically, making it difficult for the model to accurately capture abnormal signals.

[0025] 3. Existing methods can learn complex time series patterns, but usually require a large amount of labeled data for training, while abnormal data in the hydrogen industry chain is often scarce, and the types of anomalies are complex and variable, making the model prone to overfitting or insufficient generalization ability.

[0026] 4. Existing anomaly detection methods also have certain deficiencies in real-time performance and flexibility.

[0027] In order to solve the above-mentioned deficiencies or problems, in an embodiment of the present application, a rule chain-based hydrogen energy industry chain microservice anomaly detection method is provided, which utilizes a rule chain of a microservice architecture to perform anomaly detection on time series data collected from different hydrogen energy industry chain links, the rule chain includes five nodes, and the specific operation of each node is as follows: At the collection node, time series data of different hydrogen energy industry chain links is collected. At the preprocessing node, the time series data is initially investigated, and early warning is performed on data that does not conform to the rules. At the anomaly detection node, anomaly detection is performed on the preprocessed time series data to obtain an anomaly score. At the rule judgment node, the anomaly score is compared with a preset threshold to obtain a final detection result. At the feedback node, the detection result is displayed on a terminal. The anomaly detection node is internally refined into a plurality of anomaly detection sub-modules for different hydrogen energy industry chain links, which are pointed to by a link shunt node, the anomaly detection sub-module encapsulates a trained anomaly detection model as an independent microservice unit, each microservice unit is responsible for anomaly detection tasks of a specific industry chain link, the anomaly detection model sets a special memory module for each industry chain link through a multi-layer double-domain memory library, captures long-term dependencies through memory item reading and updating processes, and continuously optimizes the memory library through dynamic residual injection.

[0028] As an embodiment, the rule chain-based hydrogen energy industry chain microservice anomaly detection method of the present application can identify abnormal data of different hydrogen energy industry chain links, improve the robustness, accuracy, real-time performance and flexibility of detection, as shown in Figure 1 The specific implementation process is as follows: Step S1, constructing a rule chain.

[0029] The rule chain is a directed acyclic graph, as shown in Figure 2 It is composed of five nodes connected in turn: collection, preprocessing, anomaly detection, rule judgment and feedback, each node includes a processing step; it also includes a separate link shunt node, when the rule chain encounters the link shunt node, the data is routed to the corresponding sub-chain according to the hydrogen energy industry chain link i, for example:

[0030] The link shunt node is set in the anomaly detection node and points to a plurality of anomaly detection sub-modules for different hydrogen energy industry chain links, i.e., in the sub-chain of different hydrogen energy industry chain links.

[0031] The nodes are described in detail as follows: At the collection node, different types of sensors are used to collect a series of signal data, that is, time series data, according to the various links of the hydrogen energy industry chain. At the preprocessing node, first, the data is subjected to early warning, including simple threshold rules and local statistical rules. If there is data that does not conform to the rules in the initial rule chain check, the alarm information is output through the feedback node. The specific rules are as follows: Simple threshold rule: For each sensor data, the initial upper and lower limit thresholds are manually set. The upper and lower limit thresholds of sensor t are set to be and , then for the value at the t-th moment The judgment formula is:

[0032] Local statistical rules: Assume that the mean and standard deviation of data with length L are and , then the following rules can be defined:

[0033] in, It is an adjustment coefficient that is set according to different sensor data patterns.

[0034] Subsequently, the constructed dataset was split into training set, test set and validation set according to 8:1:1 for model training and testing. This process ensured the effective use of data and accurate evaluation of model performance.

[0035] At the anomaly detection node, the input data is detected for anomalies according to the constructed anomaly detection model, and an anomaly score is output. The anomaly detection node can be further refined into a link diversion node pointing to multiple anomaly detection sub-modules for different links in the hydrogen energy industry chain. At the rule judgment node, the anomaly score is compared with the preset threshold and the final detection result is output. At the feedback node, if the detection result output in 1-4 is indicated as an anomaly, the anomaly information is printed and displayed on the terminal. The link diversion node represents a node connected to at least two directed edges, and the specified branch is selected for subsequent processing according to the source of the data. Step S2, build a feature extractor network of the hydrogen energy industry chain microservice anomaly detection model, including a seasonal trend decomposition module and a bidirectional encoder layer.

[0036] like Figure 3 As shown, the input data x is input into the feature extractor network, and the data x is output by the seasonal trend decomposition module to obtain the initial seasonal and trend features. , seasonal and trend characteristics Input to the bidirectional encoder layer to get the output .

[0037] 2-1 Seasonal trend decomposition module includes seasonal decomposition block and trend decomposition block.

[0038] Specifically, the seasonal decomposition block decomposes the input sequence into Fourier bases by Fourier transform and selects the first

[0039]

[0040]

[0041]

[0042] where FFT and IFT are Fourier transform and inverse Fourier transform, respectively; is the frequency domain representation; is the first is the i-th pooling kernel.

[0043] 2-2 Bidirectional encoder layer is composed of two forward sequence fully connected layers and two reverse fully connected layers.

[0044] Specifically, as shown in Figure 4 , first, the seasonal and trend features are operated in reverse , and the forward and reverse data are transmitted to different fully connected networks for processing to obtain feature representations, as follows: ,

[0045] ,

[0046] where , , and are fully connected layers, , are feature representations of forward and reverse sequences, respectively.

[0047] Then, the processed data are spliced to obtain joint feature representation , ; a small fully connected network is used to map the spliced features to obtain scores of the two branches, as follows: ​​ ,

[0048] where, , are the forward and reverse scores corresponding to the seasonal and trend components respectively.

[0049] Secondly, the scores are normalized to probabilities using the Softmax function, obtaining adaptive weights:

[0050]

[0051] where, , , , are the adaptive weights.

[0052] Finally, the adaptive weights are used to weight and sum the forward and reverse features, obtaining the fused feature representation and as follows:

[0053]

[0054] where, denotes element-wise multiplication.

[0055] Step S3, a multi-layer dual-domain memory library network of the hydrogen energy industry chain micro-service anomaly detection model is built. The multi-layer dual-domain memory library network is composed of C-layer dual-domain memory modules, denoted as , C is the number of hydrogen energy industry chain links, and the dual-domain memory module is composed of a seasonal memory library and a trend memory library. Each dual-domain memory module in the dual-domain memory module contains N memory items. The zth dual-domain memory module uses N memory items to store N data prototype features of the zth hydrogen energy industry chain link. The memory module can be divided into reading and updating processes. In the reading stage, the memory items are read from the memory library to synthesize the reconstructed features. In the updating stage, the degree of memory module update is calculated according to the specified memory module through the features from different industry chain links, and the memory module is trained and updated. At the same time, the memory module and the sensor number from which the data come are recorded, and the memory module is updated accordingly. Specifically, 3-1 Reading stage In the reading stage, as shown in Figure 5 , the Softmax function is used to calculate the seasonal feature and the trend feature of the ith data corresponding to the kth memory item in the memory module.Similarity weight of and : ,

[0056] wherein, is the temperature coefficient.

[0057] Then, the memory items are aggregated by weighting with the corresponding probability, and the retrieved reconstructed feature is obtained: ,

[0058] The original feature is spliced with the reconstructed feature along the feature dimension, and the updated reconstructed feature is obtained: [ ].

[0059] 3-2 Update phase In the update phase, as shown in Figure 6 , first, the residual error between the reconstructed feature and the original feature is calculated: ,

[0060] Then, the memory attention weight is obtained by applying the Softmax function to the dot product of each memory item and the residual error: ,

[0061] Secondly, the residual feature is dynamically analyzed by a learnable gating mechanism, and the residual strength injected into each memory item is automatically adjusted, so that the dual-domain memory module determines the optimal update amplitude of different memory items in a data-driven manner: ,

[0062] wherein, and are learnable parameter matrices, is a Sigmoid function, and are update amplitudes.

[0063] Finally, based on the residual error, the memory attention weight and the optimal update amplitude, the data prototype feature (i.e. the memory item) stored in each dual-domain memory module is updated, and the update formula is as follows: ,​

[0064] Step S4, build a decoder network of the hydrogen energy industry chain microservice anomaly detection model; As Figure 7 shown, the decoder network is composed of two fully connected layers, a normalization layer and a GELU activation function, and the reconstructed features in the dual-domain memory module After the decoder network, the reconstructed data , can be expressed as:

[0065] Where FC is the fully connected layer, and Norm is the normalization layer.

[0066] Step S5, connect the feature extractor network, the multi-layer dual-domain memory bank network and the decoder network in turn to form the hydrogen energy industry chain microservice anomaly detection model, and use the training set to train the hydrogen energy industry chain microservice anomaly detection model.

[0067] In the training process, the optimizer is Adam, the initial sliding window length of the sensor data is 100, and the training is performed for 50 rounds, with 256 groups of data in each batch.

[0068] The reconstruction loss of the model in the training process And the memory bank entropy loss , is used to optimize the reconstruction of the model to the data, is used to make the memory module more sparse and reduce the reconstruction of abnormal data, And can be represented by the following formula:

[0069]

[0070] Where, is a hyperparameter that controls the importance of the entropy term, L is the window length, represents the logarithm with base e, and N represents the number of memory items in the memory module, represents the data of the i-th point in the original data.

[0071] The total loss is calculated by the formula .

[0072] Step S6, encapsulate the trained hydrogen energy industry chain microservice anomaly detection model as an independent microservice unit, and each microservice is responsible for anomaly detection tasks of a specific industry chain link. Detect the anomalies of the sensors in each link of the hydrogen energy industry chain and give early warnings. The trained model is packaged as an independent micro-service unit, and each micro-service is responsible for anomaly detection tasks of a specific industry chain link. The containerization technology such as Docker is used to package the service, and the micro-service framework is combined to realize elastic scaling and automatic load balancing. All micro-services are registered through a service registration center and accessed through a service gateway. Link tracking and log aggregation are also supported to facilitate operation and fault diagnosis.

[0073] Further, the trained hydrogen energy industry chain micro-service anomaly detection model is saved, and then the optimal weight is integrated into an inference script, which is responsible for performing the anomaly detection task of the model.

[0074] Further, in the inference process, the anomaly score is defined as a triple loss:

[0075] In the formula, represents the input sequence, represents the reconstructed sequence, is a hyperparameter that controls the importance of the reconstruction loss. This loss not only captures the global distance between the input and the reconstruction, but also considers the degree of feature matching of the trend and seasonal patterns in the reconstruction, thereby ensuring that the reconstruction error remains low in the normal mode, while the reconstruction error will significantly increase when there is an anomaly in the data.

[0076] The final is compared with the threshold parameter σ to detect anomalies.

[0077] Further, when the model detects an anomaly, it will print an alarm message and provide information on the source of the anomaly predicted by the model, including the link and sensor number in the hydrogen energy industry chain.

[0078] The method provided in this embodiment has the following advantages: By designing a rule chain early warning, data preprocessing and early warning are achieved. It performs preliminary screening on the data collected by each link sensor before the data enters the subsequent anomaly detection model, so as to discover abnormal conditions that deviate from the normal range as soon as possible.

[0079] By designing a feature extractor, periodic and trend features are extracted using a seasonal trend decomposition module, and multi-directional feature fusion is performed using a bidirectional encoder layer to obtain a more robust representation.

[0080] By designing a multi-layer dual-domain memory module, a special memory module is set for each industry chain link, long-term dependencies are captured through the reading and updating process of the memory items, and the memory bank is continuously optimized through dynamic residual injection.

[0081] The residual update mechanism is designed to realize accurate update of the memory item through residual calculation, attention weight and gate mechanism, and improve the capturing ability of the model to subtle changes in data.

[0082] By designing the reconstruction and entropy loss function, the reconstruction loss and memory bank entropy loss are combined, so that the model not only maintains low reconstruction error under normal data, but also significantly increases the error when abnormal data appears, thereby realizing accurate anomaly detection.

[0083] Embodiment 2 In an embodiment of the present application, a rule chain-based hydrogen energy industry chain microservice anomaly detection system is provided, which uses a rule chain of a microservice architecture to perform anomaly detection on time series data collected from different hydrogen energy industry chain links. The rule chain includes five nodes, and the specific operation of each node is defined as a module, including: The acquisition module is configured to acquire time series data of different hydrogen energy industry chain links. The preprocessing module is configured to preliminarily investigate the time series data and perform early warning on data that does not conform to the rules. The anomaly detection module is configured to perform anomaly detection on the preprocessed time series data to obtain an anomaly score. The rule judgment module is configured to compare the anomaly score with a preset threshold to obtain a final detection result. The feedback module is configured to display the detection result on a terminal. The anomaly detection module is internally refined into a plurality of anomaly detection sub-modules for different hydrogen energy industry chain links, and the anomaly detection sub-modules are independent microservice units encapsulating trained anomaly detection models. Each microservice unit is responsible for anomaly detection tasks for a specific industry chain link. The anomaly detection model sets up a special memory module for each industry chain link through a multi-layer double-domain memory bank, captures long-term dependencies through the memory item reading and updating process, and continuously optimizes the memory bank through dynamic residual injection.

[0084] Embodiment 3 In an embodiment of the present application, a computer program product is provided, which includes a computer program that, when executed by a processor, implements the rule chain-based hydrogen energy industry chain microservice anomaly detection method.

[0085] Embodiment 4 In an embodiment of the present application, a non-transitory computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement the rule chain-based hydrogen energy industry chain microservice anomaly detection method.

[0086] Embodiment 5 In one embodiment of the present application, an electronic device is provided, comprising: a processor, a memory and a computer program; wherein the processor is connected with the memory, and the computer program is stored in the memory; when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes the rule chain-based hydrogen energy industry chain micro-service anomaly detection method.

[0087] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowcharts and / or block diagrams.

[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are executed on the computer or other programmable data processing apparatus to generate a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 a step that implements the functions specified in the flowcharts and / or block diagrams.

[0089] Although the specific embodiments of the present application are described above with reference to the accompanying drawings, the present application is not limited to the scope of the above description. Those skilled in the art should understand that various modifications or variations made on the basis of the technical solutions of the present application without creative labor are still within the scope of protection of the present application.

Claims

1. A rule chain based hydrogen energy industry chain microservice anomaly detection method, characterized in that, The rule chain using the micro-service architecture is used for anomaly detection on time series data collected from different hydrogen energy industry chain links, and the rule chain includes five nodes, and the specific operation of each node is as follows: At the collection node, time series data of different hydrogen energy industry chain links is collected; At the preprocessing node, the time series data is initially investigated, and early warning is performed on the data that does not meet the rules; At the anomaly detection node, anomaly detection is performed on the preprocessed time series data to obtain an anomaly score; At the rule judgment node, the anomaly score is compared with a preset threshold to obtain a final detection result; At the feedback node, the detection result is displayed on the terminal. The anomaly detection node is internally refined into a plurality of anomaly detection sub-modules for different hydrogen energy industry chain links, and each anomaly detection sub-module is an independent micro-service unit encapsulating a trained anomaly detection model, each micro-service unit is responsible for anomaly detection of a specific industry chain link, and the anomaly detection model sets a special memory module for each industry chain link through a multi-layer dual-domain memory library, captures long-term dependencies through memory item reading and updating processes, and continuously optimizes the memory library through dynamic residual injection.

2. The rule chain-based hydrogen energy industry chain microservice anomaly detection method of claim 1, wherein, The anomaly detection model is connected in sequence by a feature extractor network, a multi-layer dual-domain memory library network, and a decoder network. The feature extractor network is used to extract seasonal features and trend features from time series data, the multi-layer dual-domain memory library network is used to capture long-term dependencies and enhance seasonal features and trend features, and the decoder network is used to decode the reconstructed features into reconstructed data.

3. The rule chain-based hydrogen industry chain microservice anomaly detection method of claim 2, wherein, The specific operation of the feature extractor network is as follows: First, the initial seasonal features and trend features are extracted from the input data through a seasonal trend decomposition module, then the initial seasonal features and trend features are input into a bidirectional encoder layer for bidirectional encoding, and finally the bidirectional encoded seasonal features and trend features are input into a normalization layer to obtain the final seasonal features and trend features.

4. The rule chain-based hydrogen industry chain microservice anomaly detection method of claim 2, wherein, The multi-layer dual-domain memory library network is composed of C-layer dual-domain memory modules, C is the number of hydrogen energy industry chain links, and data prototype features are used as memory items, each dual-domain memory module stores data prototype features corresponding to a hydrogen energy industry chain link, and the processing steps of the input seasonal features and trend features are as follows: The similarity weight of the seasonal features and the trend features with the data prototype features stored in the corresponding memory module is calculated respectively; The data prototype features are weighted and aggregated using the similarity weight to obtain reconstructed seasonal features and trend features, and the seasonal features and trend features are enhanced by concatenating the reconstructed features with the original features; The enhanced seasonal features and trend features are concatenated along the feature dimension to obtain the final reconstructed features.

5. The rule chain-based hydrogen industry chain microservice anomaly detection method of claim 2, wherein, The memory library is continuously optimized through dynamic residual injection, specifically as follows: First, the residual between the reconstructed features and the original features is calculated; Then, the dot product of each memory item and the residual is applied to the Softmax function to obtain the memory attention weight. Secondly, through the learnable gating mechanism, the residual characteristics are dynamically analyzed, and the residual strength injected into each memory item is automatically adjusted to determine the optimal update amplitude of different memory items in a data-driven manner. Finally, based on the residual, memory attention weight and optimal update amplitude, the data prototype features stored in each dual-domain memory module are updated.

6. The rule chain-based hydrogen industry chain microservice anomaly detection method of claim 2, wherein, The anomaly score is defined as a triplet loss, and when there is an anomaly in the data, the reconstruction error will significantly increase, which can be expressed by the formula: wherein denotes the inputted time-series data, denotes the reconstructed data outputted by the decoder network, is a hyper-parameter controlling the importance of the reconstruction loss.

7. A rule chain-based hydrogen energy industry chain microservice anomaly detection system, characterized in that, The rule chain based on the micro-service architecture is used for anomaly detection of time series data collected from different hydrogen energy industry chain links. The rule chain includes five nodes, and the specific operation of each node is defined as a module, including: The collection module is configured to collect time series data of different hydrogen energy industry chain links. The preprocessing module is configured to initially investigate the time series data and prewarn the data that does not meet the rules. The anomaly detection module is configured to perform anomaly detection on the preprocessed time series data to obtain an anomaly score. The rule judgment module is configured to compare the anomaly score with a preset threshold to obtain a final detection result. The feedback module is configured to display the detection result on the terminal. The anomaly detection module is internally refined into a plurality of anomaly detection sub-modules for different hydrogen energy industry chain links from a link shunt node, the anomaly detection sub-module encapsulates the trained anomaly detection model as an independent micro-service unit, each micro-service unit is responsible for the anomaly detection task of a specific industry chain link, the anomaly detection model sets a special memory module for each industry chain link through a multi-layer dual-domain memory library, captures long-term dependencies through the memory item reading and updating process, and continuously optimizes the memory library through dynamic residual injection.

8. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the hydrogen energy industry chain micro-service anomaly detection method based on the rule chain in any one of claims 1-6.

9. A non-transitory computer-readable storage medium, comprising: The non-transitory computer readable storage medium is used to store computer instructions, which are executed by the processor to realize the hydrogen energy industry chain micro-service anomaly detection method based on the rule chain in any one of claims 1-6.

10. An electronic device, comprising: It includes: The processor, the memory and the computer program; wherein the processor is connected with the memory, and the computer program is stored in the memory; when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes the hydrogen energy industry chain micro-service anomaly detection method based on the rule chain in any one of claims 1-6.