Time series data processing method and device, equipment and medium

Through the standardization and inverse standardization modules of the reversible network, the time sequence data is processed, and the problem of insufficient robustness in time sequence data processing is solved, and flexible processing and accurate prediction of nonlinear and time-varying data is realized.

CN120407638APending Publication Date: 2025-08-01PENG CHENG LAB
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510377316.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The prior art has low robustness in time series data processing due to the assumption of normal distribution, and cannot accurately process nonlinear and time-variable timing data, resulting in insufficient accuracy of timing prediction.

Method used

The reversible network is used to scale and offset the data range. Through the standardization module and the inverse standardization module, the data is double-surfaced transformation is realized, information loss and statistical assumption dependence are avoided, and nonlinear time-varying data is flexibly processed.

Benefits of technology

It improves the robustness and accuracy of timing data processing, ensures the completeness and accuracy of prediction results, and adapts to nonlinear and time-varying timing data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407638A_ABST
    Figure CN120407638A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a time sequence data processing method and device, equipment and a medium, and belongs to the technical field of time sequence data processing, and the method comprises the steps: obtaining to-be-predicted initial time sequence data; inputting the initial time sequence data into a standardization module in the reversible network so as to carry out data range scaling and offset processing on the initial time sequence data, and outputting standardized data; inputting the standardized data into a time sequence data processing model to perform time sequence prediction on the standardized data, and outputting predicted time sequence data; inputting the predicted time sequence processing data into an inverse standardization module in the reversible network so as to carry out scaling reduction and offset reduction processing of a data range on the predicted time sequence data, and outputting target time sequence data; wherein the standardization module and the inverse standardization module in the reversible network share parameters, so that the robustness of time sequence data processing can be improved, and the accuracy of time sequence prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of time series data processing, and particularly to a method, apparatus, device and medium for processing time series data. Background Art

[0002] Time series prediction is a process of accurately inferring future time series data through historical time series data. Its application scope covers scenarios such as weather, traffic and energy, and it is an important part of the construction of smart cities. Time series data has strong non-linearity and time-variability, and its distribution will change over time, making it difficult to model. Therefore, time series prediction often requires standardization and inverse standardization processing of time series data.

[0003] In related technologies, in the process of standardizing time series data, there is an implicit assumption that the data follows a standard normal distribution. However, real time series data has high non-linearity and time-variability, and a single normal distribution cannot accurately reflect its data law. Therefore, it is impossible to process out-of-distribution time series data, and the inverse standardization process often relies on statistical information. Since the distribution of future data is difficult to accurately infer, errors are easily introduced, resulting in low robustness of time series data processing and ultimately reducing the accuracy of time series prediction. Summary of the Invention

[0004] The main purpose of the embodiments of the present disclosure is to propose a method, apparatus, device and medium for processing time series data, which can improve the robustness of time series data processing and the accuracy of time series prediction.

[0005] To achieve the above object, a first aspect of the embodiments of the present disclosure proposes a method for processing time series data, including:

[0006] Obtain initial time series data to be predicted;

[0007] Input the initial time series data into a standardization module in a reversible network to perform scaling and offset processing on the data range of the initial time series data, and output standardized data;

[0008] Input the standardized data into a time series data processing model to perform time series prediction on the standardized data, and output predicted time series data;

[0009] Input the predicted time series processing data into an inverse standardization module in the reversible network to perform scaling reduction and offset reduction processing on the predicted time series data, and output target time series data;

[0010] Wherein, parameters are shared between the standardization module and the inverse standardization module in the reversible network.

[0011] In some embodiments, the scaling and offset processing of the data range of the initial time-series data to output standardized data includes:

[0012] Dividing the initial time-series data into a first segment of initial data and a second segment of initial data;

[0013] Keeping the first segment of initial data unchanged and performing scaling and offset processing on the data range of the second segment of initial data to obtain first standardized data;

[0014] Converting the first segment of initial data and the second segment of initial data to obtain updated first segment of initial data and updated second segment of initial data;

[0015] Continuing to keep the updated first segment of initial data unchanged and performing scaling and offset processing on the data range of the updated second segment of initial data to obtain second standardized data;

[0016] Obtaining standardized data based on the first standardized data and the second standardized data.

[0017] In some embodiments, the performing scaling and offset processing on the data range of the second segment of initial data to obtain first standardized data includes:

[0018] Inputting the first segment of initial data into a first linear network to output a first offset value;

[0019] Inputting the second segment of initial data into a second linear network to output a scaling factor, and performing an exponential operation on the scaling factor to obtain a scaling coefficient;

[0020] Obtaining a corresponding scaling value based on the scaling coefficient and the second segment of initial data, and obtaining first standardized data based on the scaling value and the first offset value.

[0021] In some embodiments, the scaling reduction and offset reduction processing of the data range of the predicted time-series data to output target time-series data includes:

[0022] Dividing the predicted time-series data into a first segment of predicted data and a second segment of predicted data;

[0023] Keeping the first segment of predicted data unchanged and performing scaling reduction and offset reduction processing on the data range of the second segment of predicted data to obtain first output data;

[0024] Converting the first segment of predicted data and the second segment of predicted data to obtain updated first segment of predicted data and updated second segment of predicted data;

[0025] Keep the updated first - stage predicted data unchanged, and perform scaling reduction and offset reduction processing on the updated second - stage predicted data to obtain second output data;

[0026] Obtain target time - series data based on the first output data and the second output data.

[0027] In some embodiments, the performing scaling reduction and offset reduction processing on the second - stage predicted data to obtain first output data includes:

[0028] Input the first - stage predicted data into a first linear network to output a second offset value;

[0029] Input the second - stage predicted data into a second linear network to output a scaling reduction factor, and perform reciprocal and exponential processing on the scaling reduction factor to obtain a scaling reduction coefficient;

[0030] Obtain an offset reduction value based on the second - stage predicted data and the second offset value, and obtain first output data based on the offset reduction value and the scaling reduction coefficient.

[0031] In some embodiments, the dividing the initial time - series data into first - stage initial data and second - stage initial data includes:

[0032] Obtain a preset target hyperparameter;

[0033] Divide the initial time - series data into first - stage initial data according to the target hyperparameter, and determine the remaining data in the initial time - series data as second - stage initial data.

[0034] In some embodiments, the method for processing time - series data further includes:

[0035] Determine the processing time consumed in the process of obtaining the first standardized data and the second standardized data;

[0036] When the processing time is greater than a preset expected duration, adjust the target hyperparameter to obtain an updated target hyperparameter;

[0037] Based on the updated target hyperparameter, re - execute the step of dividing the initial time - series data into first - stage initial data according to the target hyperparameter, and determining the remaining data in the initial time - series data as second - stage initial data.

[0038] In some embodiments, the reversible network is trained through the following steps, including:

[0039] Obtain initial sample time - series data to be predicted;

[0040] Input the initial sample time series data into the normalization module in the initial reversible network to perform scaling and offset processing on the data range of the initial sample time series data, and output the sample normalized data;

[0041] Input the sample normalized data into the initial time series data processing model to perform time series prediction on the sample normalized data, and output the predicted sample time series data;

[0042] Input the predicted sample time series processing data into the inverse normalization module in the initial reversible network to perform scaling reduction and offset reduction processing on the data range of the predicted sample time series data, and output the target sample time series data;

[0043] Generate a first loss value based on the similarity between the target sample time series data and the initial sample time series data, and train the initial reversible network based on the first loss value until the training ends to obtain the trained reversible network.

[0044] In some embodiments, after obtaining the trained reversible network, the time series data processing model is trained through the following steps, including:

[0045] Obtain the labeled time series data of the initial sample time series data at future moments;

[0046] Generate a second loss value based on the difference between the predicted sample time series data and the labeled time series data, and train the initial time series data processing model based on the second loss value until the training ends to obtain the trained time series data processing model.

[0047] To achieve the above object, a second aspect of the embodiments of the present disclosure proposes a processing device for time series data, including:

[0048] A data acquisition module for acquiring the initial time series data to be predicted;

[0049] A normalization processing module for inputting the initial time series data into the normalization module in the reversible network to perform scaling and offset processing on the data range of the initial time series data, and outputting the normalized data;

[0050] A time series data processing module for inputting the normalized data into the time series data processing model to perform time series prediction on the normalized data, and outputting the predicted time series data;

