Multi-resolution time-frequency tensor completion method and system for crowd-sensing data completion

CN122527498BActive Publication Date: 2026-10-23HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611024250.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-10-23
Estimated Expiration
2046-07-10

AI Technical Summary

Technical Problem

本发明通过构建位置-指标-时间稀疏三阶张量,提取非平稳时序表示并进行多尺度分段与频域变换,利用增强频率注意力模块对频率分量进行自适应筛选与加权,再根据频谱平坦度指标SFM和高频能量占比指标HIR对时间域与频率域补全结果进行自适应融合,以解决现有技术中存在的单域建模能力不足、频率选择僵化、多尺度动态刻画不足以及时频融合不自适应等问题,从而在高缺失率条件下实现对全局结构与局部突发变化的协同恢复

Benefits of technology

1、多维度协同建模能力

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122527498B_ABST
    Figure CN122527498B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-resolution time-frequency tensor completion crowd-sourcing data completion method and system, belong to mobile crowd-sourcing and intelligent computing technical field.The method constructs as position-index-time sparse tensor for perception data, extracts non-stationary time series representation through time domain coding and multi-scale segmentation, performs frequency domain transformation on each scale and utilizes enhanced frequency attention to adaptively filter and weight frequency components, obtains frequency domain results after inverse transformation;To avoid spectral bias caused by zero padding, construct a spectral analysis sequence using the observed values and time domain results, calculate the spectral flatness and high-frequency energy proportion indicators, and generate a monotonic suppression adaptive fusion weight. In the training phase, the model is optimized with the main reconstruction loss, frequency domain consistency loss, and sparse regularization term. The application can balance global structure and local mutation preservation, avoid over-smoothing, has high precision and strong robustness, and is suitable for traffic, air quality and environmental perception scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile swarm sensing data processing and intelligent sensing computing technology, and in particular to a swarm sensing data completion method and system for multi-resolution time-frequency tensor completion. Background Technology

[0002] Mobile Crowd Sensing (MCS) is an important technological paradigm that leverages the sensing capabilities of intelligent terminal devices to achieve large-scale urban data collection. It has been widely applied in scenarios such as air quality monitoring, traffic condition analysis, public safety sensing, environmental monitoring, and intelligent urban decision-making. Compared with traditional static sensing infrastructure, mobile crowd sensing has advantages such as low deployment cost, wide spatial coverage, and high flexibility.

[0003] However, in real-world applications, mobile crowd sensing data is often severely lacking. On one hand, user participation is opportunistic and heterogeneous, with inconsistent sampling frequencies across different terminal devices. On the other hand, due to factors such as communication interruptions, energy constraints, privacy restrictions, and the discontinuity of user movement behavior, the collected data often exhibits a highly sparse and strongly incomplete spatiotemporal observation structure. This data gap significantly weakens the reliability of subsequent analysis tasks, such as anomaly detection, urban state estimation, environmental change prediction, and intelligent service recommendation. Therefore, how to accurately complete highly missing mobile crowd sensing data has become a crucial research problem in this field.

[0004] Existing data completion methods mainly include matrix completion, tensor decomposition, and deep learning-based completion methods. Matrix completion methods typically represent data as a two-dimensional matrix and rely on low-rank factorization to recover missing values, but they struggle to characterize the complex relationships between multiple dimensions such as location, metrics, and time. Tensor completion methods can enhance expressive power through high-order structure modeling, but they mostly rely on the assumption of linear low-rank decomposition, often failing to accurately represent complex nonlinear dynamics in real-world nonstationary motion sensing scenarios. While deep learning methods have made some progress in nonlinear modeling in recent years, they still have the following shortcomings: (1) Existing methods often only model within a single domain. When relying solely on time domain modeling, local time dependencies are prone to collapse in high-missing scenarios, forming "information gaps"; when relying solely on frequency domain modeling, although it is beneficial to extract globally stable patterns, it is easy to ignore local sudden changes, resulting in overly smooth recovery results; (2) Existing frequency domain methods usually adopt a fixed heuristic low-pass strategy, which tends to retain low-frequency components and suppress high-frequency components. However, in mobile crowd sensing data, many sudden events, abnormal changes and large fluctuations often correspond to high-frequency regions. If high-frequency components are directly regarded as noise, it will destroy the key event information. (3) Mobile crowd sensing data usually contains multi-scale heterogeneous dynamics, such as slow changing trends, periodic fluctuations and short-term sudden responses. Single-scale modeling is difficult to take into account the structural features at different time granularities. (4) The spectral structures corresponding to different locations and different perception indicators are significantly different. If a fixed fusion coefficient is used to directly combine the time domain results with the frequency domain results, it is difficult to achieve adaptive modeling for the local characteristics of the sample.

[0005] Furthermore, existing multi-scale temporal imputation methods typically enhance temporal modeling capabilities through periodic tensor rearrangement, axial attention, multi-scale convolution, deformable convolution, or coarse-to-fine scale aligned resampling. While these methods can utilize multi-scale structures to some extent, their focus remains on dependency modeling within the time domain or periodic structure. They do not perform multi-scale Fourier transforms on time-domain encoded features, nor do they adaptively select and weight frequency components at different scales. Meanwhile, existing dynamic fusion methods often generate fusion coefficients through feedforward networks, global pooling, or learnable weight matrices. Their fusion objects are usually coarse-scale and fine-scale features, rather than time-domain and frequency-domain imputation results. Therefore, existing methods struggle to explicitly determine the reliability of frequency-domain imputation results based on the sequence's spectral flatness and high-frequency energy proportion, and they also struggle to simultaneously restore the global spectral structure and preserve local burst changes in high-missing scenarios.

[0006] Therefore, there is an urgent need for a tensor completion method that is suitable for mobile swarm intelligence sensing data with high missing data, can combine time domain and frequency domain information, take into account multi-scale dynamic representation and maintain the ability to handle sudden changes, so as to improve the completion accuracy and robustness and avoid the over-smoothing phenomenon in the recovery results. Summary of the Invention

[0007] To address the aforementioned shortcomings of existing technologies, this invention provides a method and system for crowdsourced sensing data completion using multi-resolution time-frequency tensor completion. This invention constructs a location-index-time sparse third-order tensor, extracts non-stationary time-series representations, performs multi-scale segmentation and frequency domain transformation, utilizes an enhanced frequency attention module to adaptively filter and weight frequency components, and then adaptively fuses the time-domain and frequency-domain completion results based on the spectral flatness index (SFM) and the high-frequency energy ratio index (HIR). This solves the problems of insufficient single-domain modeling capability, rigid frequency selection, inadequate multi-scale dynamic characterization, and non-adaptive time-frequency fusion in existing technologies, thereby achieving collaborative recovery of global structure and local sudden changes even under high missing rate conditions.

[0008] The specific technical solution of the present invention is as follows: This invention provides a method for swarm intelligence sensing data completion using multi-resolution time-frequency tensor completion, comprising the following steps: Step S1: Obtain the crowd sensing data collected by the terminal device, and construct a sparse observation tensor according to the location dimension, index dimension and time dimension; S2. Perform feature embedding on the sparse observation tensor to obtain initial embedding features; S3. Input the initial embedded features into the time domain encoding module, perform standardization processing first, introduce a de-stationary factor, extract time domain features, and generate time domain completion results through linear mapping. S4. Perform multi-scale segmentation on the time-domain features and perform frequency domain transformation on each segment to obtain multi-scale frequency-domain features. S5. Input the multi-scale frequency domain features into the enhanced frequency attention module, perform adaptive weighted selection on the frequency components, and perform nonlinear encoding on the weighted frequency domain features; S6. Perform inverse frequency domain transformation on the encoded multi-scale frequency domain features and map them to the original signal space respectively. Then fuse the results of each scale to obtain the frequency domain completion result. S7. Retain the true observation values ​​at the observation positions and use the time domain completion results to form a spectrum analysis sequence at the missing positions. Explicitly calculate the spectrum flatness index SFM and the high-frequency energy ratio index HIR based on the power spectrum of the spectrum analysis sequence, and generate time-frequency fusion weights that satisfy the monotonically suppressed relationship with SFM and HIR. S8. Adaptively fuse the time-domain completion result and the frequency-domain completion result using the time-frequency fusion weight to obtain the final completion tensor. The final completion tensor is used to generate or update urban environmental monitoring maps, traffic flow prediction models, or to generate abnormal event early warning signals.

[0009] Preferably, in step S1, the crowd sensing data is data collected in real time or periodically by terminal devices in the physical environment. The terminal devices include mobile communication terminals, vehicle-mounted sensors, or environmental monitoring nodes. The crowd sensing data includes location information, timestamps, and at least one sensing indicator, which includes at least one of air quality index, traffic flow, traffic speed, noise level, temperature, or humidity. The sparse observation tensor is represented as Where I is the number of sampling locations, J is the number of sensing indicators, and T is the number of time steps; For the sparse observation tensor The Middle Each tensor element represents the observed or to-be-completed value of the j-th sensing index at the ith sampling location at the t-th time step. To distinguish between true observations and missing elements, the set of observation element indices is defined as follows: , in, The set of indexes of the observed elements It is not a single set of location dimensions, but rather the sparse observation tensor. The set of indices of the actual observed elements; not included in The tensor elements are the missing elements and are used as the objects to be filled in; In step S2, the initial embedding features are obtained by projecting the sparse observation tensor onto the latent feature space through embedding mapping, specifically using the following formula: ,in, Represents the initial embedded features; Indicates the embedding of mapping functions; This represents the sparse observation tensor constructed in step S1; Indicates the number of sampling locations; Indicates the number of perceived indicators; Indicates the number of time steps; Indicates the embedding dimension; superscript This represents the initial embedding layer, used to distinguish it from the feature representations of subsequent coding layers.

