Method and system for constructing behavior twin based on multi-source heterogeneous data

CN122903967APending Publication Date: 2026-10-13AIHUI BAOLI (GUANGZHOU) DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611397057.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

随着时序深度学习技术的发展,现阶段,如采用LSTM、Transformer等时序神经网络模型已能够有效捕捉高频时序数据中的微观波动特征;然而,现有的深度学习时序模型本质上仍高度依赖纯数据驱动的统计相关性拟合,缺乏将主体固有的物理/运动学规律,如速度连续性、加速度惯性极限及能量守恒等作为硬性约束嵌入状态校验的机制,这导致模型在面对分布外(OOD)数据、传感器异常波动或隐蔽伪装干扰时,极易将不符合真实物理规律的反常状态误判为正常行为模式并沉淀至孪生基线库中,造成数据基底污染与脏数据自循环

Benefits of technology

(1)本发明通过获取多个渠道的异构观测数据,在平移校正与对齐后利用卡尔曼滤波与状态重建,得到在统一细粒度时空坐标下排列有序的细粒度状态序列。这克服了现有技术因异构数据采样频率差异大、存在时间空洞及颗粒度粗糙而掩盖微观动作的缺陷,显著提升了异构数据在细粒度时空维度上的对齐精度与连续性,为后续微观异常特征的深度挖掘提供了高质量、无缝隙的数据基底。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903967A_ABST
    Figure CN122903967A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of digital twinning and multi-source data processing, and discloses a behavior twinning body construction method and system based on multi-source heterogeneous data. The method comprises the following steps: acquiring multi-channel observation data and performing preprocessing to obtain a fine-grained state sequence; using a self-attention mechanism to calculate node fluctuation intensity values and extract high-abnormal-possibility nodes; substituting into Newton's second law and the law of conservation of energy to calculate a deviation amount, so as to mark out suspected violation nodes; combining a pre-maintained historical constraint trigger state to determine a real violation node; removing the violation record and updating the remaining record that passes the consistency check as the construction basis data of the behavior twinning body. The method can realize accurate spatiotemporal alignment of heterogeneous data and effective purification of violation pollution data, and guarantees high precision and adaptive evolution of behavior twinning body construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital twin and multi-source data processing technology, and in particular to a method and system for constructing behavioral twins based on multi-source heterogeneous data. Background Technology

[0002] Currently, behavioral twins, as a key technology for reproducing the behavioral patterns of real subjects in the digital space, rely on observation data from different channels and in different forms to reconstruct the activity trajectory and state evolution of subjects in the real world. They are an important digital twin support means for anomaly identification and decision-making in scenarios such as smart city governance and public safety monitoring.

[0003] In existing technologies, early behavioral trajectory construction methods largely relied on the macroscopic statistical characteristics of multi-source observation data, assessing the macroscopic behavioral profile of the subject through overall trend fitting. With the development of temporal deep learning technology, current temporal neural network models such as LSTM and Transformer can effectively capture the microscopic fluctuation characteristics in high-frequency time series data. However, existing deep learning temporal models still heavily rely on purely data-driven statistical correlation fitting, lacking a mechanism to embed inherent physical / kinematic laws of the subject, such as velocity continuity, acceleration-inertial limits, and energy conservation, as hard constraints for state verification. This leads to the model easily misjudging abnormal states that do not conform to real physical laws as normal behavioral patterns when facing out-of-distribution (OOD) data, abnormal sensor fluctuations, or hidden and disguised interference, and these abnormal states are deposited in the twin baseline library, causing data base pollution and dirty data self-circulation.

[0004] In summary, existing technologies struggle to accurately identify microscopic anomalies hidden beneath macroscopic normal behavior in multi-source heterogeneous data, resulting in low accuracy in constructing behavioral twins and low precision in identifying hidden anomalies. Summary of the Invention

[0005] This invention provides a method and system for constructing behavioral twins based on multi-source heterogeneous data, which can accurately identify microscopic anomalous states and remove contaminated data, thereby improving the accuracy of behavioral twins and the precision of hidden anomaly identification.

[0006] Firstly, to address the aforementioned technical problems, this invention provides a method for constructing behavioral twins based on multi-source heterogeneous data, comprising: Observation data from multiple channels are acquired and preprocessed to obtain a fine-grained state sequence under a unified fine-grained spatiotemporal coordinate system. The fluctuation intensity value of each node in the fine-grained state sequence is calculated using a self-attention mechanism, and nodes whose fluctuation intensity value exceeds a preset intensity threshold are extracted as nodes with high anomaly probability. Substitute the actual values ​​of velocity, displacement and energy consumption of the nodes with high anomaly probability into Newton's second law and the law of conservation of energy to obtain the corresponding theoretical values, and calculate the deviation between each actual value and the theoretical value. When any of the aforementioned deviations exceeds the corresponding preset deviation threshold, the node with a high probability of anomaly is marked as a suspected violation node. Extract the multi-dimensional feature vector of the suspected violation node, and perform binary classification judgment by combining it with the pre-maintained historical constraint trigger state to determine the real violation node; The state records of the actual violating nodes are removed from the fine-grained state sequence, and the remaining records that pass the consistency check are used as the basic data for constructing the behavioral twin.

[0007] Secondly, the present invention provides a behavioral twin construction system based on multi-source heterogeneous data, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described above.

[0008] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.

[0009] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention acquires heterogeneous observation data from multiple channels, and after translation correction and alignment, uses Kalman filtering and state reconstruction to obtain an ordered fine-grained state sequence under a unified fine-grained spatiotemporal coordinate system. This overcomes the shortcomings of existing technologies that mask microscopic actions due to large differences in the sampling frequency of heterogeneous data, the existence of time holes, and coarse granularity. It significantly improves the alignment accuracy and continuity of heterogeneous data in the fine-grained spatiotemporal dimension, providing a high-quality, seamless data foundation for the in-depth mining of subsequent microscopic anomaly features.

[0010] (2) This invention defines a dynamic neighborhood window and uses a self-attention mechanism to calculate the dot product and distribution information entropy of each central node in a fine-grained state sequence, and uses this as the fluctuation intensity value to extract nodes with high probability of anomalies. This overcomes the limitation of existing technologies that rely solely on global macroscopic statistical indicators and are prone to missing small anomalous fluctuations within extremely short time windows, significantly enhancing the system's initial sensitivity to local microscopic anomalies and achieving accurate initial screening of potential hidden anomalous nodes.

[0011] (3) This invention combines the actual values ​​of velocity, displacement, and energy consumption of nodes with high probability of anomalies with Newton's second law and the law of conservation of energy to obtain theoretical values. By calculating multidimensional deviations and comparing them with preset deviation thresholds, nodes exceeding the thresholds are marked as suspected non-compliant nodes. This overcomes the shortcomings of existing technologies that rely solely on data mining models, lack physical common sense constraints, and are prone to misjudging anomalies that violate real physical laws as normal jitter. It establishes a hard-core boundary verification barrier using physical mechanics and energy laws, greatly improving the objectivity, authenticity, and physical compliance of anomaly node marking.

[0012] (4) This invention extracts the multidimensional feature vectors of suspected violation nodes and performs binary classification mapping judgment by combining them with pre-maintained historical constraint trigger states to determine the real violation nodes. Subsequently, the real violation nodes are removed from the fine-grained state sequence, and the remaining records that pass the consistency check are used as the basic data for constructing the behavioral twin. This overcomes the fatal problem of existing technologies that continuously accumulate and contaminate the twin substrate with hidden abnormal data, and achieves precise isolation and real-time purification of contaminated data, ensuring the purity of the subject's behavioral trajectory and the accuracy of its long-term evolution in the behavioral twin. Attached Figure Description

