Time series generation method and system based on frequency domain double learning mechanism

By employing a dual learning mechanism in the frequency domain, dynamically allocating frequency weights and Patch Attention, the problems of detail loss and core feature ambiguity in frequency domain analysis are solved, achieving high-quality time series generation that is applicable to time series forecasting in fields such as temperature, finance, healthcare, and energy.

CN120804593BActive Publication Date: 2026-01-27SOUTH CHINA NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510981247.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2026-01-27
Estimated Expiration
2045-07-16

AI Technical Summary

Technical Problem

Existing technologies in frequency domain analysis suffer from problems such as loss of details due to high-amplitude frequency screening, difficulty in focusing on core features due to equal learning mechanisms, and inability of seasonal decomposition modules to take into account differentiated processing, resulting in time series generation lacking real data details and having blurred core trends.

Method used

Employing a frequency-domain dual learning mechanism, the weights of frequency bars are dynamically allocated through adaptive weighting and Patch Attention. Combined with 2D rotational position coding and attention networks, attention calculation is performed on the segmented spectrogram. Residual connections are used to fuse and optimize the frequency signals. Finally, multinomial regression is used to extract trend components, ultimately generating high-quality time series.

Benefits of technology

It effectively preserves high-amplitude core frequencies and low-amplitude details, improving the accuracy and reliability of time series generation. It can clearly restore seasonal fluctuations and long-term trends, and is suitable for time series generation tasks in multiple fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804593B_ABST
    Figure CN120804593B_ABST
Patent Text Reader

Abstract

The application provides a time series generation method based on a frequency domain double learning mechanism, including: acquiring noisy "future one-year temperature" time series data, performing Fourier transform on the time series data to the frequency domain to obtain a frequency spectrum; using a linear layer neural network to analyze the frequency spectrum, calculating the importance weight of each frequency column on the frequency spectrum, and obtaining a weighted frequency spectrum based on the importance weight multiplied by the corresponding frequency column; dividing the frequency spectrum into multiple blocks; sending all the blocks into an attention network for attention calculation to obtain an attention output; performing residual connection on the attention output and the weighted frequency spectrum to obtain a fused and optimized frequency signal; converting the fused and optimized frequency signal back to the time domain through inverse Fourier transform to obtain a seasonal component; extracting a trend component from the noisy "future one-year temperature" time series data; and adding the seasonal component and the trend component to obtain predicted "future one-year temperature" initial data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of frequency domain dual learning technology, and specifically to a time series generation method and system based on a frequency domain dual learning mechanism. Background Technology

[0002] In the field of time series generation, frequency domain analysis is a core tool for processing seasonal and periodic patterns. Existing technologies suffer from the following key shortcomings in frequency domain information processing:

[0003] 1. High amplitude frequency offset leads to loss of detail:

[0004] Traditional methods (such as ETSformer) employ a Top-K frequency filtering strategy, retaining only the K components with the highest amplitude in the frequency domain. While this strategy can capture major periodic patterns (such as high-amplitude signals like the changing seasons), it completely ignores low-amplitude frequency components. Taking urban temperature series as an example, subtle temperature fluctuations (with low amplitude but fixed periods) corresponding to the 24 solar terms and sudden weather disturbances are directly filtered out, resulting in the generated series lacking the detailed features of real data and failing to fully reconstruct the multi-level periodic patterns of complex time series.

[0005] II. The equal learning mechanism struggles to focus on core features:

[0006] While some techniques (such as Fredformer) avoid the limitations of Top-K selection by employing a strategy of learning all frequencies equally, they fail to differentiate and reinforce key frequencies. In real-world data, the importance of high-amplitude frequencies (such as annual seasonal cycles) differs significantly from that of low-amplitude frequencies (such as random noise). Equal learning can distract the model from a large amount of meaningless low-frequency noise, leading to low learning efficiency for core periodic features (such as main seasonal patterns), blurring the core trend of the generated sequences, and failing to highlight the dominant role of key seasonal features.

[0007] III. The seasonal decomposition module lacks differentiated processing capabilities:

[0008] Existing diffusion models' seasonal decomposition modules lack adaptive processing mechanisms for high and low amplitude frequencies, failing to simultaneously meet the learning requirements of both types of signals. Specifically, this manifests as insufficient enhancement of high amplitude frequencies, leading to low-quality core seasonal model generation; and the absence of filtering mechanisms for low amplitude frequencies, allowing noise and irrelevant fluctuations to infiltrate the valid signal. This deficiency is particularly pronounced in scenarios where multi-scale seasonal models coexist (such as temperature data containing the main season, sub-season, and weather disturbances), resulting in the decomposed seasonal components losing important details and containing redundant interference information. Summary of the Invention

[0009] The purpose of this invention is to overcome the above-mentioned technical deficiencies and provide a time series generation method and system based on a frequency domain dual learning mechanism, which solves the technical problems in the prior art of losing details due to high amplitude screening, lack of focus in equal learning, and inability of seasonal decomposition to take into account differentiated needs in frequency domain information processing.

[0010] To achieve the above-mentioned technical objectives, the first aspect of the present invention provides a time series generation method based on a frequency domain dual learning mechanism, which acquires noisy "temperature data for the next year" time series data, performs Fourier transform on the time series data to the frequency domain to obtain a spectrum, where the horizontal axis is frequency and the vertical axis is amplitude.

[0011] The spectrum is analyzed using a linear layer neural network to calculate the importance weight of each frequency bar in the spectrum, and the weighted spectrum is obtained by multiplying the importance weight by the corresponding frequency bar.

[0012] The weighted spectrogram is divided into multiple blocks, each block containing information about a local frequency region, and 2D rotational position encoding is used on the blocks;

[0013] All the blocks are fed into an attention network to calculate the attention output.

[0014] The attention output is residually concatenated with the weighted spectrum to obtain the fused and optimized frequency signal.

[0015] The fused and optimized frequency signal is converted back to the time domain through inverse Fourier transform to obtain the seasonal component, which includes clear seasonal fluctuations and discernible solar term transitions.

[0016] Use multinomial regression to extract trend components from noisy time-series data on "temperatures for the next year";

[0017] The seasonal component and the trend component are added together to obtain the initial data for the predicted "temperature in the coming year".

[0018] Compared with the prior art, the beneficial effects of the present invention include:

[0019] This invention dynamically assigns weights to each frequency bar through a linear layer. High-amplitude core frequencies (such as the changing seasons) are given high weights, meaningful frequencies with medium to low amplitudes (such as seasonal fluctuations) receive medium weights, and noise frequencies have weights close to 0. This mechanism avoids the loss of low-amplitude details in traditional "Top-K screening" while ensuring the generation quality of core seasonal patterns through weight reinforcement.

[0020] In the temperature data, both high-amplitude signals of the four seasons are preserved, while the medium- and low-amplitude cycles of the solar terms are enhanced, avoiding the generated sequences from merely presenting monotonous seasonal fluctuations. Patch Attention learns all frequencies equally, segmenting the spectrogram into local patches and introducing 2D RoPE positional encoding, enabling the model to accurately capture the location information and correlations of each frequency region. Even low-amplitude weather disturbance frequencies are included in the attention calculation, avoiding the problem of noise interfering with core features in equal learning. Compared to Fredformer's indiscriminate learning, this approach uses positional encoding to allow the model to pay focused attention equally, neither ignoring details nor discriminating the importance of information.

[0021] According to some embodiments of the present invention, after feeding all the blocks into an attention network to calculate the attention output, the method further includes the following steps:

[0022] The attention network separates a residual component, which is completely random noise;

[0023] The seasonal component, the trend component, and the residual component are added together to obtain the initial data for the predicted "temperature in the coming year".

[0024] According to some embodiments of the present invention, after adding the seasonal component, the trend component, and the residual component to obtain the initial data for the predicted "temperature in the next year", the method includes the following steps:

[0025] We obtain real data by collecting actual temperature time series data for the next year;

[0026] The initial data and the actual data are compared to calculate the weighted total loss.

[0027] All parameters of the model are adjusted based on the weighted total loss through backpropagation. These parameters include the adaptive weight layer, PatchAttention, and trend extractor.

[0028] According to some embodiments of the present invention, loss calculation is performed on the initial data and the real data, including the following steps:

[0029] Temporal loss (L_tmp): Directly compares the differences between the initial data and the actual data at different points in time;