[0010] Preferably, in step S3, the initial embedded features are standardized along the time dimension, and a destationary factor is introduced during the attention calculation process to compensate for the nonstationary effects caused by mean shift and variance changes. The standardization process specifically involves: denoting the initial embedding features obtained in step S2 as... , Indicates the first The sampling location, the first The first perception index in the The initial embedded features corresponding to each time step; for each position-index pair Calculate the mean along the time dimension and standard deviation : , , And obtain the standardized features using the following formula. : , in, To prevent positive numbers with a denominator of zero, The above operations are performed element-wise along the feature dimension; The introduction of the de-stationary factor specifically involves introducing a de-stationary factor during the attention calculation process to perform scaling and offset compensation on the attention score; the de-stationary factor includes a scaling factor. and offset adjustment factor Both are based on the mean. and standard deviation Generate; where, This is used for scaling attention scores. Used to compensate for the shift in attention scores; and They work together to compensate for the non-stationary information that is weakened by standardization; The extraction of time-domain features specifically involves: standardizing the features... Inputting the time-domain encoding module yields the time-domain feature representation: ,in, Represents the time-domain encoding mapping; the time-domain feature representation Let it be a four-dimensional tensor, denoted as ,in Representation of time-domain feature tensors The Middle The sampling location, the first The first perception index in the Each time step corresponds to 3D feature vector; The specific steps of generating the time-domain completion result through linear mapping are as follows: representing the time-domain features... The time-domain completion result is obtained through linear mapping; the linear mapping is denoted as... , indicating that a The 3D input vector is mapped to a scalar value through a linear transformation; the time-domain completion result is denoted as: ,in As a scalar, it represents the first... The sampling location, the first The first perception index in the Time domain completion values ​​for each time step; all Constructing a three-dimensional tensor .

[0011] Furthermore, in step S3, the destationary factor preserves the mutation peaks, local abrupt changes, and non-stationary evolution information in the original time series while ensuring training stability; the standardization process reduces the interference of non-stationary distributions on modeling.

[0012] Preferably, in step S4, the multi-scale segmentation process involves segmenting and aggregating the time-domain features along the time dimension, and then performing frequency domain transformation on the segmentation results of each scale to obtain spectral representations at different time resolutions. The multi-scale segmentation process specifically includes: Obtain the time-domain features obtained in step S3 Set the scale factor set Each scale factor is denoted as , A positive integer representing the number of consecutive time steps contained in each segment when performing segmented aggregation along the time dimension. Preserve the original time resolution. The larger the value, the longer the time range covered by the segment and the lower the time resolution. For each scale factor Time domain features Divide along the time dimension into lengths of The time period; when the end time period is less than At that time, for time domain features The ends are filled in; Then, average pooling or equivalent segmented aggregation is performed on each time period to generate a scaling factor. Corresponding scale feature representation ,in Indicates the number of sampling locations. Indicates the number of perceived indicators. Indicates the number of time steps. Feature dimensions representing time-domain features Represents scale factor The number of time steps is determined; finally, the scale feature representations corresponding to different scale factors are summarized to form a multi-scale feature sequence. Then, a fast Fourier transform is performed along the time dimension to obtain the frequency domain features at the corresponding scale.

[0013] Furthermore, in step S4, the multi-scale segmentation process does not rely on rearranging the one-dimensional time series into a two-dimensional periodic tensor, nor does it model intra- and inter-period dependencies through axial attention.

[0014] Preferably, in step S5, the enhanced frequency attention module first concatenates the real and imaginary parts of the frequency domain features at each scale to obtain a frequency representation; then it performs pooling along the frequency dimension to form a global spectral description vector corresponding to the position-index pair; then it inputs the global spectral description vector into a lightweight multilayer perceptron and outputs a frequency attention vector with the same number of frequency points at that scale; finally, it generates frequency gate weights with values ​​ranging from 0 to 1 through a sigmoid gating function; each frequency gate weight corresponds to a frequency component and acts on both the real and imaginary parts of that frequency component; the frequency gate weights are adaptively learned through backpropagation of the joint loss function during model training. The frequency-gated weights do not require the weights of all frequency components to be normalized to a fixed sum; The enhanced frequency attention module also introduces a sparse regularization constraint: during the model training phase, the average value of the frequency gating weights corresponding to each scale, each sampling position, each perceptual index, and each frequency point is used as the frequency attention sparse regularization term. This regularization term is equivalent to applying normalization to the non-negative frequency gating weights. Constraints, and through the joint loss function This item is introduced into the model training process, where, , which is the balance coefficient of the frequency attention sparse regularization term, used to control the strength of the effect of frequency attention sparse constraints in the joint loss function; For frequency attention sparsity regularization, its value is equal to the average of the frequency gating weights corresponding to each scale, each sampling location, each perception index, and each frequency point, in order to encourage only a small number of key frequency components to be given large weights. The frequency domain features weighted by the enhanced frequency attention module are further input into a nonlinear frequency coding network to model the nonlinear coupling relationship between different frequency components.

[0015] Furthermore, in step S5, the frequency gating weights do not require the weights of all frequency components to be normalized to a fixed sum, so that the model can retain multiple effective frequency components at the same time; the enhanced frequency attention module adaptively weights the real and imaginary parts of the corresponding frequency components to retain effective high-frequency components that are sensitive to sudden changes and suppress redundant spectral responses. Furthermore, in step S5, the sparse regularization constraint improves the compactness and discriminativeness of frequency selection, and the nonlinear frequency coding network enhances the frequency domain representation capability. Furthermore, in step S5, the frequency attention module is enhanced to achieve adaptive modeling of the importance of frequency components, while retaining high-frequency components that are sensitive to sudden changes and suppressing irrelevant noise and redundant frequency responses; the sparse regularization term improves the interpretability and generalization ability of frequency selection; and the nonlinear frequency coding network enhances the frequency domain representation capability.

[0016] Preferably, in step S6, the inverse frequency domain transformation is specifically an inverse fast Fourier transform; The fusion employs multi-scale splicing linear projection fusion, specifically including: performing inverse fast Fourier transform on the encoded frequency domain features at each scale to obtain the temporal recovery features corresponding to each scale; when the temporal recovery features corresponding to different scales are inconsistent in the number of time steps, they are resampled to be consistent with the original number of time steps through linear interpolation; the resampled temporal recovery features at each scale are spliced ​​along the feature dimension to obtain multi-scale spliced ​​features; then, scale fusion and dimensionality compression are performed on the multi-scale spliced ​​features through a learnable linear mapping, and the frequency domain completion result is obtained through the output mapping.

[0017] Preferably, in step S7, the spectral flatness index SFM is calculated by the ratio of the geometric mean to the arithmetic mean of the power spectrum energy, and is used to characterize whether the spectral energy is concentrated in a few dominant frequencies; when SFM is small, it indicates that the spectral energy is more concentrated and the frequency domain completion result is more reliable; when SFM is large, it indicates that the spectrum is flatter and the reliability of the frequency domain completion result is reduced. The High Frequency Energy Ratio (HIR) index is calculated as the ratio of the sum of the power spectrum energy in the high frequency region to the sum of the power spectrum energy at all frequency points. It is used to characterize the proportion of rapidly changing, spike perturbations, or broadband responses in the sequence. When the HIR is large, the proportion of the frequency domain completion result in the final fusion is reduced. The monotonic inhibition relationship is as follows: when SFM increases, the time-frequency fusion weight... Decrease when HIR increases Decrease; when SFM is small and HIR is small, The increase in frequency domain completion results improves the contribution of the model when the spectral structure is clear and stable, and improves the contribution of time domain completion results when the spectrum is flat or the high-frequency disturbances are strong. The specific calculation formula for the time-frequency fusion weight is as follows: ; in, Use the Sigmoid activation function; Indicates the first The sampling location, the first The spectrum flatness index is calculated from the spectrum analysis sequence corresponding to each perception index. Indicates the first The sampling location, the first The high-frequency energy ratio index is calculated from the spectrum analysis sequence corresponding to each sensing index. Indicates the first The sampling location, the first Sequence-level time-frequency fusion weights corresponding to each sensing indicator; Indicates will After broadcasting along the time dimension, in the first The time-frequency fusion weights corresponding to each time step; The time-frequency fusion weights are not directly learned from coarse-scale and fine-scale features, but are determined by the spectral structure reflected by SFM and HIR.

[0018] Furthermore, in step S7, to avoid introducing artificial spectral components after zeros are padded at missing positions; sequences with spectral energy concentrated in a few dominant frequencies have more stable periodicity or global structure; the larger the HIR, the more rapid changes, spikes, or broadband responses the sequence contains.

[0019] Preferably, in step S8, the final completed tensor is obtained as follows: = , in, For the frequency domain completion result, To complete the result in the time domain, It is the dynamic time-frequency fusion weight generated in step S7.

[0020] Preferably, during the model training phase, the training objective of the method includes one or more of the following: the main reconstruction loss, frequency domain consistency loss, and frequency attention sparsity regularization term calculated based on the observation element index set; wherein, the frequency domain consistency loss does not directly constrain the sparse input spectrum after zero-padding, but constructs a frequency domain consistency reference by using the real observation value at the position corresponding to the observation element index set and the padding result at the position of the missing element, and constrains the consistency between the final padding result and the frequency domain consistency reference in the real and imaginary parts of the frequency domain.

[0021] This invention also provides a swarm intelligence sensing data completion system with multi-resolution time-frequency tensor completion, based on the method described above, the system comprising: The data construction module is responsible for executing step S1, which is used to acquire the crowd sensing data collected by terminal devices in the physical environment, and construct a sparse observation tensor according to the location dimension, index dimension and time dimension. The time-domain encoding module is responsible for executing steps S2 and S3, which are used to perform embedding mapping on the sparse observation tensor and extract time-domain features from the initial embedding features to output the time-domain completion result. The multi-scale frequency domain modeling module is responsible for executing steps S4 to S6, which are used to perform multi-scale segmentation, frequency domain transformation, adaptive selection of frequency components, frequency domain nonlinear coding, inverse frequency domain transformation and multi-scale fusion on time domain features, and output frequency domain completion results. The fusion completion module is responsible for executing steps S7 and S8, which are used to generate time-frequency fusion weights based on the spectral flatness index and the high-frequency energy ratio index, and adaptively fuse the time-domain completion result and the frequency-domain completion result to output the final completed tensor.