[0013] Figure 1 This is a schematic diagram of the process for constructing a behavioral twin based on multi-source heterogeneous data provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of violation markers and suspected violation nodes provided in the first embodiment of the present invention. Detailed Implementation

[0014] 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.

[0015] Reference Figure 1 The first embodiment of the present invention provides a method for constructing a behavioral twin based on multi-source heterogeneous data, including the following steps: S11, acquire observation data from multiple channels and preprocess the observation data to obtain a fine-grained state sequence under a unified fine-grained spatiotemporal coordinate. S12, use the self-attention mechanism to calculate the fluctuation intensity value of each node in the fine-grained state sequence, and extract the nodes whose fluctuation intensity value exceeds the preset intensity threshold as nodes with high anomaly probability. S13, Substitute the actual values ​​of velocity, displacement and energy consumption of the nodes with high anomaly probability into Newton's second law and the law of conservation of energy to obtain the corresponding theoretical values, and calculate the deviation between each actual value and the theoretical value; S14, when any of the aforementioned deviations exceeds the corresponding preset deviation threshold, the node with a high probability of anomaly is marked as a suspected violation node; S15, extract the multi-dimensional feature vector of the suspected violation node, and perform binary classification judgment by combining it with the pre-maintained historical constraint trigger state to determine the real violation node; S16, the state records of the real violation nodes are removed from the fine-grained state sequence, and the remaining records that pass the consistency check are used as the basic data for constructing the behavioral twin and updated.

[0016] In step S11, observation data from multiple channels are acquired and preprocessed to obtain a fine-grained state sequence under a unified fine-grained spatiotemporal coordinate system, including: S111, obtain the clock deviation of each channel based on the standard time server, and use the clock deviation to shift and correct the data timestamps of the multiple channels; S112, the aligned data streams are divided according to the set sliding time window, and linear proportional filling is performed when time gaps are detected to obtain multi-source observation sequences; S113, Calculate the predicted state of the coarse-grained data source in the multi-source observation sequence based on the Kalman filter, and reconstruct the state of the unobserved nodes to obtain the fine-grained state sequence. In step S111, the clock deviation of each channel is obtained based on the standard time server, and the clock deviation is used to shift and correct the data timestamps of the multiple channels.

[0017] Specifically, before acquiring the clock deviation based on the standard time server, raw observation data from multiple sources, including vehicle sensor data, roadside monitoring data, energy consumption record data, and load sensor data, is first acquired. The vehicle sensor data includes instantaneous velocity and acceleration sequences collected by the vehicle inertial measurement unit and wheel speed sensors; the roadside monitoring data includes spatial three-dimensional displacement trajectories extracted from roadside sensing units and camera frame sequences; and the energy consumption record data includes instantaneous power and fuel / electricity consumption rates collected via the vehicle controller's local area network bus.

[0018] By connecting to a standard time server via a network time protocol, the clock deviation of the system clock of each data acquisition terminal relative to the standard timestamp is extracted. This clock deviation is then used to perform a shift correction on the data timestamps of the multiple channels, eliminating the absolute time phase difference caused by hardware clock drift. After shift correction, the time point interleaving problem caused by inconsistent sampling frequencies between different channels is addressed, ensuring precise alignment of sampling time points across heterogeneous data streams within the same time coordinate system.

[0019] In step S112, the aligned data streams are segmented according to the set sliding time window, and linear proportional filling is performed when time holes are detected to obtain a multi-source observation sequence.

[0020] Specifically, the data streams after translation correction are segmented into time series, and a sliding time window mechanism is used to extract continuous spatiotemporal data segments. The length of the sliding time window is determined based on the statistical mean of the typical duration of micro-driving behavior, which is set to 5 seconds in this embodiment. The sliding step size is adaptively calculated based on the overlap rate requirement of adjacent windows, which is set to 1 second in this embodiment, so that an 80% data overlap rate is maintained between adjacent windows, ensuring that the state transition between continuous time windows has a high degree of smoothness and temporal correlation, and avoiding the loss of edge dynamic features caused by window fragmentation.

[0021] During window segmentation, the continuity of data within the sliding time window is monitored in real time. Using the aligned standard timeline as a reference, the time difference between two adjacent frames of data from the same data channel is calculated. When the continuous missing time of a data channel within the current time window exceeds a preset time hole threshold, a time hole is determined to exist in that data channel within the time window. The time hole threshold is adaptively determined based on the 99th percentile statistic of the sensor data transmission delay; in this embodiment, it is set to 100 milliseconds, equivalent to the statistical boundary of 10 consecutive missing frames of data for a 100Hz high-frequency sensor or 1 consecutive missing frame of data for a 10Hz low-frequency sensor. The threshold is set based on the fact that short-term data loss is within the acceptable range of sensor transmission fluctuations; exceeding the threshold indicates a significant interruption or packet loss in the data stream, which will cause a systematic deviation in subsequent continuous feature extraction.

[0022] For data segments identified as having time holes, a linear proportional filling algorithm based on known valid sampling points before and after the hole is used to complete the data. The time offset of the time to be filled relative to the valid time of the hole's inception is calculated, and the total time span between the two valid times before and after the hole is calculated. The ratio of the time offset to the total time span is used as the linear interpolation weight. This interpolation weight is then used to weight the difference between the first valid state value after the hole ends and the last valid state value before the hole begins. The weighted change is then added to the valid state value before the hole begins to calculate the state estimate for the time to be filled, thus completing the seamless repair of the time hole. Multidimensional observations from each channel, after completion and without gaps, are stitched together along a unified time axis. The data are then aligned and merged column-wise into a matrix sequence containing multidimensional features such as instantaneous velocity, three-dimensional displacement coordinates, acceleration, and instantaneous power, resulting in a time-ordered multi-source observation sequence.

[0023] In step S113, the predicted state of the coarse-grained data source in the multi-source observation sequence is calculated based on the Kalman filter, and the state of the unobserved nodes is reconstructed to obtain the fine-grained state sequence.

[0024] Specifically, in order to address the issue of missing states at unsampled high-frequency nodes for coarse-grained data sources marked in step S111, such as roadside sensing or energy consumption data with a sampling frequency of 10Hz, a discrete-time Kalman filter algorithm is used to construct a state estimation model.

[0025] First, establish the system's state transition model and observation model. The real physical states corresponding to the coarse-grained data source, including one-dimensional displacement, instantaneous velocity, and acceleration, are constructed as state vectors, and a state transition matrix is ​​built based on the continuous motion mechanics equations.

[0026] At a high-frequency step size of 10 milliseconds corresponding to a 100Hz sampling rate, further state recursion prediction is performed using the posterior state estimate from the previous moment and the state transition matrix to obtain the spatiotemporal state prediction value for the currently unobserved node, i.e., the moment when the coarse-grained data source has not been sampled. Simultaneously, the prior error covariance for the current moment is calculated and updated by combining the state transition matrix, the posterior error covariance from the previous moment, and the process noise covariance calibrated based on the variances of the accelerometers and dynamic disturbances. Specifically, the process noise covariance matrix is ​​determined as follows: Accelerometer and dynamic disturbance measurement sequences at at least 1000 consecutive sampling points under historical stable operating conditions are extracted for each coordinate axis component; the variance of each component sequence is calculated; and the calculated variance values ​​are used as the main diagonal elements to construct the process noise covariance matrix.

