A method for identifying cross-scene hazard migration based on large model latent space mapping
By constructing a large-scale latent space mapping model and a cross-scenario feature alignment model, the problems of low accuracy and poor adaptability in hazard identification under different scenarios are solved. Effective alignment of cross-scenario features and real-time hazard warning are achieved, improving identification accuracy and adaptability, and reducing maintenance costs.
Patent Information
- Application Number
- CN202511641209.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-11-11
AI Technical Summary
Existing technologies for hazard identification in different scenarios lack cross-scenario feature alignment methods, resulting in low identification accuracy, difficulty in adapting to data changes, increased maintenance costs and workload, and inability to efficiently extract time series features and fuse cross-scenario features, affecting the timeliness and accuracy of hazard warnings.
By collecting data from multiple scenarios, standardizing the format and filtering out noise, a large model latent space mapping module is constructed to generate latent vectors of scene features. Based on the cross-scene feature alignment model, feature distribution differences are aligned, a hazard migration identification model is trained to predict the probability of hazard existence, and the model parameters are updated regularly. Combined with scene-level hazard identification thresholds, early warnings are triggered.
It achieves effective alignment of features across scenarios, improves the accuracy and adaptability of hazard identification, enhances the generalization ability of the model, ensures the scientific nature and timeliness of early warning, and reduces maintenance costs.
Smart Images