[0022] The beneficial technical effects of this invention are as follows: 1. Multi-dimensional collaborative modeling capability This invention overcomes the limitations of traditional single-domain modeling, enabling simultaneous modeling of time and frequency domain information. Through the collaborative work of time and frequency domain branches, it achieves joint recovery of local dynamics and global structure. Furthermore, this invention supports multi-resolution dynamic modeling, using multi-scale segmentation and frequency domain transformation mechanisms to uniformly model time-frequency patterns at different time granularities, better characterizing slow-changing trends, periodic patterns, and short-term bursts in mobile crowdsourcing data. In addition, this invention possesses adaptive frequency selection capabilities, utilizing an enhanced frequency attention module to adaptively filter frequency components, avoiding the misclassification of key high-frequency components as noise by existing fixed low-pass strategies. This improves the recovery capability for abnormal fluctuations and bursts, thereby maintaining both global structure recovery and local burst change preservation capabilities even in scenarios with high missing rates.

[0023] 2. Adaptive fusion and smoothing suppression capabilities This invention possesses adaptive time-frequency fusion capabilities. It dynamically generates fusion weights based on spectral flatness and high-frequency energy proportion indices, enabling more suitable time-frequency combinations for different positions, indices, and sequences, thus improving the robustness of the completion. Specifically, when the spectral flatness and / or high-frequency energy proportion indices increase, this invention reduces the proportion of frequency domain completion results in the final fusion, enhancing the contribution of time domain completion results, thereby achieving adaptive fusion of time and frequency domain completion results. Therefore, this invention not only addresses point value errors but also considers sudden changes and local morphology preservation, effectively recovering important fluctuation structures even under high missing rate conditions and significantly alleviating the over-smoothing problem.

[0024] 3. High applicability and comprehensive performance advantages This invention has good scene adaptability and is applicable to various mobile crowd sensing scenarios such as traffic monitoring, air quality monitoring, traffic status analysis, environmental perception, and smart city computing. It can also be extended to other tasks that complete spatiotemporal sensing data with high missing data. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of the execution flow of the data completion system of the present invention; Figure 2 This is a schematic diagram of the overall architecture of the Multi-Resolution Time-Frequency Tensor Completion Model (MRTFTC) of this invention; Figure 3 This is a schematic diagram of the multi-scale segmented processing flow; Figure 4 A schematic diagram of the enhanced frequency attention module structure; Figure 5 A schematic diagram of a dynamic time-frequency fusion process guided by spectral structure; Figure 6This is a schematic diagram comparing the mean absolute error (MAE) of the method of the present invention with that of existing methods in a random missing scenario; Figure 7 This is a schematic diagram comparing the completion performance of the method of the present invention and existing methods in a structured missing scenario; Figure 8 This is a schematic diagram comparing the training time and model parameter count of the method of the present invention with those of existing methods; Figure 9 This is a visual illustration of the frequency component selection of the enhanced frequency attention module on different datasets in this invention; Figure 10 This is a schematic diagram illustrating the sensitivity analysis of the method of the present invention to the number of frequency scales and the frequency domain consistency loss weight. Detailed Implementation

[0026] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0027] Example 1: Method Example This embodiment provides a swarm intelligence sensing data completion method based on a multi-resolution time-frequency tensor completion model (MRTFTC). The model achieves high-precision completion of highly missing mobile swarm intelligence sensing tensors through non-stationary time-domain feature encoding, multi-scale frequency-domain feature modeling, enhanced frequency attention selection, and spectral structure-guided dynamic time-frequency fusion. Specifically, the model in this embodiment includes a forward completion computation part and a training optimization part. For example... Figure 1 The diagram illustrates the execution flow of the data completion system of this invention. The forward completion calculation section includes steps S1 to S8, which collect crowdsensing data from terminal devices in the physical environment and sequentially complete sparse observation tensor construction, embedding mapping, time-domain feature extraction, multi-scale frequency-domain modeling, spectral structure-guided dynamic time-frequency fusion, and final tensor completion output. The training and optimization section updates the model parameters based on the forward completion calculation results, according to the principal reconstruction loss, frequency domain consistency loss, and frequency attention sparse regularization term.

[0028] S1. Constructing the sparse observation tensor This involves acquiring mobile crowdsourcing sensing data, which is collected in real-time or periodically by terminal devices deployed in a real physical environment and uploaded via a wireless network. The terminal devices include mobile communication terminals, vehicle-mounted sensors, or environmental monitoring nodes. For example, the mobile communication terminal can be a mobile phone carried by a citizen; the vehicle-mounted sensor can be a GPS device or traffic status acquisition device installed on a bus, taxi, or other mobile vehicle; and the environmental monitoring node can be a fixed or mobile air quality sensor, noise sensor, or temperature and humidity sensor.

[0029] The mobile crowd sensing data includes location information, timestamps, and at least one sensing indicator, which includes at least one of air quality index, PM2.5 concentration, traffic flow, traffic speed, noise level (decibels), temperature, or humidity. This data is used to reflect the true state of the physical world, such as the PM2.5 concentration in a specific area at a specific time, the traffic speed on a road during a specific time period, or the environmental noise intensity at a specific location.

[0030] Due to communication interruptions, device energy-saving strategies, terminal offline status, inconsistent sensor sampling intervals, or discontinuous user participation, a large amount of data in the mobile crowd sensing data is missing. This embodiment organizes the aforementioned mobile crowd sensing data into a third-order sparse observation tensor according to location, sensing indicators, and time: , in, This represents the third-order sparse observation tensor organized according to the location dimension, the perception index dimension, and the time dimension. Indicates the number of sampling locations. Indicates the number of perceived indicators. Indicates the number of time steps; For the sparse observation tensor The Middle The tensor element represents the th tensor element. The sampling location at the first sampling position The time step Observed or incomplete values ​​of a perception indicator It is the set of real numbers.

[0031] To distinguish between true observations and missing elements, the set of observation element indices is defined as follows: , in, The set of indexes of the observed elements It is not a single set of location dimensions, but rather the sparse observation tensor. The set of indices of the actual observed elements; not included in The tensor elements are missing elements and are the objects that need to be completed in this embodiment.

[0032] S2, Embedded Mapping We perform feature embedding on the sparse observation tensor to obtain initial embedding features: , in, Represents the initial embedded features; Indicates the embedding of mapping functions; This represents the sparse observation tensor constructed in step S1; Indicates the number of sampling locations; Indicates the number of perceived indicators; Indicates the number of time steps; Indicates the embedding dimension, i.e., the dimension of the projected features; superscript This represents the initial embedding layer, used to distinguish it from the feature representations of subsequent coding layers.

[0033] S3. Temporal Feature Extraction and Temporal Completion The initial embedded features are input into the temporal coding module. In this embodiment, the temporal coding module uses a non-stationary temporal coding method for temporal feature extraction. That is, it reduces the interference of non-stationary distribution on modeling through time dimension normalization and introduces a destationary factor during attention calculation to compensate for the non-stationary effects caused by mean shift, scale changes and local sudden events.

[0034] It should be noted that this standardization process does not redefine the input data from a new perspective, but rather normalizes the same initial embedded feature E obtained in step S2 along the time dimension to reduce the impact of mean shifts and scale differences between different locations and different perceptual indicators on time-domain modeling. For each location-indicator pair... ), for the initial embedding features obtained in step S2 Standardization is performed along the time dimension. Specifically, let... Indicates the first The sampling location, the first The first perception index in the The initial embedded features corresponding to each time step Calculate the mean along the time dimension. and standard deviation : , , Among them, the mean and standard deviation Only with location-indicator pairs Related to time index They are unrelated; they respectively characterize the statistical centrality and dispersion of the corresponding position-index pair across all time steps. Standardized features are obtained in the following manner. : , in, For standardized 3D features, subscript Corresponding to the location dimension, index dimension, and time dimension respectively, this standardization operation is performed on each location-index pair. All time steps The same and Perform element-wise scaling and translation; To prevent positive numbers with a denominator of zero, The above subtraction, division, and squaring operations are performed element-wise along the feature dimension.

[0035] The aforementioned standardization process can reduce the numerical scale differences between different locations and different perceptual indicators, but it may also weaken the non-stationary information in the original time series reflected by mean shift, scale changes, and local sudden events. Therefore, this embodiment introduces a destationary factor in the attention calculation process to compensate for the standardized attention score.

[0036] Specifically, the destabilization factor is based on each position-index pair. corresponding mean and standard deviation Generation, including scale adjustment factors and offset adjustment factor .in, This is a scale used to adjust attention scores; Used to compensate for the mean offset information weakened by the standardization process.

[0037] As a specific implementation, the scale adjustment factor and the offset adjustment factor are respectively composed of the mean. and standard deviation Generated through preset functions or learnable mappings, for example: ; in, and For linear mappings, multilayer perceptrons, or other learnable mapping functions; Used to ensure scale adjustment factor It is a positive value. Let it be. , , These respectively represent the standardized features The query matrix, key matrix, and value matrix obtained by linear mapping, wherein, , , All three are expanded along the time dimension; for each position-indicator pair The corresponding linear mapping layers are generated separately. , , Then, the attention calculation including the destationary factor can be expressed as: , in, and Generates features based on the temporal statistical characteristics of the corresponding position-index pairs and broadcasts them during temporal attention computation. In this way, while utilizing standardized features for stable training, the model can reintroduce the non-stationary statistical information of the original sequence during the attention computation stage, thereby mitigating over-smoothing of sudden fluctuations and local changes. After multi-layer temporal encoding, the temporal domain feature representation is obtained: , in, This represents the time-domain encoding mapping. This time-domain feature representation... Specifically, it is represented by a four-dimensional tensor, which has the following form: , in, The number of sampling locations, To perceive the number of indicators. For the number of time steps, For feature dimension; where Representation of time-domain feature tensors The Middle The sampling location, the first The first perception index in the Each time step corresponds to 3D eigenvectors.