[0027] When the motion evolves to the actual sampling time of the coarse-grained data source, that is, at every 10 high-frequency step low-frequency sampling node, the actual observation values ​​of high-frequency channels in the multi-source observation sequence, such as the 100Hz vehicle-mounted IMU or wheel speed meter, are extracted, and an observation matrix is ​​established. The actual observation values ​​are subtracted from the predicted observation values ​​obtained by mapping the spatiotemporal state prediction values ​​through the observation matrix to obtain the residual vector representing the measurement bias.

[0028] Subsequently, combining the observation matrix, the prior error covariance, and the measurement noise covariance based on the high-frequency sensor hardware measurement accuracy calibration, the residual covariance is calculated by sequentially multiplying the observation matrix, the prior error covariance, and the transpose of the observation matrix, and then superimposing the measurement noise covariance matrix. Finally, the Kalman gain weight matrix is ​​calculated by multiplying the prior error covariance by the transpose of the observation matrix and then by the inverse of the residual covariance matrix. This Kalman gain weight matrix reflects the confidence weight ratio between the model prediction value and the actual high-frequency observation value in real time. Specifically, the measurement noise covariance matrix is ​​determined as follows: during the offline static calibration stage, output data from at least 3000 sampling points of each high-frequency sensor are continuously collected in a static state; the mean square error of the measurement noise of each sensor is calculated; and the squares of the mean square errors are arranged in a main diagonal matrix according to the sensor data dimension to construct the measurement noise covariance matrix.

[0029] Furthermore, the residual vector is weighted using the Kalman gain weight matrix obtained by calculation, and the weighted correction is accumulated to the prior spatiotemporal state prediction value to obtain the posterior corrected state value at each estimated time.

[0030] The prior error covariance is updated by subtracting the Kalman gain weight from the observation matrix from the identity matrix, and the posterior error covariance at the current time is obtained. This completes the recursive calculation of the Kalman filter in the measurement update step, thereby eliminating the cumulative drift error caused by pure dynamic recursion and ensuring the state accuracy of the coarse-grained data source at the low-frequency sampling node.

[0031] After obtaining the posterior corrected state values ​​of the coarse-grained data source at the low-frequency sampling nodes, a cubic spline interpolation function is used to perform continuous state curve fitting for the unobserved high-frequency micro-nodes between two adjacent corrected state values ​​in order to reconstruct the geometric curves. Using adjacent posterior corrected state values ​​as interpolation nodes, a piecewise cubic polynomial equation with respect to time is established between every two adjacent sampling times.

[0032] Strict boundary and physical continuity constraints are introduced when solving the coefficients of the equations. First, there is the function value continuity constraint, requiring the interpolation curve to precisely cross the posterior correction state value at each low-frequency sampling node. Second, there is the physical smoothness constraint, requiring the first and second derivatives of the interpolation curve to be completely continuous at the connection points of adjacent nodes. These first and second derivatives correspond to instantaneous velocity and instantaneous acceleration, respectively, ensuring that the reconstructed velocity and displacement curves conform to the motion continuity of the real object. Finally, there is the natural boundary condition, setting the second derivative at the start and end points of the sequence to zero to eliminate unnatural curvature at the two boundary points. By transforming the constraints into a tridiagonal linear equation system for solution, the coefficients of the cubic polynomial in each time segment are calculated. The cubic spline polynomial is then sampled and calculated at a high-frequency time step of 10 milliseconds to obtain the refined displacement, velocity, and acceleration states at unobserved nodes. The reconstructed high-frequency state sequence is integrated with the original high-frequency channel data to output a fine-grained state sequence that is strictly arranged in a fine-grained spatiotemporal coordinate system at a unified high frequency of 100Hz. This provides a standardized data base for subsequent micro-fluctuation feature mining and physical conservation verification.

[0033] In step S12, the fluctuation intensity value of each node in the fine-grained state sequence is calculated using a self-attention mechanism, and nodes whose fluctuation intensity values ​​exceed a preset intensity threshold are extracted as nodes with high anomaly probability, including: S121, taking each spatiotemporal node in the fine-grained state sequence as the center, and combining the preset time span and spatial radius, delineate the dynamic neighborhood window corresponding to each center node; S122, using a self-attention mechanism, the state vector of the central node is mapped to a query vector, and the state vectors of each adjacent node in the dynamic neighborhood window are mapped to key vectors. The dot product of the query vector and each key vector is calculated to obtain the original attention score. S123, normalize the original attention scores to obtain attention weights, calculate the distribution information entropy of each attention weight, and use the distribution information entropy as the fluctuation intensity value of each central node. S124, sort all the fluctuation intensity values ​​of all nodes according to the spatiotemporal dimension, construct the fluctuation intensity distribution, and extract the nodes whose fluctuation intensity values ​​are above the set quantile interval as nodes with high anomaly probability.

[0034] In step S121, taking each spatiotemporal node in the fine-grained state sequence as the center, and combining the preset time span and spatial radius, the dynamic neighborhood window corresponding to each center node is delineated.

[0035] Specifically, for the 100Hz fine-grained state sequence output in step S113, a dynamic correlation topology structure between local displacement and time is constructed node by node. The time span of the dynamic neighborhood window is set to 2 seconds, corresponding to 200 10-millisecond sampling points, and the spatial radius is set to 50 meters.

[0036] The time span is set to 2 seconds because the physical duration of micro-driving intention switching or abnormal sensor fluctuations is usually between 1 and 2 seconds, and a 2-second duration can fully capture the complete envelope of transient fluctuations. The spatial radius is set to 50 meters based on the effective overlap area of ​​vehicle wireless communication and roadside sensing, which can effectively cover the interaction space of adjacent lanes and nearby vehicles in front and behind. For any central node in the sequence, all neighboring spatiotemporal nodes within a 1-second time range before and after it, and within a spatial Euclidean distance of 50 meters, are extracted and combined to form a dynamic neighborhood window set exclusive to that central node.

[0037] In step S122, the state vector of the central node is mapped to a query vector using a self-attention mechanism, and the state vectors of each adjacent node in the dynamic neighborhood window are mapped to key vectors. The dot product of the query vector and each key vector is calculated to obtain the original attention score.

[0038] Specifically, the self-attention mechanism module adopts a single-layer multi-head self-attention architecture, with 8 heads and a 64-dimensional hidden layer feature mapping. The input state vector has a 5-dimensional dimension, including three-dimensional displacement coordinates, instantaneous velocity, instantaneous acceleration, and energy consumption change rate.

[0039] The state vector of the central node is linearly transformed into a 64-dimensional query vector using a pre-trained 5x64-dimensional query weight matrix. Simultaneously, the state vectors of each neighboring node within the dynamic neighborhood window are linearly transformed into 64-dimensional key vectors using a pre-trained 5x64-dimensional key weight matrix. This self-attention mapping network is pre-trained using an offline unsupervised mask reconstruction task. The training dataset is derived from a historical database containing 1 million normal traffic trajectories and multi-source sensor fluctuations. The batch size is set to 64, the AdamW optimizer is used, and the initial learning rate is set to 0.0001. After 100 training epochs, the baseline mapping network parameters are obtained through gradient descent convergence. These baseline mapping network parameters serve as the initial configuration parameters for online inference and are fine-tuned and updated online during subsequent incremental learning.

[0040] During the online inference phase, the query vector of the central node is subjected to vector dot product operation with the key vectors of each neighboring node in the neighborhood one by one. The dot product result is then divided by the square root of the hidden layer dimension, i.e., divided by 8, to scale it, so as to prevent the dot product value from being too large and causing the gradient to vanish. Finally, the original attention score sequence between the central node and each neighboring node in the neighborhood is output.

