An abnormal event reasoning method based on multi-source data fusion, medium and equipment
By constructing metadata vectors and spatial distribution features for scene enhancement and weighted fusion, a high-dimensional abnormal event feature vector is generated. A lightweight student model is trained using knowledge distillation, which solves the problem of high-precision, low-latency real-time reasoning of abnormal events under multi-source heterogeneous data, and improves detection accuracy and efficiency.
Patent Information
- Application Number
- CN202611686886.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-29
- Publication Date
- 2026-11-27
AI Technical Summary
Under complex conditions where the quality of multi-source heterogeneous data varies and edge computing resources are limited, existing technologies struggle to achieve high-precision, low-latency real-time reasoning for anomalies. Traditional multi-source data fusion methods suffer from noise and redundant information, and lightweight models suffer severe accuracy loss, failing to meet edge requirements.
By constructing metadata vectors and spatial distribution features, scene enhancement and weighted fusion are performed to generate high-dimensional abnormal event feature vectors. Knowledge distillation is then used to train a lightweight student model, enabling adaptive knowledge transfer and efficient edge reasoning.
It improves the accuracy and efficiency of abnormal event detection, solves the problems of multi-source data modal semantic conflict and poor scenario adaptability, and realizes high-precision, low-latency real-time prediction of abnormal events.
Smart Images