[0030] Frequency domain loss (L_feq): Perform Fourier transforms on both the initial data and the actual data, and compare the differences in the frequency domain;

[0031] Weighted total loss (L_alpha): The time domain loss and frequency domain loss are added together proportionally (alpha).

[0032] According to some embodiments of the present invention, the frequency column includes:

[0033] Four Seasons Pillar, Solar Terms Pillar, and Noise Pillar.

[0034] According to some embodiments of the present invention, calculating the importance weight of each frequency bar on the spectrogram includes:

[0035] The weight of the Four Seasons column is 0.9, the weight of the Solar Terms column is 0.7, and the weight of the Noise column is 0.01.

[0036] Secondly, this application provides a time series generation system based on a frequency domain dual learning mechanism, including:

[0037] The frequency transformation module acquires noisy time-series data of "temperature for the next year", performs Fourier transform on the time-series data to the frequency domain to obtain a spectrum, with the horizontal axis being frequency and the vertical axis being amplitude.

[0038] An adaptive weighting module uses a linear layer neural network to analyze the spectrogram, calculates the importance weight of each frequency bar in the spectrogram, and multiplies the importance weight by the corresponding frequency bar to obtain the weighted spectrogram.

[0039] The spectrum segmentation module divides the spectrum into multiple blocks, each block containing information about a local frequency region, and uses 2D rotational position encoding on the blocks;

[0040] The attention calculation module feeds all the blocks into an attention network to calculate the attention output.

[0041] The fusion optimization module performs a residual connection between the attention output and the weighted spectrum to obtain the fused and optimized frequency signal.

[0042] The inverse transform module converts the fused and optimized frequency signal back to the time domain through inverse Fourier transform to obtain the seasonal component, which includes clear seasonal fluctuations and discernible solar term transitions.

[0043] The trend component extraction module uses multinomial regression to extract trend components from noisy time-series data on "temperatures for the next year".

[0044] The initial data generation module adds the seasonal component and the trend component to obtain the initial data for the predicted "temperature in the next year".

[0045] According to some embodiments of the present invention, it further includes:

[0046] The loss calculation module collects real temperature time series data for the next year to obtain real data, and calculates the weighted total loss by comparing the initial data with the real data.

[0047] Thirdly, this application provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the time series generation method based on the frequency domain dual learning mechanism as described in any one of the first aspects.

[0048] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0049] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein the abstract drawings are to be completely consistent with one of the drawings in the specification:

[0050] Figure 1 A flowchart of a time series generation method based on a frequency domain dual learning mechanism provided in an embodiment of the present invention;

[0051] Figure 2 A flowchart of a time series generation method based on a frequency domain dual learning mechanism provided in an embodiment of the present invention;

[0052] Figure 3 A flowchart detailing the time series generation method based on a frequency domain dual learning mechanism provided in an embodiment of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0054] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0055] Reference Figures 1-3 , Figure 1 A flowchart of a time series generation method based on a frequency domain dual learning mechanism provided in an embodiment of the present invention; Figure 2 A flowchart of a time series generation method based on a frequency domain dual learning mechanism provided in an embodiment of the present invention; Figure 3The flowchart illustrates a time series generation method based on a frequency domain dual learning mechanism, as provided in one embodiment of the present invention. The time series generation method based on the frequency domain dual learning mechanism includes, but is not limited to, the following steps:

[0056] Step S110: Obtain noisy time-series data of "temperature in the next year", and perform Fourier transform on the time-series data to the frequency domain to obtain the spectrum.

[0057] Step S120: Use a linear layer neural network to analyze the spectrum, calculate the importance weight of each frequency bar on the spectrum, and multiply the importance weight by the corresponding frequency bar to obtain the weighted spectrum.

[0058] Step S130: Divide the spectrogram into multiple blocks, each block containing information about a local frequency region. Use 2D rotation position encoding on the blocks and feed all blocks into an attention network to calculate attention and obtain attention output.

[0059] Step S140: The attention output is residually connected to the weighted spectrum to obtain the fused and optimized frequency signal. The fused and optimized frequency signal is converted back to the time domain through inverse Fourier transform to obtain the seasonal component, which includes clear seasonal fluctuations and identifiable solar term transitions.