[0041] In step S123, the original attention scores are normalized to obtain attention weights, and the distribution information entropy of each attention weight is calculated. The distribution information entropy is used as the fluctuation intensity value of each central node.

[0042] Specifically, the original attention score sequence obtained in step S122 is subjected to exponential normalization using the Softmax function, mapping all original attention scores to an attention weight probability distribution with values ​​between zero and one, and where the sum of the weights of all neighboring nodes is strictly equal to one. This attention weight probability distribution objectively reflects the degree of attention focus of the central node on each spatiotemporal node within its dynamic neighborhood. Next, the Shannon information entropy algorithm is introduced to quantitatively characterize the uniformity of this attention weight probability distribution. The attention weight of each neighboring node is multiplied by its base-2 logarithm, and the sum of the products of all neighboring nodes is taken as a negative number to obtain the distribution information entropy corresponding to the central node. The calculated distribution information entropy is used as the fluctuation intensity value of the central node.

[0043] When the subject is in a stable and compliant state of motion, the spatiotemporal correlation between the central node and its neighboring nodes is relatively uniform, the attention weight distribution is relatively smooth, and the calculated fluctuation intensity value determined based on the distributed information entropy is relatively high. However, when the subject experiences a sudden change, abnormal jump, or sensor anomaly within a very short time window, the self-attention mechanism will highly concentrate attention on a few nodes that have experienced abnormal changes, resulting in an extremely sharp peak in the attention weight distribution. At this time, the fluctuation intensity value determined based on the distributed information entropy will drop sharply. In this way, the abstract state fluctuation is successfully transformed into a quantifiable fluctuation intensity value.

[0044] To verify the effectiveness of the aforementioned reverse mapping relationship, this embodiment conducted statistical verification on a historical database containing 1 million normal traffic trajectories and multi-source sensor fluctuations. Specifically, for all trajectory nodes in the database marked as operating normally and smoothly, the distribution information entropy of each node was calculated according to steps S121 to S123, and the distribution range of its entropy value was statistically analyzed. For all abnormal trajectory nodes in the database marked as containing sudden turns, abnormal jumps, or sensor anomalies, their distribution information entropy was calculated in the same way. The statistical results show that the distribution information entropy of normally operating nodes is concentrated in the range of 2.5 bits to 4.5 bits, while the distribution information entropy of abnormal fluctuation nodes is concentrated in the range of 0.5 bits to 2.0 bits. The entropy distribution of the two types of samples is significantly different and the boundary is clear, confirming the strong correlation between the decrease in distribution information entropy and the aggravation of state fluctuations.

[0045] In step S124, the fluctuation intensity values ​​of all nodes are sorted according to the spatiotemporal dimension to construct a fluctuation intensity distribution, and nodes whose fluctuation intensity values ​​are above a set quantile interval are extracted as nodes with high probability of anomalies.

[0046] Specifically, a two-dimensional spatiotemporal index queue is established for all center nodes in the dataset, arranged chronologically from earliest to latest, and simultaneously in ascending order of their three-dimensional spatial coordinates. The fluctuation intensity values ​​(i.e., distribution information entropy values) corresponding to all center nodes in the two-dimensional spatiotemporal index queue are extracted to construct a global fluctuation intensity value distribution histogram. Based on the statistical characteristics of a historical database of anomaly-free samples, the quantile interval is designated as the 5% interval with the lowest fluctuation intensity values, i.e., the 95th percentile threshold. Since lower fluctuation intensity values ​​indicate higher feature distribution concentration and more severe state fluctuations, all center nodes whose fluctuation intensity values ​​fall below this 95th percentile threshold are highlighted and extracted from the entire sequence as a set of highly probable anomaly nodes for subsequent physical equation constraint verification. Through this quantile threshold filtering mechanism, microscopically volatile nodes hidden beneath a surface of macroscopic normal behavior can be adaptively and sensitively screened out without manual annotation.

[0047] The historical anomaly-free sample library is constructed by collecting no fewer than 10,000 sets of main operating trajectory data that have been manually verified and confirmed to be free of anomalies. For each set of data, the fluctuation intensity value of each node is calculated, and a global fluctuation intensity value distribution histogram is constructed. Specifically, the criteria for manually verifying and confirming that there are no anomalies include: all sensor data within the trajectory segment have not triggered hardware fault alarms; the rate of change of velocity between adjacent frames within the trajectory segment does not exceed the physical limits of the vehicle's maximum acceleration and braking deceleration; the spatial continuity index of the three-dimensional displacement trajectory within the trajectory segment is not lower than a preset smoothness threshold; and the deviation of the physical conservation check within the trajectory segment is within the 99.5 percentile of the normal driving historical sample set. Only trajectory segments that meet all of the above conditions are included in the historical anomaly-free sample library.

[0048] In step S13, the actual values ​​of velocity, displacement, and energy consumption of the high-anomaly-probability node are simultaneously substituted into the mechanics and energy conservation equations to obtain the corresponding theoretical values. The deviation between each actual value and the theoretical value is calculated, and when any deviation exceeds the corresponding preset deviation threshold, the high-anomaly-probability node is marked as a suspected violation node, including: S131, Based on the historical operating state of the high-anomaly-probability node, use Newton's second law equation and the energy conservation law equation to obtain the theoretical velocity value, theoretical displacement value and theoretical energy consumption value of the high-anomaly-probability node in the current time window; S132, calculate the velocity deviation between the actual velocity value and the theoretical velocity value, the displacement deviation between the actual displacement value and the theoretical displacement value, and the energy consumption deviation between the actual energy consumption value and the theoretical energy consumption value of the nodes with high anomaly probability.

[0049] In step S131, based on the historical operating state of the high-anomaly-probability node, the theoretical velocity value, theoretical displacement value, and theoretical energy consumption value of the high-anomaly-probability node within the current time window are obtained using Newton's second law equation and the energy conservation law equation.

[0050] Specifically, the stable operating state data of 10 consecutive high-frequency sampling points (i.e., 100 milliseconds of historical time period) of the high-anomaly-probability nodes selected in step S124 before the current 5-second time window are extracted as the initial state for dynamic deduction. Using Newton's second law, the drag coefficient of 0.3 and the rolling friction coefficient of 0.015 are taken as the ideal physical parameters of the vehicle. The actual speed of the previous moment and the net external force acting on the main body are integrated in the time domain to calculate the theoretical speed value under the condition of no measurement disturbance within the current time window. Based on this, the theoretical speed value is integrated twice in time to obtain the theoretical displacement value of the main body at the current moment. At the same time, based on the law of conservation of energy, the mechanical work done by the engine driving force on the theoretical displacement, combined with the mechanical transmission efficiency of 85% and the heat loss coefficient, is converted into work done per unit time, and the theoretical instantaneous power value is obtained, thus establishing an ideal motion and energy consumption benchmark strictly constrained by physical laws.

[0051] It should be noted that the theoretical displacement value is obtained by integrating the theoretical velocity value over time, and the theoretical velocity value is obtained by integrating Newton's second law equation over time, thus forming a closed system of equations consisting of Newton's second law, kinematic integral relations, and the law of conservation of energy.

[0052] In step S132, the velocity deviation between the actual velocity value and the theoretical velocity value, the displacement deviation between the actual displacement value and the theoretical displacement value, and the energy consumption deviation between the actual energy consumption value and the theoretical energy consumption value of the nodes with high anomaly probability are calculated respectively.