[0051] An inverse normalization processing module for inputting the predicted time series processing data into the inverse normalization module in the reversible network to perform scaling reduction and offset reduction processing on the data range of the predicted time series data, and outputting the target time series data;

[0052] Among them, parameters are shared between the normalization module and the inverse normalization module in the reversible network.

[0053] To achieve the above object, a third aspect of the embodiments of the present disclosure provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the processing method for time series data described in the embodiments of the first aspect above.

[0054] To achieve the above object, a fourth aspect of the embodiments of the present disclosure provides a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, it implements the processing method for time series data described in the embodiments of the first aspect above.

[0055] By executing the processing method for time series data, the embodiments of the present disclosure can obtain initial time series data to be predicted; input the initial time series data into the normalization module in the reversible network to perform scaling and offset processing on the data range of the initial time series data, and output normalized data; input the normalized data into the time series data processing model to perform time series prediction on the normalized data, and output predicted time series data; input the predicted time series processed data into the inverse normalization module in the reversible network to perform scaling reduction and offset reduction processing on the predicted time series data, and output target time series data; among them, parameters are shared between the normalization module and the inverse normalization module in the reversible network.

[0056] Therefore, by inputting the initial time series data into the normalization module in the reversible network to perform scaling and offset processing on the data range of the initial time series data and outputting normalized data, the embodiments of the present disclosure can project the initial time series data into a high-dimensional space with an unknown distribution, rather than conforming to a certain prior distribution assumption, which is more flexible in the data preprocessing problem. Therefore, it can process out-of-distribution time series data and improve the robustness of time series data processing. Subsequently, after inputting the normalized data into the time series data processing model, time series prediction can be performed on the normalized data to output predicted time series data, and then through the inverse normalization module in the reversible network, scaling reduction and offset reduction processing are performed on the predicted time series data to output target time series data. Since parameters are shared between the normalization module and the inverse normalization module in the reversible network, the reversible network belongs to a bijective transformation, and the target time series data obtained by its transformation will not cause information loss, and this process does not depend on statistical data, so no additional error will be introduced, thus ensuring the integrity of the target time series data, and ultimately improving the accuracy of time series prediction. Description of the Drawings

[0057] Figure 1It is a schematic diagram of an application environment of the method for processing time series data provided by an embodiment of the present disclosure

[0058] Figure 2 It is a schematic flowchart of the method for processing time series data provided by an embodiment of the present disclosure;

[0059] Figure 3 It is a schematic diagram of time series prediction for traffic data provided by an embodiment of the present disclosure;

[0060] Figure 4 It is Figure 2 a schematic flowchart further included in step 201 in;

[0061] Figure 5 It is Figure 4 a schematic flowchart further included in step 302 in;

[0062] Figure 6 It is Figure 2 a schematic flowchart further included in step 204 in;

[0063] Figure 7 It is Figure 6 a schematic flowchart further included in step 502 in;

[0064] Figure 8 It is Figure 4 a schematic flowchart further included in step 301 in;

[0065] Figure 9 It is another schematic flowchart of the method for processing time series data provided by an embodiment of the present disclosure;

[0066] Figure 10 It is a schematic flowchart of the reversible network training process provided by an embodiment of the present disclosure;

[0067] Figure 11 It is a schematic flowchart of the time series data processing model training process provided by an embodiment of the present disclosure;

[0068] Figure 12 It is a schematic diagram of the functional modules of the time series data processing device provided by an embodiment of the present disclosure;

[0069] Figure 13 It is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present disclosure. Detailed implementation manners

[0070] To enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present disclosure.

[0071] It can be understood that in the specific implementation of the present disclosure, when retrieving initial timing data, initial sample timing data, and related data, when the above embodiments of the present disclosure are applied to specific products or technologies, object permission or consent needs to be obtained, and the collection, use, and processing of related data need to comply with relevant laws, regulations, and standards.

[0072] In addition, when the embodiments of the present disclosure need to retrieve initial timing data, initial sample timing data, and related data, a separate permission or separate consent for the initial timing data, initial sample timing data, and related data will be obtained by means of a pop-up window or jumping to a confirmation page, etc. After clearly obtaining the separate permission or separate consent for the initial timing data, initial sample timing data, and related data, the necessary initial timing data, initial sample timing data, and related data for the normal operation of the embodiments of the present disclosure will be obtained.

[0073] In the embodiments of the present disclosure, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit that includes the function of the module or unit.

[0074] Before further elaborating on the embodiments of the present disclosure, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are applicable to the following explanations:

[0075] Artificial Intelligence (AI): It is a new technical science that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence; artificial intelligence is a branch of computer science. Artificial intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a way similar to human intelligence. The research in this field includes robots, speech recognition, image recognition, natural language processing, and expert systems, etc. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence also refers to the theory, method, technology, and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.

[0076] The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0077] Robustness refers to the characteristic that a system, model, or product can still maintain certain performance when facing various abnormal situations, interference factors, uncertain factors, or when parameters change. It can also be understood as the ability to resist failures or interference.

[0078] Time series prediction is the process of accurately inferring future time series data through historical time series data. Its application scope covers scenarios such as weather, traffic, and energy, and it is an important part of the construction of smart cities. Time series data has extremely strong nonlinearity and time-variability, and its distribution will change over time, making it difficult to model. Therefore, time series prediction often requires standardization and inverse standardization processing of time series data.

[0079] In related technologies, during the process of standardizing time series data, there is an implicit assumption that the data follows a standard normal distribution. However, real-time series data has high nonlinearity and time-variability, and a single normal distribution cannot accurately reflect its data law. Therefore, it cannot process out-of-distribution time series data, and the inverse standardization process often relies on statistical information. Since the distribution of future data is difficult to accurately infer, errors are easily introduced, resulting in low robustness in the processing of time series data and ultimately reducing the accuracy of time series prediction.

[0080] Embodiments of the present disclosure propose a method, device, equipment, and medium for processing time series data to solve the above problems, which can improve the robustness of time series data processing and the accuracy of time series prediction.

[0081] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the scenario of the implementation environment of the method for processing time series data provided by the present disclosure embodiment, including: a terminal 101 and a server 102.

[0082] Exemplarily, the server 102 can obtain initial time series data to be predicted from the terminal 101; input the initial time series data into a normalization module in a reversible network to perform scaling and offset processing on the data range of the initial time series data, and output normalized data; input the normalized data into a time series data processing model to perform time series prediction on the normalized data, and output predicted time series data; input the predicted time series processed data into an inverse normalization module in the reversible network to perform scaling restoration and offset restoration processing on the predicted time series data, and output target time series data; wherein, the normalization module and the inverse normalization module in the reversible network share parameters.

[0083] The terminal 101 can be a mobile phone, a computer, an intelligent voice interaction device, an intelligent wearable device, an intelligent home appliance, a vehicle-mounted terminal, etc., but is not limited thereto. The terminal 101 can also independently execute the method for processing time series data. The terminal 101 and the server 102 can be directly or indirectly connected through wired or wireless communication methods, and the present disclosure embodiment does not limit this here.

[0084] The server 102 can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In addition, the server 102 can also be a node server in a blockchain network.

[0085] It should be noted that Figure 1 the schematic diagram of the scenario of the implementation environment of the method for processing time series data shown is only an example. The security detection system and scenario described in the present disclosure embodiment are for more clearly illustrating the technical solutions of the present disclosure embodiment, and do not constitute a limitation on the technical solutions provided by the present disclosure embodiment. Those of ordinary skill in the art know that with the evolution of the security detection system and the emergence of new business scenarios, the technical solutions provided by the present disclosure embodiment are equally applicable to similar technical problems.

[0086] Please refer to Figure 2 , Figure 2It is a schematic flowchart of a method for processing time series data provided by an embodiment of the present disclosure. The method for processing time series data can be applied to the server or terminal in the above embodiment, or jointly executed by the terminal and the server. The method for processing time series data includes steps 201 to 204:

[0087] Step 201: Obtain initial time series data to be predicted;

[0088] Step 202: Input the initial time series data into the normalization module in the reversible network to perform scaling and offset processing on the data range of the initial time series data, and output normalized data;

[0089] Step 203: Input the normalized data into the time series data processing model to perform time series prediction on the normalized data, and output predicted time series data;

[0090] Step 204: Input the predicted time series processed data into the inverse normalization module in the reversible network to perform scaling restoration and offset restoration processing on the predicted time series data, and output target time series data;

[0091] Among them, the normalization module and the inverse normalization module in the reversible network share parameters.