[0038] Then The time-domain completion result is obtained through linear mapping. This completion result is expressed in scalar form as follows: , in, Indicates to give one A mapping operation that projects a 3D input vector onto a scalar value through a linear transformation. All scalars Together they form a three-dimensional tensor Its form is: ; in, The Middle The element is , indicating the first The sampling location, the first The first perception index in the The scalar completion value at each time step is determined by... via linear mapping We obtain it after reducing the dimension to one.

[0039] To facilitate the differentiation of characteristics at each stage, this instruction manual stipulates that: This is the overall feature tensor output by the time-domain encoding module. ; For its position The eigenvector at that location; According to the scaling factor The scale feature tensor after segmentation and aggregation; To Multi-scale frequency domain features obtained after performing a Fast Fourier Transform.

[0040] S4, Multi-scale Frequency Domain Modeling To characterize the global spectral features at different temporal granularities, the temporal domain features are analyzed. Perform multi-scale segmentation along the time dimension. Let the pre-defined set of scale factors be... ,in, Indicates the number of scales. Each scale factor A positive integer representing the number of consecutive time steps contained in each segment when performing piecewise aggregation along the time dimension. Scale factor. Preserve original temporal resolution; scale factor The larger the value, the longer the time range covered by each segment, resulting in a lower temporal resolution, which is then used to extract trends and periodic features over a longer time period.

[0041] like Figure 3 As shown, the multi-scale segmentation process specifically includes: inputting the time-domain features obtained in step S3. Set the scale factor set Each scale factor is denoted as For each scale factor Time domain features Divide along the time dimension into lengths of The time period; when the end time period is less than At that time, for time domain features The ends are padded; then, average pooling or equivalent segmented aggregation is performed on each time period to generate a scaling factor. Corresponding scale feature representation Finally, the scale feature representations corresponding to different scale factors are summarized to form a multi-scale feature sequence.

[0042] Specifically, for any scaling factor According to the scale factor, the time-domain features Segmented aggregation along the time dimension yields scale features: , in, Represents scale factor The number of time steps; when the original number of time steps Cannot be When dividing by integers, the last segment is supplemented to meet the segment aggregation requirements; The feature dimension representing the time-domain features.

[0043] Subsequently, a Fast Fourier Transform is performed along the time dimension to obtain multi-scale frequency domain features. Through multi-scale frequency domain analysis, long-term trends, periodic components, and short-term high-frequency disturbances can be characterized simultaneously, solving the problem that single-scale frequency domain modeling cannot simultaneously take into account different time granularities.

[0044] S5, Enhanced Frequency Attention Selection and Frequency Coding For the frequency domain features at each scale, an enhanced frequency attention module is constructed to adaptively generate frequency gating weights for each frequency component for different sampling locations, different perception indicators, and different scales.

[0045] like Figure 4 As shown, the enhanced frequency attention selection and frequency feature nonlinear encoding process in step S5 is a local sub-process of step S5. Specifically, the multi-scale frequency domain features obtained in step S4 are first input. And extract the multi-scale frequency domain features. The real and imaginary parts of each frequency component are then identified; subsequently, the real and imaginary parts corresponding to the same frequency component are concatenated to obtain the frequency representation. ,in, For frequency point subscripts, , Represents scale factor The number of frequency points obtained after the Fast Fourier Transform is used to identify each frequency component; then, the frequency representation is input into the Enhanced Frequency Attention Module (EFAB), which generates a frequency attention vector through frequency-dimensional pooling and a multilayer perceptron, and further converts it into frequency-gated weights through a Sigmoid gating function. Next, the real and imaginary parts of the corresponding frequency components in the frequency representation are adaptively weighted simultaneously using the frequency-gated weights to obtain the weighted frequency representation. During the model training phase, a frequency attention sparse regularization term is constructed based on the frequency-gated weights. Finally, the weighted frequency representation is input into the frequency feature nonlinear coding network to obtain the encoded frequency domain features, and the encoded frequency domain features are sent to step S6 to perform inverse fast Fourier transform.

[0046] Specifically, for the scaling factor , No. The sampling location, the first The first perception indicator and the first For each frequency point, the real and imaginary parts of the corresponding frequency domain feature are concatenated to obtain the frequency representation. Let the scaling factor be... The number of frequency points below is Then, the frequency representation is pooled along the frequency dimension to form a global spectral description of the corresponding position-index pair, and the global spectral description is input into a lightweight multilayer perceptron to obtain a frequency attention vector: , in, , Represents scale factor The number of frequency points below, The feature dimension is represented by the concatenation of the real and imaginary parts of the frequency domain feature. Represents the frequency dimension Perform a pooling operation to aggregate the features of each frequency point into a global spectral description vector of the corresponding position-index pair. The pooling result has a dimension of 2d. Represents scale factor The corresponding lightweight multilayer perceptron takes the global spectral description vector as input and outputs a frequency attention vector. Each element in the output vector corresponds to a scaling factor. The next frequency point.

[0047] In one specific embodiment, the lightweight multilayer perceptron includes a first linear mapping layer, a nonlinear activation function, and a second linear mapping layer connected in sequence, and its calculation method is as follows: , in, , Represents a non-linear activation function. , , and The parameters are obtained through model training, and the output dimension of the second linear mapping layer is... .

[0048] The frequency attention vector is converted into frequency-gated weights using the Sigmoid gating function. , in, , its first element Indicates the first The sampling location, the first Individual perception indicators in scale factor Next The importance of each frequency component is determined. The frequency gating weights are not normalized using Softmax, and the sum of the weights of each frequency component is not required to be a fixed value. Therefore, the model can retain multiple effective frequency components simultaneously.

[0049] The frequency representations are weighted using the frequency-gated weights: , in, This represents the weighted frequency representation; the frequency gating weights corresponding to the same frequency component apply to both the real and imaginary parts of that frequency component. These frequency gating weights are not pre-set manually, but are obtained by adaptively updating the parameters of the multilayer perceptron through backpropagation of the joint loss function during model training; the larger the weight, the more important the corresponding frequency component is to the data completion task.

[0050] During the model training phase, a frequency attention sparse regularization term is introduced into the frequency-gated weights. Since the values ​​of the frequency-gated weights are all non-negative, the average value of the frequency-gated weights corresponding to each scale, sampling position, perceptual index, and frequency point is used as the sparse regularization term: , in, Represents the set of scale factors. Indicates the scale quantity. (J) represents the number of sampling locations, and (J) represents the number of sensing indicators. Represents scale factor The number of frequency points below, This represents the frequency gating weight of the corresponding frequency component.

[0051] The frequency attention sparse regularization term is equivalent to applying normalization to the non-negative frequency gating weights. Constraints, and through the joint loss function This sparse regularization term is introduced into the model training process. Minimizing this term can prevent the model from assigning large weights to all frequency components simultaneously, prompting the model to retain large gating weights only for a small number of key frequency components related to data completion. Parameters This is used to adjust the strength of the sparse constraint in the joint loss function.

[0052] S6, Inverse Transformation and Multiscale Fusion Perform inverse fast Fourier transform on the encoded frequency domain features at each scale to restore them to the time domain, obtaining the time-domain restored features corresponding to each scale. For the scale factor... Let its corresponding time-domain recovery feature be When the temporal reconstruction features obtained at different scales are inconsistent in the number of time steps, they are resampled to the same number of time steps as the original through linear interpolation. Consistency ensures that the time-domain recovery features at each scale have the same time length.

[0053] In this embodiment, a multi-scale stitching linear projection fusion method is preferably used to fuse the results at each scale. Specifically, the temporal reconstructed features at each scale are stitched along the feature dimension to obtain multi-scale stitched features: , in, Represents the set of scale factors. Indicates the scale quantity. This indicates that a concatenation operation is performed along the feature dimension. If the feature dimension of the temporal domain recovered features at each scale is... The feature dimension of the multi-scale splicing feature is then... .

[0054] Then, the multi-scale spliced ​​features are scaled and compressed using a learnable linear mapping to obtain frequency domain fused features: ; in, This refers to the multi-scale spliced ​​feature obtained by splicing the temporal domain recovered features at each scale along the feature dimension; This represents the frequency domain fusion feature obtained after scale fusion and dimensionality compression. This represents a learnable scale fusion mapping; and These are the parameters obtained through model training. The learnable scale fusion mapping is used to automatically learn the combination relationship between features recovered at different scales, and then concatenates the results. 3D feature compression Frequency domain fusion features.

[0055] Finally, the frequency domain fusion features are projected onto the original signal space through the output mapping to obtain the frequency domain completion result: ; in, This represents the output mapping, which is preferably a linear mapping, used to map frequency domain fusion features to the original signal space; This represents the frequency domain completion result, its first... The element represents the first element. The sampling location, the first The first perception index in the Frequency domain padding values ​​corresponding to each time step.

[0056] S7. Dynamic Fusion Weight Generation Based on Spectrum Structure Awareness In order to adaptively balance the time domain completion result and the frequency domain completion result according to the spectral structure of the sequence corresponding to different positions and different sensing indicators, this embodiment introduces the Spectral Flatness Measure (SFM) and the High-frequency energy Ratio (HIR) indicator.