[0060] Step S150: Use multinomial regression to extract the trend component from the noisy "temperature in the next year" time series data, and add the seasonal component and the trend component to obtain the initial data of the predicted "temperature in the next year".

[0061] In one embodiment, the time series generation method based on the frequency domain dual learning mechanism includes the following steps: acquiring noisy "future year temperature" time series data; performing a Fourier transform on the time series data to the frequency domain to obtain a spectrum, with the horizontal axis representing frequency and the vertical axis representing amplitude; analyzing the spectrum using a linear layer neural network, calculating the importance weight of each frequency bar on the spectrum, and multiplying the importance weight by the corresponding frequency bar to obtain a weighted spectrum; dividing the weighted spectrum into multiple blocks, each block containing information about a local frequency region, and using 2D rotational position encoding on the blocks; feeding all blocks into an attention network for attention calculation to obtain an attention output; performing a residual connection between the attention output and the weighted spectrum to obtain a fused and optimized frequency signal; converting the fused and optimized frequency signal back to the time domain using an inverse Fourier transform to obtain a seasonal component, which includes clear seasonal fluctuations and discernible solar term transitions; extracting a trend component from the noisy "future year temperature" time series data using multinomial regression; and adding the seasonal component and the trend component to obtain the predicted initial data for the "future year temperature".

[0062] Real-world example: Generating a daily temperature time series for a city for the next year

[0063] Characteristics of real data:

[0064] Trend (T): Global warming is causing a slow rise in average annual temperature (long-term change).

[0065] Season (S):

[0066] 1. Main season (high amplitude): obvious seasonal changes (spring, summer, autumn, winter, large amplitude).

[0067] 2. Sub-seasonal (low amplitude): Subtle temperature fluctuations brought about by the twenty-four solar terms (such as "Awakening of Insects").

[0068] Warming up, followed by a drop in temperature around "Frost's Descent" (the changes are small but the patterns are important).

[0069] 3. Weather disturbances (low amplitude): sudden cold waves, heat waves, etc. (no fixed period, small amplitude).

[0070] 4. Residual (R): Completely random measurement noise or small perturbations.

[0071] Problems with traditional methods:

[0072] If only the top-K high amplitude frequency (such as top-1) is selected, only the most obvious "four seasons" changes can be learned, and the "solar term" fluctuations and "weather disturbance" patterns will be completely lost. The generated temperature curve will only have monotonous seasonal fluctuations and lack details.

[0073] If all frequencies are treated equally, the model may be distracted by a large number of tiny “weather disturbances” and noise frequencies, resulting in insufficient learning of the most important “four seasons” and “solar terms” features, and the generated seasonal features may be vague.

[0074] 1. Frequency domain conversion

[0075] Operation: Input the current noisy "temperature for the next year" time series data Xk into a Fourier transform (FFT).

[0076] Result: The frequency domain signal Ak is obtained. Ak is no longer a temperature curve, but a spectrum graph, with the horizontal axis representing frequency (how fast it changes) and the vertical axis representing amplitude (the intensity of the change).

[0077] In this chart: the seasonal changes (1 year / cycle) correspond to high amplitude;

[0078] The changes in the solar terms (15 days / cycle) correspond to medium to low amplitude; weather disturbances and noise correspond to low amplitude.

[0079] Function: To decompose complex temporal changes into combinations of different frequencies (speed) and intensities (amplitude). This is a crucial first step in dealing with seasonality issues.

[0080] By converting time-series data to the frequency domain using Fourier transform, information hidden in different frequency components within the time series can be extracted. Compared to methods that only analyze the time domain, this frequency-domain approach can more accurately capture the frequency characteristics corresponding to periodic changes in temperature data, such as annual and seasonal cycles. This provides a solid foundation for accurately generating subsequent time series data and helps to grasp the inherent rhythm of temperature changes over time.

[0081] 2. Dual learning mechanism

[0082] a) Adaptive weighting

[0083] Operation: Design a small neural network (linear layer) to analyze the spectrum Ak. Automatically calculate the "importance weight" of each frequency bar. High amplitude (such as the four seasons) will receive a high weight, medium to low amplitude (such as solar terms) will receive a medium or high weight, and short bars representing pure noise will have a very low weight or even close to 0. Then, multiply the corresponding bars in Ak by this weight to obtain the weighted spectrum Gk.