Figure CN123179137A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to an anomaly event reasoning method, medium, and device based on multi-source data fusion. Background Technology
[0002] With the rapid development of the Internet of Things (IoT) and multi-sensor fusion technologies, anomaly detection based on multi-source sensor data has become one of the core methods in urban management and industrial operations and maintenance. Taking traffic management as an example, in practical applications, various data sources such as roadside unit monitoring cameras, law enforcement recorders, radar speedometers, geomagnetic sensors, connected vehicle reporting systems, and electronic tickets are widely deployed, providing rich heterogeneous data support for anomaly detection. Similarly, in scenarios such as industrial equipment monitoring, public safety monitoring, and environmental monitoring, there is also a need for the fusion of multi-source heterogeneous data and anomaly inference.
[0003] However, different data sources exhibit significant differences in sampling frequency, data format, semantic representation, and reliability. Traditional multi-source data fusion methods typically employ fixed-rule time alignment strategies or simple feature concatenation, failing to adequately consider temporal misalignment, physical rationality, and modal semantic conflicts between different data sources. This leads to the introduction of substantial noise and redundant information into the fused features, severely impacting the accuracy of anomaly detection. Furthermore, while existing technologies such as the Transformer-based spatiotemporal fusion model and diffusion-based anomaly detection methods demonstrate excellent detection accuracy, their large parameter count and numerous inference steps make them difficult to deploy directly on resource-constrained edge computing devices, necessitating knowledge distillation for model compression. However, existing model distillation methods often employ fixed distillation temperatures and uniform loss weights, ignoring the impact of differences in the quality of different data sources and variations in anomaly distribution density across different spatial regions on knowledge transfer. This results in significant accuracy loss in the compressed, lightweight model, failing to meet the dual requirements of high accuracy and low latency at the edge.
[0004] Therefore, how to achieve high-precision, low-latency real-time reasoning of abnormal events under complex conditions such as uneven quality of multi-source heterogeneous data and limited computing resources at the edge has become an urgent technical problem to be solved. Summary of the Invention
[0005] To address the aforementioned technical problems, the present invention provides an anomaly event reasoning method based on multi-source data fusion, which includes the following steps:
[0006] S1. Based on the original data and spatial location information corresponding to each data source, obtain the metadata vector, modality-independent features and spatial distribution features corresponding to each data source. The metadata vector is used to characterize the data quality and scene attributes of the corresponding data source. Different data sources correspond to different modal data.
[0007] S2, based on the real-time scene context, perform scene enhancement and weighted fusion on the modal independent features to generate the first abnormal event feature vector, where the real-time scene context includes the time information, spatial information and meteorological environment information of the current scene.
[0008] S3, fuse the first abnormal event feature vector and the spatial distribution feature to generate a second abnormal event feature vector, wherein the dimension of the second abnormal event feature vector is greater than the dimension of the first abnormal event feature vector.
[0009] S4. Input the second abnormal event feature vector into the lightweight student model to obtain the occurrence probability of various abnormal events. The lightweight student model is a model that is pre-trained based on metadata vectors and spatial distribution features through knowledge distillation.
[0010] S5 generates abnormal early warning information based on the probability of occurrence.
[0011] The present invention also provides a non-transitory computer-readable storage medium storing at least one instruction or at least one program, wherein the at least one instruction or at least one program is loaded and executed by a processor to implement the above-described method for anomaly event reasoning based on multi-source data fusion.
[0012] The present invention also provides an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0013] This invention has at least the following beneficial effects: By constructing metadata vectors corresponding to each data source to quantitatively represent data quality and scene attributes, and using metadata vectors and spatial distribution features to train a lightweight student model through knowledge distillation, the distillation training process can adaptively transfer knowledge based on the quality differences and spatial anomaly distributions of each data source, overcoming the shortcomings of traditional fixed-parameter distillation strategies in multi-source heterogeneous data scenarios, such as poor adaptability and low knowledge transfer efficiency; by performing scene enhancement and weighted fusion on modal independent features through real-time scene context, a first abnormal event feature vector with fused temporal dynamics and multi-modal semantic consistency is generated, solving the problems of multi-source data modal semantic conflict and poor scene adaptability, thus improving... The system enhances the representation capabilities of anomalous event features in complex scenarios. By fusing the first anomalous event feature vector with spatial distribution features, a second anomalous event feature vector with higher dimensionality is generated. This further incorporates spatial distribution density information on top of the fusion of temporal semantic information, improving the spatial accuracy of anomalous events. By inputting the second anomalous event feature vector into a lightweight student model pre-trained using knowledge distillation based on metadata vectors and spatial distribution features, the model achieves low-latency inference at the edge while maintaining high detection accuracy. This resolves the contradiction between the large number of parameters and high inference latency of traditional deep learning models and the limited resources of edge devices, enabling high-precision, low-latency real-time prediction of anomalous events. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart of an abnormal event reasoning method based on multi-source data fusion provided in Embodiment 1 of the present invention. Detailed Implementation
[0016] 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.
[0017] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is understood that, where appropriate, the terms used to distinguish similar objects can be interchanged so that the invention can also be implemented in other embodiments besides the illustrated or described embodiments. Furthermore, the terms "including," "having," and any variations are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0018] Example 1
[0019] This first embodiment provides an anomaly event reasoning method based on multi-source data fusion, such as... Figure 1 As shown, this anomaly event reasoning method based on multi-source data fusion includes the following steps:
[0020] S1. Based on the original data and spatial location information corresponding to each data source, obtain the metadata vector, modality-independent features and spatial distribution features corresponding to each data source.
[0021] The data source is the source device or recording medium that provides raw data within the target monitoring area.
[0022] In one possible implementation, when the target monitoring area is an industrial equipment monitoring area, the data sources include vibration sensors, temperature sensors, pressure sensors, acoustic signature collectors, and equipment control system logs, corresponding to vibration signal modal data, temperature time-series data, pressure time-series data, acoustic signature modal data, and equipment status text log data, respectively. In another possible implementation, when the target monitoring area is a public safety monitoring area, the data sources include fixed cameras, mobile patrol terminals, access control systems, fire alarms, and a public information collection platform, corresponding to video surveillance modal data, mobile terminal reported data, access control record text data, alarm signal data, and public information text data, respectively.
[0023] Specifically, this embodiment takes the target monitoring area as the traffic monitoring area as an example. The data sources include traffic management departments, video surveillance, vehicles, and sensors. Correspondingly, the raw data from traffic management departments comes from electronic ticket data, including text modal data such as violation records, accident records, and penalty information; the raw data from video surveillance comes from recorder video data and roadside unit monitoring data, including visual modal data such as on-site video footage, road monitoring videos, and traffic flow images; the raw data reported by vehicles comes from connected vehicle alarm data, including text modal data such as vehicle abnormal status reports, emergency braking alarm records, and collision warning records; and the raw data from sensors comes from geomagnetic sensor detection data and radar speed measurement data, including kinematic time-series modal data such as vehicle speed, headway, and lane occupancy time.
[0024] Spatial location information refers to the latitude and longitude coordinates corresponding to the sampling points of each data source, used to map multi-source data to a unified spatial grid. For example, in traffic monitoring scenarios, electronic ticket data corresponds to the latitude and longitude fields of the incident location in the ticket record; dashcam video data corresponds to the shooting location coordinates recorded by the dashcam's built-in GPS module; surveillance data corresponds to the fixed latitude and longitude coordinates of the roadside unit deployment location; data reported by connected vehicles corresponds to the real-time latitude and longitude reported by the vehicle's onboard GPS / BeiDou positioning system; geomagnetic sensor detection data corresponds to the fixed latitude and longitude coordinates of the sensor deployment location; and radar speed measurement data corresponds to the fixed latitude and longitude coordinates of the radar equipment deployment location. It is understandable that in other application scenarios, spatial location information may correspond to other coordinate forms representing the spatial location of the sampling points of each data source, and no specific limitations are imposed on this.
[0025] To address the heterogeneity of multi-source raw data in terms of data format, sampling frequency, semantic representation, and spatial scale, this embodiment extracts multi-dimensional information on quality and scene attributes from each data source, constructing standardized metadata vectors to provide a data source-level quantitative benchmark for subsequent differentiated processing. Furthermore, a dedicated feature extractor is employed based on the modality type of each data source to extract independent feature vectors that retain the original semantics of each modality, avoiding information loss before cross-modal fusion. The spatial location information of each data source is mapped to a unified grid, and standardized spatial distribution features are generated through potential energy density field modeling and entropy-penalized attention mechanisms, achieving spatial-dimensional information aggregation.
[0026] The metadata vector characterizes the data quality and scenario attributes of the corresponding data source, including at least a data integrity score, signal-to-noise ratio (SNR), historical confidence score, and temporal, spatial, and environmental embedding codes. The data integrity score is a completeness indicator quantified based on the imputation rate of missing values in the data source; a lower imputation rate results in a higher score, reflecting the data completeness of the data source. The SNR is the power ratio of the preprocessed signal to the noise, used to quantify the denoising effect and reflect the purity and reliability of the data source. The historical confidence score is a reliability indicator based on prior knowledge of the application scenario and historical statistical data, reflecting the historical adaptability reliability of the data source under different scenarios. Temporal embedding codes are vector representations encoded based on the time periods of events such as peak hours, off-peak hours, and nighttime, giving the metadata vector a time-scene awareness capability. Spatial embedding codes are vector representations encoded based on the geographical locations of events such as intersections, road segments, and areas, giving the metadata vector a spatial scene awareness capability. Environmental embedding codes are vector representations encoded based on meteorological conditions such as sunny days, rainy days, and foggy days, giving the metadata vector an environmental scene awareness capability. It is understood that the specific classification of the above-mentioned codes is only an exemplary implementation method to further illustrate this embodiment. Those skilled in the art can make adaptive adjustments to the above-mentioned code categories according to actual application scenarios, and no specific limitations are made thereto.
[0027] Modality-independent features are the original feature vectors extracted by dedicated feature extractors for each data source in its respective modality, preserving the unique semantic information of each modality.
[0028] Spatial distribution characteristics are a set of spatial dimension features composed of the standardized grid density of each grid and the spatial entropy attention weight.
[0029] Different data sources correspond to different modalities of data.
[0030] In one specific embodiment, S1 includes the following steps:
[0031] S11. Extract multidimensional attribute information from the original data of each data source. The multidimensional attribute information includes at least data integrity score, signal-to-noise ratio, historical confidence, and time embedding encoding, spatial embedding encoding, and environmental embedding encoding.
[0032] S12, construct a fixed-dimensional metadata vector based on multi-dimensional attribute information.
[0033] S13. Based on the modality type of each data source, use the corresponding feature extractor to extract the corresponding modality-independent features.
[0034] S14, map the spatial location information of each data source to the preset spatial grid cell.
[0035] S15. Construct a spatial potential energy density field based on the number of data sources and confidence weights in each grid of the preset spatial grid unit.
[0036] S16 performs a normalized mapping of the spatial potential energy density field to obtain the standardized grid density corresponding to each grid.
[0037] S17, calculate the information entropy corresponding to each grid, and generate the spatial entropy attention weight corresponding to each grid based on the normalized grid density and information entropy. The information entropy is used to quantify the disorder of the data distribution within the grid. The lower the normalized grid density or the higher the information entropy, the lower the spatial entropy attention weight corresponding to the grid.
[0038] S18, based on the standardized grid density and spatial entropy attention weight of each grid, constitutes the spatial distribution characteristics.
[0039] Specifically, the event occurrence time, geographical location, and meteorological conditions corresponding to each data source are converted into fixed-dimensional embedding vectors, resulting in corresponding time embedding codes, spatial embedding codes, and environmental embedding codes. Those skilled in the art will recognize that any existing embedding coding algorithm falls within the scope of this invention; for example, the one-hot encoding algorithm, which will not be elaborated upon here.
[0040] Furthermore, the three scalar values of data integrity score, signal-to-noise ratio, and historical confidence are concatenated with three embedding vectors of time embedding encoding, spatial embedding encoding, and environment embedding encoding to form a unified fixed-dimensional vector, which serves as the metadata vector of the data source.
[0041] Modality type refers to the signal form or data format category of the data source. In this embodiment, it includes text modality, visual modality, and kinematic temporal modality. Different modalities have completely different information structures: video data is a sequence of pixel matrices, radar data is a time-series signal, and text data is a sequence of discrete symbols. A single feature extractor cannot adapt to all modalities; therefore, this embodiment designs a dedicated extraction architecture for each modality. Specifically, in the traffic monitoring scenario, text modality data uses a BERT pre-trained language encoder to extract semantic information and event attribute features of abnormal events; visual modality data uses a ResNet convolutional neural network to extract visual semantic features such as traffic scene appearance, vehicle trajectory, and congestion status; kinematic temporal modality data uses kinematic statistical methods to extract traffic kinematic features such as vehicle speed, acceleration, headway, and traffic density. The dimensions of the independent features for each modality vary depending on the data source type. Those skilled in the art will recognize that the BERT pre-trained language encoder, ResNet convolutional neural network, and kinematic statistical methods in the prior art all fall within the protection scope of this invention, and will not be elaborated upon here.
[0042] It is understood that the feature extractor types corresponding to each of the above modes are only one exemplary implementation of this embodiment. Those skilled in the art can select the corresponding feature extractor according to the characteristics of different modal data in actual application scenarios. For example, in the scenario of industrial equipment monitoring, the vibration signal mode can be extracted using wavelet packet transform or fast Fourier transform to extract time-frequency domain features, and the acoustic text mode can be extracted using Mel frequency cepstral coefficients. This invention does not limit the specific feature extractor type used for each mode.
[0043] The preset spatial grid unit is a regular grid that evenly divides the target monitoring area according to a preset latitude and longitude step size. It can provide a unified spatial reference for multi-source heterogeneous data and standardize and align spatial positions.
[0044] Since discrete grid statistics suffer from boundary abrupt changes and sparse data failure, this embodiment introduces the theory of gravitational potential energy field and uses an anisotropic Gaussian kernel to achieve smooth radiation of spatial information, so that the influence of each data point spreads to its neighboring grid and forms a continuous spatial density field.
[0045] Specifically, the potential energy density values of each grid are smoothed using an anisotropic Gaussian kernel to obtain the potential energy density value at grid (u,v): Where ρ(u,v) is the potential energy density value at grid (u,v), representing the superposition density of the influence of all surrounding data sources at that grid location. A higher potential energy density value indicates a higher degree of anomalous aggregation in that area; u is the row index, v is the column index, and i is the i-th data source sampling point, i=1,2,...,N, where N is the total number of sampling points from all data sources. , where is the confidence weight for the i-th data source sampling point, used to differentiate the contribution of different data sources, and can be preset based on prior information such as data source type and historical reliability; (u i ,v i ) represents the grid index coordinates mapped from the i-th data source sampling point; The dynamic adaptive variance is used to control the radiation range of the Gaussian kernel. It is adjusted in real time according to the local data distribution density, and a larger value is taken in sparse areas to expand the radiation range, while a smaller value is taken in dense areas to maintain fine focus. exp() is an exponential function used to convert distance values into weight values between 0 and 1. The closer the distance, the closer the weight is to 1, and the farther the distance, the closer the weight is to 0.
[0046] The continuous spatial potential energy density values covering the entire target monitoring area are obtained by traversal, and the potential energy density values are converted into standardized grid density values with stable value range, such as the 0-1 interval, through global normalization mapping, so as to realize the comparability and controllability of density parameters under different scenarios and different data volumes.
[0047] Furthermore, since high-density areas may contain a large amount of noisy data from a single conflicting mode, while low-density areas may contain reliable signals consistently confirmed by multiple modes, the data quality in a region cannot be judged solely by the quantity of data. This embodiment introduces information entropy to quantify the degree of disorder among data categories within the grid. Correspondingly, a higher entropy value indicates a more uniform proportion of data in each category and a lower signal reliability, while a lower entropy value indicates that a certain category is dominant and a higher signal reliability.
[0048] Specifically, firstly, the information entropy of the data source category distribution within each grid is calculated, and then the spatial entropy attention weight β is calculated based on the standardized grid density and information entropy. u,v =Softmax(MLP(PosEnc(u,v))×(1-tanh(H(u,v)))), where β u,v The spatial entropy attention weight at grid (u,v) represents the importance of this grid in subsequent feature fusion and distillation training; PosEnc(u,v) is the position encoding vector corresponding to grid (u,v), obtained by mapping the grid's coordinate position to a fixed-dimensional vector representation, used to preserve the relative positional relationship between grids; MLP() is a multilayer perceptron network used to perform nonlinear mapping on the position encoding vector, generating an intermediate representation containing spatial position priors, and outputting a vector with a dimension of 1 or matching the dimension of the attention weights; H(u,v) is the information entropy corresponding to grid (u,v); 1-tanh(H(u,v)) is the entropy suppression coefficient, which is the suppression factor after nonlinear transformation of the information entropy; Softmax is a normalization function used to normalize the original attention scores of all grids, so that the sum of the spatial entropy attention weights of all grids is 1, which facilitates the relative comparison of weights between different grids.
[0049] The above methods utilize metadata vectors to quantify the data quality and scene attributes of each data source, suppressing the interference of low-quality data on model performance during training. A modality-corresponding feature extractor is used to extract modality-independent features, avoiding information loss in multimodal scenarios compared to a unified feature extractor. Spatial grid mapping and potential energy density field construction enable a smooth representation from discrete spatial points to a continuous density field, overcoming the shortcomings of boundary abrupt changes and sparse data information loss in traditional discrete grid statistics. By introducing information entropy calculation and fusing standardized grid density to generate spatial entropy attention weights, high-entropy cluttered regions are automatically downweighted while low-entropy pure regions are automatically upweighted, effectively suppressing the interference of multimodal conflict noise in the spatial dimension and improving the signal-to-noise ratio of the spatial representation of abnormally clustered regions.
[0050] S2, based on the real-time scene context, performs scene enhancement and weighted fusion on the modal independent features to generate the first abnormal event feature vector.
[0051] The real-time scene context includes the time information, spatial information, and meteorological environment information of the current scene. Correspondingly, in the traffic monitoring scenario, the time information includes the time period of the event, such as morning rush hour, off-peak hour, nighttime, and holidays, which is used to encode the time context and enable the features to have time period perception capabilities; the spatial information includes the road type and spatial location information of the event, such as highways, urban arterial roads, intersections, and ramps, which is used to encode the road spatial context and enable the features to have road type perception capabilities; the meteorological environment information includes the current weather conditions, such as sunny, rainy, snowy, and foggy, which is used to encode the meteorological context and enable the features to have meteorological perception capabilities.
[0052] The first abnormal event feature vector is a comprehensive feature representation that integrates temporal dynamics and multimodal semantic consistency.
[0053] In one specific embodiment, S2 includes the following steps:
[0054] S21, the time information, spatial information and meteorological environment information of the current scene are encoded and fused to obtain the global context vector.
[0055] S22, the scaling factor and bias factor are generated by the conditional multilayer perceptron based on the global context vector.
[0056] S23, perform affine transformation on each modal independent feature according to the scaling factor and the bias factor to obtain the scene-enhanced modal features corresponding to each modal independent feature.
[0057] S24. Calculate the semantic conflict degree between any two scene-enhanced modal features, and construct modality fusion attention weights based on the semantic conflict degree. The modality fusion attention weights are negatively correlated with the semantic conflict degree.
[0058] S25. Based on the modality fusion attention weight, all scene-enhanced modal features are weighted and summed to obtain the fused multi-source representation features.
[0059] S26, perform nonlinear transformation on the multi-source representation features to generate the first abnormal event feature vector.
[0060] Among these, temporal information, spatial information, and meteorological environmental information have different semantic spaces. Temporal information is periodic, spatial information is topological, and meteorological environmental information is categorical. They need to be encoded separately into a unified vector space before fusion. Specifically, temporal information is periodically encoded, such as by using sine / cosine functions to map time periods to vectors or using category embedding encoding; spatial information is encoded using location encoding or learnable embedding layers; and meteorological environmental information is encoded using category embedding. Then, the three types of encoded vectors are concatenated to obtain a global context vector with a unified dimension.
[0061] The global context is fed into the Conditional Multilayer Perceptron (CMP). After multiple nonlinear mappings, scaling and bias coefficients are output, with their dimensions aligned with the dimensions of the modality-independent features. Specifically, the scaling coefficients are channel-wise scaling factor vectors output by the CMP, used to dynamically scale each channel of the modality-independent features, adjusting the activation intensity of each channel in the current scene. The bias coefficients are channel-wise bias vectors output by the CMP, used to dynamically offset each channel of the modality-independent features, adjusting the activation threshold of each channel.
[0062] Affine transformation is an operation that preserves the basic structure of features while adjusting their distribution. By adjusting the variance of each channel through scaling factors and the mean of each channel through bias factors, the distribution of features can be reshaped under scene semantic conditions. Scene context information is injected into modal-independent features, allowing features from the same source to exhibit different semantic expressions in different scenes. Taking traffic monitoring as an example, the activation of visual features is suppressed under low light conditions at night, while the activation of radar features is enhanced.
[0063] Semantic conflicts may occur when features from different modalities are fused. If the features of a certain modality deviate significantly from the features of most other modalities in terms of semantics, the credibility of that modality is low, and its fusion weight should be reduced.
[0064] Specifically, the semantic conflict degree between any two scene-enhanced modal features is calculated using cosine distance. A higher semantic conflict degree indicates a more significant semantic divergence and lower credibility between the two scene-enhanced modal features. Then, a modality fusion attention weight with penalty constraints is constructed based on the semantic conflict degree, automatically downweighting high-scoring but isolated modalities and automatically upweighting low-scoring but multimodal consensus modalities. ,in, Let r be the modality fusion attention weight corresponding to the r-th enhanced modal feature, where r = 1, 2, ..., M, and M is the total number of enhanced modal features; Let be the semantic conflict degree between the r-th enhanced modal feature and the j-th enhanced modal feature, where j = 1, 2, ..., M; Let η be the semantic conflict degree between the k-th enhanced modal feature and the j-th enhanced modal feature, k=1,2,...,M; η is the modal conflict penalty coefficient, a hyperparameter used to regulate the conflict suppression strength. The larger η is, the more severe the weight penalty of the conflicting modality and the sharper the attention distribution; the smaller η is, the milder the weight penalty of the conflicting modality and the smoother the attention distribution.
[0065] Furthermore, the multi-source representation features are input into a learnable fully connected mapping layer, and non-linear activation functions such as ReLU are used to regularize the feature dimensions and enhance the semantics, ultimately generating a fixed-dimensional first abnormal event feature vector that integrates temporal dynamics and multimodal semantic consistency.
[0066] In another possible implementation, when the above method is applied to an industrial equipment anomaly monitoring scenario, the time information in the real-time scenario context includes the equipment's operating period, such as day shift / night shift / maintenance cycle; the spatial information includes the production line number, machine position number, workshop area, etc.; and the meteorological environment information includes workshop temperature and humidity, dust concentration, etc. Those skilled in the art can adaptively configure the specific information types of the real-time scenario context according to the actual application scenario, and this application does not impose specific limitations on this.
[0067] As described above, by using a conditional multilayer perceptron to generate scaling and bias coefficients based on the global context vector and performing affine transformations on the independent features of each modality, the same original feature presents differentiated semantic mappings in different scenarios, improving the utilization of scene information. By constructing modality fusion attention weights that are negatively correlated with the semantic conflict degree between scene-enhanced modal features, isolated conflict modalities are automatically downweighted while multimodal consensus modalities are automatically upweighted, effectively suppressing the interference of single-sensor false alarms and modal semantic conflicts on fused features. By using modality fusion attention weights to perform weighted summation of scene-enhanced modal features and performing nonlinear transformations to generate a first anomalous event feature vector with scene adaptability and modal semantic consistency, a high-quality feature foundation is provided for subsequent anomalous event detection.
[0068] S3, fuse the first abnormal event feature vector and spatial distribution features to generate the second abnormal event feature vector.
[0069] The first anomalous event feature vector primarily carries temporal dynamics and multimodal semantic consistency information, but lacks awareness of spatial distribution density and spatial correlation. Therefore, this embodiment fuses the first anomalous event feature vector and spatial distribution features to generate a second anomalous event feature vector. The dimension of the second anomalous event feature vector is greater than that of the first anomalous event feature vector, providing richer semantic information for subsequent anomaly detection.
[0070] In one specific embodiment, S3 includes the following steps:
[0071] S311, Based on the first abnormal event feature vector and spatial distribution characteristics, a fused gating vector is generated through a gating network.
[0072] S312, based on the fusion gate vector, the projected features obtained by linear projection of the first abnormal event feature vector and the projected features obtained by linear projection of the spatial distribution features are weighted and summed to obtain the second abnormal event feature vector.
[0073] Spatial distribution features are not equally important in all scenarios. For example, in traffic monitoring, when there is significant spatial anomaly clustering, the injection of spatial distribution features should be strengthened; when the spatial distribution is uniform and there is no anomaly clustering, the dominance of temporal features should be preserved. Therefore, a gating network dynamically calculates the optimal fusion ratio for each dimension based on the current first feature vector and the specific content of the spatial distribution features. Specifically, the first anomaly event feature vector is concatenated with the flattened spatial distribution features, input into the gating network, and the output is a fused gating vector. Each element in this fused gating vector has a value between 0 and 1, representing the injection ratio of spatial features in the corresponding dimension.
[0074] The first abnormal event feature vector and the spatial distribution feature are in different feature spaces. They need to be projected onto a unified target dimension space first, and then weighted and combined using fusion gated vectors to finally obtain the second abnormal event feature vector.
[0075] In one specific embodiment, S3 further includes the following steps:
[0076] S321, construct the topological adjacency matrix and degree matrix based on the spatial topology information of the current scene.
[0077] S322, based on the topological adjacency matrix and degree matrix, the second abnormal event feature vector is iteratively updated through the graph heat conduction propagation mechanism to obtain the second abnormal event feature vector after spatial topology optimization. The single iteration update amount of the graph heat conduction propagation mechanism is the product of the value of the second abnormal event feature vector after normalization graph Laplacian operator transformation and the density adaptive decay coefficient. The density adaptive decay coefficient is negatively correlated with the normalized grid density corresponding to each grid in the second abnormal event feature vector.
[0078] S323 uses the second abnormal event feature vector after spatial topology optimization as the input feature vector of the lightweight student model.
[0079] Spatial topology information refers to the connection relationships between spatial units in the current scenario. Taking a traffic monitoring scenario as an example, road network topology information is the connection relationship information of the road network, including the adjacency relationships between road segments. Accidents, congestion, and other abnormal events propagate along roads, affecting downstream road segments. Therefore, the spatial topology structure needs to be quantified into a matrix form for subsequent graph propagation calculations. Specifically, based on the spatial topology information of the current scenario, each grid is treated as a graph node. If two grids have a spatial connection, such as being connected by a road, the corresponding position in the topological adjacency matrix is set to 1; otherwise, it is set to 0, resulting in the topological adjacency matrix. Then, by statistically analyzing the connection variables of the nodes as the diagonal elements of the degree matrix, the degree matrix is obtained.
[0080] The graph heat conduction propagation mechanism simulates the process of heat diffusion along a medium in the physical world, enabling information transfer between adjacent nodes in the feature graph. Taking a traffic monitoring scenario as an example, in a road network, the impact of abnormal events propagates along roads, and the impact of accidents spreads to adjacent road segments, with the impact being greater the closer the distance and less the farther the distance. This embodiment achieves single-step propagation through the graph Laplacian operator and long-range diffusion through multiple iterations, preserving the temporal semantics of the original features while supplementing spatial topological association information.
[0081] Specifically, the iterative formula is as follows: ,in, Let be the feature matrix at the (t+1)th iteration. Let be the feature matrix at iteration t. is the feature vector of the second abnormal event, which serves as the initial feature matrix for graph heat conduction propagation. Each row in the feature matrix corresponds to the feature vector of a grid, which is the spatial expansion form of the feature vector of the second abnormal event; t is the iteration round index, t=0,1,...,T-1, and T is the preset total number of propagation steps; η is the global propagation step size, which is used to control the amplitude of feature updates in a single iteration. The larger η is, the larger the amplitude of single-step propagation, and the smaller η is, the smoother the feature update. It is a topological adjacency matrix. For degree matrix, Let I be the normalized adjacency matrix and I be the identity matrix. The negative half of the normalized graph Laplacian operator represents the direction of feature propagation; λ(u,v) is the density-adaptive decay coefficient, which is negatively correlated with the normalized grid density. After T iterations, the propagation-optimized features are obtained. .
[0082] It is understood that the above-described graph heat conduction propagation steps are an optional implementation. In other application scenarios, if there is no explicit topological connection between spatial units, such as independent equipment monitoring points, then the graph propagation optimization steps S321 to S323 do not need to be executed, and the second abnormal event feature vector obtained in S312 can be directly input into the lightweight student model. Those skilled in the art can adaptively choose whether to execute the above-described graph propagation optimization steps based on whether there is a topological connection between spatial units in the actual application scenario, and this invention does not limit this.
[0083] As described above, a fusion gating vector is generated based on the first abnormal event feature vector and spatial distribution features through a gating network. This allows the injection ratio of spatial features to be adaptively adjusted according to the current scene, improving the flexibility and rationality of feature fusion. By linearly projecting the first abnormal event feature vector and spatial distribution features respectively, and then weighting and summing them based on the fusion gating vector, a second abnormal event feature vector with higher dimension is obtained. This enables the fused features to simultaneously possess temporal dynamics, multimodal semantic consistency, and spatial distribution awareness, providing richer semantic information for subsequent anomaly detection. A topological adjacency matrix and degree matrix are constructed using the spatial topological information of the current scene, and the second abnormal event feature vector is iteratively updated through a graph heat conduction propagation mechanism. A density adaptive decay coefficient that is negatively correlated with the standardized grid density is used to control the propagation step size, improving the accuracy of feature representation.
[0084] S4. Input the second abnormal event feature vector into the lightweight student model to obtain the probability of occurrence of various abnormal events.
[0085] In this embodiment, a teacher-student knowledge distillation architecture is adopted, which achieves a balance between low-latency inference and high detection accuracy at the edge by transferring the knowledge of the large teacher model to the lightweight student model.
[0086] Specifically, the teacher model employs a large-scale anomaly detection model based on the Transformer architecture, incorporating modules such as multi-head self-attention, feedforward neural networks, and layer normalization. This deep neural network possesses strong global context modeling capabilities, effectively capturing long-range spatiotemporal dependencies in the original data. The teacher model is pre-trained on a large-scale labeled original dataset, achieving high detection accuracy. Its specific training process falls within the scope of this invention and will not be elaborated upon here. During distillation training, the teacher model parameters are fixed, serving solely as a source of supervisory signals. The output of the teacher model, after Softmax normalization, forms soft labels containing implicit knowledge of inter-category relationships, providing rich supervisory information to the student model and guiding it in learning this knowledge.
[0087] The lightweight student model employs a fully connected network architecture or a lightweight 1D-CNN architecture, with a significantly smaller parameter count than the teacher model. This meets the single-inference latency requirements of edge devices, maintaining both high detection accuracy and low latency. In this embodiment, it includes an input layer, a feature extraction backbone, hidden layers, and an output layer, trained using knowledge distillation based on metadata vectors and spatial distribution features. Specifically, the input layer receives the second anomalous event feature vector; the feature extraction backbone comprises multiple lightweight convolutional or fully connected layers; each hidden layer is followed by a non-linear activation function and a batch normalization layer; and the output layer is a Softmax classifier, outputting the normalized probability of occurrence for each type of anomalous event.
[0088] In one specific embodiment, S4 includes the following steps:
[0089] S41, perform quality screening on each data source based on the metadata vector to obtain the quality gating coefficient corresponding to each data source.
[0090] S42, construct a distillation loss tank based on the quality gate coefficient and spatial distribution characteristics.
[0091] S43, select the weight vector based on the metadata vector and spatial distribution characteristics to generate the strategy.
[0092] S44. Based on the strategy, select the weight vector to adaptively combine the loss terms in the distillation loss pool, and perform distillation training on the initial student model to obtain a trained lightweight student model.
[0093] The initial student model is a small neural network model that has not been trained by distillation. Through iterative training, it gradually approaches the performance of the teacher model.
[0094] Data quality varies significantly across different data sources. If left unchecked, low-quality data can transmit incorrect knowledge to the student model, leading to reduced distillation efficiency or even performance degradation. Therefore, a quality gating mechanism employs a gating coefficient between 0 and 1 for each data source to filter and retain high-quality data while suppressing low-quality data.
[0095] Specifically, the metadata vectors from each data source are input into a lightweight MLP encoding, mapped to meta-embedding features of a unified dimension, and then the quality gating coefficient g=Sigmoid(v) is calculated. g T ×e), where v g v is a learnable weight vector. g T For v g The transpose of the vector is given, with quality g ∈ [0,1] and e being the meta-embedded feature. When g is below a preset quality threshold, the weight of this data source in subsequent distillation training is significantly reduced to suppress interference from invalid data.
[0096] The distillation loss pool includes at least soft-label distillation loss and weighted hard-label distillation loss. Soft-label distillation loss conveys implicit knowledge of the relative relationships between categories, while weighted hard-label distillation loss provides deterministic category constraints. The two complement each other, constructing a multi-paradigm loss pool that allows the student model to simultaneously acquire the teacher's knowledge and the true answers.
[0097] The loss terms in the distillation loss pool have different applicability to data sources of varying quality. Correspondingly, high-quality data sources provide reliable soft labels, so soft-label distillation loss should be emphasized; low-quality data sources have unreliable soft labels, so hard-label distillation loss should be emphasized. The strategy selection weight vector is jointly driven by metadata vectors reflecting data source quality and spatial distribution features reflecting scenario anomalies, dynamically generating the optimal loss combination ratio for each sample.
[0098] Furthermore, the strategy selection weight vector reflects the optimal loss combination scheme for the current sample. It is weighted and summed with the various losses in the distillation loss pool to form a unified optimization objective. The parameters of the initial student model are updated through backpropagation and gradient descent algorithms until the model converges, so that the student model can simultaneously approximate the teacher's knowledge and the real labels, resulting in a trained lightweight student model.
[0099] In one specific embodiment, S42 includes the following steps:
[0100] S421 generates dynamic temperature parameters for each grid based on the standardized grid density. Grids with lower standardized grid densities have higher dynamic temperature parameters.
[0101] S422, construct the soft-label distillation loss based on the dynamic temperature parameter. The soft-label distillation loss for a single training data point is as follows: divide the unnormalized logistic value output by the pre-trained teacher model and the unnormalized logistic value output by the initial student model by the dynamic temperature parameter corresponding to the grid where the current training data is located, then normalize them to a probability distribution using the Softmax function, calculate the KL divergence between the two probability distributions, and multiply the KL divergence by the square of the dynamic temperature parameter to obtain the soft-label distillation loss for a single training data point.
[0102] S423, construct a weighted hard label distillation loss based on the quality gating coefficient and spatial entropy attention weight. The weighted hard label distillation loss is as follows: construct the classification loss of a single training data based on the focusing loss function, multiply the classification loss by the quality gating coefficient corresponding to the training data and the spatial entropy attention weight of the grid where the training data is located, and sum the weighted losses of all training data and divide by the sum of the quality gating coefficients of all training data to obtain the weighted hard label distillation loss. The focusing loss function reduces the loss contribution of easily classified samples and highlights the loss contribution of difficult-to-classify samples through preset focusing parameters.
[0103] S424, construct a distillation loss pool based on soft-label distillation loss and weighted hard-label distillation loss.
[0104] The dynamic temperature parameter controls the smoothness of the Softmax output probability distribution. In knowledge distillation, higher temperatures smooth the category probability distribution, weakening the probability of the largest class and relatively increasing the probability of non-largest classes, thus amplifying the dark knowledge information output by the teacher model. Regions with different grid densities exhibit varying reliability and clarity of anomalous signals. In low-density regions, where signals are sparse or noise is abundant, higher temperature parameters are needed to smooth the distribution and reduce reliance on unreliable signals; conversely, in high-density regions, where signals are rich and clear, lower temperature parameters can be used to maintain accuracy.
[0105] Specifically, regions with lower standardized grid density represent sparser or less reliable anomalous signals, corresponding to higher dynamic temperature parameters. Smoothing reduces noise interference. Therefore, based on the standardized grid density, the dynamic temperature parameter τ for each grid is generated. (u,v) =τ base ×(1+δ×(1-density (u,v) )), where τ (u,v) τ represents the dynamic temperature parameter corresponding to the grid (u,v). base The base temperature coefficient, δ is the temperature regulation coefficient, and τ is the temperature coefficient. base The specific values of density and δ can be set by the implementer according to the actual situation. (u,v) This is the standardized grid density of the grid (u,v) where the current training data is located.
[0106] The core of soft-label distillation loss is to make the output probability distribution of the student model approximate the teacher model at the level of dark knowledge. Dividing the unnormalized logistic values of the teacher-student model and the initial student model by the dynamic temperature parameter, followed by Softmax normalization, amplifies the differences in the relative relationships between categories, enabling the student model to learn the teacher model's judgments on subtle differences between categories. Multiplying the KL divergence by the square of the temperature compensates for the gradient scaling caused by dividing by the dynamic temperature parameter, making the gradient magnitude independent of the dynamic temperature parameter.
[0107] Easy-to-classify samples refer to training samples whose predicted categories are highly consistent with the true labels. In other words, the model correctly predicted the category of the sample with a high confidence level, and the prediction probability is close to 1. Easy-to-classify samples are already well-identified by the model during training, and their contribution to model parameter updates is relatively saturated. Hard-to-classify samples refer to training samples whose predicted categories deviate significantly from the true labels. In other words, the model predicts these samples with a low probability or even incorrectly, with a prediction probability close to 0.5 or lower. Hard-to-classify samples are difficult for the model to correctly identify during training, reflecting the current limitations of the model's capabilities, and have higher information content and training value for model parameter updates.
[0108] The core of hard-label distillation loss is to ensure that the student model learns the true class distribution, avoiding over-reliance on the teacher model and deviation from the true labels. Employing a focused loss function reduces the loss contribution of easily classified samples through focused parameters, allowing the model to pay more attention to difficult-to-classify samples during training and alleviating the problem of imbalanced classes in outliers. Simultaneously, by deweighting low-quality samples through a quality gating coefficient and deweighting samples in high-entropy, cluttered regions through spatial entropy attention weights, dual noise suppression can be achieved.
[0109] In one specific embodiment, S43 includes the following steps:
[0110] S431, input the metadata vectors corresponding to each data source into the preset metadata encoder to obtain the meta-embedded features corresponding to each data source.
[0111] S432 concatenates the standardized grid density in the meta-embedded features and spatial distribution features corresponding to each data source to obtain a joint feature vector.
[0112] S433 inputs the joint feature vector into a preset weight generation network, and outputs the weight coefficients corresponding to each loss term in the distillation loss pool after nonlinear mapping.
[0113] S434: Normalize the weight coefficients corresponding to each loss term, and scale the normalized weights according to the preset maximum weight coefficient to obtain the strategy selection weight vector.
[0114] The metadata vectors of each data source contain multi-dimensional attribute information. The metadata vectors of each data source are input into a preset metadata encoder. After two fully connected layers and non-linear mapping with the ReLU activation function, a unified-dimensional meta-embedding feature is output, which ensures the feasibility of subsequent splicing and network processing.
[0115] The formulation of distillation strategies requires simultaneous consideration of data source quality and spatial anomaly distribution density. For example, if a data source has high quality but its grid has sparse anomaly signals, it is still necessary to smooth the output by increasing the temperature parameter; conversely, if the data source has low quality but high spatial density, it may be necessary to focus on hard label constraints. Correspondingly, meta-embedding features characterize the quality attributes at the data source granularity, while standardized grid density characterizes the intensity of anomaly distribution at the spatial granularity. Therefore, concatenating the information from both into a joint feature vector allows the weight generation network to make decisions by integrating information from both aspects, achieving complementary information dimensions and providing a complete decision basis for subsequent weight generation.
[0116] The importance of each loss term in the distillation loss pool during distillation training should dynamically change based on the quality and spatial distribution of the data source. Specifically, the joint feature vector is input into a pre-defined weight generation network, and after linear transformation and nonlinear activation, the original weight coefficient vector is output, enabling the weights to adaptively change with the input features.
[0117] As described above, by using metadata vectors to perform quality screening on each data source to obtain quality gating coefficients, low-quality data sources are automatically suppressed during distillation training, preventing the transfer of erroneous knowledge to the student model and improving the efficiency and effectiveness of distillation training. By constructing a distillation loss pool containing soft-label distillation loss and weighted hard-label distillation loss, the teacher model's dark knowledge and the supervision signals from the real labels simultaneously influence the distillation process, achieving comprehensive knowledge transfer and robustness to the training objective. Furthermore, by encoding metadata vectors into meta-embedding features and concatenating them with standardized grid density to form a joint feature vector, the generation of policy selection weight vectors possesses both data source-level and spatial-level characteristics. Perception capability: By using a weight generation network to perform nonlinear mapping on the joint feature vector and then normalizing and scaling it to obtain the policy selection weight vector, the weights of each loss term can be adaptively adjusted according to the quality and spatial distribution of the data source, avoiding the adaptation failure problem of fixed weight distillation in scenarios with fluctuating data quality. By adaptively combining each loss term in the distillation loss pool according to the policy selection weight vector and distilling the initial student model, high-quality data sources emphasize soft labels to fully transfer teacher knowledge, while low-quality data sources emphasize hard labels to avoid noise interference, thus improving the detection accuracy and generalization ability of the lightweight student model in complex multi-source raw data scenarios.
[0118] S5 generates abnormal early warning information based on the probability of occurrence.
[0119] Different types of abnormal events have different degrees of harm and urgency. In this embodiment, multiple thresholds are configured independently for each type of abnormal event, which can realize differentiated hierarchical early warning.
[0120] Correspondingly, an L-level early warning threshold is independently configured for the w-th type of abnormal event, and the l-th level early warning threshold is denoted as θ. w l Where w = 1, 2, ..., W, where W is the total number of categories of abnormal events; l = 1, 2, ..., L. θ w l The specific value can be set by the implementer according to the actual situation.
[0121] When the probability of the w-th type of abnormal event occurring is greater than or equal to θ w l When the w-th type of abnormal event is triggered, the k-th level warning is generated, and standardized abnormal warning information is generated.
[0122] In traffic monitoring scenarios, abnormal early warning information is pushed to traffic management centers, rescue units, and surrounding connected vehicles via vehicle-road cooperative networks. In industrial equipment monitoring scenarios, abnormal early warning information is pushed to equipment operation and maintenance centers, on-site duty terminals, and related equipment control systems via industrial IoT networks. In public safety monitoring scenarios, abnormal early warning information is pushed to emergency command centers, local police terminals, and surrounding broadcasting systems via public safety dedicated networks.
[0123] It is understood that the above implementation methods are merely illustrative examples of this method in different application scenarios. Those skilled in the art can select the appropriate information push network and receiving terminal type according to the actual application scenario. This invention does not limit the specific push method and receiving object of the warning information.
[0124] This embodiment constructs metadata vectors corresponding to each data source to quantitatively represent data quality and scene attributes. It then utilizes these metadata vectors and spatial distribution features to train a lightweight student model through knowledge distillation. This enables the distillation training process to adaptively transfer knowledge based on quality differences and spatial anomalies among data sources, overcoming the shortcomings of traditional fixed-parameter distillation strategies in multi-source heterogeneous data scenarios, such as poor adaptability and low knowledge transfer efficiency. Furthermore, it enhances and weights modal-independent features through real-time scene context, generating a first anomalous event feature vector that integrates temporal dynamics and multi-modal semantic consistency. This resolves the issues of multi-source data modal semantic conflicts and poor scene adaptability, improving performance in complex scenarios. The system enhances the representation capabilities of anomalous event features. By fusing the first anomalous event feature vector with spatial distribution features, a second anomalous event feature vector with higher dimensionality is generated. This further incorporates spatial distribution density information on top of the fusion of temporal semantic information, improving the spatial accuracy of anomalous events. By inputting the second anomalous event feature vector into a lightweight student model pre-trained using knowledge distillation based on metadata vectors and spatial distribution features, the model achieves low-latency inference at the edge while maintaining high detection accuracy. This resolves the contradiction between the large number of parameters and high inference latency of traditional deep learning models and the limited resources of edge devices, enabling high-precision, low-latency real-time prediction of anomalous events.
[0125] Example 2
[0126] Embodiment 2 of the present invention provides a non-transitory computer-readable storage medium, which can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method in the method embodiment. The at least one instruction or at least one program is loaded and executed by the processor to implement the abnormal event reasoning method based on multi-source data fusion provided in the above embodiment.
[0127] Example 3
[0128] Embodiment 3 of the present invention provides an electronic device, which includes a processor and the non-transitory computer-readable storage medium of Embodiment 2 of the present invention.
[0129] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. An anomaly event reasoning method based on multi-source data fusion, characterized in that, The method includes the following steps: S1. Based on the original data and spatial location information corresponding to each data source, obtain the metadata vector, modality-independent features and spatial distribution features corresponding to each data source. The metadata vector is used to characterize the data quality and scene attributes of the corresponding data source. Different data sources correspond to different modal data. S2, based on the real-time scene context, the modal independent features are enhanced and weighted fused to generate a first abnormal event feature vector, wherein the real-time scene context includes the time information, spatial information and meteorological environment information of the current scene; S3, fuse the first abnormal event feature vector and the spatial distribution feature to generate a second abnormal event feature vector, wherein the dimension of the second abnormal event feature vector is greater than the dimension of the first abnormal event feature vector; S4, input the second abnormal event feature vector into the lightweight student model to obtain the occurrence probability of various abnormal events, wherein the lightweight student model is a model pre-trained based on the metadata vector and the spatial distribution features through knowledge distillation; S5, Generate an anomaly warning message based on the occurrence probability.
2. The abnormal event reasoning method based on multi-source data fusion according to claim 1, characterized in that, S1 includes the following steps: S11, extract multidimensional attribute information from the original data of each data source, wherein the multidimensional attribute information includes at least data integrity score, signal-to-noise ratio, historical confidence, and time embedding encoding, spatial embedding encoding, and environmental embedding encoding; S12, Construct a fixed-dimensional metadata vector based on the multi-dimensional attribute information; S13, based on the modality type of each data source, use the corresponding feature extractor to extract the corresponding modality-independent features; S14, map the spatial location information of each data source to a preset spatial grid cell; S15, construct a spatial potential energy density field based on the number of data sources and confidence weights in each grid of the preset spatial grid unit; S16, Normalize the spatial potential energy density field to obtain the standardized grid density corresponding to each grid. S17, calculate the information entropy corresponding to each grid, and generate the spatial entropy attention weight corresponding to each grid according to the standardized grid density and the information entropy. The information entropy is used to quantify the disorder of data distribution within the grid. The lower the standardized grid density or the higher the information entropy, the lower the spatial entropy attention weight corresponding to the grid. S18, The spatial distribution characteristics are formed based on the standardized grid density and the spatial entropy attention weight of each grid.
3. The anomaly event reasoning method based on multi-source data fusion according to claim 1, characterized in that, S2 includes the following steps: S21, Encode and fuse the time information, spatial information and meteorological environment information of the current scene to obtain the global context vector; S22, Scaling coefficients and bias coefficients are generated by a conditional multilayer perceptron based on the global context vector; S23, perform affine transformation on each modal independent feature according to the scaling factor and the bias factor to obtain the scene-enhanced modal features corresponding to each modal independent feature; S24, calculate the semantic conflict degree between any two scene-enhanced modal features, and construct modal fusion attention weights based on the semantic conflict degree, wherein the modal fusion attention weights are negatively correlated with the semantic conflict degree; S25, All scene-enhanced modal features are weighted and summed according to the modal fusion attention weights to obtain the fused multi-source representation features; S26, perform a nonlinear transformation on the multi-source representation features to generate a first abnormal event feature vector.
4. The anomaly event reasoning method based on multi-source data fusion according to claim 2, characterized in that, S3 includes the following steps: S311, Based on the first abnormal event feature vector and the spatial distribution features, a fused gating vector is generated through a gating network; S312, based on the fusion gate vector, the projection features obtained by linear projection of the first abnormal event feature vector and the projection features obtained by linear projection of the spatial distribution features are weighted and summed to obtain the second abnormal event feature vector.
5. The anomaly event reasoning method based on multi-source data fusion according to claim 4, characterized in that, S3 also includes the following steps: S321, Construct a topological adjacency matrix and a degree matrix based on the spatial topology information of the current scene; S322, based on the topological adjacency matrix and the degree matrix, the second abnormal event feature vector is iteratively updated through a graph heat conduction propagation mechanism to obtain the second abnormal event feature vector after spatial topology optimization. The single iteration update amount of the graph heat conduction propagation mechanism is: the product of the value of the second abnormal event feature vector after normalized graph Laplacian operator transformation and the density adaptive decay coefficient. The density adaptive decay coefficient is negatively correlated with the normalized grid density corresponding to each grid in the second abnormal event feature vector. S323, the second abnormal event feature vector after spatial topology optimization is used as the input feature vector of the lightweight student model.
6. The anomaly event reasoning method based on multi-source data fusion according to claim 2, characterized in that, S4 includes the following steps: S41, perform quality screening on each data source based on the metadata vector to obtain the quality gating coefficient corresponding to each data source; S42, construct a distillation loss pool based on the quality gate coefficient and the spatial distribution characteristics, wherein the distillation loss pool includes at least soft-label distillation loss and weighted hard-label distillation loss; S43, Select a weight vector based on the metadata vector and the spatial distribution features using a generation strategy; S44, according to the strategy, select the weight vector to adaptively combine each loss term in the distillation loss pool, and perform distillation training on the initial student model to obtain a trained lightweight student model.
7. The anomaly event reasoning method based on multi-source data fusion according to claim 6, characterized in that, S42 includes the following steps: S421, Based on the standardized grid density, generate dynamic temperature parameters corresponding to each grid, wherein the lower the standardized grid density, the higher the dynamic temperature parameters corresponding to the grid. S422, construct a soft-label distillation loss based on the dynamic temperature parameter, wherein the soft-label distillation loss for a single training data is: divide the unnormalized logistic value output by the pre-trained teacher model and the unnormalized logistic value output by the initial student model by the dynamic temperature parameter corresponding to the grid where the current training data is located, then normalize them to a probability distribution using the Softmax function, calculate the KL divergence between the two probability distributions, and multiply the KL divergence by the square of the dynamic temperature parameter as the soft-label distillation loss for a single training data; S423, construct a weighted hard label distillation loss based on the quality gating coefficient and the spatial entropy attention weight, wherein the weighted hard label distillation loss is: construct the classification loss of a single training data based on the focusing loss function, multiply the classification loss by the quality gating coefficient corresponding to the training data and the spatial entropy attention weight of the grid where the training data is located, and sum the weighted losses of all training data and divide by the sum of the quality gating coefficients of all training data to obtain the weighted hard label distillation loss. The focusing loss function reduces the loss contribution of easily classified samples and highlights the loss contribution of difficult-to-classify samples through preset focusing parameters. S424, construct a distillation loss pool based on the soft label distillation loss and the weighted hard label distillation loss.
8. The anomaly event reasoning method based on multi-source data fusion according to claim 6, characterized in that, S43 includes the following steps: S431, Input the metadata vector corresponding to each data source into the preset metadata encoder to obtain the meta-embedding features corresponding to each data source; S432, concatenates the standardized grid density in the meta-embedded features and spatial distribution features corresponding to each data source to obtain a joint feature vector; S433, the joint feature vector is input into a preset weight generation network, and after nonlinear mapping, the weight coefficients corresponding to each loss term in the distillation loss pool are output; S434: Normalize the weight coefficients corresponding to each loss term, and scale the normalized weights according to the preset maximum weight coefficient to obtain the strategy selection weight vector.
9. A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores at least one instruction or at least one program, characterized in that, The at least one instruction or the at least one program segment is loaded and executed by the processor to implement the abnormal event reasoning method based on multi-source data fusion as described in any one of claims 1-8.
10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.