[0057] Specifically, the first step is to construct a spectral analysis sequence: for the tensor elements that have been observed (i.e., the set of observed element indices) For the corresponding positions, the actual observation values ​​are used directly; for missing positions, the time-domain completion results are used for filling. This avoids the artificial spectral bias caused by directly performing frequency domain transformation on the zero-padded sparse input, allowing subsequent spectral analysis to more realistically reflect the structural characteristics of the current sequence.

[0058] Then, a fast Fourier transform is performed on the spectral analysis sequence, and the SFM and HIR are explicitly calculated based on the obtained power spectrum.

[0059] SFM represents the ratio of the geometric mean to the arithmetic mean of the power spectrum energy. If the SFM is small, it indicates that the spectral energy is concentrated in a few dominant frequencies, and the sequence has a clear periodic structure or a stable global pattern. In this case, the frequency domain completion result is more reliable. If the SFM is large, it indicates that the spectral energy distribution is flatter and difficult to explain by a few stable frequency components. In this case, the contribution of the frequency domain completion result should be reduced.

[0060] HIR represents the ratio of the sum of the power spectrum energies in the high-frequency region to the sum of the power spectrum energies at all frequency points. A larger HIR indicates that the sequence contains more rapid changes, spikes, or broadband responses, and the frequency domain completion result is prone to over-smoothing. Therefore, the contribution of the time domain completion result should be enhanced.

[0061] Based on the above rules, this embodiment calculates the time-frequency fusion weights using the following formula: ; in, Use the Sigmoid activation function; Indicates the first The sampling location, the first The spectrum flatness index is calculated from the spectrum analysis sequence corresponding to each perception index. Indicates the first The sampling location, the first The high-frequency energy ratio index is calculated from the spectrum analysis sequence corresponding to each sensing index. Indicates the first The sampling location, the first Sequence-level time-frequency fusion weights corresponding to each sensing indicator; Indicates will After broadcasting along the time dimension, in the first The time-frequency fusion weights corresponding to each time step; SFM and HIR satisfy a monotonically inhibited relationship: when When it increases, Decrease; when When it increases, Decrease; when Smaller and When smaller, This increases the frequency domain completion result. Therefore, the present invention can rely more on the frequency domain completion result when the spectral structure is stable, and more on the time domain completion result when there are sudden changes or more pronounced high-frequency disturbances. It should be noted that, and Each location-indicator pair Calculated independently, the subscript is sometimes omitted in the text description, but its meaning remains unchanged.

[0062] S8, Time-frequency fusion output final completion result Based on the aforementioned dynamic fusion weights, the time-domain completion result and the frequency-domain completion result are adaptively fused to obtain the final completed tensor: = , in, Indicates the final completed tensor The Middle The sampling location, the first The first perception index in the The completion value for each time step; Indicates the frequency domain completion result The complete values ​​for the corresponding location, perception indicators, and time steps; Indicates the time domain completion result The complete values ​​for the corresponding location, perception indicators, and time steps; This represents the dynamic time-frequency fusion weight generated in step S7, which is used to control the contribution ratio of the frequency domain completion result in the final completion value. This indicates the proportion of the time-domain completion result in the final completed value. Specifically, when The larger the value, the more the final completed value is biased towards the frequency domain completion result; when The smaller the value, the more the final completed value is biased towards the time-domain completed result. This weight can be adjusted according to the sampling position. Perception indicators and time step Dynamic changes enable fine-grained adaptive fusion of spectral structures at different locations, with different indicators, and at different times.

[0063] like Figure 5 As shown, steps S7 and S8 together constitute the spectral structure dynamic time-frequency fusion sub-process. Specifically, this sub-process first inputs the sparse observation tensor. Observation element index set, time domain completion result Frequency domain completion results Then, a spectral analysis sequence is constructed, where the observation locations are represented by sparse observation tensors. The actual observations in the data are used, and the missing positions are filled using the time domain completion results. Next, based on the power spectrum of the spectral analysis sequence, the spectral flatness index (SFM) and the high-frequency energy ratio index (HIR) are calculated respectively, and dynamic time-frequency fusion weights are generated based on SFM and HIR. Finally, the dynamic time-frequency fusion weights are... Time domain completion results Frequency domain completion results The input time-frequency fusion module performs adaptive fusion according to the time-frequency fusion formula described in step S8, and outputs the final completed tensor. .

[0064] Steps S1 to S8 above constitute the forward completion computation part of the model, defining the specific mapping method from the input sparse observation tensor to the output final completed tensor. During the model training phase, based on the final completed tensor output by the forward completion computation part, a training objective is constructed by combining it with the real observation elements corresponding to the observation element index set, and the model parameters are updated by minimizing the joint loss function. The training objective includes at least: (1) Main reconstruction loss Used to constrain the completion error at the observation location; (2) Frequency domain consistency loss This is used to constrain the consistency between the final completion result and the frequency domain consistency reference in the real and imaginary parts of the frequency domain. The frequency domain consistency reference is not directly obtained from the zero-padded sparse input, but is constructed using real observations at observation positions and completion results at missing positions, thereby avoiding interference to the spectral structure caused by zero-padded missing positions; (3) Frequency attention sparse regularization term The result is calculated using the average value of the frequency gating weights corresponding to each scale, sampling location, sensing index, and frequency point in step S5, and then processed through the joint loss function. This is added to the model training process to suppress the simultaneous activation of all frequency components, prompting the model to focus on selecting key frequency components that are effective for data completion.

[0065] The expression for the joint loss function is: , in, This represents the principal reconstruction loss, used to constrain the completion error of the final completed tensor at the corresponding position in the set of observed element indices; This represents the frequency domain consistency loss, used to constrain the consistency between the final completion result and the frequency domain consistency reference in the real and imaginary parts of the frequency domain. This indicates the frequency attention sparsity regularization term mentioned in step S5, which is used to constrain the sparsity of frequency gating weights and suppress the simultaneous assignment of large weights to all frequency components. and These are non-negative balance coefficients, used to adjust the strength of the frequency domain consistency loss and the frequency attention sparse regularization term in the joint loss function, respectively.

[0066] In a preferred embodiment, The value range of is [0,1], used to control the influence strength of the frequency domain consistency constraint relative to the primary reconstruction loss; when When no frequency domain consistency loss is introduced, when As the frequency attention sparse regularization term increases, the model places greater emphasis on the consistency of the spectral structure of the completed result. Since the frequency attention sparse regularization term is primarily used to assist in constraining the frequency-gated weights, preventing it from excessively interfering with the main reconstruction loss, The preferred value range is ;when When, without introducing a frequency-attention sparse regularization term, when As the value increases, the sparsity constraint on the frequency-gated weights of the model strengthens. In actual training, and The selection can be based on the validation set completion error and the effect of preserving the spectral structure.

[0067] This embodiment effectively solves the problems of information gaps, excessive smoothing, and difficulty in recovering local mutations in the process of completing highly missing mobile swarm sensing data by using multi-resolution time-frequency joint modeling, adaptive frequency selection, and dynamic time-frequency fusion.

[0068] Specifically, addressing the information gaps caused by insufficient local temporal context in high-missing scenarios, this embodiment performs multi-scale segmentation and frequency domain transformation based on temporal domain encoded features. This enables the model to extract global periodic structure, slow-changing trends, and short-term perturbation information from different temporal resolutions. Furthermore, it combines recovery features from different scales through multi-scale splicing linear projection fusion, thus supplementing missing information using the global structure in the frequency domain even when local observations are insufficient. To address the over-smoothing problem inherent in traditional frequency domain methods, this embodiment enhances the frequency attention module to generate frequency-gated weights for each frequency component and incorporates a frequency attention sparse regularization term. This allows the model to focus on retaining key frequency components effective for the completion task, rather than simply using a fixed low-pass strategy to suppress high-frequency components, thereby reducing the risk of smoothing out sudden changes and abnormal fluctuations. To address the differences in spectral structure at different locations, with different sensing indicators, and at different time steps, this embodiment further generates dynamic time-frequency fusion weights based on the spectral flatness index SFM and the high-frequency energy ratio index HIR. The contribution ratio of the time-domain completion result and the frequency-domain completion result is adaptively adjusted through the time-frequency fusion formula in step S8. This allows for greater utilization of the frequency-domain completion result when the spectral structure is stable, and enhances the role of the time-domain completion result when there are significant high-frequency disturbances or local abrupt changes.

[0069] It should be noted that the tensor data completed in this embodiment can be directly used to guide the decision-making of physical systems: for example, the completed spatiotemporal distribution map of air quality can be pushed to an environmental monitoring center for pollution source location; or the completed traffic speed matrix can be input into an adaptive traffic signal controller to optimize traffic light timing. These applications all rely on the accurate restoration of missing data by this invention, thereby overcoming the technical obstacles caused by incomplete sensor data collection in the physical world.