[0053] Specifically, the actual velocity value, actual three-dimensional displacement coordinate value, and actual instantaneous power value corresponding to the high-anomaly probability node in the fine-grained state sequence output in step S113 are extracted. The absolute value of the difference between the actual velocity value and the theoretical velocity value obtained in step S131 is taken to obtain the velocity deviation. The three-dimensional Euclidean distance between the actual and theoretical three-dimensional displacement coordinates is calculated to obtain the displacement deviation. The absolute value of the difference between the actual and theoretical instantaneous power values ​​is taken and divided by the theoretical instantaneous power value to obtain the energy consumption deviation. When the theoretical instantaneous power value is less than a preset idle power benchmark, the denominator is the preset idle power benchmark. By combining multi-dimensional calculations of absolute and relative deviations, the degree to which the actual observed data deviates from the physical conservation laws is quantitatively characterized.

[0054] In step S14, when any of the deviations exceeds the corresponding preset deviation threshold, the high-probability-of-abnormality node is marked as a suspected violation node, including: S141, when the speed deviation exceeds a preset speed threshold, or the displacement deviation exceeds a preset displacement threshold, or the energy consumption deviation exceeds a preset energy consumption threshold, the position corresponding to the high anomaly probability node is set as a violation mark in the constraint violation mark matrix. S142, Extract high-probability-of-abnormal nodes with the aforementioned violation markers and establish a spatiotemporal distribution matrix; S143, Perform spatial clustering analysis on the spatiotemporal distribution matrix and mark the nodes located in the concentrated violation area as suspected violation nodes.

[0055] In step S141, when the speed deviation exceeds a preset speed threshold, or the displacement deviation exceeds a preset displacement threshold, or the energy consumption deviation exceeds a preset energy consumption threshold, the position corresponding to the high anomaly probability node is marked as a violation in the constraint violation marking matrix.

[0056] Specifically, a two-dimensional constraint violation marker matrix is ​​constructed, corresponding one-to-one with all spatiotemporal nodes, and all initial elements of the matrix are set to zero. A three-dimensional physical threshold is introduced, calibrated based on the ultimate dynamic performance of real vehicles and the noise limits of sensor measurements. The preset speed threshold and preset displacement threshold are adaptively determined based on the extreme values ​​or high quantiles of the physical deviation distribution in the normal driving history sample set. Specifically, the normal driving history sample set originates from test vehicles in a controlled test field and at least 100,000 compliant historical driving trajectory segments initially screened through hardware fault-free alarm logs. After manually offline verifying and performing dual physical conservation cross-validation on these trajectory segments to confirm the absence of abrupt changes in physical quantities and sensor packet loss anomalies, the normal driving history sample set is constructed. During the screening process, all records from the test vehicles in the controlled test field are directly adopted. For the trajectory segments initially screened based on hardware fault-free alarm logs, each trajectory segment is checked for consecutive time gaps exceeding 50 milliseconds, for inter-frame displacement jumps exceeding the maximum displacement corresponding to the vehicle's physical speed limit, and for instantaneous power mutation rates exceeding a preset change rate threshold. Only trajectory segments that pass all the above checks are included in the normal driving history sample set. Furthermore, the construction of the normal driving history sample set and the historical anomaly-free sample library adopts the same verification standards to ensure consistency in data quality.

[0057] During the training phase, the 99.5th percentile of the normal, anomaly-free sample distribution is calculated, corresponding to a preset speed threshold of 2.5 meters per second and a preset displacement threshold of 1.8 meters per second. These threshold boundaries represent the physical upper limit of the allowable deviation between the vehicle's maximum output power and maximum braking deceleration within its extreme dynamic range. The preset power deviation rate threshold is set based on the fact that a power deviation exceeding 20% ​​cannot be explained by normal wind resistance or road slope changes, indicating sensor data falsification or system malfunction. Each three-dimensional deviation / deviation rate is compared with its corresponding preset threshold. When the absolute speed deviation exceeds 2.5 meters per second, or the absolute displacement deviation exceeds 1.8 meters per second, or the instantaneous relative power deviation rate exceeds 20%, the node with a high probability of anomaly is determined to have violated physical conservation laws. The corresponding row and column position of this node is then flipped from zero to one in the constraint violation marker matrix, and a violation marker is assigned.

[0058] In steps S142 and S143, high-probability abnormal nodes with the violation markers are extracted to establish a spatiotemporal distribution matrix. Spatial clustering analysis is performed on the spatiotemporal distribution matrix to mark nodes located in concentrated violation areas as suspected violation nodes.

[0059] Specifically, the constraint violation marker matrix is ​​traversed, and all spatiotemporal nodes with a value of one and their corresponding 3D spatial coordinates and timestamps are extracted to construct a spatiotemporal distribution matrix. A density-based noisy spatial clustering algorithm is used to cluster the spatiotemporal distribution matrix. The algorithm uses a hybrid spatiotemporal distance for neighborhood distance, which is the spatial Euclidean distance divided by 30 meters, plus the time difference divided by 1 second. The reason for choosing 30 meters and 1 second as dimensionless scaling factors is that 30 meters corresponds to the typical displacement envelope boundary of a vehicle within 1 second under typical driving conditions. By dividing by 30 meters and 1 second respectively, the heterogeneous spatiotemporal dimensions are converted into dimensionless values, ensuring that the spatial span of 30 meters and the time span of 1 second have equal weight in distance measurement calculations.

[0060] The neighborhood radius is set to 1.0, and the minimum number of cluster nodes is set to 5. If a node with a violation label has more than 5 other nodes with the same violation label in its mixed spatiotemporal neighborhood, then the node is determined not to be isolated hardware random noise or sporadic interference, but rather to be located within a continuously occurring concentrated violation region. All spatiotemporal nodes located within the concentrated violation region are assigned a high-confidence violation label and ultimately marked as suspected violation nodes for subsequent classification and verification mechanisms to determine actual violations.

[0061] like Figure 2As shown in the figure, this diagram illustrates the distribution of violation markers and suspected violation nodes along the three-dimensional spatial behavioral trajectory in step S14. The light blue curve represents the normal trajectory, the gray dots represent the violation marker nodes marked after the physical deviation exceeds the threshold in step S141, and the yellow asterisks represent the suspected violation nodes selected from the violation marker nodes after spatial clustering analysis in step S143. This figure intuitively presents the discrete distribution characteristics of violation marker nodes along the trajectory and the spatial clustering pattern of suspected violation nodes. It reflects the technical logic of distinguishing isolated hardware noise interference from real concentrated violations through density clustering, providing a spatial distribution-level data foundation and visual verification basis for the subsequent step S15 to extract multi-dimensional feature vectors and perform binary classification.

[0062] In step S15, the multi-dimensional feature vector of the suspected violation node is extracted, and a binary classification judgment is performed in combination with the pre-maintained historical constraint triggering state to determine the real violation node, including: S151, the physical quantity sequence of the suspected violation node is divided according to the preset duration sub-segments, and the mean, variance, extreme value and rate of change in each sub-segment are calculated to obtain the original feature vector; S152, Calculate the corresponding violation confidence level based on the original feature vector; S153, when the violation confidence level meets the set confidence level threshold and the frequency of historical constraint triggering corresponding to the suspected violation node exceeds the set number of times, the suspected violation node is confirmed as a real violation node.

[0063] In step S151, the physical quantity sequences of the suspected violation nodes are divided according to preset duration segments, and the mean, variance, extreme values ​​and rate of change in each segment are statistically analyzed to obtain the original feature vector.