[0092] Regarding the above step 201, the initial time series data is the original data to be subjected to time series prediction. These data have time series attributes, that is, the data are arranged in time order and can reflect the state or changes of an object at different time points.

[0093] Exemplarily, the initial time series data can be data in different fields. The initial time series data under continuous time can form corresponding data sequences. For example, the initial time series data is weather data. For example, the highest temperature data recorded every day or every hour in a certain city over a period of time is the initial time series data, and these weather data can form a temperature sequence in time order; or, the initial time series data is traffic data. For example, the traffic flow data counted every hour or every day at a certain intersection over a period of time is the initial time series data, and these traffic data can form a traffic flow sequence arranged by time period; or, the initial time series data is energy data. For example, the electricity consumption data counted every month or every day in a certain community over a period of time is the initial time series data, and these energy data can form an electricity consumption sequence arranged monthly.

[0094] It should be noted that there are various ways to obtain the initial time-series data to be predicted in the embodiments of the present disclosure. For example, the initial time-series data can be collected through sensors or read from a database to obtain data in different fields, such as weather data, traffic data, or energy data. Or, the initial time-series data can also be obtained from the file system. The embodiments of the present disclosure can read historical record archives or perform offline data collation to obtain the required weather data, traffic data, or energy data. Or, the initial time-series data can also be obtained from a network interface. The embodiments of the present disclosure can obtain the required weather data, traffic data, or energy data from a third-party data service.

[0095] Regarding the above step 202, the reversible network is a network structure constructed in the embodiments of the present disclosure for the standardization and inverse standardization processing of time-series data. Its core feature is bijective transformation (one-to-one correspondence). In the processing of time-series data, the reversible network includes a standardization module and an inverse standardization module, and the two modules share parameters. That is, the transformation operations (such as scaling and offset) of the standardization module on the data are completely reversible, and the inverse standardization module can accurately restore the original data through the shared parameters, avoiding information loss. Therefore, the processing of time-series data by the reversible network is different from the traditional standardization that relies on the normal distribution assumption. The reversible network projects the data into a high-dimensional space with an unknown distribution, flexibly processes time-series data with strong nonlinearity and time-variability, and improves robustness.

[0096] Among them, the standardization module is a component of the reversible network and is responsible for preprocessing the input initial time-series data. Further, the standardization module can be a neural network structure (such as a linear layer and an activation function) to perform customized transformation operations on the input data. The goal is to adjust the data to a range more suitable for model processing and lay a foundation for subsequent inverse standardization restoration. Moreover, the operations of the standardization module do not rely on the assumption that "the data follows a specific distribution", but autonomously learn the data features through the network to achieve more flexible data preprocessing.

[0097] It should be noted that the standardization module can perform scaling and offset processing on the data range of the input initial time series data to complete the standardization process. Specifically, the scaling processing adjusts the numerical range of the data and can be achieved by calculating the scaling factor. For example, a scaling coefficient is generated using a preset function, and then the numerical range of the data is amplified or reduced through exponential operations to make the data distribution more uniform and avoid affecting the model learning effect due to excessive numerical differences. The offset processing calculates the displacement amount through another preset function and superimposes it on the data to adjust the overall position of the data, so that the data further adapts to the model input requirements after scaling. Therefore, the combined effect of scaling and offset processing maps the original initial time series data to a new space to obtain standardized data, achieving the purpose of both retaining the data characteristics and making the data easier for the time series prediction model to capture the rules, and at the same time providing support for the lossless restoration of the inverse standardization module.

[0098] Regarding the above step 203, the time series data processing model is a neural network model used for analyzing, modeling, and predicting time series data. Its core function is to infer future time series values by learning the rules of historical time series data. In the embodiments of the present disclosure, the input of the time series data processing model is the standardized data after standardization. Therefore, the model uses the standardized data as historical time series data to predict future time series data.

[0099] Furthermore, the time series data processing model can be any neural network model structure to achieve the required time series prediction function. For example, the time series data processing model can be a Long Short Term Memory (LSTM) network, which can be used to capture long-term dependencies in time series data; or, the time series data processing model can also be a Transformer network with a self-attention mechanism, which can be used to handle the global correlation of long-sequence time series data; or, the time series data processing model can also be a combination of a graph convolutional network and a gating mechanism (GWNET), which can be used for time series prediction with spatial correlations such as traffic flow.

[0100] In addition, the time series data processing model can also implement processing tasks for different time series processing. For example, in the traffic congestion judgment task, a classification model can be set as the time series data processing model. By inputting the standardized data into the classification model, classification task judgment can be performed. For example, by inputting the standardized traffic flow data into the classification model to judge whether there is congestion in the corresponding time period; or, in the energy consumption anomaly detection task, an anomaly detection model can be set as the time series data processing model. By inputting the standardized data into the anomaly detection model, anomaly detection can be performed. For example, by inputting the standardized electricity consumption data into the anomaly detection model (such as the Isolation Forest) to identify abnormal electricity consumption patterns; in the time series data repair task, a time series repair model can be set as the time series data processing model. By inputting the standardized data into the time series repair model, the repair of time series data can be performed. For example, by inputting the standardized data containing missing values into the time series repair model (such as the interpolation model) for repair, and then inverse standardizing to obtain the complete original data.

[0101] The predicted time series data is the result output by the time series data processing model. It is the data predicted for the time series data at future moments, that is, the inference result of the time series data processing model for the time series values in the future time period based on the standardized historical data.

[0102] Regarding the above step 204, the inverse standardization module is another component of the reversible network. It shares parameters with the standardization module and is responsible for restoring the predicted time series data to the original data range. Therefore, its core function is to perform the standardization operation in reverse to ensure the lossless restoration of data information. Specifically, the standardization module in the embodiments of the present disclosure scales and offsets the data, and the inverse standardization module eliminates the effects of these operations. Moreover, the inverse standardization module reuses the parameters of the standardization module to ensure the consistency of forward and reverse transformations and avoid errors caused by parameter differences.

[0103] The target time series data is the output result of the inverse standardization module, that is, the predicted data after restoration. The unit and dimension of the target time series data are consistent with the initial time series data. And through the bijective transformation of the reversible network, the target time series data retains all the information in the standardization process without data loss. Therefore, the finally obtained target time series data can be directly used in the actual scenario to provide a basis for decision-making.

[0104] For example, if the initial time series data is weather data, traffic data, or energy data, then through time series prediction and the output of the inverse standardization module, the output target time series data is also the corresponding weather data, traffic data, or energy data, that is, the weather data, traffic data, or energy data at future moments.

[0105] Next, in combination with the scenario of traffic data prediction, the embodiments of the present disclosure will be illustrated by examples:

[0106] Please refer to Figure 3 , Figure 3 which is a schematic diagram for time series prediction of traffic data provided by an embodiment of the present disclosure. In this embodiment, the initial time series data is the traffic data of a certain traffic intersection for each day in the past 3 days, such as traffic flow, etc. These initial time series data can form a traffic flow sequence (such as Traffic Data 1 to 3). Then, the traffic data in the traffic flow sequence is input into the normalization module in the reversible network for scaling and offset processing to obtain the normalized traffic flow data, that is, the normalized data (such as Normalized Data 1 to 3, not shown in the figure). Then, the normalized traffic flow data is input into the time series data processing model for time series prediction tasks, and the predicted traffic flow for the future time period (such as 3 days) is output, that is, the predicted time series data (such as Predicted Time Series Data 1 to 3, not shown in the figure). Finally, the inverse normalization module in the reversible network is used again to perform inverse normalization processing on the predicted time series data, subtract the displacement amount from the predicted value and eliminate the scaling factor to restore the original range, and obtain the final target prediction data, that is, the traffic flow data at the future moment finally predicted (such as Traffic Data 4 to 6).

[0107] In this embodiment, since the reversible network does not assume that the traffic flow follows a normal distribution and can handle abnormal data such as sudden congestion, while traditional methods (such as Z-score) may fail when the traffic flow suddenly increases during the morning rush hour, and this embodiment still maintains accuracy through flexible transformation and adapts to non-linear and time-varying input data. Moreover, the inverse normalization module ensures the precise restoration of the predicted data through parameter sharing and reverse operations, avoiding the limitations of traditional methods that rely on statistics. The target time series data not only retains the inference results of the prediction model but also restores the physical meaning of the actual scenario, so it can accurately restore the traffic flow value and avoid the errors caused by traditional methods relying on historical statistics. Finally, the prediction result, that is, the final traffic flow data, can be directly used for traffic signal timing optimization, road planning, etc., to improve the efficiency of urban traffic management. Therefore, this embodiment achieves higher accuracy and robustness in traffic time series prediction and provides reliable data support for the traffic management of smart cities.