[0070] Example 2: System Example This embodiment provides a crowd-sensing data completion system based on a multi-resolution time-frequency tensor completion model (MR-TFTC), implemented based on the method described in Embodiment 1. Figure 2 The diagram shows the overall architecture of the multi-resolution time-frequency tensor completion model of this invention. This architecture employs a dual-branch parallel structure: the embedding and time-domain encoding module and the multi-scale frequency-domain modeling module constitute the time-domain branch and frequency-domain branch, respectively. Both are driven by the sparse observation tensor output by the data construction module, generating time-domain completion results and frequency-domain completion results, respectively. The spectral structure dynamic fusion module adaptively fuses the dual-branch results according to the spectral structure, outputting the final completed tensor. The training optimization module collaboratively optimizes the learnable parameters of the aforementioned modules through a joint loss function. The system includes a data construction module, an embedding and time-domain encoding module, a multi-scale frequency-domain modeling module, a spectral structure dynamic fusion module, and a training optimization module. The correspondence between each module and steps S1 to S8 in Example 1 is as follows: (1) Data construction module, corresponding to step S1 in embodiment 1, is used to acquire mobile crowd sensing data collected by terminal devices in the physical environment, and construct a third-order sparse observation tensor according to the location dimension, sensing index dimension and time dimension. Specifically, the data construction module receives raw sampled data containing location information, timestamp and sensing index value, indexes and organizes the data according to the sampling location, sensing index and time step to form a sparse observation tensor, and records the set of observation element indexes to distinguish between real observation elements and missing elements to be completed; (2) The embedding and temporal coding module, corresponding to steps S2 and S3 in Example 1, is used to perform embedding mapping on the sparse observation tensor and extract temporal features to generate temporal completion results. Specifically, the embedding and temporal coding module first maps the sparse observation tensor to the latent feature space to obtain initial embedding features; then, it standardizes the initial embedding features along the time dimension and introduces a destationary factor during the attention calculation process to compensate for the non-stationary effects caused by mean shift, scale changes, and local sudden events; finally, it obtains the temporal completion results through output mapping. (3) Multi-scale frequency domain modeling module, corresponding to steps S4 to S6 in Example 1, is used to generate frequency domain completion results based on time domain features. Specifically, the multi-scale frequency domain modeling module includes a multi-scale segmentation unit, a frequency domain transformation unit, an enhanced frequency attention unit, a frequency nonlinear coding unit, an inverse frequency domain transformation unit, and a scale fusion unit; The system comprises the following components: a multi-scale segmentation unit, which aggregates time-domain features along the time dimension according to different scale factors to obtain scale features at different time resolutions; a frequency domain transformation unit, which performs fast Fourier transform on each scale feature to obtain multi-scale frequency domain features; an enhanced frequency attention unit, which concatenates the real and imaginary parts of the frequency domain features, pools them along the frequency dimension, generates frequency-gated weights using a multilayer perceptron and a sigmoid gating function, and simultaneously weights the real and imaginary parts of the corresponding frequency components using these weights; a frequency nonlinear coding unit, which performs nonlinear coding on the weighted frequency domain features to model the nonlinear coupling relationship between different frequency components; an inverse frequency domain transformation unit, which performs inverse fast Fourier transform on the encoded frequency domain features to obtain time-domain recovery features corresponding to each scale; and a scale fusion unit, which performs linear interpolation resampling when the number of time steps is inconsistent at different scales, concatenates the time-domain recovery features of each scale along the feature dimension, performs scale fusion and dimension compression through a learnable linear mapping to obtain frequency domain fused features, and finally obtains the frequency domain completion result through output mapping. (4) The spectral structure dynamic fusion module, corresponding to steps S7 and S8 in Example 1, is used to adaptively fuse the time-domain completion result and the frequency-domain completion result according to the spectral structure, and output the final completed tensor. Specifically, the spectral structure dynamic fusion module first constructs a spectral analysis sequence using the real observation value at the observation position and the time-domain completion result at the missing position; then it calculates the spectral flatness index SFM and the high-frequency energy ratio index HIR according to the power spectrum of the spectral analysis sequence, and generates dynamic time-frequency fusion weights; finally, it uses the dynamic time-frequency fusion weights to perform weighted fusion of the time-domain completion result and the frequency-domain completion result to obtain the final completed tensor. (5) A training optimization module, used to update system parameters according to the joint loss function during the model training phase. Specifically, the training optimization module constructs a joint loss function based on the main reconstruction loss, frequency domain consistency loss, and frequency attention sparse regularization term, and updates the learnable parameters in the embedding and time domain coding module, the multi-scale frequency domain modeling module, and the spectral structure dynamic fusion module through backpropagation. Among them, the frequency attention sparse regularization term is used to constrain the sparsity of the frequency gating weights, so that the enhanced frequency attention unit focuses on selecting key frequency components that are effective for data completion;

[0071] The system in this embodiment can be deployed in a modular form on servers, edge computing nodes, cloud platforms, or intelligent sensing and analysis platforms. Through the collaborative work between the above modules, the system can sequentially complete sparse observation tensor construction, time domain completion, frequency domain completion, dynamic spectral structure fusion, and model training optimization, thereby achieving the completion of highly missing mobile swarm sensing data.

[0072] Example 3: Experimental verification: 1. Experimental setup (1) Dataset This experiment was conducted on three representative spatiotemporal sensing datasets: Sensor, Traffic, and Air Quality. These datasets were chosen because: the Sensor dataset primarily reflects the temporal variation characteristics under continuous sampling scenarios by physical sensors, and can be used to verify the applicability of this invention for completing missing data in general sensing scenarios; the Traffic dataset primarily reflects the dynamic laws of traffic states such as traffic flow and speed changing over time and space, and can be used to verify the invention's ability to complete strongly spatiotemporally correlated data in mobile crowdsourcing sensing and urban traffic scenarios; the Air Quality dataset primarily reflects the changes in environmental indicators such as air quality in different regions and at different times, and can be used to verify the invention's ability to recover from slow trends, periodic fluctuations, and local anomalies in environmental monitoring scenarios. These three datasets cover typical spatiotemporal sensing application scenarios such as general sensor monitoring, traffic state perception, and environmental quality monitoring, and can evaluate the completion performance and robustness of this invention under different data distributions, dynamic change patterns, and missing data conditions.

[0073] (2) Comparison method The multi-resolution time-frequency tensor completion model (MR-TFTC) proposed in this invention is compared with the following existing methods. For ease of understanding, this paper retains the English names of each method while providing a brief description of their model types and main characteristics: ModernTCN, or Modern Temporal Convolutional Network Model, mainly models local variations and multi-scale temporal dependencies in time series through convolutional structures, and has high computational efficiency. TimesNet, a deep time series model based on two-dimensional time series variation modeling, mainly describes periodic changes and multi-period patterns by converting one-dimensional time series into a two-dimensional structure. Autoformer, a time series modeling method based on autocorrelation, mainly uses sequence decomposition and autocorrelation mechanisms to capture long-term dependencies and is suitable for time series data with obvious trend and periodic terms. HDDI, or Deep Learning-based imputation method for high missing data, is mainly aimed at data recovery tasks in scenarios with high missing rates. It is used to verify the imputation capabilities of different imputation models under sparse observation conditions. CSDI, or Conditional Score Diffusion Imputation Model, mainly generates possible values ​​for missing positions through conditional diffusion modeling and is suitable for probabilistic time series imputation tasks. iTransformer, or inverted Transformer time series model, mainly uses variable dimensions as the modeling object to enhance the expressive power of the dependencies between variables in multivariate time series. Transformer, a basic time series modeling model based on self-attention mechanism, is mainly used to capture global dependencies between different time steps in a sequence; SAITS, or Self-Attention-Based Time Series Imputation Model, mainly utilizes the self-attention structure to learn the relationship between observed values ​​and missing values, and is used for imputing missing time series data. NTM, or Neural Tensor Completion Model, mainly uses neural networks to model the multidimensional relationships in tensors, and is used to recover missing elements in high-order tensors. CoSTCo, or Convolutional Sparse Tensor Completion Model, mainly uses convolutional structures to model the local structure and multidimensional correlations of sparse tensors for tensor completion tasks.

[0074] The above comparison methods cover different technical approaches such as temporal convolutional models, Transformer-like temporal models, diffusion interpolation models, self-attention interpolation models, and tensor completion models, which can comprehensively evaluate the performance of this invention in the task of completing highly missing mobile swarm intelligence sensing data.

[0075] (3) Evaluation indicators The experiment was evaluated using the following indicators: ①Mean squared error (MSE) and mean absolute error (MAE): used to measure the error in completing numerical values; ② Cosine similarity: used to measure the consistency of the changing trend between the completed sequence and the true sequence; ③Burst Recall and Burst F1 Score: These measures the model’s ability to recover from sudden events and abnormal fluctuations.

[0076] (4) Hyperparameter sensitivity settings To verify the stability of the key hyperparameter settings in this invention, this embodiment further includes a hyperparameter sensitivity experiment, testing the number of frequency scales. Frequency domain consistency loss weights An analysis was conducted. This included the number of frequency scales. This represents the number of scales involved in frequency domain feature extraction in the multi-scale frequency domain modeling module, used to control the model's ability to extract spectral structure from different temporal resolutions; frequency domain consistency loss weights. This represents the frequency domain consistency loss in the joint loss function. The balance coefficient is used to adjust the strength of the frequency domain consistency constraint during model training.

[0077] In this embodiment, different numbers of frequency scales are set respectively. and different frequency domain consistency loss weights The MSE and MAE of the completion results were compared under the same dataset, missing rate, and training conditions to analyze the impact of these two hyperparameters on completion performance. It should be noted that the number of frequency scales... Frequency domain consistency loss weights These are not performance evaluation metrics for completion, but rather key hyperparameters in model training and structural design; this embodiment still uses MSE and MAE as evaluation metrics for completion error.

[0078] 2. Experimental Results and Analysis (1) Random missing completion performance experiment In the case of random missing values, the missing values ​​were set to 0.1, 0.3, 0.5, 0.7 and 0.9, and the completion performance of different methods was compared on the three datasets.

[0079] like Figure 6 As shown, the completion error of each method generally increases with the increase of the missing value rate, indicating that a high missing value rate significantly increases the difficulty of data completion in crowdsourced sensing. However, the MRTFTC proposed in this invention maintains a low MAE under different missing values ​​and shows a more significant advantage over existing methods under high missing value conditions. This result shows that MRTFTC can effectively recover missing values ​​even with highly sparse observation data and has strong robustness to random missing values. The overall performance experiment in the experimental results also compares MSE and MAE under three datasets and five missing values ​​to answer the questions of overall effectiveness and high robustness to missing values.

[0080] (2) Structured missing completion experiment To verify the completion capability of MRTFTC in scenarios with missing time slices, a structured missing rate of 0.9 was set up. Unlike random missing, structured missing produces information gaps in continuous time intervals, which is closer to the continuous observation gaps caused by factors such as communication interruption, device offline, and discontinuous user movement in real crowd sensing systems.