[0064] Specifically, for the suspected violation nodes selected in step S143, a multivariate physical quantity time series of 2.5 seconds before and after the node, for a total duration of 5 seconds, is extracted. This time series includes instantaneous velocity, three-dimensional displacement, acceleration, instantaneous power, and physical deviation. This 5-second time series is divided into 5 preset duration segments, each with a strictly defined time span of 1 second, corresponding to 100 high-frequency sampling points. The segmentation is based on the fact that a 1-second time granularity can accurately capture the non-stationary evolution characteristics of microscopic behavior within a short time. For each duration segment, the arithmetic mean, statistical variance, extreme value difference (the difference between the maximum and minimum values), and first-order difference mean (the rate of change) of each physical quantity sequence within that 1-second interval are calculated. The statistical indicators calculated from the 5 duration segments are then concatenated and combined in a multidimensional manner to construct an original feature vector containing 100-dimensional statistical features, achieving a high-dimensional representation of the spatiotemporal dynamic characteristics of the microscopic state of the suspected violation node.

[0065] In step S152, the corresponding violation confidence level is calculated based on the original feature vector.

[0066] Specifically, to eliminate the impact of differences in physical dimensions and numerical orders of magnitude among the 100-dimensional original feature vectors on the accuracy of the judgment, a discrete maximum-minimum normalization algorithm is used to standardize the original feature vectors. This normalization algorithm, based on the maximum and minimum values ​​of each dimension of features in the historical training set, linearly maps each feature component to a dimensionless interval between 0 and 1. Subsequently, the normalized feature vector is input into the binary classification discriminant model to calculate the violation confidence score, i.e., the probability or confidence score that the node belongs to the true violation behavior pattern, with a value between 0 and 1.

[0067] The binary classification model is constructed through offline supervised training. The training dataset contains 50,000 historical samples labeled with real violations and random perturbations, with 25,000 positive samples and 25,000 negative samples. Positive samples are derived from real violation nodes in the historical database that have been manually labeled and confirmed. The labeling criteria for real violation nodes are consistent with the online judgment logic executed in steps S141 to S153, namely, they must simultaneously meet the triple confirmation conditions of physical deviation exceeding the threshold (corresponding to S141), being located in a concentrated violation area (corresponding to S143), and the violation confidence meeting the set confidence threshold and the frequency of historical constraint triggering exceeding the set number (corresponding to S153). Negative samples are derived from trajectory nodes that have been confirmed to be anomalies under long-term stable operation. During training, the samples are divided into training and test sets in an 8:2 ratio. Five-fold cross-validation is used to adaptively optimize the model hyperparameters, with the optimization objective being to maximize the average Youden exponent under cross-validation, thus determining the classification decision boundary. After training convergence, the reserved test set is used to verify the generalization performance, ensuring that the model's classification accuracy on unseen data is not less than 95%.

[0068] In step S153, when the violation confidence level meets the set confidence level threshold and the frequency of historical constraint triggering corresponding to the suspected violation node exceeds the set number of times, the suspected violation node is confirmed as a real violation node.

[0069] Specifically, the violation confidence score calculated in step S152 is compared with a preset confidence threshold. The preset confidence threshold is determined adaptively by maximizing the Youden exponent of the ROC curve during cross-validation of the training set, for example, it is set to 0.65, which is used to balance recall and precision in binary classification. Specifically, a training set containing no less than 10,000 labeled samples is constructed, and five-fold cross-validation is used. The candidate confidence thresholds are traversed in the interval [0.1, 0.9] with a step size of 0.05. The objective function is to maximize the Youden exponent, i.e., recall plus specificity minus 1. After the above process, the optimal threshold is 0.65.

[0070] When the violation confidence level is greater than or equal to the set confidence threshold, the pre-maintained historical constraint trigger state is further introduced for secondary cross-validation. The pre-maintained historical constraint trigger state is maintained in real time by constructing a historical constraint trigger state table and a circular sliding queue in system memory. Specifically, whenever the upstream physical verification step S141 determines that the physical deviation of any node exceeds the preset deviation threshold, the system extracts the unique device or spatiotemporal identifier corresponding to the node and appends a trigger record containing the violation mark and a precise millisecond-level timestamp to the historical constraint trigger state table; at the same time, the system performs dynamic sliding window maintenance on the historical constraint trigger state table based on the current determination time, automatically scanning and physically clearing old trigger records with timestamps more than 10 seconds earlier than the current time, thereby maintaining the latest historical constraint trigger state of each node within the predetermined historical time window of the past 10 seconds in real time.

[0071] Query the historical constraint trigger status table to count the cumulative number of times the suspected violation node was marked as a violation within a 10-second historical time window, thus obtaining the historical constraint trigger frequency.

[0072] The set number of triggers is quantitatively derived based on the Poisson distribution probability model. According to the hardware fault-free operation log statistics, the average trigger frequency of hardware random noise is 0.05 times per second. Therefore, within a predetermined historical time window of 10 seconds, the average number of triggers λ according to the Poisson distribution is 0.05 multiplied by 10, which equals 0.5 times. Based on the Poisson distribution probability formula, when λ equals 0.5, the probability of hardware random noise triggering 0 times within 10 seconds is approximately 60.65%, the probability of triggering once is approximately 30.33%, and the probability of triggering twice is approximately 7.58%. To control the cumulative probability of misjudgment caused by continuous hardware random noise triggering below the 1% significance level, the calculated cumulative probability of more than 3 consecutive triggers is only 0.18%, far below the extremely low probability threshold of 1%. Therefore, the set number of triggers is determined to be 3 times. When the historical constraint trigger frequency exceeds the set number, i.e., greater than 3 times, the interference of occasional random noise is excluded, and the suspected violation node is confirmed as a real violation node.

[0073] In step S16, the state records of the actual violating nodes are removed from the fine-grained state sequence, and the remaining records that pass the consistency check are updated as the basic data for constructing the behavioral twin, including: S161, based on the identifier corresponding to the real violation node, remove the state record of the real violation node from the fine-grained state sequence to obtain the remaining record entries; S162, Perform spatiotemporal consistency verification on the remaining record entries to obtain a state sequence that passes the consistency verification; S163, Incrementally encode the state sequence that has passed the consistency check, write it into the state storage space of the behavioral twin, and update the subject behavior trajectory in the behavioral twin.

[0074] In step S161, based on the identifier corresponding to the real violation node, the state record of the real violation node is removed from the fine-grained state sequence to obtain the remaining record entries.

[0075] Specifically, the state records of the confirmed real violation nodes in step S153 are extracted, and their unique 64-bit global hash state record identifiers in the database are obtained. The state sequence awaiting update in the cached behavior twin is retrieved synchronously. This state sequence contains a 100Hz fine-grained state sequence preprocessed in S113 within the current time window. Each record entry in this fine-grained state sequence is traversed using a two-pointer single-scan algorithm. When the 64-bit global hash state record identifier of a record entry matches a real violation node, a memory discard instruction is triggered, physically erasing the record entry from the cache sequence and releasing the memory space it occupies. When a record entry does not match a real violation node, it is retained and sequentially appended to a temporary storage area, completely isolating and removing micro-level violation data hidden beneath the surface of normal behavior, resulting in the remaining record entries composed of pure compliant state records.

[0076] In step S162, the remaining record entries are subjected to spatiotemporal consistency verification to obtain a state sequence that passes the consistency verification.

[0077] Specifically, the data flow logic closed loop and spatiotemporal continuity verification are performed on the remaining record entries obtained in step S161. The consistency verification includes two dimensions: temporal continuity and 3D spatial displacement continuity. The timestamp difference between two adjacent records in the remaining record entries is calculated. If the timestamp difference exceeds the preset temporal discontinuity threshold, a temporal discontinuity is determined to exist.