[0084] Example: The weight of the seasonal pillars = 0.9, the weight of the solar term pillars = 0.7, and the weight of the noise pillars = 0.01. Gk strengthens the signals of the four seasons and solar terms, and greatly weakens the noise.

[0085] What problem does it solve? It ensures that the model focuses on truly important frequency patterns (seasons, solar terms), preventing them from being overwhelmed or under-learned. This corresponds to "emphasizing important frequencies."

[0086]

[0087] S k =PatchAttention(X) k -G k )+G k

[0088] F(·) represents performing a Fourier transform on Xk to the frequency domain, and IF(·) represents an inverse Fourier transform, converting the frequency domain data back to timing data.

[0089] By analyzing the spectrogram using a linear layer neural network and calculating the importance weight of each frequency bar, the system can automatically filter out the frequency components that have a more critical impact on the "temperature for the next year" time series data. By weighting these important frequency information and weakening relatively less important components, the resulting forecast data focuses more on key factors such as core periodic fluctuations, thus improving the accuracy and reliability of the forecasts.

[0090] Patch Attention is the method proposed in this application:

[0091] b) Patch Attention

[0092] Operation: The entire spectrum Ak is divided into many small, non-overlapping patches, much like cutting a large image into many small puzzle pieces. Each patch contains information about a local frequency region.

[0093] 2D RoPE Attention: These "frequency patches" are fed into a special attention network. The key is the use of 2D Rotated Position Encoding (RoPE). This allows the model to not only focus on the information within each patch, but also to accurately know the position of each patch in the entire spectrogram (which frequency range, which amplitude region), and to calculate the correlation between different patches.

[0094] Results: The model equally examines and processes every local region (each patch) of the spectrogram. Even if a patch mainly contains low amplitudes (such as the frequency region corresponding to a certain solar term or weather disturbance), the model still has the opportunity to learn it because its patch is included in the attention calculation.

[0095] What problem does it solve? It prevents the model from ignoring potentially meaningful frequency information with low amplitude (such as seasonal fluctuations). It ensures that information from all frequency regions is "seen" and considered. This corresponds to "equal learning of all frequencies."

[0096] The following three formulas are for calculating Patch Attention.

[0097]

[0098] ·F(·) represents performing a Fourier transform on Xk to the frequency domain to obtain the amplitude of each frequency component. Patch(·) represents dividing Ak into multiple non-overlapping local feature blocks. This indicates that the data is normalized. Attention(·) calculates the dependencies between data points. IF(·) represents the inverse Fourier transform, converting the frequency domain data back to time series.

[0099] The following two formulas are for calculating 2D repo.

[0100]

[0101] R(n,t) represents the elements of the rotation matrix, where n is the position index and t is the frequency index. Represents a complex exponential function of rotation at position n and frequency t, where Re(·) denotes taking the real part of the complex number, and * denotes the complex conjugate operation.

[0102] The weighted spectrogram is divided into multiple blocks and 2D rotational position encoding is used. This operation considers information from local frequency regions and gives these local features a unique position-related representation through rotational position encoding. This allows the model to better capture the correlations and differences between different local frequency regions, enriching the characterization of frequency domain information and helping to more accurately reproduce the characteristics of temperature changes at different stages.

[0103] c) Residual connectivity fusion:

[0104] Operation: Add the output of Patch Attention (which contains equal learning information for all frequencies) to the adaptively weighted output Gk (which contains reinforcement information for key frequencies) (residual connection).

[0105] Result: A final seasonal frequency representation that combines the advantages of both approaches was obtained. It preserves and enhances key patterns (seasons, solar terms) without losing other potentially important details (certain specific weather patterns).

[0106] Effect: This is the core "magic" of DiffFreq, allowing the model to simultaneously "see the whole picture equally" and "focus on the key points".

[0107] By using an attention network to perform attention calculations on the segmented blocks, the model can dynamically focus on more critical local regions and feature combinations in the spectrogram, adaptively allocate computing resources, further explore deeper feature relationships, and thus integrate more representative and valuable attention outputs, optimizing the utilization of frequency domain information in the entire generation process.