[0081] like Figure 7 As shown, in the case of structured missing context, MRTFTC achieves optimal or near-optimal completion results on the Sensor, Traffic, and Air Quality datasets. This result indicates that when local temporal context is severely missing, completion methods relying solely on local temporal dependencies are prone to failure. In contrast, the multi-scale frequency domain modeling branch in MRTFTC provides effective global structural priors, and the spectral structure-guided dynamic time-frequency fusion mechanism further enhances the model's stability and robustness in scenarios with continuous missing context. Experimental results for structured missing context show that MRTFTC achieves the best MSE on the three datasets and the best MAE on the Sensor and Traffic datasets.

[0082] (3) Training cost and model complexity experiment To verify the engineering feasibility and computational efficiency of this invention, the training time of different methods was further compared under the condition of a structured missing rate of 0.9. For example... Figure 8 As shown, while MRTFTC is not the model with the fewest parameters, its model size is moderate. Compared to methods such as ModernTCN, TimesNet, HDDI, CSDI, and iTransformer, MRTFTC has a shorter or comparable training time on complex datasets while maintaining superior completion accuracy. This result demonstrates that this invention improves completion robustness through multi-resolution time-frequency joint modeling without introducing excessive computational overhead, making it suitable for deployment on servers, edge computing nodes, cloud platforms, or intelligent perception and analysis platforms. The training cost experiment, using training time as the evaluation metric, shows that MRTFTC achieves a good balance between completion performance and computational cost.

[0083] (4) Experiment on the ability to retain sudden changes To verify MRTFTC's ability to preserve abrupt changes and local spike structures, cosine similarity, burst recall, and burst F1 score were used for evaluation. Abrupt events were defined using a high quantile threshold from the observation distribution; if the completion result could correctly recover the burst peak at the missing location, it indicated that the model possessed strong abrupt change preservation capabilities. To avoid excessively long tables, Table 1 showcases the abrupt change preservation capabilities of MR-TFTC, along with four representative temporal completion methods: ModernTCN, TimesNet, iTransformer, and SAITS. Other comparative methods were evaluated in the overall completion performance experiment.

[0084] Table 1. Comparison of the ability of representative methods to preserve abrupt changes on three datasets.

[0085] As shown in Table 1, among the selected representative methods, MR-TFTC achieved high cosine similarity, burst recall, and burst F1 score on all three datasets, indicating that it not only reduces point value error but also better recovers burst peaks, local abrupt changes, and anomalous fluctuation structures in real-world perceived data. The burst recall and burst F1 score of some methods in Table 1 being 0 indicates that, under the corresponding datasets and evaluation thresholds, the method failed to correctly recover real burst events exceeding the burst threshold at the missing locations; this does not mean that its overall completion error is 0. These experimental results further demonstrate that this invention can alleviate the oversmoothing problem easily generated by traditional completion methods, and is of great significance for downstream tasks such as urban anomaly perception, environmental change detection, and traffic anomaly analysis. The burst preservation experiment in the experimental results shows that MRTFTC has higher burst recall and burst F1 score on the three datasets, and can more effectively recover real burst events.

[0086] (5) Ablation experiment of key modules To verify the effectiveness of key modules in MRTFTC, ablation experiments were conducted on the Enhanced Frequency Attention Block (EFAB) and Harmonic Gating (HG). Four model variants were set up: EFAB only, HG only, both EFAB and HG disabled, and the complete model with both EFAB and HG enabled.

[0087] Table 2. Comparison of ablation experiments between the enhanced frequency attention module and the spectral structure-guided dynamic fusion module.

[0088] As shown in Table 2, the complete MR-TFTC model with both EFAB and HG enabled achieves the best or best MSE and MAE on the Sensor, Air Quality, and Traffic datasets. This result indicates that EFAB and HG are not simply a stack of modules, but rather have complementary effects: HG can dynamically adjust the contributions of the time and frequency domain branches according to the spectral structure, while EFAB enhances the discriminativeness of frequency component selection, enabling the model to more effectively retain the effective frequency components related to abrupt changes. It should be noted that on the Traffic dataset, the improvement in MSE of the complete model compared to the variant without EFAB and HG is relatively small, decreasing from 0.1100 to 0.1097, a reduction of only 0.0003. This may be because traffic data itself has strong periodicity and relatively stable traffic flow patterns, and the basic time-frequency structure is already able to capture the main changing trends. Therefore, EFAB and HG have limited marginal improvement on the mean square error. However, from the perspective of MAE, the complete model decreased from 0.1561 to 0.1502, still demonstrating an improvement in both the overall absolute error and local bias. Combining the three datasets and the two types of error indices, the complete model still shows a more stable completion effect overall.

[0089] (6) Frequency selection visualization experiment To further verify EFAB's adaptive frequency selection capability, the frequency components retained after EFAB selection on different datasets were visualized. For example... Figure 9 As shown, the frequency components retained by EFAB are not simply concentrated in the low-frequency region, but exhibit a significantly different non-uniform selection pattern across different datasets. Specifically, the frequency retention rates on the Sensor, Air Quality, and Traffic datasets are approximately 45.70%, 29.30%, and 46.48%, respectively. This result indicates that EFAB is not a fixed low-pass filter, but rather can adaptively select effective frequency components based on the spectral structure of different datasets. This allows it to retain global trend information while avoiding misclassifying high-frequency components related to sudden changes as noise. The EFAB visualization results in the experimental results also clearly indicate that white represents retained frequency components, and black represents discarded frequency components, with significant differences in the retention patterns across different datasets.

[0090] (7) Hyperparameter sensitivity analysis Finally, to verify the sensitivity of MR-TFTC to key hyperparameters, this embodiment further analyzes the number of frequency scales. Frequency domain consistency loss weights The impact on completion performance. For example... Figure 10 As shown, the number of frequency scales Larger is not always better; as the number of scales increases from a small value to a moderate range, the model can utilize more complementary spectral information, improving the completion effect. However, when the number of scales increases further... If the value is too large, it may introduce redundant spectral responses and increase optimization difficulty, leading to performance degradation. Simultaneously, the frequency domain consistency loss weight... It also shows a trend of first increasing and then decreasing: when When the frequency domain is too small, the constraints are insufficient, making it difficult to fully maintain the global spectral structure; when When the number of frequency scales is too large, the model may overemphasize frequency domain consistency, potentially interfering with the accuracy of time domain reconstruction. Therefore, a moderate number of frequency scales is necessary. Frequency domain consistency loss weights It achieves a better balance between time-domain reconstruction accuracy and frequency-domain structure preservation. This result demonstrates that MR-TFTC exhibits good stability and applicability within a reasonable hyperparameter range. Experimental results show... and Sensitivity analysis showed that a moderate multi-scale setting was more stable. It can achieve better frequency domain constraint effect.

[0091] 3. Experimental Conclusions In summary, combining Figures 6 to 10 Analysis of the data in Tables 1 and 2 shows that the MRTFTC proposed in this invention exhibits excellent performance in terms of random missing data, structured missing data, computational efficiency, preservation of sudden changes, effectiveness of key modules, interpretability of frequency selection, and stability of hyperparameters. Experimental results fully demonstrate that this invention can not only reduce the completion error of highly missing swarm intelligence sensing data, but also effectively preserve local sudden changes and the global spectral structure, possessing high completion accuracy, robustness, interpretability, and engineering application value.

[0092] Although the embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, and for those of ordinary skill in the art, various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention. Therefore, the present invention is not limited to the specific details without departing from the general concept defined by the claims and their equivalents.

Claims

1. A method for swarm intelligence sensing data completion using multi-resolution time-frequency tensor completion, characterized in that, Includes the following steps: Step S1: Obtain the crowd sensing data collected by the terminal device, and construct a sparse observation tensor according to the location dimension, index dimension and time dimension; S2. Perform feature embedding on the sparse observation tensor to obtain initial embedding features; S3. Input the initial embedded features into the time domain encoding module, perform standardization processing first, introduce a de-stationary factor, extract time domain features, and generate time domain completion results through linear mapping. The introduction of the de-stationary factor specifically involves introducing a de-stationary factor during the attention calculation process to perform scaling and offset compensation on the attention score; the de-stationary factor includes a scaling factor. and offset adjustment factor Both are based on the mean. and standard deviation Generate; where, This is used for scaling attention scores. Used to compensate for the shift in attention scores; and They work together to compensate for the non-stationary information that is weakened by standardization; S4. Perform multi-scale segmentation on the time-domain features and frequency domain transformation on each segment to obtain multi-scale frequency-domain features. S5. Input the multi-scale frequency domain features into the enhanced frequency attention module, perform adaptive weighted selection on the frequency components, and perform nonlinear encoding on the weighted frequency domain features; S6. Perform inverse frequency domain transformation on the encoded multi-scale frequency domain features and map them to the original signal space respectively. Then fuse the results of each scale to obtain the frequency domain completion result. S7. Retain the true observation values ​​at the observation positions and use the time domain completion results to form a spectrum analysis sequence at the missing positions. Explicitly calculate the spectrum flatness index SFM and the high-frequency energy ratio index HIR based on the power spectrum of the spectrum analysis sequence, and generate time-frequency fusion weights that satisfy the monotonically suppressed relationship with SFM and HIR. The monotonic inhibition relationship is as follows: when SFM increases, the time-frequency fusion weight... Decrease when HIR increases Decrease; when SFM is small and HIR is small, The increase in frequency domain completion results improves the contribution of the model when the spectral structure is clear and stable, and improves the contribution of time domain completion results when the spectrum is flat or the high-frequency disturbances are strong. The specific calculation formula for the time-frequency fusion weight is as follows: ; in, Use the Sigmoid activation function; Indicates the first The sampling location, the first The spectrum flatness index is calculated from the spectrum analysis sequence corresponding to each perception index. Indicates the first The sampling location, the first The high-frequency energy ratio index is calculated from the spectrum analysis sequence corresponding to each sensing index. Indicates the first The sampling location, the first Sequence-level time-frequency fusion weights corresponding to each sensing indicator; Indicates will After broadcasting along the time dimension, in the first The time-frequency fusion weights corresponding to each time step; The time-frequency fusion weights are not directly learned from coarse-scale and fine-scale features, but are determined by the spectral structure reflected by SFM and HIR. S8. Adaptively fuse the time-domain completion result and the frequency-domain completion result using the time-frequency fusion weight to obtain the final completion tensor. The final completion tensor is used to generate or update urban environmental monitoring maps, traffic flow prediction models, or to generate abnormal event early warning signals.