[0078] The time-series discontinuity threshold is determined by the statistical value of the maximum sampling interval of the high-frequency sensor, for example, set to 50 milliseconds. The average spatial movement speed between adjacent records is calculated, and the upper limit of the spatial jump speed is determined by the sum of the extreme values ​​of the vehicle's physical speed limit and the hardware speed measurement error, for example, set to 45 meters per second. If the timestamp difference exceeds the time-series discontinuity threshold, or the average speed exceeds the upper limit of the spatial jump speed, a data discontinuity is determined to exist; conversely, when the remaining record entries simultaneously satisfy the condition that the timestamp difference is not greater than the time-series discontinuity threshold and the average speed is not greater than the upper limit of the spatial jump speed, they are determined to have passed the data flow consistency check and are identified as a state sequence that has passed the consistency check.

[0079] In step S163, incremental encoding is performed based on the state sequence that has passed the consistency check, and the result is written into the state storage space of the behavioral twin to update the subject behavior trajectory in the behavioral twin.

[0080] Specifically, to reduce data transmission bandwidth and storage pressure on the behavioral twin database, the state sequence output in step S162 that has passed consistency verification is subjected to incremental differential encoding compression: the first node in the state sequence is selected as the reference anchor point to record the full absolute value, and subsequent nodes only record their incremental changes in 3D coordinates, instantaneous velocity, and energy consumption characteristics relative to the previous node. A variable-length integer encoding algorithm is used to compress and package the incremental change values, constructing a highly compressed incremental update data block. Subsequently, through an efficient remote procedure call protocol, the incremental update data block is asynchronously written into the distributed graph database and state storage space of the behavioral twin, updating the high-precision physical behavior trajectory of the subject in the behavioral twin in real time, achieving seamless synchronization and pure restoration of the state evolution between the digital space and the real physical world.

[0081] In a preferred embodiment, after incremental update and updating of the subject behavior trajectory in the behavior twin in step S16, the behavior twin construction method based on multi-source heterogeneous data further includes the following process: extracting the updated subject behavior trajectory in the behavior twin, performing density spatial clustering on the subject behavior trajectory to obtain multiple trajectory clusters, calculating the overlap degree between each trajectory cluster and a preset standard trunk line, removing trajectory clusters with overlap degrees exceeding a set overlap threshold, and combining the remaining discrete trajectory points with abnormal cluster points to construct an anomalous spatiotemporal node set, extracting yaw distance, abnormal dwell time, and load change rate features from the anomalous spatiotemporal node set to obtain an anomalous feature vector, outputting the corresponding anomalous type identification result based on the anomalous feature vector, and adding the anomalous feature vector and the anomalous type identification result as new training samples to the historical sample library, triggering incremental learning and updating the preset intensity threshold.

[0082] Specifically, after incremental updating and updating the subject's behavioral trajectory in the behavioral twin in step S16, the updated historical full behavioral trajectory of the subject stored in the behavioral twin is extracted. A density-based noisy spatial clustering algorithm is used to spatially cluster the subject's behavioral trajectory, with a neighborhood radius set to 50 meters and a minimum number of cluster points set to 10. Through cluster analysis of the three-dimensional spatial coordinates, continuously distributed trajectory points are merged and divided into multiple trajectory clusters representing the subject's normal movement path.

[0083] Subsequently, pre-set standard trunk line data, i.e., urban arterial roads or fixed transportation routes, are retrieved from the high-precision map database. The spatial overlap between each trajectory cluster and the pre-set standard trunk line is calculated one by one. The overlap is calculated as the percentage of trajectory points within a trajectory cluster that fall within a 50-meter buffer zone of the standard trunk line out of the total number of points in that trajectory cluster. An overlap threshold of 80% is set. When the overlap between a trajectory cluster and the pre-set standard trunk line exceeds 80%, the trajectory cluster is determined to be a compliant standard trunk line travel trajectory and is removed. Trajectory clusters with an overlap of no more than 80% are identified as abnormal behaviors deviating from the normal route. These discrete trajectory points deviating from the route, along with abnormal clusters gathered in non-designated areas, are combined to construct an anomalous spatiotemporal node set.

[0084] Furthermore, for each node in the anomalous spatiotemporal node set, multidimensional spatial and load features are extracted to construct an anomaly feature vector. Specifically, the extracted features include yaw distance, anomalous dwell time, and load change rate. Yaw distance is calculated by determining the vertical Euclidean distance between the anomalous node and the nearest standard trunk line; anomalous dwell time is calculated by determining the continuous duration during which the subject's speed is less than 0.2 meters per second in an area without a matching parking lot or station; and the load change rate is calculated by determining the ratio of the load change collected by the vehicle's suspension sensor or axle load sensor to the rated load during this period. The yaw distance, anomalous dwell time, and load change rate are concatenated to form a 3D anomaly feature vector. This anomaly feature vector is input into an offline-trained decision tree classifier, which outputs the corresponding anomaly type identification result, such as smuggling, illegal detours, unauthorized abnormal parking and unloading, or data spoofing.

[0085] The decision tree classifier is constructed through offline supervised training. The training dataset consists of no fewer than 3,000 sets of anomalous spatiotemporal node samples with clearly defined anomaly type labels accumulated in history, covering no fewer than 5 anomaly types such as yaw, abnormal docking, and data camouflage. During training, 3-dimensional features such as yaw distance, abnormal stay duration, and load change rate are used as inputs, and the corresponding anomaly type labels are used as supervision signals. The Gini coefficient is used as the node splitting criterion, with a maximum depth of 6 layers and a minimum number of samples per leaf node of 10. A post-pruning strategy is used to prevent overfitting. After training, 500 independent test samples are used for validation to ensure that the classification accuracy is no less than 90%.

[0086] Finally, the extracted abnormal feature vectors and corresponding abnormal type identification results are packaged into new training samples and automatically added to the historical sample library. When the number of newly added training samples accumulated in the historical sample library reaches the preset incremental update threshold of 500 sets, the background incremental learning task is automatically triggered. Incremental learning uses an online gradient descent algorithm to fine-tune the self-attention mechanism model without destroying existing knowledge, and re-statistically analyzes the percentile distribution of the information entropy of the entire sample distribution, thereby dynamically updating the preset intensity threshold used in step S124, i.e., the 95th percentile threshold. Through this closed-loop feedback and incremental learning mechanism, the adaptive evolution of the system's judgment boundary is achieved, significantly improving the continuous judgment accuracy of new and covert violation methods.

[0087] In summary, this invention discloses a method for constructing a behavioral twin based on multi-source heterogeneous data. The method includes acquiring observation data from multiple channels and preprocessing the observation data to obtain a fine-grained state sequence under a unified fine-grained spatiotemporal coordinate system; calculating the fluctuation intensity value of each node in the fine-grained state sequence using a self-attention mechanism, and extracting nodes whose fluctuation intensity values ​​exceed a preset intensity threshold as high-probability anomaly nodes; simultaneously substituting the actual values ​​of velocity, displacement, and energy consumption of the high-probability anomaly nodes into Newton's second law and the law of conservation of energy to obtain corresponding theoretical values, and calculating the deviation between each actual value and the theoretical value; marking the high-probability anomaly node as a suspected violation node when any deviation exceeds the corresponding preset deviation threshold; extracting the multi-dimensional feature vector of the suspected violation node, and performing binary classification based on pre-maintained historical constraint trigger states to determine the true violation node; removing the state records of the true violation node from the fine-grained state sequence, and updating the remaining records that pass consistency verification as the basic data for constructing the behavioral twin. This invention eliminates data granularity differences and gaps through spatiotemporal alignment and fitting reconstruction, utilizes self-attention information entropy and physical conservation equations to achieve multidimensional and accurate identification of micro-fluctuations, and combines binary classification verification and incremental learning mechanisms to purify contaminated data and drive adaptive updates of judgment thresholds, thereby realizing the high-precision construction and long-term stable evolution of behavioral twins.