[0108] By fusing the attention output with the weighted spectrogram through residual connections, the fused frequency signal retains the basic frequency information in the original spectrogram while incorporating important features filtered and refined by the attention mechanism. This effectively avoids problems such as gradient vanishing that may occur during information fusion, and helps to better optimize the frequency signal and improve the quality of the final generated seasonal component.

[0109] 3. Time-series reconstruction

[0110] Operation: Convert the fused and optimized frequency signal (the result of the previous step) back to the time domain using inverse Fourier transform (IFFT).

[0111] Result: A high-quality seasonal component Sk was obtained. This Sk contains clear seasonal fluctuations, discernible seasonal transitions, and may even contain some regular weather disturbance patterns, while suppressing most of the pure noise.

[0112] 4. Generate the final timing sequence

[0113] Operation: Use multinomial regression to extract the trend component Tk from the noisy data Xk (to capture the long-term upward trend of global warming).

[0114]

[0115] Here, "·" denotes tensor multiplication. The polynomial space C is a matrix composed of powers of the vector c = [1,2,...,t-2,t-1,t] / t, where t represents the time step and p is a small order (e.g., p = 3).

[0116] The model may also separate a small residual component Rk (completely random noise); add Tk (trend) + Sk (optimized season) + Rk (residual / noise).

[0117] Results: A clean, predictive initial data set X0 was generated, which ultimately resulted in a high-quality temperature time series for the next year. This series exhibits: a clear long-term warming trend (Tk); significant and detailed seasonal changes and seasonal fluctuations (Sk, thanks to dual learning); and preservation of necessary randomness (Rk).

[0118] The seasonal components obtained after the above series of frequency domain processing and conversion back to the time domain exhibit clear seasonal fluctuations and discernible transitions between solar terms, effectively reproducing the temperature changes throughout the year with the changing seasons. Simultaneously, multinomial regression is used to extract the trend component, and the two are finally added together to obtain the initial data for prediction. This approach takes into account both long-term trends and periodic seasonal variations, making the prediction results more closely match actual temperature change patterns and improving the practicality and reliability of the predicted data.

[0119] 5. Loss Calculation

[0120] Operation: Calculate the difference between the generated X0 and the real, clean X0 (that is, the actual data in the dataset) as the loss.

[0121] Double loss:

[0122] Temporal loss (L_tmp): Directly compares the differences (mean squared error, MSE) between the generated sequence and the real sequence at different time points. Ensures overall shape matching.

[0123]

[0124] Frequency domain loss (L_feq): Perform FFT on both the generated and real sequences and compare their differences in the frequency domain (L1 Loss). Core function: Forces the model to be similar not only temporally but also in terms of frequency components (which periods exist and their intensities). This directly supervises the quality of seasonality decomposition.

[0125]

[0126] Weighted total loss (L_alpha): The two losses are added together proportionally (alpha).

[0127] Objective: Based on this total loss, adjust all model parameters (including adaptive weight layers, patch attention, trend extractor, etc.) through backpropagation to improve the next generation. The frequency domain loss L_feq is the key supervision signal driving the model to learn frequency information well.

[0128]

[0129] The effect achieved:

[0130] 1. Improved generation quality:

[0131] On six benchmark datasets, the average relevance score (Corr.) decreased by 36%, and the context-FID decreased by 19%.

[0132] In the long-term generation task (128 steps on the ETTh dataset), the FID metric was improved by 38% compared to the best baseline.

[0133] 2. Optimization of frequency learning capability:

[0134] Simultaneously capture high-amplitude core patterns (such as seasonal cycles) and low-amplitude details (such as sudden anomalies);

[0135] Adaptive weights are used to visualize and verify the model's selective reinforcement of key frequencies.

[0136] 3. Application scalability:

[0137] It is applicable to time series generation in multiple fields such as finance, healthcare, and energy (validated using datasets such as Stock and fMRI).

[0138] Furthermore, after feeding all the blocks into an attention network to calculate the attention output, the process also includes the following steps:

[0139] The attention network separates a residual component, which is completely random noise;

[0140] The initial data for predicting the "temperature for the next year" is obtained by adding the seasonal component, trend component, and residual component. This is represented as adding Tk (trend) + Sk (optimized seasonal) + Rk (residual / noise).