[0108] In summary, in the embodiments of the present disclosure, by performing the processing method of the time series data in steps 201 to 204, the initial time series data is input into the normalization module in the reversible network to perform scaling and offset processing on the data range of the initial time series data, and the normalized data is output. Thus, the initial time series data can be projected into a high-dimensional space with an unknown distribution, rather than being subject to a certain prior distribution assumption, which is more flexible in the data preprocessing problem. Therefore, it can process out-of-distribution time series data and improve the robustness of time series data processing. Subsequently, after the normalized data is input into the time series data processing model, time series prediction can be performed on the normalized data, and the predicted time series data is output. Then, through the inverse normalization module in the reversible network, scaling reduction and offset reduction processing are performed on the predicted time series data, and the target time series data is output. Since the parameters are shared between the normalization module and the inverse normalization module in the reversible network, the reversible network belongs to a bijective transformation, and the target time series data obtained by its transformation will not cause information loss, and this process does not depend on statistical data, so no additional error will be introduced, thereby ensuring the integrity of the target time series data. Therefore, the accuracy of time series prediction can be improved finally.

[0109] Next, the further included content in steps 201 to 204 in the embodiments of the present disclosure will be described in detail.

[0110] Please refer to Figure 4 , Figure 4 which Figure 2 is a schematic flowchart further included in step 201 in . In some embodiments, the process of inputting the initial time series data into the normalization module in the reversible network to perform scaling and offset processing on the data range of the initial time series data and outputting the normalized data may include steps 301 to 305:

[0111] Step 301, divide the initial time series data into the first segment of initial data and the second segment of initial data;

[0112] Step 302, keep the first segment of initial data unchanged, and perform scaling and offset processing on the second segment of initial data to obtain the first normalized data;

[0113] Step 303, transform the first segment of initial data and the second segment of initial data to obtain the updated first segment of initial data and the updated second segment of initial data;

[0114] Step 304, continue to keep the updated first segment of initial data unchanged, and perform scaling and offset processing on the updated second segment of initial data to obtain the second normalized data;

[0115] Step 305, obtain the normalized data based on the first normalized data and the second normalized data.

[0116] In the above steps, the first initial data and the second initial data are two parts of data obtained by dividing the initial time-series data to be processed in a certain way. When performing the normalization process, the initial time-series data is divided into the first initial data and the second initial data, and this division method can be based on the time order of the data, the characteristics of the data, or other relevant factors.

[0117] It should be noted that in the embodiments of the present disclosure, the initial time-series data is divided into two segments in order to be able to process the data in stages and in a targeted manner subsequently. Through this division method, an alternating processing strategy can be adopted to perform different operations on different parts of the data to achieve more flexible and effective data normalization, so as to better meet the processing requirements of the reversible network.

[0118] Next, the embodiments of the present disclosure keep the first initial data unchanged and perform scaling and offset processing on the data range of the second initial data to obtain the first normalized data. Among them, the scaling of the data range is to adjust the numerical range of the data, which can be achieved by calculating the scaling factor. For example, a scaling factor is generated using a preset function, and then the numerical range of the data is amplified or reduced through exponential operations to make the data distribution more uniform and avoid affecting the model learning effect due to excessive numerical differences. The offset of the data range can calculate the displacement amount through another preset function and superimpose it on the data to adjust the overall position of the data so that the data further adapts to the model input requirements after scaling.

[0119] It should be noted that the embodiments of the present disclosure keep the first initial data unchanged and process the second data first in order to retain a part of the original information during the processing and avoid the loss of data characteristics that may be caused by operating on all data at once. Performing scaling and offset processing on the second data can make the distribution of this part of the data more reasonable and more suitable for subsequent model processing, and at the same time lay a foundation for subsequent inverse normalization processing.

[0120] Subsequently, the embodiments of the present disclosure convert the first initial data and the second initial data to obtain the updated first initial data and the updated second initial data. Specifically, the conversion here means swapping the positions of the first initial data and the second initial data, so that the original first data becomes the second, and the original second data becomes the first, thereby obtaining the updated two segments of data. Such an alternating processing method helps to normalize the data more comprehensively and can better retain the characteristic information of the data.

[0121] Next, the embodiments of the present disclosure continue to keep the updated first initial data unchanged, and perform scaling and offset processing on the data range of the updated second initial data to obtain second standardized data. Among them, keeping the updated first initial data unchanged and processing the updated second data is to continue the previous alternating processing strategy. By performing scaling and offset processing on this part of the updated second initial data, the distribution of the data can be further optimized, enabling the entire data to better adapt to subsequent model processing and providing a more reliable basis for the lossless restoration of inverse standardization.

[0122] Finally, based on the first standardized data and the second standardized data, standardized data can be obtained. The obtained standardized data is also a data set, which not only retains the characteristic information of the original input data but also reasonably adjusts the data to make it more suitable for input into the time series data processing model for prediction, thereby improving the accuracy and reliability of time series prediction.

[0123] Please refer to Figure 5 , Figure 5 is Figure 4 a schematic flowchart further included in step 302 in [reference]. In some embodiments, the process of performing scaling and offset processing on the data range of the second initial data to obtain the first standardized data may include steps 401 to 403:

[0124] Step 401: Input the first initial data into the first linear network and output the first offset value;

[0125] Step 402: Input the second initial data into the second linear network, output the scaling factor, and perform an exponential operation on the scaling factor to obtain the scaling coefficient;

[0126] Step 403: Obtain the corresponding scaling value based on the scaling coefficient and the second initial data, and obtain the first standardized data based on the scaling value and the first offset value.

[0127] In the above steps, the first linear network belongs to a type of neural network structure, and its internal operations are mainly based on linear transformations, that is, the input data is processed through linear operations such as matrix multiplication and addition. The first offset value is the result calculated by the first linear network based on the first initial data, and this value is used for subsequent offset processing of the second initial data to adjust the overall position of the data.

[0128] It should be noted that the first offset value is calculated using the first segment of initial data in the embodiments of the present disclosure to determine a suitable offset according to the characteristics of the initial time series data itself. Since the initial time series data has certain internal rules and characteristics, extracting this information from the first segment of data through the first linear network and converting it into an offset value can make the subsequent offset processing of the second segment of data more conform to the characteristics of the data itself, which helps the processed data better adapt to the input requirements of the model.

[0129] The second linear network is also a neural network structure, and its internal operations are mainly based on linear transformations, that is, the input data is processed through linear operations such as matrix multiplication and addition. The scaling factor is an intermediate result obtained by the second linear network processing the second segment of initial data, and it represents a basic parameter for scaling the data. The scaling coefficient is the value obtained after taking the exponential of the scaling factor, and it will be directly used to adjust the numerical range of the second segment of initial data, enlarging or shrinking the numerical range of the data to make the data distribution more uniform.

[0130] It should be noted that in the embodiments of the present disclosure, the scaling factor is first obtained from the second segment of initial data through the second linear network, and then its exponential is taken to obtain the scaling coefficient, in order to obtain a parameter that can effectively adjust the numerical range of the data. The exponential operation can perform a suitable transformation on the scaling factor according to the characteristics of the data, so that the finally obtained scaling coefficient can better optimize the data distribution and avoid affecting the learning effect of the subsequent model due to excessive numerical differences in the data.

[0131] The scaling value is the result obtained by operating the scaling coefficient with the second segment of initial data, that is, the numerical range of the second segment of initial data is adjusted. The first normalized data is the data obtained after scaling the second segment of initial data to obtain the scaling value and then performing offset processing in combination with the first offset value, and it is an intermediate result of the normalization processing of the second segment of initial data.

[0132] It should be noted that in the embodiments of the present disclosure, the scaling value is obtained based on the scaling coefficient to adjust the numerical range of the second segment of initial data to make the data distribution more reasonable. On this basis, further processing in combination with the first offset value to obtain the first normalized data can adjust the overall position of the data while adjusting the numerical range of the data, comprehensively complete the normalization processing of the second segment of initial data, make it more suitable for subsequent time series prediction models to process, and also lay a foundation for the generation of the final complete normalized data.