Figure CN121093168B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of large model latent space mapping technology, specifically to a method for cross-scene hazard migration identification based on large model latent space mapping. Background Technology
[0002] In many fields such as industrial control, traffic management, and energy dispatch, hazard identification is crucial. However, existing technologies face numerous challenges. Historical hazard data and normal operation data vary in format across different scenarios and contain significant noise, making effective data utilization difficult. Traditional hazard identification methods often rely on large amounts of labeled data for specific scenarios. When applying the model to new scenarios, the significant differences in data distribution between different scenarios result in insufficient model transferability, making it difficult to accurately identify hazards in new scenarios.
[0003] Existing methods lack effective alignment techniques for cross-scene features, failing to fully utilize common features across different scenes, resulting in low recognition accuracy. Furthermore, as scene data updates over time, traditional methods struggle to adapt to these changes in real time, requiring frequent model retraining and increasing maintenance costs and workload.
[0004] Existing technologies, when processing real-time data, cannot efficiently extract time-series features and fuse them with cross-scenario features, thus affecting the timeliness and accuracy of hazard warnings. Therefore, there is an urgent need for a method that can effectively process multi-scenario data, achieve cross-scenario feature transfer, and improve the accuracy and adaptability of hazard identification. Summary of the Invention
[0005] The purpose of this invention is to provide a method for identifying cross-scene hazard migration based on large model latent space mapping, so as to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, this invention provides a method for identifying cross-scene hazard migration based on large model latent space mapping, the method comprising:
[0007] Historical hazard data and normal operation data from various scenarios were collected, and the two types of data were processed for format unification and noise filtering to obtain a standardized scenario dataset.
[0008] A large model latent space mapping module is constructed to map the hidden danger features and operation features in the standardized scene dataset to the latent space of the pre-trained large model, generating scene feature latent vectors.
[0009] A cross-scene feature alignment model is constructed based on scene feature latent vectors. By aligning the distribution differences of latent vectors in different scenes, a unified feature representation across scenes is obtained.
[0010] Train a hazard migration identification model, using a unified feature representation across scenarios and real-time data of the target scenario as input data, and the probability of hazard existence as output data, to predict the probability of hazard existence in the current operation of the target scenario;
[0011] Based on the probability distribution of historical hazard data in the target scenario, the scenario-level hazard identification threshold is calculated. Combining the probability of hazard existence in the current operation of the target scenario with the scenario-level hazard identification threshold, it is determined whether a hazard warning is triggered, and the parameters of the cross-scenario feature alignment model are updated regularly.
[0012] Preferably, the specific method for collecting historical hazard data and normal operation data under multiple scenarios, and performing format unification and noise filtering on the two types of data to obtain a standardized scenario dataset is as follows:
[0013] From the information systems of three scenarios—industrial control, traffic management, and energy dispatch—timestamps, equipment status, and operation instruction fields are extracted from historical hazard data, as well as environmental parameters, process records, and feedback information fields from normal operation data.
[0014] The extracted fields are standardized in terms of units and missing values are filled. The sliding window method is used to filter out abnormal fluctuations in the time series data. The processed hidden danger data and normal operation data are stored as structured tables respectively, and then merged to obtain a standardized scenario dataset.
[0015] Preferably, the method for constructing the large model latent space mapping module to map the hazard features and operational features in the standardized scene dataset to the latent space of the pre-trained large model and generate scene feature latent vectors is as follows:
[0016] A pre-trained language model is selected as the basic large model, and a feature embedding layer is added to the model input layer to convert the structured fields in the standardized scene dataset into word vector form;
[0017] A latent space extractor is set in the intermediate layer of the model. The output of the intermediate layer is mapped to a latent space of fixed dimension through a fully connected layer. The hidden danger features and operation features are encoded respectively to obtain the hidden vectors of hidden danger features and operation features in the corresponding scenarios.
[0018] Preferably, the specific method for constructing a cross-scene feature alignment model based on scene feature latent vectors, and obtaining a unified feature representation across scenes by aligning the distribution differences of latent vectors from different scenes, is as follows:
[0019] Assign a domain label to each scenario, and use the latent vectors of hidden danger features and the latent vectors of operational features as input to construct an adversarial network that includes a domain discriminator and a feature aligner.
[0020] The domain discriminator is used to determine the scene domain to which the input latent vector belongs, and the feature aligner is used to adjust the distribution of the latent vector so that the latent vectors of different scene domains overlap in the feature space.
[0021] By minimizing the classification loss of the domain discriminator and maximizing the alignment loss of the feature aligner, the parameters of the cross-scene feature alignment model are optimized to obtain a unified feature representation across scenes.
[0022] Preferably, the specific method for training the hazard migration identification model, using a unified feature representation across scenarios and real-time data of the target scenario as input data, and the probability of hazard existence as output data, to predict the probability of hazard existence in the current operation of the target scenario is as follows:
[0023] Collect historical hazard data and normal operation data of the target scenario, extract their cross-scenario unified feature representation, label the hazard data with the hazard existence label, and label the normal operation data with the hazard non-hazard label, and construct a training sample set;
[0024] The unified feature representation across scenarios is concatenated with the time series features of real-time data of the target scenario as input. The hazard transfer identification model is trained using a binary classification cross-entropy loss function. The training objective is to accurately predict the hazard existence label. The model training is completed when the loss function converges.
[0025] For the current operation in the target scenario, extract its cross-scenario unified feature representation and real-time time series features as input data, and output the probability of the existence of potential risks in this operation.
[0026] Preferably, the specific method for calculating the scene-level hazard identification threshold based on the probability distribution of historical hazard data in the target scene, and combining the probability of hazard existence in the current operation of the target scene with the scene-level hazard identification threshold to determine whether to trigger a hazard warning is as follows:
[0027] After inputting historical hazard data of the target scene into the hazard migration identification model, the probability of hazard existence output is statistically analyzed, and the cumulative distribution function of the probability value is calculated.
[0028] The probability value corresponding to the 95th percentile in the cumulative distribution function is selected as the threshold for scene-level hazard identification;
[0029] If the probability of a potential hazard in the current operation of the target scenario is greater than the scenario-level hazard identification threshold, a hazard warning will be triggered; otherwise, it will be marked as a normal operation.
[0030] Preferably, the specific method for periodically updating the cross-scene feature alignment model parameters is as follows:
[0031] At fixed time intervals, new hidden danger data and normal operation data from each scenario are collected, and the data are re-formatted and noise filtered to generate an updated standardized scenario dataset.
[0032] The cross-scene feature alignment model was retrained using an updated standardized scene dataset. The parameters of the domain discriminator and feature aligner were adjusted through incremental learning to maintain the alignment effect of latent vector distributions in different scenes.
[0033] Preferably, the method for processing the real-time data of the target scene is as follows:
[0034] The operation data collected in real time in the target scene is divided into time windows. The mean, variance, and maximum value in each time window are extracted as time series features. The time series features are then concatenated with the cross-scene unified feature representation to obtain the model input data.
[0035] Preferably, the method for constructing the feature embedding layer is as follows:
[0036] For numerical fields in the standardized scenario dataset, a linear transformation is used to map them to the 0-1 range; for textual fields, the term frequency-inverse document frequency algorithm is used to extract keyword vectors; the numerical mapping results are concatenated with the text keyword vectors as input data for the feature embedding layer, and a fixed-dimensional feature embedding vector is output through a fully connected layer.
[0037] Preferably, the specific process for triggering the hazard warning is as follows:
[0038] When the probability of a potential hazard in the current operation of the target scenario exceeds the scenario-level hazard identification threshold, an early warning message is generated that includes the operation time, device identifier, and probability of hazard.
[0039] The warning information is sent to the corresponding scenario management terminal and recorded in the hazard log database. The log content includes the warning time, warning level and related operation data.
[0040] Compared with the prior art, the beneficial effects of the present invention are:
[0041] This invention collects historical hazard data and normal operation data from multiple scenarios, and performs format standardization and noise filtering to obtain a standardized scenario dataset. This ensures consistency and reliability of data across different scenarios, providing a high-quality data foundation for subsequent feature extraction and model training. A large-scale model latent space mapping module is constructed to map the hazard features and operation features from the standardized scenario dataset to the latent space of a pre-trained large model, generating scenario feature latent vectors. This allows for the extraction of deep-level feature representations from the data, enhancing the expressive power of the features.
[0042] A cross-scene feature alignment model is constructed based on scene feature latent vectors. By aligning the distribution differences of latent vectors across different scenes, a unified feature representation across scenes is obtained, effectively solving the problem of inconsistent feature distributions between different scenes and enabling the model to perform effective knowledge transfer between different scenes. A hazard transfer identification model is trained using the unified cross-scene feature representation and real-time data of the target scene as input data. This model can accurately predict the probability of hazard existence during the current operation in the target scene, improving the accuracy and generalization ability of hazard identification. A scene-level hazard identification threshold is calculated based on the probability distribution of historical hazard data in the target scene, and this threshold is used to determine whether to trigger a hazard warning, making the warning mechanism more scientific and reasonable, and enabling dynamic adjustments based on the characteristics of different scenes.
[0043] Regularly updating the parameters of the cross-scene feature alignment model, through collecting new data and incremental learning, enables the model to continuously adapt to data changes, maintaining good performance and accuracy. Dividing real-time data of the target scene into time windows and extracting time-series features, then concatenating them with a unified feature representation across scenes, fully utilizes the temporal information in the real-time data, improving the model's ability to identify potential real-time operational hazards. The feature embedding layer construction method processes different types of fields, effectively converting numerical and textual fields into feature embedding vectors, improving data representation capabilities. The specific process for triggering hazard warnings generates detailed warning information and ensures timely transmission and recording, facilitating processing and traceability at the scene management terminal. Attached Figure Description
[0044] Figure 1 This is a schematic diagram illustrating the working principle of the cross-scene hazard migration identification method based on large model latent space mapping described in this invention.
[0045] Figure 2 A flowchart for building a standardized scenario dataset;
[0046] Figure 3 A flowchart for the latent space mapping of a large model;
[0047] Figure 4 A flowchart for building a cross-scene feature alignment model. Detailed Implementation
[0048] 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 only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] Please see Figures 1-4This invention provides a method for identifying cross-scene hazard migration based on large model latent space mapping. The specific implementation steps are as follows:
[0050] Historical hazard data and normal operation data from various scenarios were collected. Both types of data underwent format standardization and noise filtering to obtain a standardized scenario dataset. From information systems in three scenarios—industrial control, traffic management, and energy dispatch—timestamps, equipment status, and operation instructions were extracted from historical hazard data, while environmental parameters, process records, and feedback information fields were extracted from normal operation data. The extracted fields were then standardized in units and missing value imputation was performed. Anomalies in the time series data were filtered using a sliding window method. The processed hazard data and normal operation data were stored separately in structured tables and then merged to obtain the standardized scenario dataset.
[0051] A large-scale latent space mapping module is constructed to map the hazard features and operational features in the standardized scene dataset to the latent space of the pre-trained large model, generating scene feature latent vectors. A pre-trained language model is selected as the base large model, and a feature embedding layer is added to the model input layer to convert the structured fields in the standardized scene dataset into word vectors. For numerical fields in the standardized scene dataset, a linear transformation is used to map them to the 0-1 interval; for textual fields, a term frequency-inverse document frequency algorithm is used to extract keyword vectors. The numerical mapping result is concatenated with the textual keyword vectors as input data for the feature embedding layer, which outputs a fixed-dimensional feature embedding vector through a fully connected layer. A latent space extractor is set in the intermediate layer of the model, and the output of the intermediate layer is mapped to a fixed-dimensional latent space through a fully connected layer to encode the hazard features and operational features respectively, obtaining the hazard feature latent vectors and operational feature latent vectors for the corresponding scenarios.
[0052] A cross-scene feature alignment model is constructed based on scene feature latent vectors. By aligning the distribution differences of latent vectors across different scenes, a unified feature representation across scenes is obtained. A domain label is assigned to each scene. Hidden vectors of potential hazards and operational features are used as input to construct an adversarial network containing a domain discriminator and a feature aligner. The domain discriminator determines the scene domain to which the input latent vector belongs, while the feature aligner adjusts the distribution of latent vectors so that the latent vectors of different scene domains overlap in the feature space. By minimizing the classification loss of the domain discriminator and maximizing the alignment loss of the feature aligner, the parameters of the cross-scene feature alignment model are optimized, resulting in a unified feature representation across scenes.
[0053] A hazard migration identification model is trained, using a cross-scene unified feature representation and real-time data of the target scene as input data, and the probability of hazard existence as output data, to predict the probability of hazard existence in the current operation of the target scene. Historical hazard data and normal operation data of the target scene are collected, and their cross-scene unified feature representations are extracted. Hazard data is labeled as hazard existence, and normal operation data is labeled as no hazard, constructing a training sample set. The time series features of the cross-scene unified feature representation and the real-time data of the target scene are concatenated as input, and a binary classification cross-entropy loss function is used to train the hazard migration identification model, with the accurate prediction of hazard existence labels as the training objective. Model training is complete when the loss function converges. For the current operation of the target scene, its cross-scene unified feature representation and real-time time series features are extracted as input data, and the probability of hazard existence for this operation is output. The processing method for the real-time data of the target scene is as follows: the real-time collected operation data of the target scene is divided into time windows, and the mean, variance, and maximum value within each time window are extracted as time series features. The time series features are concatenated with the cross-scene unified feature representation to obtain the model input data.
[0054] Based on the probability distribution of historical hazard data for the target scenario, a scenario-level hazard identification threshold is calculated. Combining the probability of hazard existence during the current operation in the target scenario with the scenario-level hazard identification threshold, it is determined whether a hazard warning should be triggered, and the parameters of the cross-scenario feature alignment model are updated periodically. The probability of hazard existence output after inputting historical hazard data from the target scenario into the hazard migration identification model is statistically analyzed, and the cumulative distribution function of the probability values is calculated. The probability value corresponding to the 95th quantile in the cumulative distribution function is selected as the scenario-level hazard identification threshold. If the probability of hazard existence during the current operation in the target scenario is greater than the scenario-level hazard identification threshold, a hazard warning is triggered; otherwise, it is marked as normal operation. The specific process for triggering a hazard warning is as follows: When the probability of hazard existence during the current operation in the target scenario is greater than the scenario-level hazard identification threshold, a warning message containing the operation time, device identifier, and hazard probability is generated and sent to the corresponding scenario management terminal. Simultaneously, the warning message is recorded in the hazard log database, with the log content including the warning time, warning level, and associated operation data. The specific method for regularly updating the parameters of the cross-scene feature alignment model is as follows: at fixed time intervals, collect newly added hidden danger data and normal operation data for each scene, re-process them with format unification and noise filtering, generate an updated standardized scene dataset, retrain the cross-scene feature alignment model using the updated standardized scene dataset, and adjust the parameters of the domain discriminator and feature aligner through incremental learning to maintain the alignment effect of the latent vector distribution of different scenes.
[0055] Example 1:
[0056] When constructing the latent space mapping module of a large model, it is necessary to first determine the selection of the base model. Here, a pre-trained language model is chosen as the base. The reason for choosing a pre-trained language model is that it has powerful feature extraction and representation capabilities, which can provide a good foundation for subsequent latent space mapping.
[0057] A feature embedding layer is added to the model input layer. This layer transforms the structured fields in the standardized scene dataset into word vectors suitable for model processing. Since the standardized scene dataset contains different types of fields, different processing methods are required for different types of fields.
[0058] For numerical fields, considering that different numerical fields may have different units and value ranges, directly inputting them into the model might affect the model's training and performance. Therefore, a linear transformation method is used to map them to the 0-1 interval. Specifically, the linear transformation process involves determining the maximum and minimum values of the numerical field, and then transforming each value according to a certain linear formula so that the transformed value falls between 0 and 1. This achieves a uniform numerical range, avoids problems caused by different units, and allows the model to process these numerical data more effectively.
[0059] For text-based fields, since text information is unstructured and cannot be directly processed by the model, it needs to be converted into a computable vector form. Here, the term frequency-inverse document frequency (TNF) algorithm is used to extract keyword vectors. The basic principle of the TNF algorithm is to measure the importance of each word by calculating its frequency of occurrence in a document and its inverse document frequency in the entire corpus, thereby extracting keyword vectors that represent the text content. In practice, the text-based field is first preprocessed by word segmentation and stop word removal. Then, the term frequency and inverse document frequency of each word are calculated. Finally, these weights are combined with the word vectors to obtain the keyword vector representation of the text-based field.
[0060] After processing the numerical and textual fields separately, their results need to be concatenated. This involves concatenating the results of mapping the numerical fields to the 0-1 range with the keyword vectors extracted from the textual fields using the term frequency-inverse document frequency (IF-IVF) algorithm, forming the input data for the feature embedding layer. The purpose of this concatenation is to integrate different types of feature information, allowing the model to consider both numerical and textual features simultaneously.
[0061] These concatenated input data need to be processed by fully connected layers. The role of fully connected layers is to perform linear transformations and non-linear activations on the input data, thereby outputting fixed-dimensional feature embedding vectors. Through the processing of fully connected layers, the input data can be mapped to a fixed-dimensional space, so that different types of fields have the same dimension after processing, which facilitates subsequent model processing and feature extraction.
[0062] A latent space extractor is set in the intermediate layer of the model. This extractor maps the output of the intermediate layer to a latent space of fixed dimension. The latent space extractor implements this mapping process through fully connected layers. The fully connected layers further transform and fuse the output of the intermediate layers, and then map it to the latent space of the specified dimension.
[0063] During the latent space extractor process, hazard features and operational features need to be encoded separately. For hazard features, the latent space extractor maps them from the original feature space to the latent space, obtaining hazard feature latent vectors. Similarly, for operational features, the same processing flow is used to obtain operational feature latent vectors. In this way, hazard features and operational features in the standardized scene dataset are mapped to the latent space of the pre-trained large model, generating corresponding scene feature latent vectors.
[0064] Through the series of processing steps described above, from selecting the basic large model to constructing the input layer feature embedding layer, and then to setting and processing the intermediate latent space extractor, the process of mapping features from the standardized scene dataset to the latent space of the pre-trained large model is finally completed. These generated scene feature latent vectors contain key information from the original data and exist in a vector form suitable for further model processing and analysis, providing an important foundation for the subsequent construction of cross-scene feature alignment models and the implementation of the entire cross-scene hazard transfer identification method.
[0065] Example 2:
[0066] When constructing a cross-scene feature alignment model based on scene feature latent vectors, a domain label is assigned to each scene. The purpose of the domain label is to identify different scenes so that the feature vectors of different scenes can be distinguished in subsequent model processing. For example, for the three scenarios of industrial control, traffic management, and energy dispatch, different domain labels can be assigned, such as "domain 1", "domain 2", and "domain 3", so that the scene to which each feature vector belongs can be clearly identified during model processing.
[0067] Using the latent feature vectors and operational feature vectors previously generated by the large model latent space mapping module as input, an adversarial network containing a domain discriminator and a feature aligner is constructed. The structure of this adversarial network is designed to align the distribution of feature vectors from different scenarios, enabling cross-scenario features to be represented in a unified space.
[0068] In adversarial networks, the domain discriminator plays the role of determining the context domain to which an input latent vector belongs. Its working principle involves receiving the input latent vector, analyzing and processing it through its internal network structure, and then outputting the probability that the latent vector belongs to each context domain. For example, given an input latent vector, the domain discriminator calculates the probability that it belongs to the industrial control context domain, the traffic management context domain, and the energy dispatch context domain, ultimately determining which context domain the latent vector is most likely to belong to. The goal of the domain discriminator is to determine the context domain to which the input latent vector belongs as accurately as possible, thereby improving the context domain classification ability.
[0069] The role of the feature aligner differs from that of the domain discriminator; it primarily adjusts the distribution of latent vectors. Its core objective is to maximize the overlap of latent vector distributions from different scene domains in the feature space. In other words, regardless of the scene from which the latent vectors originate, their distributions in the feature space should be as similar as possible after processing by the feature aligner, thus achieving cross-scene feature unification. The feature aligner transforms and adjusts the latent vectors, altering their position and distribution in the feature space to achieve overlap with the distributions of latent vectors from other scenes.
[0070] During the training of adversarial networks, it is necessary to simultaneously optimize the parameters of the domain discriminator and the feature aligner, which is achieved by adjusting the loss functions of both. Specifically, the classification loss of the domain discriminator should be minimized while the alignment loss of the feature aligner should be maximized.
[0071] The classification loss of the domain discriminator is calculated based on its accuracy in identifying the scene domain of the input latent vector. If the domain discriminator accurately identifies the scene domain to which the latent vector belongs, the classification loss will be small; conversely, if it misidentifies, the classification loss will be large. Therefore, minimizing the classification loss encourages the domain discriminator to continuously improve its accuracy in identifying the scene domain.
[0072] The alignment loss of the feature aligner measures the degree of overlap in the latent vector distributions across different scenarios. A higher degree of overlap results in a larger alignment loss, while a lower degree of overlap results in a smaller alignment loss. Therefore, by maximizing the alignment loss, the feature aligner can better adjust the distribution of latent vectors, making the distributions of latent vectors in different scenarios closer, thus achieving the goal of feature alignment.
[0073] In actual training, these two optimization objectives are in conflict. The domain discriminator strives to improve its ability to identify scene domains, while the feature aligner tries to make the latent vector distributions of different scenes indistinguishable, thereby deceiving the domain discriminator. This adversarial process drives both to continuously optimize, eventually reaching a balance.
[0074] As the adversarial network is continuously trained, the classification loss of the domain discriminator and the alignment loss of the feature aligner gradually stabilize. At this point, the parameters of the cross-scene feature alignment model can be considered optimized. The model optimized in this way can map the latent vectors of different scenes into a unified feature space, resulting in a unified feature representation across scenes.
[0075] This unified feature representation across different scenarios plays a crucial role, enabling features from various scenarios to be compared and processed within the same space. For example, in subsequent hazard migration identification models, regardless of the data's origin, this unified feature representation can be used as input to the model, thereby achieving the migration identification of hazards from different scenarios. The entire process of building a cross-scenario feature alignment model, from assigning domain labels to constructing adversarial networks and then adjusting model parameters by optimizing the loss function, is closely interconnected, working together to achieve the alignment and unified representation of features from different scenarios. This provides a vital guarantee for the effectiveness of the entire cross-scenario hazard migration identification method.
[0076] Example 3:
[0077] When training the hazard migration identification model, it is first necessary to collect historical hazard data and normal operation data of the target scenario. The source of this data is the information system of the target scenario. The historical hazard data records the hazard situations that have occurred in the scenario, while the normal operation data reflects the operational status of the scenario during normal operation.
[0078] After collecting the data, it is necessary to extract a unified feature representation across scenarios. This unified feature representation is obtained through processing the previously constructed cross-scenario feature alignment model. It maps data from different scenarios to a unified feature space, making the data from the target scenario comparable to data from other scenarios. The process of extracting the unified feature representation involves inputting historical hazard data and normal operation data from the target scenario into the cross-scenario feature alignment model to obtain the corresponding feature representations.
[0079] Next, this data needs to be labeled. Historical hazard data is labeled as hazard present, and normal operation data is labeled as hazard-free. The purpose of labeling is to build a training sample set, allowing the model to learn the differences in data features between hazard-present and hazard-free scenarios. When building the training sample set, the extracted cross-scenario unified feature representations are combined with the corresponding labels to form training samples, which will be used for subsequent model training.
[0080] When processing real-time data from a target scenario, it is necessary to divide the real-time collected operational data into time windows. The division of time windows is determined based on the actual application scenario and data characteristics; for example, windows can be divided according to time units such as seconds or minutes. Each time window contains the operational data within that time period. By analyzing the data within each time window, time-series features that reflect the operational characteristics within that time period can be extracted.
[0081] For the operational data within each time window, the mean, variance, and maximum value need to be extracted as time series features. The mean reflects the average level of the data within that time window, the variance reflects the degree of data fluctuation, and the maximum value represents the largest value within that time period. These features can describe the characteristics of the operational data within the time window from different perspectives, providing more information for the model.
[0082] After extracting the time-series features, it is necessary to perform dimensional concatenation with these time-series features using a unified feature representation across different scenarios. This dimensional concatenation involves linking the unified feature representation across scenarios and the time-series features in a specific order to form a new feature vector. The purpose of this is to fuse the unified features across scenarios with the real-time time-series features of the target scenario, allowing the model to consider both aspects of information simultaneously, thereby more accurately predicting the probability of potential hazards.
[0083] After preparing the input data, a hazard transfer detection model is trained using a binary cross-entropy loss function. The binary cross-entropy loss function is suitable for binary classification problems and can measure the difference between the model's prediction and the actual label. During training, the model's goal is to accurately predict the hazard label, that is, based on the input feature vector, determine whether the operation is a hazard or a normal operation.
[0084] During training, the model parameters are continuously adjusted to gradually decrease the value of the binary classification cross-entropy loss function. When the loss function converges, it indicates that the model has learned the feature patterns in the data well, and the model training can be considered complete. The criterion for judging the convergence of the loss function is that the value of the loss function no longer decreases significantly within a certain number of iterations, or the decrease is less than a preset threshold.
[0085] For the current operation in the target scene, the input data needs to be extracted using the same processing method as the training data. That is, firstly, a cross-scene unified feature representation of the operation is extracted, then the real-time collected operation data is divided into time windows, and the mean, variance, and maximum value within each time window are extracted as time series features. Finally, the cross-scene unified feature representation and the time series features are concatenated dimensionally to obtain the input data for the model.
[0086] The input data is fed into a trained hazard transfer identification model. The model processes and analyzes the input data, outputting the probability of a hazard existing in the operation. This probability value reflects the model's judgment on the likelihood of a hazard existing in the operation; the higher the probability value, the greater the likelihood of a hazard existing in the operation.
[0087] Through the above series of steps—from data collection, feature extraction, data labeling, input data processing, model training, to final probability prediction—the training and application of the hazard migration identification model were achieved. The entire process strictly followed the established procedures, with each step having its specific processing methods and objectives, ensuring that the model could accurately predict the probability of hazard presence in the current operation of the target scenario. This training and prediction method effectively utilizes cross-scenario feature information, combined with real-time data from the target scenario, to achieve hazard migration identification, providing crucial protection for the safe operation of the target scenario. This implementation method allows the model to work well in different target scenarios, improving the accuracy and reliability of hazard identification.
[0088] Example 4:
[0089] When calculating the scene-level hazard identification threshold and determining whether to trigger a hazard warning based on historical hazard data of the target scene, the historical hazard data of the target scene needs to be input into the pre-trained hazard migration identification model. The historical hazard data contains information related to previously recorded operations with potential hazards in the scene. After processing this data, the model outputs the probability of hazard existence for each operation.
[0090] The probability of all potential hazards output by the model is statistically analyzed, and the cumulative distribution function (CDF) of these probability values is calculated. The cumulative distribution function describes the probability that a random variable is less than or equal to a certain value. Here, it can be understood that for any given probability value p, CDF(p) represents the proportion of historical data where the probability of a potential hazard is less than or equal to p.
[0091] After obtaining the cumulative distribution function, the probability value corresponding to the 95th quantile needs to be selected as the scene-level hazard identification threshold. A quantile is a numerical value divided into several equal parts after sorting a set of data from smallest to largest. The 95th quantile represents the probability that a value is less than or equal to the threshold, and the remaining 5% probability that a value is greater than the threshold. This can be expressed by the formula:
[0092] ;
[0093] in, The cumulative distribution function represents the probability of the existence of a potential hazard. The formula is its inverse function, where 0.95 represents the probability level of the 95th percentile. The meaning of this formula is to find the probability value that makes the cumulative probability reach 95% by using the inverse function of the cumulative distribution function; this value is the scene-level hazard identification threshold.
[0094] After determining the threshold, the probability of a potential hazard in the current operation of the target scenario is compared with the threshold. If the probability of a potential hazard in the current operation is greater than the scenario-level hazard identification threshold, a hazard warning is triggered; if it is less than or equal to the threshold, it is marked as a normal operation.
[0095] The specific process for triggering a hazard warning is as follows: When the probability of a hazard occurring during the current operation exceeds a threshold, the system generates a warning message containing the operation time, equipment identifier, and hazard probability. The operation time records the specific moment the hazard occurred, the equipment identifier identifies the equipment involved, and the hazard probability reflects the likelihood of the hazard.
[0096] After generating an early warning message, it needs to be sent to the corresponding scenario management terminal. The scenario management terminal is a device or system responsible for receiving and processing early warning messages. Relevant personnel can use this terminal to obtain information about potential hazards in a timely manner so that appropriate measures can be taken.
[0097] Warning information is also recorded in the hazard log database. The log content includes the warning time, warning level, and related operation data. The warning time is consistent with the time of the generated operation, used for time sorting and querying of the logs; the warning level can be determined based on the probability of the hazard or other preset rules, used to distinguish the severity of the hazard; the related operation data contains specific operation information related to the warning, facilitating subsequent hazard tracing and analysis.
[0098] Throughout the process, from inputting historical data to outputting probabilities from the model, and then to calculating the cumulative distribution function and determining the threshold, each step is based on statistical analysis of the data and the model's prediction results. The threshold is selected using the 95th percentile, which comprehensively considers the accuracy and timeliness of hazard warnings, minimizing missed reports while avoiding excessive false alarms. The process of generating, sending, and recording warning information ensures that hazards can be detected and addressed promptly, while providing complete data records for subsequent safety management and hazard analysis.
[0099] Example 5:
[0100] When periodically updating the parameters of the cross-scenario feature alignment model, a fixed time period needs to be determined. This time period can be set according to the actual application scenario and the frequency of data updates, such as daily, weekly, or monthly. Taking weekly updates as an example, the system will automatically trigger the parameter update process when the set time period is reached.
[0101] Within each time period, new potential hazard data and normal operation data will be generated in each scenario. Taking the industrial control scenario as an example, within this week, potential hazard data caused by new equipment failures may be recorded, while a large amount of normal operation data will also be collected; in the traffic management scenario, potential hazard data caused by new traffic violations may be generated, as well as operation data under normal traffic flow; in the energy dispatch scenario, potential hazard data caused by new energy allocation anomalies may be generated, as well as operation data during normal dispatch.
[0102] After collecting newly added hazard data and normal operation data from various scenarios, it is necessary to standardize the format and filter noise from this new data. For newly added hazard data in industrial control scenarios, fields such as timestamps, equipment status, and operation instructions need to be extracted. For normal operation data, fields such as environmental parameters, process records, and feedback information need to be extracted. Similarly, for newly added data in traffic management scenarios, fields such as timestamps, equipment status (e.g., vehicle status), and operation instructions (e.g., traffic signal control instructions) need to be extracted. For normal operation data, fields such as environmental parameters (e.g., weather conditions), process records (e.g., vehicle passage records), and feedback information (e.g., traffic flow feedback) need to be extracted. The same applies to energy dispatch scenarios, where the corresponding fields are extracted.
[0103] After extracting the fields, the units of these fields are standardized. For example, in industrial control scenarios, the temperature values of equipment status may be in degrees Celsius or degrees Fahrenheit, and need to be uniformly converted to degrees Celsius; in traffic management scenarios, vehicle speeds may be in both kilometers per hour and meters per second, and need to be uniformly converted to kilometers per hour; in energy dispatch scenarios, energy quantities may be in units such as kilowatt-hours and megawatt-hours, and need to be uniformly converted to kilowatt-hours.
[0104] Missing values are filled in. For missing timestamp fields in industrial control scenarios, forward filling can be used, filling with the timestamp of the previous time point; for missing equipment status fields, they can be filled based on the historical average status value of the equipment. For missing environmental parameter fields in traffic management scenarios, such as missing weather conditions, they can be filled by referring to the weather conditions of nearby monitoring points during the same time period. For missing operation instruction fields in energy dispatching scenarios, they can be filled reasonably based on the logic of preceding and following operation instructions.
[0105] The sliding window method is used to filter out abnormal fluctuations in time series data. Taking the current value time series of equipment status in an industrial control scenario as an example, a sliding window is set to a size of 5 time points. The mean and standard deviation of the data within the window are calculated. When the current value at a certain time point exceeds the range of the mean plus or minus 3 times the standard deviation, that point is considered an abnormal fluctuation point, and the value at that point is replaced with the mean of the data within the window. The same method is used to filter out abnormal fluctuations in time series data of vehicle flow in traffic management scenarios and time series data of energy allocation in energy dispatching scenarios.
[0106] After the above processing, the processed hazard data and normal operation data are stored as structured tables, and then merged to obtain the updated standardized scenario dataset. For example, the structured table for the industrial control scenario includes columns such as timestamp, equipment status, and operation instructions, while the tables for the traffic management and energy dispatch scenarios also include their respective columns. The merged standardized scenario dataset contains all the data from the three scenarios.
[0107] The cross-scene feature alignment model was retrained using an updated, standardized scene dataset. During retraining, incremental learning was employed to adjust the parameters of the domain discriminator and feature aligner. Incremental learning refers to training the model using new data based on existing model parameters, rather than training the model from scratch.
[0108] For the domain discriminator, the original model was already able to discriminate the latent vectors of three scenarios: industrial control, traffic management, and energy dispatch. During incremental learning, the updated standardized scenario dataset is input into the domain discriminator. The domain discriminator will discriminate the scenario domain of the new data, and then adjust its internal parameters based on the difference between the discrimination result and the actual scenario domain to improve its ability to discriminate the scenario domain of the new data.
[0109] The role of the feature aligner is to adjust the distribution of latent vectors so that the distributions of latent vectors in different scenarios overlap. During incremental learning, new data is processed by the latent space mapping module of the large model to generate new latent vectors for potential hazards and operational features. These new latent vectors are input into the feature aligner, which adjusts its parameters according to the distribution of the new latent vectors, making the distribution of the new latent vectors more overlapping with the original latent vector distribution.
[0110] Through this incremental learning approach, the parameters of the domain discriminator and feature aligner are continuously adjusted, enabling the cross-scenario feature alignment model to adapt to the characteristics of newly added data and maintain the alignment effect of latent vector distributions across different scenarios. For example, when a new type of equipment hazard emerges in an industrial control scenario, its corresponding latent vector distribution differs from the previous one. Through incremental learning, the feature aligner adjusts its parameters so that this new latent vector distribution can overlap well with the latent vector distributions of other scenarios, and the domain discriminator can accurately determine the industrial control scenario domain to which the new latent vector belongs.
[0111] The implementation of regularly updating cross-scenario feature alignment model parameters allows the model to continuously absorb new data information and adapt to changes and developments in the scenario over time. When equipment is updated, operating procedures change, or new types of hazards emerge in various scenarios, timely collection of new data and updating of model parameters ensures that the model maintains good cross-scenario feature alignment capabilities, thereby guaranteeing the effectiveness and accuracy of the entire cross-scenario hazard migration identification method. For example, in a traffic management scenario, new traffic equipment is introduced, generating data features different from before. By regularly updating model parameters, the model can learn these new features in a timely manner. When performing cross-scenario hazard identification, it can accurately align and process the data from the new equipment with data from other scenarios, avoiding hazard identification errors caused by the model's inability to adapt to new data.
[0112] It should be noted that, in this document, relational terms such as "first" and "second" are used only 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 process, method, article, or apparatus.
[0113] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for cross-scene hazard migration identification based on large model latent space mapping, characterized in that, The application relates to a method for realizing cross-scene hidden danger identification. The method comprises the following steps: Collecting historical hidden danger data and normal operation data in multiple scenes, and performing format unification and noise filtering on the two types of data to obtain a standardized scene data set; Constructing a large model hidden space mapping module, mapping hidden danger features and operation features in the standardized scene data set to a hidden space of a pre-trained large model, and generating scene feature hidden vectors; Based on the scene feature hidden vectors, a cross-scene feature alignment model is constructed, and by aligning the distribution differences of hidden vectors in different scenes, a cross-scene unified feature representation is obtained; A hidden danger migration identification model is trained, and the cross-scene unified feature representation and real-time data of a target scene are used as input data, and the hidden danger existence probability is used as output data to predict the hidden danger existence probability of the current operation of the target scene; According to the probability distribution of the historical hidden danger data of the target scene, a scene-level hidden danger identification threshold is calculated, and the hidden danger existence probability of the current operation of the target scene and the scene-level hidden danger identification threshold are combined to determine whether to trigger a hidden danger warning, and the parameters of the cross-scene feature alignment model are updated regularly; The specific method of training the hidden danger migration identification model, using the cross-scene unified feature representation and real-time data of the target scene as input data, and using the hidden danger existence probability as output data to predict the hidden danger existence probability of the current operation of the target scene is as follows: Collecting historical hidden danger data and normal operation data of the target scene, extracting the cross-scene unified feature representation, marking the hidden danger data with a hidden danger existence label, marking the normal operation data with a no-hidden-danger label, and constructing a training sample set; The cross-scene unified feature representation and the time sequence features of the real-time data of the target scene are spliced as input, and a binary classification cross-entropy loss function is used to train the hidden danger migration identification model, and the hidden danger existence label is accurately predicted as the training target, and the model training is completed when the loss function converges; 2. The large model latent space mapping based cross-scene hazard migration identification method of claim 1, wherein, For the current operation of the target scene, the cross-scene unified feature representation and the real-time time sequence features are extracted as input data, and the hidden danger existence probability of the operation is output. The specific method of collecting historical hidden danger data and normal operation data in multiple scenes, and performing format unification and noise filtering on the two types of data to obtain a standardized scene data set is as follows: From the information systems of the three scenes of industrial control, traffic management and energy scheduling, the time stamp, device state and operation instruction fields in the historical hidden danger data and the environment parameter, process record and feedback information fields in the normal operation data are extracted; 3. The method of claim 2, wherein the method further comprises: The extracted fields are subjected to unit unification and missing value filling, and the sliding window method is used to filter abnormal fluctuation points in the time sequence data, and the processed hidden danger data and normal operation data are stored as structured tables, and the standardized scene data set is obtained by merging. The specific method of constructing a large model hidden space mapping module, mapping hidden danger features and operation features in the standardized scene data set to a hidden space of a pre-trained large model, and generating scene feature hidden vectors is as follows: A pre-trained language model is selected as a basic large model, a feature embedding layer is added to the model input layer, and the structured fields in the standardized scene data set are converted into word vector form; An intermediate layer of the model is provided with a hidden space extractor, and the output of the intermediate layer is mapped to a fixed-dimensional hidden space through a fully connected layer to encode the hidden danger features and operation features respectively to obtain hidden danger feature vectors and operation feature vectors in the corresponding scene.
4. The method of claim 3, wherein the method further comprises: The specific method for constructing the cross-scene feature alignment model based on the scene feature hidden vectors is to align the distribution differences of hidden vectors in different scenes to obtain a unified cross-scene feature representation. A domain label is assigned to each scene, and the hidden danger feature vectors and operation feature vectors are taken as inputs to construct an adversarial network comprising a domain discriminator and a feature aligner. The domain discriminator is used to determine the scene domain to which the input hidden vector belongs, and the feature aligner is used to adjust the distribution of the hidden vector so that the hidden vectors in different scene domains overlap in the feature space. By minimizing the classification loss of the domain discriminator and maximizing the alignment loss of the feature aligner, the parameters of the cross-scene feature alignment model are optimized to obtain a unified cross-scene feature representation.
5. The large model latent space mapping based cross-scenario hazard migration identification method of claim 1, wherein, The specific method for calculating the scene-level hidden danger identification threshold according to the probability distribution of the historical hidden danger data of the target scene is to combine the hidden danger probability of the current operation of the target scene with the scene-level hidden danger identification threshold to determine whether to trigger a hidden danger warning. The hidden danger probability output by the hidden danger migration identification model after inputting the historical hidden danger data of the target scene is counted to calculate the cumulative distribution function of the probability value. The probability value corresponding to the 95% quantile in the cumulative distribution function is selected as the scene-level hidden danger identification threshold. If the hidden danger probability of the current operation of the target scene is greater than the scene-level hidden danger identification threshold, a hidden danger warning is triggered, otherwise it is marked as normal operation.
6. The large model latent space mapping based cross-scene hazard migration identification method of claim 5, wherein, The specific method for periodically updating the parameters of the cross-scene feature alignment model is as follows: Every fixed time period, collect the newly added hidden danger data and normal operation data of each scene, reformat and filter the noise to generate an updated standardized scene data set. Use the updated standardized scene data set to retrain the cross-scene feature alignment model, and adjust the parameters of the domain discriminator and the feature aligner through incremental learning to maintain the alignment effect of the hidden vectors in different scenes.
7. The large model latent space mapping based cross-scenario hazard migration identification method of claim 1, wherein, The processing method of the real-time data of the target scene is as follows: Divide the operation data collected in real time into time windows, extract the mean, variance and maximum value in each time window as time series features, and concatenate the time series features with the cross-scene unified feature representation to obtain the model input data.
8. The method of claim 3, wherein the method further comprises: The construction method of the feature embedding layer is as follows: For numerical fields in the standardized scene data set, use linear transformation to map them to the 0-1 interval; for text fields, use the term frequency-inverse document frequency algorithm to extract keyword vectors; concatenate the numerical mapping results and text keyword vectors as input data of the feature embedding layer, and output fixed-dimensional feature embedding vectors through a fully connected layer.
9. The large model latent space mapping based cross-scene hazard migration identification method of claim 5, wherein, The specific process of triggering a hidden danger warning is as follows: When the hidden danger probability of the current operation of the target scene is greater than the scene-level hidden danger identification threshold, generate warning information containing the operation time, device identifier and hidden danger probability. The early warning information is sent to a corresponding scene management terminal, and is recorded to a hidden danger log database, and the log content includes early warning time, early warning level and associated operation data.
Citation Information
Patent Citations
Cross-scene wireless gesture recognition method based on unsupervised learning
CN119202932A