[0141] Real-world temperature data, besides exhibiting regular seasonal fluctuations and long-term trends, inevitably contains random noise components that are difficult to accurately characterize using conventional models. By having an attention network separate out completely random noise as a residual component and incorporate it into the initial data calculation for the final predicted "temperature for the next year" (i.e., in the form of Tk+Sk+Rk), the prediction results can more comprehensively reflect the complexities of actual temperature changes, improving the model's ability to fit real-world temperature data with uncertainties and randomness.

[0142] This application proactively separates and incorporates noise components as residual components, meaning the model doesn't simply attempt to filter out all noise, but rather acknowledges its existence and tries to adapt to this random variation. This allows the model to exhibit better adaptability when facing noise interference of varying degrees and types, preventing significant deviations in prediction results due to noise presence. It enhances the model's robustness in complex and ever-changing real-world application scenarios, ensuring relatively stable and reliable prediction results.

[0143] After adding the seasonal component, trend component, and residual component to obtain the initial data for predicting the "temperature of the next year", the steps include: collecting real temperature time series data for the next year to obtain real data; calculating the loss between the initial data and the real data to obtain the weighted total loss; and adjusting all parameters of the model based on the weighted total loss through backpropagation, including the adaptive weight layer, Patch Attention, and trend extractor.

[0144] This application uses backpropagation by collecting real data and calculating a loss function. The model can automatically adjust the parameters of key components such as the adaptive weight layer, patch attention, and trend extractor based on the difference between the actual observed temperature data and the predicted results. This end-to-end learning mechanism allows the model to dynamically optimize each processing step according to the characteristics of real data, avoiding the tedious process of manually adjusting parameters and improving the automation and optimization efficiency of the model.

[0145] The loss function directly measures the deviation between predicted and actual data. By minimizing this deviation, the model can continuously improve its ability to capture temperature change patterns. In particular, by combining parameter optimization with a dual learning mechanism in the frequency domain, the model can more accurately identify important frequency components, adjust the attention allocation of local features, and optimize the fitting effect of trend extraction, thereby significantly improving the accuracy and reliability of "temperature for the next year" predictions.

[0146] In one embodiment, the time series generation system based on a frequency domain dual learning mechanism includes: a frequency transformation module, which acquires noisy "temperature data for the next year" time series data, performs a Fourier transform on the time series data to the frequency domain to obtain a spectrum, with the horizontal axis representing frequency and the vertical axis representing amplitude; an adaptive weighting module, which analyzes the spectrum using a linear layer neural network, calculates the importance weight of each frequency bar on the spectrum, and multiplies the importance weight by the corresponding frequency bar to obtain a weighted spectrum; a spectrum segmentation module, which segments the spectrum into multiple squares, each square containing information about a local frequency region, and uses 2D rotational position encoding for the squares; and attention calculation. The system comprises several modules: a module that feeds all blocks into an attention network for attention calculation to obtain the attention output; a fusion optimization module that performs residual concatenation between the attention output and the weighted spectrogram to obtain the fused and optimized frequency signal; an inverse transform module that transforms the fused and optimized frequency signal back to the time domain using an inverse Fourier transform to obtain the seasonal component, which includes clear seasonal fluctuations and discernible solar term transitions; a trend component extraction module that uses multinomial regression to extract the trend component from noisy "future year temperature" time series data; an initial data generation module that adds the seasonal and trend components to obtain the predicted "future year temperature" initial data; and a loss calculation module that collects real future year temperature time series data to obtain real data, performs loss calculations on the initial data and real data to obtain the weighted total loss.

[0147] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0148] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0149] Furthermore, one embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions that are executed by a processor or controller, for example, by a processor in the above-described terminal embodiment, such that the processor performs the time series generation method based on the frequency domain dual learning mechanism described in the above-described embodiment.

[0150] Those skilled in the art will understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0151] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