[0133] Please refer to Figure 6 , Figure 6 is Figure 2The flowchart further included in step 204. In some embodiments, the process of performing scaling reduction and offset reduction processing on the predicted time series data to output the target time series data may include steps 501 to 505:

[0134] Step 501, divide the predicted time series data into a first segment of predicted data and a second segment of predicted data;

[0135] Step 502, keep the first segment of predicted data unchanged, and perform scaling reduction and offset reduction processing on the second segment of predicted data to obtain the first output data;

[0136] Step 503, transform the first segment of predicted data and the second segment of predicted data to obtain the updated first segment of predicted data and the updated second segment of predicted data;

[0137] Step 504, continue to keep the updated first segment of predicted data unchanged, and perform scaling reduction and offset reduction processing on the updated second segment of predicted data to obtain the second output data;

[0138] Step 505, obtain the target time series data based on the first output data and the second output data.

[0139] In the above steps, the first segment of predicted data and the second segment of predicted data are two parts of data obtained by dividing the predicted time series data to be processed in a certain way. When performing inverse normalization processing, the predicted time series data is divided into the first segment of predicted data and the second segment of predicted data, and this division method can be based on the time order of the data, the characteristics of the data, or other relevant factors.

[0140] It should be noted that the division of the predicted time series data in the embodiments of the present disclosure is to prepare for subsequent phased scaling reduction and offset reduction processing. By dividing the data into two parts, the inverse normalization operation on the data can be carried out more carefully and targeted, just like breaking a large task into small tasks, which is convenient for better management and processing to ensure the accurate target time series data is finally obtained.

[0141] Next, the embodiments of the present disclosure keep the first segment of predicted data unchanged, and perform scaling reduction and offset reduction processing on the second segment of predicted data to obtain the first output data. Among them, the scaling reduction is opposite to the scaling processing in the standardization process, which is to restore the data after scaling processing to the original data value range, and is achieved by performing reverse operations with the scaling coefficient calculated during previous standardization. The offset reduction is opposite to the offset processing in the standardization process, which is to restore the data after offset processing to the original data position, and is achieved by subtracting the offset value calculated during previous standardization.

[0142] It should be noted that in the embodiments of the present disclosure, the first - stage prediction data is maintained unchanged, and the second - stage prediction data is processed first in order to retain a part of the original prediction data state and avoid information chaos that may be caused by processing all data simultaneously. Scaling reduction and offset reduction are performed on the second - stage prediction data to restore this part of the data to its original representation form, so as to obtain the target time - series data that meets the actual requirements through subsequent integration.

[0143] Subsequently, in the embodiments of the present disclosure, the first - stage prediction data and the second - stage prediction data are converted to obtain the updated first - stage prediction data and the updated second - stage prediction data. Data conversion is performed to enable the originally unprocessed first - stage prediction data to undergo scaling reduction and offset reduction processing, while keeping the already processed second - stage prediction data unchanged in subsequent operations. This alternating processing method can ensure that the entire predicted time - series data can be accurately restored to the original data range and position, ensuring the integrity and accuracy of the data.

[0144] Next, in the embodiments of the present disclosure, the updated first - stage prediction data is still maintained unchanged, and scaling reduction and offset reduction processing of the data range are performed on the updated second - stage prediction data to obtain the second output data. Among them, maintaining the updated first - stage prediction data unchanged and processing the updated second - stage prediction data continues the alternating processing strategy. By performing scaling reduction and offset reduction on this part of the data, the entire predicted time - series data can be accurately restored, avoiding missing the processing of some data, thereby ensuring the accuracy of the finally obtained target time - series data.

[0145] Finally, in the embodiments of the present disclosure, the target time - series data can be obtained based on the first output data and the second output data, forming a complete data set that meets the actual requirements. The target time - series data obtained in this way restores the characteristics and range of the original data and can be used for actual analysis and decision - making, such as predicting future weather, traffic flow, or energy consumption, etc.

[0146] Please refer to Figure 7 , Figure 7 is Figure 6 a schematic flowchart further included in step 502 of

[0147] In step 601, the first - stage prediction data is input into the first linear network to output the second offset value;

[0148] In step 602, the second - stage prediction data is input into the second linear network to output the scaling reduction factor, and the reciprocal and exponential processing are performed on the scaling reduction factor to obtain the scaling reduction coefficient;

[0149] Step 603: Obtain an offset restoration value based on the second segment of prediction data and the second offset value, and obtain first output data based on the offset restoration value and the scaling restoration coefficient.

[0150] In the above steps, the second offset value is the result calculated by the first linear network based on the first segment of prediction data. This value is used for subsequent offset restoration processing of the second segment of prediction data to eliminate the adjustment of the data position during the standardization process and return the data to its original position.

[0151] It should be noted that the data is offset during the standardization process in this disclosed embodiment. Here, the second offset value is calculated using the first segment of predicted data through the first linear network. This is to determine the appropriate offset restoration amount based on the characteristics of the predicted time series data itself. Different predicted time series data have different characteristics. This approach ensures that the subsequent offset restoration of the second segment of predicted data is more consistent with the original state of the data, thereby ensuring the accuracy of data restoration.

[0152] The scaling factor is the intermediate result obtained by processing the second segment of the predicted data using the second linear network. It serves as the basic parameter for the scaling operation. The scaling coefficient is the value obtained by taking the inverse and then the exponential of the scaling factor. It is used to restore the numerical range of the second segment of the predicted data, restoring the data scaled during the normalization process to its original numerical range.

[0153] It should be noted that the disclosed embodiments scale the data during normalization. Now, it is necessary to restore the data's numerical range. Therefore, the scaling factor is first obtained, and then the scaling coefficient is obtained by taking the inverse and exponential processing. This is to offset the scaling operation during normalization through appropriate operations. The inverse and exponential operations can accurately calculate the coefficients required to restore the data range based on the characteristics of the data and the previous normalization method, thereby achieving accurate restoration of the data's numerical range.

[0154] The offset restoration value is the result of calculating the second segment of prediction data and the second offset value, and is used to restore the second segment of prediction data to its original position. The first output data is the data obtained after performing the offset restoration and scaling restoration processing on the second segment of prediction data, and is the result of the denormalization of the current second segment of prediction data.

[0155] It should be noted that the offset reduction value obtained by the embodiments of the present disclosure based on the second-stage prediction data and the second offset value is to restore the position of the data to the state before standardization. On this basis, further processing is performed in combination with the scaling reduction coefficient to obtain the first output data, which can restore the numerical range of the data to the original state while restoring the data position, comprehensively complete the inverse standardization processing of the second-stage prediction data, and restore it to the original data form that conforms to the actual meaning, preparing for finally obtaining the complete target time series data.

[0156] Please refer to Figure 8 , Figure 8 which Figure 4 is the schematic flow chart further included in step 301 in

[0157] Step 701: Obtain preset target hyperparameters;

[0158] Step 702: Divide the initial time series data into the first-stage initial data according to the target hyperparameters, and determine the remaining data in the initial time series data as the second-stage initial data.

[0159] In the above steps, the preset target hyperparameters are parameters set in advance and are used to guide the division operation of the initial time series data. It should be noted that different time series data have different characteristics and different processing requirements. The embodiments of the present disclosure can divide the initial time series data more flexibly and pertinently by setting appropriate target hyperparameters, making the divided data more suitable for subsequent operations such as standardization processing, which helps to improve the effect and adaptability of the entire time series data processing method.

[0160] After obtaining the target hyperparameters, a part of the data divided from the initial time series data according to the target hyperparameters can be used as the first-stage initial data, which will participate in some calculations later, such as calculating the offset value, etc. Then, the remaining data in the initial time series data after being divided into the first-stage initial data is used as the second-stage initial data, and subsequent scaling and offset processing will be performed to obtain the standardized data.

[0161] Next, the above embodiments will be illustrated by examples.

[0162] Assume that the initial time series data is traffic data, then the initial time series data is defined as {X (T-L) , X (T-L+1) ,..., X (T -1)} ∈ R L*N*K , and the target time series data to be predicted is defined as Among them, X represents traffic data at a certain time, that is, the initial time series data. represents the predicted traffic data at a certain time, that is, the target time series data. T represents the specified time point, which can be the current time. L and H are the lengths of the input sequence (that is, the sequence of the initial time series data, or the historical sequence) and the output sequence (that is, the sequence of the target time series data, or the prediction sequence) respectively. N and K represent features, that is, the number of traffic data and the dimension of the traffic data. In this embodiment, N represents the number of traffic data. For example, multiple (such as multiple road network nodes) traffic data are collected as the initial time series data. K represents the dimension of each traffic data. If each traffic data includes not only the traffic volume at the intersection (road network node) but also the vehicle speed, then the dimension is 2, and so on. This embodiment does not make specific restrictions on this.