[0088] The second embodiment of the present invention provides a behavioral twin construction system based on multi-source heterogeneous data, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer executes the program to implement the method described above.

[0089] It should be noted that the behavioral twin construction system based on multi-source heterogeneous data provided in this embodiment of the invention is used to execute all the process steps of the behavioral twin construction method based on multi-source heterogeneous data in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0090] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0091] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method for constructing behavioral twins based on multi-source heterogeneous data, characterized in that, include: Observation data from multiple channels are acquired and preprocessed to obtain a fine-grained state sequence under a unified fine-grained spatiotemporal coordinate system. The fluctuation intensity value of each node in the fine-grained state sequence is calculated using a self-attention mechanism, and nodes whose fluctuation intensity value exceeds a preset intensity threshold are extracted as nodes with high anomaly probability. Substitute the actual values ​​of velocity, displacement and energy consumption of the nodes with high anomaly probability into Newton's second law and the law of conservation of energy to obtain the corresponding theoretical values, and calculate the deviation between each actual value and the theoretical value. When any of the aforementioned deviations exceeds the corresponding preset deviation threshold, the node with a high probability of anomaly is marked as a suspected violation node. Extract the multi-dimensional feature vector of the suspected violation node, and perform binary classification judgment by combining it with the pre-maintained historical constraint trigger state to determine the real violation node; The state records of the actual violating nodes are removed from the fine-grained state sequence, and the remaining records that pass the consistency check are used as the basic data for constructing the behavioral twin.

2. The method for constructing a behavioral twin based on multi-source heterogeneous data according to claim 1, characterized in that, The process of acquiring observation data from multiple channels and preprocessing the observation data to obtain a fine-grained state sequence under a unified fine-grained spatiotemporal coordinate includes: The clock deviation of each channel is obtained based on a standard time server, and the clock deviation is used to shift and correct the data timestamps of the multiple channels. The aligned data streams are segmented according to the set sliding time window, and linear proportional filling is performed when time gaps are detected to obtain multi-source observation sequences. The predicted state of the coarse-grained data source in the multi-source observation sequence is calculated based on the Kalman filter, and the state of the unobserved nodes is reconstructed to obtain the fine-grained state sequence.

3. The method for constructing behavioral twins based on multi-source heterogeneous data according to claim 1, characterized in that, The calculation of the fluctuation intensity value of each node in the fine-grained state sequence using the self-attention mechanism includes: Taking each spatiotemporal node in the fine-grained state sequence as the center, and combining the preset time span and spatial radius, the dynamic neighborhood window corresponding to each center node is defined. The state vector of the central node is mapped to a query vector using a self-attention mechanism, and the state vectors of each adjacent node in the dynamic neighborhood window are mapped to key vectors. The dot product of the query vector and each key vector is calculated to obtain the original attention score. The original attention scores are normalized to obtain attention weights, and the distribution information entropy of each attention weight is calculated. The distribution information entropy is used as the fluctuation intensity value of each central node.

4. The method for constructing a behavioral twin based on multi-source heterogeneous data according to claim 1, characterized in that, The step of extracting nodes whose fluctuation intensity values ​​exceed a preset intensity threshold as nodes with high anomaly probability includes: The fluctuation intensity values ​​of all nodes are sorted according to the spatiotemporal dimension to construct the fluctuation intensity distribution; Nodes whose fluctuation intensity values ​​are above a set quantile range are extracted as nodes with high probability of anomalies.

5. The method for constructing behavioral twins based on multi-source heterogeneous data according to claim 1, characterized in that, The process involves simultaneously substituting the actual values ​​of velocity, displacement, and energy consumption of the nodes with high anomaly probability into Newton's second law and the law of conservation of energy to obtain corresponding theoretical values, and calculating the deviation between each actual value and the theoretical value, including: Based on the historical operating state of the high-anomaly-probability node, the theoretical velocity, theoretical displacement, and theoretical energy consumption of the high-anomaly-probability node within the current time window are obtained using Newton's second law equation and the energy conservation law equation. Calculate the velocity deviation between the actual and theoretical velocity values, the displacement deviation between the actual and theoretical displacement values, and the energy consumption deviation between the actual and theoretical energy consumption values ​​for the nodes with high anomaly probability.

6. The method for constructing behavioral twins based on multi-source heterogeneous data according to claim 5, characterized in that, The step of marking the high-probability-of-abnormality node as a suspected violation node when any of the aforementioned deviations exceeds the corresponding preset deviation threshold includes: When the speed deviation exceeds a preset speed threshold, or the displacement deviation exceeds a preset displacement threshold, or the energy consumption deviation exceeds a preset energy consumption threshold, the position corresponding to the high anomaly probability node is marked as a violation in the constraint violation marking matrix. Extract nodes with high probability of anomalies that have the aforementioned violation markers and establish a spatiotemporal distribution matrix; Spatial clustering analysis is performed on the spatiotemporal distribution matrix, and nodes located in concentrated violation areas are marked as suspected violation nodes.

7. The method for constructing behavioral twins based on multi-source heterogeneous data according to claim 1, characterized in that, The step of extracting the multi-dimensional feature vector of the suspected violation node, combining it with the pre-maintained historical constraint triggering state for binary classification to determine the real violation node includes: The physical quantity sequences of the suspected violation nodes are divided according to preset duration segments, and the mean, variance, extreme values ​​and rate of change in each segment are statistically analyzed to obtain the original feature vector. Calculate the corresponding violation confidence level based on the original feature vector; When the violation confidence level meets the set confidence level threshold and the frequency of historical constraint triggering corresponding to the suspected violation node exceeds the set number of times, the suspected violation node is confirmed as a real violation node.

8. The method for constructing a behavioral twin based on multi-source heterogeneous data according to claim 1, characterized in that, The step of removing the state records of the actual violating nodes from the fine-grained state sequence and updating the remaining records that have passed the consistency check as the basic data for constructing the behavioral twin includes: Based on the identifier corresponding to the actual violation node, the state record of the actual violation node is removed from the fine-grained state sequence to obtain the remaining record entries; Perform a spatiotemporal consistency check on the remaining record entries to obtain a state sequence that passes the consistency check; Incremental encoding is performed based on the state sequence that has passed the consistency check, and the result is written into the state storage space of the behavioral twin to update the subject's behavioral trajectory in the behavioral twin.

9. The method for constructing a behavioral twin based on multi-source heterogeneous data according to claim 1, characterized in that, After updating the remaining records that have passed the consistency check as the foundational data for constructing the behavioral twin, the following is also included: Extract the updated subject behavior trajectory from the behavior twin, and perform density space clustering on the subject behavior trajectory to obtain multiple trajectory clusters; Calculate the overlap degree between each trajectory cluster and the preset standard trunk line, remove trajectory clusters whose overlap degree exceeds the set overlap threshold, and combine the remaining discrete trajectory points with abnormal cluster points to construct an anomalous spatiotemporal node set. Extract the yaw distance, abnormal dwell time and load change rate features from the abnormal spatiotemporal node set to obtain an abnormal feature vector, and output the corresponding abnormal type identification result based on the abnormal feature vector; The abnormal feature vector and the abnormal type identification result are added as new training samples to the historical sample library, triggering incremental learning and updating the preset intensity threshold.

10. A behavioral twin construction system based on multi-source heterogeneous data, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method according to any one of claims 1 to 9.