[0152] The specific embodiments of the present invention described above do not constitute a limitation on the scope of protection of the present invention. Any other corresponding changes and modifications made in accordance with the technical concept of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A time series generation method based on a frequency domain dual learning mechanism, characterized in that, Including the following steps: Obtain noisy time-series data of "temperature for the next year", and perform Fourier transform on the time-series data to obtain a spectrum, with the horizontal axis being frequency and the vertical axis being amplitude. The spectrum is analyzed using a linear layer neural network to calculate the importance weight of each frequency bar in the spectrum, and the weighted spectrum is obtained by multiplying the importance weight by the corresponding frequency bar. The weighted spectrogram is divided into multiple blocks, each block containing information about a local frequency region, and 2D rotational position encoding is used on the blocks; All the blocks are fed into an attention network to calculate the attention output. The attention output is residually concatenated with the weighted spectrum to obtain the fused and optimized frequency signal. The fused and optimized frequency signal is converted back to the time domain through inverse Fourier transform to obtain the seasonal component, which includes clear seasonal fluctuations and discernible solar term transitions. Use multinomial regression to extract trend components from noisy time-series data of "temperatures for the next year"; The seasonal component and the trend component are added together to obtain the initial data for the predicted "temperature in the coming year".

2. The time series generation method based on a frequency domain dual learning mechanism according to claim 1, characterized in that, After feeding all the blocks into an attention network to calculate the attention output, the process further includes the following steps: The attention network separates a residual component, which is completely random noise; The seasonal component, the trend component, and the residual component are added together to obtain the initial data for the predicted "temperature in the next year".

3. The time series generation method based on a frequency domain dual learning mechanism according to claim 2, characterized in that, After adding the seasonal component, the trend component, and the residual component to obtain the initial data for predicting the "temperature in the coming year," the process includes the following steps: Collect real temperature time series data for the next year to obtain accurate data; The initial data and the actual data are compared to calculate the weighted total loss. All parameters of the model are adjusted based on the weighted total loss through backpropagation. These parameters include the adaptive weight layer, PatchAttention, and trend extractor.

4. The time series generation method based on a frequency domain dual learning mechanism according to claim 3, characterized in that, The loss calculation is performed between the initial data and the actual data, including the following steps: Time domain loss L_tmp: directly compares the differences between the initial data and the actual data at different points in time; Frequency domain loss L_feq: Perform Fourier transforms on both the initial data and the actual data, and compare the differences in the frequency domain; Weighted total loss L_alpha: The time domain loss and frequency domain loss are added together by the ratio alpha.

5. The time series generation method based on a frequency domain dual learning mechanism according to claim 1, characterized in that, The frequency column includes: Four Seasons Pillar, Solar Terms Pillar, and Noise Pillar.

6. The time series generation method based on a frequency domain dual learning mechanism according to claim 5, characterized in that, Calculating the importance weight of each frequency bar on the spectrum includes: The weight of the Four Seasons column is 0.9, the weight of the Solar Terms column is 0.7, and the weight of the Noise column is 0.

01.

7. A time series generation system based on a frequency domain dual learning mechanism, characterized in that, include: The frequency transformation module acquires noisy time-series data of "temperature in the next year", performs Fourier transform on the time-series data to the frequency domain to obtain a spectrum, with the horizontal axis being frequency and the vertical axis being amplitude. An adaptive weighting module uses a linear layer neural network to analyze the spectrogram, calculates the importance weight of each frequency bar in the spectrogram, and multiplies the importance weight by the corresponding frequency bar to obtain the weighted spectrogram. The spectrum segmentation module divides the spectrum into multiple blocks, each block containing information about a local frequency region, and uses 2D rotational position encoding on the blocks; The attention calculation module feeds all the blocks into an attention network to calculate the attention output. The fusion optimization module performs a residual connection between the attention output and the weighted spectrum to obtain the fused and optimized frequency signal. The inverse transform module converts the fused and optimized frequency signal back to the time domain through inverse Fourier transform to obtain the seasonal component, which includes clear seasonal fluctuations and discernible solar term transitions. The trend component extraction module uses multinomial regression to extract trend components from noisy "temperature for the next year" time series data. The initial data generation module adds the seasonal component and the trend component to obtain the initial data for the predicted "temperature in the next year".

8. A time series generation system based on a frequency domain dual learning mechanism according to claim 7, characterized in that, Also includes: The loss calculation module collects real temperature time series data for the next year to obtain real data, and calculates the weighted total loss by comparing the initial data with the real data.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the time series generation method based on a frequency domain dual learning mechanism as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Time sequence data modeling method for body-equipped agent based on frequency domain learning

    CN119357642A

  • Method and system for reconstructing magnetic particle distribution model based on time-frequency spectrum enhancement

    US11816767B1