[0163]

[0164]

[0165] Among them, θ is the parameter of the time series data processing model F. In this embodiment, the time series data processing model is a prediction model.

[0166] Due to the inconsistent dimensions of the time series data, it is necessary to introduce a standardization module T φ and an inverse standardization module These two modules can slow down the drift phenomenon caused by the change of data distribution over time, so that the prediction model can more accurately model the relationship between the historical sequence and the prediction sequence from a smooth view, and improve the accuracy of the final prediction. The time series prediction with the introduction of the standardization module can be defined as:

[0167]

[0168] For the standardization module, in this embodiment, the standardization process is equivalent and reversible, that is, no information is lost after the data is standardized and can be completely restored through its inverse operation. And since the distribution of the data is difficult to accurately represent with a known single distribution, the standardization process should not contain any prior assumptions about the distribution. Therefore, this embodiment introduces a reversible network to standardize the data. First, the input sequence is decomposed into {X 1:d , X (d+1):(d+D)}, where X 1:d is the first segment of the initial data, X (d+1):(d+D) is the second segment of the initial data set, d is the preset target hyperparameter, that is, the position of the sequence segmentation, D represents the number of traffic data in the input sequence. In this embodiment, d can be half of D. This target hyperparameter can be used to represent the standardization process T φ as:

[0169] X′ 1:d = X 1:d

[0170] X′ (d+1):D = X (d+1):D ο exp(s(X (d+1):D )) + t(X 1:d ) (3)

[0171] where s, t ∈ R d → R D-d is any neural network structure for data range scaling and offset. Among them, t is the first linear network, and s is the second linear network. In this embodiment, a combination of a linear layer and a tanh activation function can be used as s and t. Finally, the standardized data is represented as X′ = concatenate(X′ 1:d , X′ d:D ). Since only half of the information in the sequence can be changed in a single operation during the above standardization process, data conversion is implemented in some standardization operations to fully mix the information, that is, the first segment of the initial data and the second segment of the initial data are exchanged and then re - input into the above formula (3). The mixing formula includes: X′ 1:d , X′ d+1:D = X′ d+1:D , X′ 1:d . Stacking multiple standardization modules can ensure the full conversion of sequence information. Finally, data standardization based on a reversible network converts the data into a hidden high - dimensional space that does not contain any prior assumptions about the distribution. Therefore, it is universal for data with different distributions and can handle time series with abnormal distributions.

[0172] Prediction model F θ deduces future data based on the standardized traffic data. It should be noted that the standardization method proposed in this embodiment is applicable to most time - series prediction models such as LSTM, GWNET, etc., and can be used as an effective plug - in for the prediction model to improve the final prediction accuracy. Therefore, the prediction model used in this embodiment is not explicitly specified. The prediction process is defined as:

[0173] Y′ = F θ (X′) (4)

[0174] where Y′ is the predicted time - series data and X′ is the standardized data.

[0175] The predicted time - series data output by the prediction model follows the standardized data distribution. To obtain the final predicted value, it is necessary to convert it to the actual data distribution space. Therefore, an inverse standardization module T φ is introduced. The inverse standardization process can be expressed as:

[0176] Y 1:d = Y1' :d