2. The method according to claim 1, characterized in that, In step S1, the crowd sensing data is data collected in real time or periodically by terminal devices in the physical environment. The terminal devices include mobile communication terminals, vehicle-mounted sensors, or environmental monitoring nodes. The crowd sensing data includes location information, timestamps, and at least one sensing indicator, which includes at least one of air quality index, traffic flow, traffic speed, noise level, temperature, or humidity. The sparse observation tensor is represented as Where I is the number of sampling locations, J is the number of sensing indicators, and T is the number of time steps; For the sparse observation tensor The Middle Each tensor element represents the observed or to-be-completed value of the j-th sensing index at the ith sampling location at the t-th time step. To distinguish between true observations and missing elements, the set of observation element indices is defined as follows: , in, The set of indexes of the observed elements It is not a single set of location dimensions, but rather the sparse observation tensor. The set of indices of the actual observed elements; not included in The tensor elements are the missing elements and are used as the objects to be filled in; In step S2, the initial embedded features are obtained by projecting the sparse observation tensor onto the latent feature space through an embedding map, specifically using the following formula: ,in, Indicates the initial embedded features; Indicates the embedding of mapping functions; This represents the sparse observation tensor constructed in step S1; Indicates the number of sampling locations; Indicates the number of perceived indicators; Indicates the number of time steps; Indicates the embedding dimension; superscript This represents the initial embedding layer, used to distinguish it from the feature representations of subsequent coding layers.

3. The method according to claim 1, characterized in that, In step S3, the initial embedded features are standardized along the time dimension, and a destationary factor is introduced during the attention calculation process to compensate for the nonstationary effects caused by mean shift and variance changes. The standardization process specifically involves: denoting the initial embedding features obtained in step S2 as... , Indicates the first The sampling location, the first The first perception index in the The initial embedded features corresponding to each time step; For each position-indicator pair Calculate the mean along the time dimension and standard deviation : , , And obtain the standardized features using the following formula. : , in, To prevent positive numbers with a denominator of zero, The above operations are performed element-wise along the feature dimension; The extraction of time-domain features specifically involves: standardizing the features... Inputting the time-domain encoding module yields the time-domain feature representation: ,in, Represents the time-domain encoding mapping; the time-domain feature representation Let it be a four-dimensional tensor, denoted as ,in Representation of time-domain feature tensors The Middle The sampling location, the first The first perception index in the Each time step corresponds to 3D feature vector; The specific steps of generating the time-domain completion result through linear mapping are as follows: representing the time-domain features... The time-domain completion result is obtained through linear mapping; the linear mapping is denoted as... , indicating that a The 3D input vector is mapped to a scalar value through a linear transformation; the time-domain completion result is denoted as: ,in As a scalar, it represents the first... The sampling location, the first The first perception index in the Time domain completion values ​​for each time step; all Constructing a three-dimensional tensor .

4. The method according to claim 1, characterized in that, In step S4, the multi-scale segmentation process involves segmenting and aggregating the time-domain features along the time dimension, and then performing frequency domain transformation on the segmentation results of each scale to obtain spectral representations at different time resolutions. The multi-scale segmentation process specifically includes: Obtain the time-domain features obtained in step S3 Set the scale factor set Each scale factor is denoted as , A positive integer representing the number of consecutive time steps contained in each segment when performing segmented aggregation along the time dimension. Preserve the original time resolution. The larger the value, the longer the time range covered by the segment and the lower the time resolution. For each scale factor Time domain features Divide along the time dimension into lengths of The time period; when the end time period is less than At that time, for time domain features The ends are filled in; Then, average pooling or equivalent segmented aggregation is performed on each time period to generate a scaling factor. Corresponding scale feature representation ,in Indicates the number of sampling locations. Indicates the number of perceived indicators. Indicates the number of time steps. Feature dimensions representing time-domain features Represents scale factor The number of time steps is determined; finally, the scale feature representations corresponding to different scale factors are summarized to form a multi-scale feature sequence. Then, a fast Fourier transform is performed along the time dimension to obtain the frequency domain features at the corresponding scale.

5. The method according to claim 1, characterized in that, In step S5, the enhanced frequency attention module first concatenates the real and imaginary parts of the frequency domain features at each scale to obtain a frequency representation; then it performs pooling along the frequency dimension to form a global spectral description vector for the corresponding position-index pair; then it inputs the global spectral description vector into a lightweight multilayer perceptron and outputs a frequency attention vector with the same number of frequency points at that scale; finally, it generates frequency gate weights with values ​​ranging from 0 to 1 through a sigmoid gating function; each frequency gate weight corresponds to a frequency component and acts on both the real and imaginary parts of that frequency component; the frequency gate weights are adaptively learned through backpropagation of the joint loss function during model training. The frequency gating weights do not require the weights of all frequency components to be normalized to a fixed sum; The enhanced frequency attention module also introduces a sparse regularization constraint: during the model training phase, the average value of the frequency gating weights corresponding to each scale, each sampling position, each perceptual index, and each frequency point is used as the frequency attention sparse regularization term. This regularization term is equivalent to applying normalization to the non-negative frequency gating weights. Constraints, and through the joint loss function This item is introduced into the model training process, where, , which is the balance coefficient of the frequency attention sparse regularization term, used to control the strength of the effect of frequency attention sparse constraints in the joint loss function; For frequency attention sparsity regularization, its value is equal to the average of the frequency gating weights corresponding to each scale, each sampling location, each perception index, and each frequency point, in order to encourage only a small number of key frequency components to be given large weights. The frequency domain features weighted by the enhanced frequency attention module are further input into a nonlinear frequency coding network to model the nonlinear coupling relationship between different frequency components.

6. The method according to claim 1, characterized in that, In step S6, the inverse frequency domain transformation is specifically the inverse fast Fourier transform; The fusion employs multi-scale splicing linear projection fusion, specifically including: performing inverse fast Fourier transform on the encoded frequency domain features at each scale to obtain the temporal recovery features corresponding to each scale; when the temporal recovery features corresponding to different scales are inconsistent in the number of time steps, they are resampled to be consistent with the original number of time steps through linear interpolation; the resampled temporal recovery features at each scale are spliced ​​along the feature dimension to obtain multi-scale spliced ​​features; then, scale fusion and dimensionality compression are performed on the multi-scale spliced ​​features through a learnable linear mapping, and the frequency domain completion result is obtained through the output mapping.

7. The method according to claim 1, characterized in that, In step S7, the spectral flatness index SFM is calculated by the ratio of the geometric mean to the arithmetic mean of the power spectrum energy, and is used to characterize whether the spectral energy is concentrated in a few dominant frequencies. When SFM is small, it indicates that the spectral energy is more concentrated and the frequency domain completion result is more reliable. When SFM is large, it indicates that the spectrum is flatter and the reliability of the frequency domain completion result is reduced. The High Frequency Energy Ratio (HIR) index is calculated as the ratio of the sum of the power spectrum energy in the high frequency region to the sum of the power spectrum energy at all frequency points. It is used to characterize the proportion of rapidly changing, spiked perturbations, or broadband responses in the sequence. When the HIR is large, reduce the proportion of frequency domain completion results in the final fusion.

8. The method according to claim 1, characterized in that, In step S8, the final completed tensor is obtained as follows: = , in, For the frequency domain completion result, To complete the result in the time domain, It is the dynamic time-frequency fusion weight generated in step S7.

9. The method according to claim 1, characterized in that, During the model training phase, the training objective of the method includes one or more of the following: the main reconstruction loss, frequency domain consistency loss, and frequency attention sparsity regularization term calculated based on the observation element index set; wherein, the frequency domain consistency loss does not directly constrain the sparse input spectrum after zero-padding, but constructs a frequency domain consistency reference by using the real observation value at the position corresponding to the observation element index set and the padding result at the position of the missing element, and constrains the consistency between the final padding result and the frequency domain consistency reference in the real and imaginary parts of the frequency domain.

10. A swarm intelligence sensing data completion system with multi-resolution time-frequency tensor completion, based on the method described in any one of claims 1 to 9, characterized in that, The system includes: The data construction module is responsible for executing step S1, which is used to acquire the crowd sensing data collected by terminal devices in the physical environment, and construct a sparse observation tensor according to the location dimension, index dimension and time dimension. The time-domain encoding module is responsible for executing steps S2 and S3, which are used to perform embedding mapping on the sparse observation tensor and extract time-domain features from the initial embedding features to output the time-domain completion result. The multi-scale frequency domain modeling module is responsible for executing steps S4 to S6, which are used to perform multi-scale segmentation, frequency domain transformation, adaptive selection of frequency components, frequency domain nonlinear coding, inverse frequency domain transformation and multi-scale fusion on time domain features, and output frequency domain completion results. The fusion completion module is responsible for executing steps S7 and S8, which are used to generate time-frequency fusion weights based on the spectral flatness index and the high-frequency energy ratio index, and adaptively fuse the time-domain completion result and the frequency-domain completion result to output the final completed tensor.

Citation Information

Patent Citations

  • Missing data completion method based on sparse topology space-time attention mechanism

    CN118760677A

  • Frequency spectrum data completion method and system based on third-dimensional tensor collaborative sparse and low-rank transformation learning

    CN122241023A