[0177] Y d+1:D = [Y d ' +1:D - t(Y1' :d )] ο exp(s(Y1' :d ) -1 ) (5)

[0178] where Y1' :d is the first-stage prediction data, and Y d ' +1:D is the second-stage prediction data. Since the parameters are shared between the normalization module and the inverse normalization module, the final prediction result is expressed as:

[0179] Y = concat(Y 1:d , Y d:D ) (6)

[0180] where Y is the target time series data. The conversion process during inverse normalization is similar to that during the above-mentioned normalization, and will not be elaborated here.

[0181] Please refer to Figure 9 , Figure 9 which is another flowchart of the method for processing time series data provided by the embodiments of the present disclosure. In some embodiments, the method for processing time series data further includes steps 801 to 803:

[0182] Step 801, determine the processing time consumed in the process of obtaining the first normalized data and the second normalized data;

[0183] Step 802, when the processing time is greater than a preset expected duration, adjust the target hyperparameter to obtain an updated target hyperparameter;

[0184] Step 803, based on the updated target hyperparameter, re-execute the step of dividing the first-stage initial data from the initial time series data according to the target hyperparameter, and determining the remaining data in the initial time series data as the second-stage initial data.

[0185] In the above steps, the processing time refers to the time spent from the start of processing the initial time series data to obtaining the first normalized data and the second normalized data respectively. It should be noted that determining the processing time is to evaluate the efficiency of the current data processing process. In practical applications, the processing time is an important consideration factor. If the processing time is too long, it may affect the real-time performance and response speed of the entire time series prediction system and cannot meet the requirements of the actual scenario. Therefore, it is necessary to obtain this indicator for subsequent corresponding adjustments.

[0186] The preset expected duration is a time standard set in advance according to factors such as actual requirements and system performance, serving as a reference basis for judging whether the current data processing process is efficient. The updated target hyperparameter is a new parameter obtained by adjusting the original target hyperparameter. The purpose of the adjustment is to optimize the data processing efficiency so that the processing time meets the preset expected duration.

[0187] It should be noted that in the embodiments of the present disclosure, when the processing time is greater than the preset expected duration, it indicates that the current data processing efficiency is low, and the division method of the initial time-series data (determined by the target hyperparameter) will affect the subsequent data processing process and time. Therefore, by adjusting the target hyperparameter, the division situation of the data can be changed, and then the subsequent processing steps and calculation amount may be changed, in order to shorten the processing time and make the data processing process meet the time requirements.

[0188] Finally, after obtaining the updated target hyperparameter, the embodiments of the present disclosure can re-divide the initial time-series data based on the updated target hyperparameter and apply the adjusted division method to the actual data processing. By re-dividing, the input situation of the data is changed, thereby affecting the subsequent normalization processing process, and it is possible to shorten the processing time for obtaining the first normalized data and the second normalized data. Eventually, the entire time-series data processing method can meet the requirements of time efficiency while satisfying accuracy, improving the practicality of the system.

[0189] In some embodiments, the reversible network and the time-series data processing model are separately trained. Please refer to Figure 10 , Figure 10 which is a schematic flowchart of the training process of the reversible network provided by the embodiments of the present disclosure. In some embodiments, the reversible network is trained through the following steps, including steps 901 to 905:

[0190] Step 901, obtain the initial sample time-series data to be predicted;

[0191] Step 902, input the initial sample time-series data into the normalization module in the initial reversible network to perform scaling and offset processing on the data range of the initial sample time-series data, and output the sample normalized data;

[0192] Step 903, input the sample normalized data into the initial time-series data processing model to perform time-series prediction on the sample normalized data, and output the predicted sample time-series data;

[0193] Step 904, input the predicted sample time-series processing data into the inverse normalization module in the initial reversible network to perform scaling reduction and offset reduction processing on the predicted sample time-series data, and output the target sample time-series data;

[0194] Step 905: Generate a first loss value based on the similarity between the target sample time-series data and the initial sample time-series data, and train the initial reversible network based on the first loss value until the training ends to obtain the trained reversible network.

[0195] In the above steps, the initial sample time-series data is the original data to be predicted in time series during the training process. These data have time-series attributes, that is, the data are arranged in chronological order and can reflect the state or changes of an object at different time points.

[0196] Exemplarily, the initial sample time-series data is similar to the initial time-series data in the application process and can be data in different fields. The initial sample time-series data under continuous time can form a corresponding data sequence. Similar to the initial time-series data, the initial sample time-series data can also be weather data, traffic data, or energy data, which will not be elaborated here.

[0197] The initial reversible network is a reversible network before training or not yet trained. The sample standardized data is the data obtained after the initial sample time-series data is scaled and offset by the standardization module. This data is more suitable for subsequent time-series data processing models to process and at the same time lays a foundation for inverse standardization restoration. It should be noted that the sample standardized data is similar to the standardized data in the application process and will not be elaborated here.

[0198] The initial time-series data processing model is a time-series data processing model before training or not yet trained. The predicted sample time-series data is the data obtained by the initial time-series data processing model inferring the time-series values in the future time period based on the input sample standardized data (as historical time-series data), which is the predicted result output by the model. The predicted sample time-series data is similar to the predicted time-series data in the application process and will not be elaborated here.

[0199] The target sample time-series data is the data obtained after the inverse standardization module restores the predicted sample time-series data. Its unit and dimension are consistent with the initial sample time-series data, and through the bijective transformation of the reversible network, all information in the standardization process is retained without data loss, which will not be elaborated here.

[0200] Similarity refers to the degree of closeness between the time-series data of the target sample and the time-series data of the initial sample in terms of values, distributions, etc., and can be measured by various metrics (such as mean squared error, mean absolute error, etc.). The first loss value is a value calculated based on the similarity between the time-series data of the target sample and the time-series data of the initial sample, and is used to measure the difference between the model prediction result and the original data. It can be understood that the smaller the loss value, the closer the prediction result is to the original data, and the better the model performance. The trained reversible network is the initial reversible network after multiple iterative trainings. According to the first loss value, the network parameters are adjusted to continuously improve the similarity between the time-series data of the target sample and the time-series data of the initial sample, and finally a reversible network that can effectively process time-series data is obtained.

[0201] It should be noted that in the embodiments of the present disclosure, by calculating the similarity between the time-series data of the target sample and the time-series data of the initial sample to generate the first loss value, the prediction effect of the reversible network can be quantitatively evaluated. Based on this loss value, the initial reversible network is trained, and the network parameters are continuously adjusted to gradually reduce the loss value, so that the reversible network can learn more appropriate parameters, improve its ability to process time-series data, and finally obtain a trained reversible network that can more accurately perform standardization and inverse standardization processing on time-series data in practical applications, improving the accuracy of time-series prediction.

[0202] Next, an example will be given to illustrate the process of training the reversible network in the above embodiments.

[0203] In this embodiment, the training of the model is divided into two modules, namely the training of the reversible network and the training of the time-series data processing model. Among them, the training of the reversible network can also be called the training of standardization parameters. The training of standardization parameters can be used as a pre-training process for the time-series data processing model, mainly used to construct a standardized hidden space and make it meet the expectations through a loss function constraint. In this embodiment, the conversion parameters are updated with the maximum mean discrepancy (MMD) as the loss function as follows:

[0204]

[0205] where loss MMD is the first loss value, X′ i,k and X′ j,k are the input data and output data of the standardization module, that is, the initial time-series data and the standardized data respectively, and Y i ′ ,k and Y j ′ ,kThey are the input data and output data of the inverse normalization module, that is, the predicted time series data and the target time series data. n and m are the number of samples of the historical sequence and the predicted sequence respectively. The historical sequence is a time series composed of multiple initial time series data, and the predicted sequence is a time series composed of multiple target time series data. K is the dimension of the initial time series data. When the initial time series data is traffic data, K represents the dimension of the road network nodes. The above loss function evaluates the similarity between the normalized historical sequence and the predicted sequence in the hidden space. The kernel function f(.) is defined as: σ represents the variance of the data.

[0206] Please refer to Figure 11 , Figure 11 FIG. is a schematic flowchart of the training process of the time series data processing model provided by an embodiment of the present disclosure. In some embodiments, the time series data processing model is trained through the following steps, including steps 1001 to 1002:

[0207] Step 1001, obtain the labeled time series data at a future time for the initial sample time series data;

[0208] Step 1002, generate a second loss value based on the difference between the predicted sample time series data and the labeled time series data, and train the initial time series data processing model based on the second loss value until the training ends to obtain the trained time series data processing model.

[0209] In the above steps, the labeled time series data at a future time: refers to the real time series data that actually occurs at a future time point corresponding to the initial sample time series data, and it serves as a reference standard or real label for the model prediction result. For example, if the initial sample time series data is the daily maximum temperature data of a certain city in the past month, then the labeled time series data at a future time may be the maximum temperature data actually recorded in the next few days; if the initial sample time series data is the hourly traffic flow data of a certain intersection in the past week, the labeled time series data at a future time may be the traffic flow data actually counted in the next few hours. These data are objectively real and are used to evaluate the prediction accuracy of the time series data processing model.

[0210] The difference refers to the degree of difference between the predicted sample time-series data and the labeled time-series data in terms of values, distributions, etc., and is measured by specific metrics (such as mean squared error, mean absolute error, etc.) to measure the gap between the two. The second loss value is a numerical value calculated based on the difference between the predicted sample time-series data and the labeled time-series data, and is used to quantify the error between the model's prediction result and the actual situation. The smaller the loss value, the closer the model's prediction result is to the actual labeled time-series data, and the better the performance of the model. The trained time-series data processing model is the initial time-series data processing model after multiple iterative trainings. According to the second loss value, the model's parameters are continuously adjusted to gradually reduce the difference between the predicted sample time-series data and the labeled time-series data, and finally a model that can effectively predict time-series data is obtained.

[0211] It should be noted that in the embodiments of the present disclosure, by calculating the difference between the predicted sample time-series data and the labeled time-series data to generate the second loss value, the prediction error of the time-series data processing model can be quantified. Based on this loss value, the initial time-series data processing model is trained, and the model's parameters are continuously adjusted using optimization algorithms (such as stochastic gradient descent, etc.) to gradually reduce the loss value, making the model's prediction result closer and closer to the actual labeled time-series data. By continuously repeating this process until the training ends, the model can learn the patterns in the historical time-series data, so as to more accurately predict future time-series data in practical applications and improve the accuracy and reliability of time-series prediction.

[0212] Next, an example will be given to illustrate the process of training the time-series data processing model in the above embodiments.

[0213] When the time-series data processing model is a prediction model, the training performed by the time-series data processing model is prediction training, and the goal of prediction training is to improve the accuracy of time-series prediction. Therefore, the gap between the prediction result and the true value is directly used as the loss function. In this embodiment, the mean squared error (MSE) is used as the loss function:

[0214]

[0215] where, loss MSE is the second loss value, is the output data of the time-series data processing model, that is, the predicted time-series data, is the true data corresponding to the predicted time-series data, that is, the labeled time-series data, T is the sequence length of the historical sequence, the historical sequence is a time series composed of multiple initial time-series data, N is the number of initial time-series data, and when the initial time-series data is traffic data, N represents the number of road network nodes.

[0216] Please refer to Figure 12, an embodiment of the present disclosure also provides a processing device for time series data, which can implement the above-mentioned method for processing time series data. The processing device for time series data includes:

[0217] A data acquisition module 1201, configured to acquire initial time series data to be predicted;

[0218] A normalization processing module 1202, configured to input the initial time series data into a normalization module in a reversible network to perform scaling and offset processing on the data range of the initial time series data, and output normalized data;

[0219] A time series data processing module 1203, configured to input the normalized data into a time series data processing model to perform time series prediction on the normalized data, and output predicted time series data;

[0220] An inverse normalization processing module 1204, configured to input the predicted time series processing data into an inverse normalization module in a reversible network to perform scaling reduction and offset reduction processing on the data range of the predicted time series data, and output target time series data;

[0221] Wherein, parameters are shared between the normalization module and the inverse normalization module in the reversible network.

[0222] In summary, the processing device for time series data implements the method for processing time series data through the above-mentioned embodiments. By inputting the initial time series data into the normalization module in the reversible network, scaling and offset processing are performed on the data range of the initial time series data, and normalized data is output. Thus, the initial time series data can be projected into a high-dimensional space with an unknown distribution, rather than being subject to a certain prior distribution assumption, which is more flexible in the data preprocessing problem. Therefore, out-of-distribution time series data can be processed, and the robustness of time series data processing is improved. Subsequently, after the normalized data is input into the time series data processing model, time series prediction can be performed on the normalized data, and predicted time series data is output. Then, through the inverse normalization module in the reversible network, scaling reduction and offset reduction processing are performed on the predicted time series data, and target time series data is output. Since parameters are shared between the normalization module and the inverse normalization module in the reversible network, the reversible network belongs to a bijective transformation, and the target time series data obtained by the transformation will not cause information loss, and this process does not depend on statistical data, so no additional error will be introduced, thereby ensuring the integrity of the target time series data. Therefore, the accuracy of time series prediction can be finally improved.

[0223] The specific implementation manner of the processing device for time series data is basically the same as the specific embodiments of the above-mentioned method for processing time series data, and will not be elaborated here. On the premise of meeting the requirements of the embodiments of the present disclosure, other functional modules can be set in the processing device for time series data to implement the method for processing time series data in the above-mentioned embodiments.

[0224] An embodiment of the present disclosure also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the above-mentioned processing method for timing data is implemented. The electronic device can be any intelligent terminal including a tablet computer, an in-vehicle computer, etc.

[0225] Please refer to Figure 13 , Figure 13 which schematically shows the hardware structure of an electronic device according to another embodiment. The electronic device includes:

[0226] A processor 1301, which can be implemented by using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present disclosure;

[0227] A memory 1302, which can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 1302 can store an operating device and other application programs. When implementing the technical solutions provided by the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1302 and are called by the processor 1301 to execute the processing method for timing data of the embodiments of the present disclosure;

[0228] An input / output interface 1303, which is used to implement information input and output;

[0229] A communication interface 1304, which is used to implement communication interaction between this device and other devices, and can implement communication through a wired method (such as USB, network cable, etc.) or through a wireless method (such as a mobile network, WI FI, Bluetooth, etc.);

[0230] A bus 1305, which transmits information between various components of the device (such as the processor 1301, the memory 1302, the input / output interface 1303, and the communication interface 1304);

[0231] Among them, the processor 1301, the memory 1302, the input / output interface 1303, and the communication interface 1304 are communicatively connected to each other inside the device through the bus 1305.

[0232] An embodiment of the present disclosure also provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the above-described method for processing time-series data.

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

[0234] The embodiments described in the embodiments of the present disclosure are for more clearly illustrating the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art will understand that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are equally applicable to similar technical problems.

[0235] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present disclosure, and may include more or fewer steps than shown in the figures, or combine certain steps, or different steps.

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

[0237] Those of ordinary skill in the art can understand that all or some of the steps in the above-disclosed methods, and the functional modules / units in the devices and equipment can be implemented as software, firmware, hardware, and appropriate combinations thereof.

[0238] The terms "first", "second", "third", "fourth", etc. (if any) in the description of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or equipment.

[0239] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (one) of the following" or its similar expression refers to any combination of these items, including any combination of single item (one) or plural items (ones). For example, at least one (one) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0240] In several embodiments provided by the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above-mentioned division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.

[0241] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0242] In addition, in each of the embodiments of the present disclosure, the functional units may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0243] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the embodiments of the present disclosure. The foregoing storage medium includes: various media that can store programs such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.

[0244] The preferred embodiments of the embodiments of the present disclosure have been described above with reference to the accompanying drawings, and thus do not limit the scope of rights of the embodiments of the present disclosure. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present disclosure shall be within the scope of rights of the embodiments of the present disclosure.

Claims

1. A method for processing time-series data, characterized in that Including: Obtain the initial time-series data to be predicted; Input the initial time-series data into the normalization module in the reversible network to perform scaling and offset processing on the data range of the initial time-series data, and output the normalized data; Input the normalized data into the time-series data processing model to perform time-series prediction on the normalized data, and output the predicted time-series data; Input the predicted time-series processed data into the inverse normalization module in the reversible network to perform scaling restoration and offset restoration processing on the predicted time-series data, and output the target time-series data; Wherein, the normalization module and the inverse normalization module in the reversible network share parameters.

2. The processing method of the timing data according to claim 1, wherein The performing scaling and offset processing on the data range of the initial time-series data and outputting the normalized data includes: Divide the initial time-series data into the first segment of initial data and the second segment of initial data; Keep the first segment of initial data unchanged, and perform scaling and offset processing on the second segment of initial data to obtain the first normalized data; Convert the first segment of initial data and the second segment of initial data to obtain the updated first segment of initial data and the updated second segment of initial data; Continue to keep the updated first segment of initial data unchanged, and perform scaling and offset processing on the updated second segment of initial data to obtain the second normalized data; Obtain the normalized data based on the first normalized data and the second normalized data.

3. The method for processing time series data according to claim 2, wherein The performing scaling and offset processing on the second segment of initial data to obtain the first normalized data includes: Input the first segment of initial data into the first linear network and output the first offset value; Input the second segment of initial data into the second linear network, output the scaling factor, and perform an exponential operation on the scaling factor to obtain the scaling coefficient; Obtain the corresponding scaling value based on the scaling coefficient and the second segment of initial data, and obtain the first normalized data based on the scaling value and the first offset value.

4. The processing method of the timing data according to claim 2, wherein The performing scaling restoration and offset restoration processing on the predicted time-series data and outputting the target time-series data includes: Divide the predicted time-series data into the first segment of predicted data and the second segment of predicted data; Keep the first segment of predicted data unchanged, and perform scaling restoration and offset restoration processing on the second segment of predicted data to obtain the first output data; Convert the first segment of predicted data and the second segment of predicted data to obtain the updated first segment of predicted data and the updated second segment of predicted data; Continue to keep the updated first segment of predicted data unchanged, and perform scaling restoration and offset restoration processing on the updated second segment of predicted data to obtain the second output data; Obtain the target time-series data based on the first output data and the second output data.

5. The processing method of the timing data according to claim 4, wherein The performing scaling restoration and offset restoration processing on the second segment of predicted data to obtain the first output data includes: Input the first segment of predicted data into the first linear network and output the second offset value; Input the second - stage predicted data into the second linear network, output the scaling reduction factor, take the reciprocal and exponential processing of the scaling reduction factor to obtain the scaling reduction coefficient; Based on the second - stage predicted data and the second offset value, obtain the offset reduction value, and based on the offset reduction value and the scaling reduction coefficient, obtain the first output data.

6. The processing method of the timing data according to claim 2, wherein The step of dividing the initial time - series data into the first - stage initial data and the second - stage initial data includes: Obtain a preset target hyper - parameter; According to the target hyper - parameter, divide the first - stage initial data from the initial time - series data, and determine the remaining data in the initial time - series data as the second - stage initial data.

7. The method for processing time series data according to claim 6, wherein The method for processing the time - series data further includes: Determine the processing time consumed in the process of obtaining the first standardized data and the second standardized data; When the processing time is greater than a preset expected duration, adjust the target hyper - parameter to obtain an updated target hyper - parameter; Based on the updated target hyper - parameter, re - execute the step of dividing the first - stage initial data from the initial time - series data according to the target hyper - parameter, and determining the remaining data in the initial time - series data as the second - stage initial data.

8. The processing method of the timing data according to claim 1, characterized in that The reversible network is trained through the following steps, including: Obtain the initial sample time - series data to be predicted; Input the initial sample time - series data into the standardization module in the initial reversible network to perform scaling and offset processing on the data range of the initial sample time - series data, and output the sample standardized data; Input the sample standardized data into the initial time - series data processing model to perform time - series prediction on the sample standardized data, and output the predicted sample time - series data; Input the predicted sample time - series processed data into the inverse standardization module in the initial reversible network to perform scaling reduction and offset reduction processing on the data range of the predicted sample time - series data, and output the target sample time - series data; Based on the similarity between the target sample time - series data and the initial sample time - series data, generate a first loss value, and train the initial reversible network based on the first loss value until the training ends to obtain the trained reversible network.

9. The processing method of the timing data according to claim 8, wherein After obtaining the trained reversible network, the time - series data processing model is trained through the following steps, including: Obtain the labeled time - series data of the initial sample time - series data at future times; Based on the difference between the predicted sample time - series data and the labeled time - series data, generate a second loss value, and train the initial time - series data processing model based on the second loss value until the training ends to obtain the trained time - series data processing model.

10. A processing device for time-series data, characterized in that, It includes: A data acquisition module for obtaining the initial time - series data to be predicted; A standardization processing module for inputting the initial time - series data into the standardization module in the reversible network to perform scaling and offset processing on the data range of the initial time - series data, and outputting the standardized data; A time - series data processing module for inputting the standardized data into the time - series data processing model to perform time - series prediction on the standardized data, and outputting the predicted time - series data; The inverse normalization processing module is used to input the predicted time series processing data into the inverse normalization module in the reversible network, so as to perform scaling reduction and offset reduction processing on the data range of the predicted time series data and output the target time series data; Among them, parameters are shared between the normalization module and the inverse normalization module in the reversible network.

11. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the time series data processing method according to any one of claims 1 to 9.

12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the time series data processing method according to any one of claims 1 to 9.

Citation Information

Cited By

  • State prediction method and head-mounted display device

    CN120744328A

  • State prediction methods and head-mounted display devices

    CN120744328B