CN117056709A - Training method and device of time sequence prediction model, storage medium and electronic equipment - Google Patents

Training method and device of time sequence prediction model, storage medium and electronic equipment Download PDF

Info

Publication number
CN117056709A
CN117056709A CN202311313706.9A CN202311313706A CN117056709A CN 117056709 A CN117056709 A CN 117056709A CN 202311313706 A CN202311313706 A CN 202311313706A CN 117056709 A CN117056709 A CN 117056709A
Authority
CN
China
Prior art keywords
time
frequency
domain coding
domain
time sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311313706.9A
Other languages
Chinese (zh)
Inventor
沈雷
张睿欣
丁守鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202311313706.9A priority Critical patent/CN117056709A/en
Publication of CN117056709A publication Critical patent/CN117056709A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/27Regression, e.g. linear or logistic regression
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The application discloses a training method and device of a time sequence prediction model, a storage medium and electronic equipment. Wherein the method comprises the following steps: acquiring an initial time sequence prediction model and a plurality of time sequence samples; inputting a plurality of time sequence samples into a time domain coder to obtain a plurality of time domain coding characteristics; inputting the multiple time domain coding features into a regressive device to obtain multiple time domain prediction results; converting the plurality of time-series samples into a plurality of first frequency-domain coding features and converting the plurality of time-domain prediction results into a plurality of second frequency-domain coding features; acquiring a global loss function of an initial time sequence prediction model by utilizing a plurality of time domain coding features, a plurality of time domain prediction results, a plurality of first frequency domain coding features and a plurality of second frequency domain coding features; and under the condition that the global loss function meets the training convergence condition, obtaining a trained time sequence prediction model. The application can be applied to the technical field of big data. The method solves the technical problem of low accuracy of time sequence prediction.

Description

Training method and device of time sequence prediction model, storage medium and electronic equipment
Technical Field
The present application relates to the field of computers, and in particular, to a training method and apparatus for a time sequence prediction model, a storage medium, and an electronic device.
Background
Existing time sequence prediction technologies, such as a prediction method based on a mechanism model or a prediction method based on data driving, often perform feature calculation and processing based on time domain data to establish a time sequence prediction model for outputting a time sequence prediction result. However, the time domain data has unavoidable data limitations, such as insufficient data scale and missing time domain information, so that the accuracy of the time sequence prediction result output by the time sequence prediction model is poor, and the problem of low accuracy of the time sequence prediction is caused.
Therefore, the related art has a technical problem of low accuracy of timing prediction.
Disclosure of Invention
The embodiment of the application provides a training method and device of a time sequence prediction model, a storage medium and electronic equipment, and aims to at least solve the technical problem of low accuracy of time sequence prediction in the related technology.
According to an aspect of the embodiment of the present application, there is provided a training method of a time series prediction model, including: acquiring an initial time sequence prediction model and a plurality of time sequence samples, wherein the plurality of time sequence samples are original time domain sample sets obtained by continuously sampling original time sequence signals, and the time sequence prediction model is used for predicting unknown time sequence data according to known time sequence data; inputting the plurality of time sequence samples into a time domain coder of the initial time sequence prediction model to obtain a plurality of time domain coding features, wherein the time domain coder is used for extracting the features of the time sequence samples, and the time domain coding features are used for representing the time sequence characteristics of the time sequence samples; inputting the plurality of time domain coding features into a regressor of the initial time sequence prediction model to obtain a plurality of time domain prediction results, wherein the regressor is used for carrying out regression analysis on the time domain coding features; converting the plurality of time-series samples into a plurality of first frequency-domain coding features, and converting the plurality of time-domain prediction results into a plurality of second frequency-domain coding features, wherein the first frequency-domain coding features are used for representing probability densities of each frequency segment of the time-series samples, and the second frequency-domain coding features are used for representing probability densities of each frequency segment of the time-domain prediction results; acquiring a global loss function of the initial time sequence prediction model by using the plurality of time domain coding features, the plurality of time domain prediction results, the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, wherein the global loss function is used for measuring training convergence conditions of the initial time sequence prediction model; and under the condition that the global loss function meets the training convergence condition, obtaining a trained time sequence prediction model.
According to another aspect of the embodiment of the present application, there is also provided a training apparatus for a time-series prediction model, including: the first acquisition unit is used for acquiring an initial time sequence prediction model and a plurality of time sequence samples, wherein the plurality of time sequence samples are original time domain sample sets obtained by continuously sampling original time sequence signals, and the time sequence prediction model is used for predicting unknown time sequence data according to known time sequence data; a first determining unit, configured to input the plurality of time-series samples into a time-domain encoder of the initial time-series prediction model, to obtain a plurality of time-domain coding features, where the time-domain encoder is configured to perform feature extraction on the time-series samples, and the time-domain coding features are configured to characterize a time-series characteristic of the time-series samples; a second determining unit, configured to input the plurality of time-domain coding features into a regressor of the initial time-sequence prediction model, to obtain a plurality of time-domain prediction results, where the regressor is configured to perform regression analysis on the time-domain coding features; a conversion unit, configured to convert the plurality of time-series samples into a plurality of first frequency-domain coding features, and convert the plurality of time-domain prediction results into a plurality of second frequency-domain coding features, where the first frequency-domain coding features are used to represent probability densities of each frequency segment of the time-series samples, and the second frequency-domain coding features are used to represent probability densities of each frequency segment of the time-domain prediction results; a second obtaining unit, configured to obtain a global loss function of the initial time-sequence prediction model by using the plurality of time-domain coding features, the plurality of time-domain prediction results, the plurality of first frequency-domain coding features, and the plurality of second frequency-domain coding features, where the global loss function is used to measure a training convergence condition of the initial time-sequence prediction model; and the third determining unit is used for obtaining a trained time sequence prediction model under the condition that the global loss function meets the training convergence condition.
As an alternative, the second obtaining unit includes: a first obtaining module, configured to obtain a first loss function based on the plurality of time-domain coding features and the plurality of time-domain prediction results, where the first loss function is used to constrain the time-domain prediction results; a second obtaining module, configured to obtain a second loss function based on the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, where the second loss function is used to constrain probability density of each frequency segment of the time domain prediction result; and the third acquisition module is used for acquiring the global loss function according to the first loss function and the second loss function.
As an optional solution, the first obtaining module includes: and a calculation sub-module, configured to calculate a root mean square error between each of the plurality of time-domain coding features and each of the plurality of time-domain prediction results, and determine the root mean square error as a first loss function.
As an optional solution, the second obtaining module includes: an obtaining sub-module, configured to obtain a first loss sub-function based on the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, and obtain a second loss sub-function based on the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, where the first loss sub-function is used to constrain the probability density distribution difference of the time domain prediction result and the time domain coding features in each frequency segment, and the second loss sub-function is used to constrain the probability density difference of the time domain prediction result and the time domain coding features in each frequency segment; and the determining submodule is used for determining the sum of the first loss function and the second loss function as the second loss function.
As an alternative, the acquiring sub-module includes: a first obtaining subunit, configured to obtain a first frequency domain probability of the first frequency domain coding feature corresponding to an i-th frequency segment in each frequency segment, and a second frequency domain probability of the second frequency domain coding feature corresponding to the i-th frequency segment, where i is a positive integer; a first determining subunit, configured to, when a multiplication result obtained by multiplying the first frequency domain probability by a weighting parameter is obtained, divide the multiplication result by the second frequency domain probability to obtain a division result, and determine the division result as a probability density difference distribution value of an i-th set of frequency domain coding feature combinations, where the frequency domain coding feature combinations of different sets correspond to the first frequency domain coding feature and the second frequency domain coding feature of different frequency segments, and the weighting parameter is a logarithmic value of the first frequency domain probability based on a preset parameter; a second determining subunit configured to determine, when a probability density difference distribution value of each set of frequency-domain coding feature combinations is obtained according to a determination method of the probability density difference distribution value of the i-th set of frequency-domain coding feature combinations, a sum of the probability density difference distribution values of each set of frequency-domain coding feature combinations as the first loss subfunction; the obtaining sub-module includes: a second obtaining subunit, configured to obtain a euclidean distance between the first frequency domain probability and the second frequency domain probability, and determine the euclidean distance as a probability density difference value of the combination of the ith set of frequency domain coding features, where the euclidean distance is used to indicate a square difference of a sum of squares of differences between the first frequency domain probability and the second frequency domain probability; and a third determining subunit configured to determine, when the probability density difference value of each set of frequency-domain coding feature combinations is obtained according to the determination method of the probability density difference value of the i-th set of frequency-domain coding feature combinations, a sum of the probability density difference values of each set of frequency-domain coding feature combinations as the second loss subfunction.
As an alternative, the apparatus includes: a third obtaining subunit, configured to obtain, before obtaining the global loss function according to the first loss function and the second loss function, a third frequency domain probability of a target frequency domain coding feature point corresponding to a jth frequency segment in each frequency segment, and a second frequency domain probability of the second frequency domain coding feature corresponding to the jth frequency segment, where the first frequency domain coding feature includes the target frequency domain coding feature point, and j is a positive integer; a fourth determining subunit configured to determine, before the global loss function is obtained according to the first loss function and the second loss function, an absolute value of a difference between the third frequency domain probability and the second frequency domain probability as a single-point probability density value of the j-th set of frequency domain coding feature combinations; a fifth determining subunit, configured to determine, before the global loss function is obtained according to the first loss function and the second loss function, a sum of single-point probability density values of the frequency-domain coding feature combinations of each group as a third loss function when single-point probability density values of the frequency-domain coding feature combinations of each group are obtained according to a determining manner of single-point probability density values of the frequency-domain coding feature combinations of the j-th group, where the third loss function is used to constrain a single-point probability density of the time-domain prediction result; the third obtaining module includes: and the weighting submodule is used for carrying out weighted summation on the first loss function, the second loss function and the third loss function to obtain the global loss function.
As an alternative, the second determining unit includes: the splicing module is used for carrying out characteristic splicing on the plurality of time domain coding characteristics to obtain a target time domain characteristic set; and the first input module is used for respectively inputting each time domain coding feature in the target time domain feature set into the regressor of the initial time sequence prediction model to obtain a target prediction result, wherein the target prediction result comprises a plurality of time domain prediction results.
As an alternative, the apparatus further includes: the third determining module is used for responding to the time sequence prediction request triggered by the time sequence working condition signal after the trained target time sequence prediction model is obtained, inputting the time sequence working condition signal into a time domain coder of the target time sequence prediction model to obtain a plurality of working condition coding features, wherein the working condition coding features are used for timing sequence characteristics of the time sequence working condition signal; the second input module is used for inputting the plurality of working condition coding features into the regressor of the trained time sequence prediction model after the trained target time sequence prediction model is obtained, so as to obtain a plurality of working condition prediction results; and the fusion module is used for carrying out feature fusion on the plurality of working condition prediction results after the trained target time sequence prediction model is obtained, so as to obtain a fused target working condition prediction result. As an alternative, the first obtaining unit includes: a fifth acquisition module, configured to acquire an original input signal of a target time window, where the target time window is used to indicate a time period interval from a first time point to a second time point; and the sampling module is used for carrying out sampling processing of different granularities on the original input signal to obtain a plurality of window data, and determining the window data as the time sequence samples.
According to yet another aspect of embodiments of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the training method of the time series prediction model as above.
According to still another aspect of the embodiment of the present application, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the training method of the timing prediction model by using the computer program.
In the embodiment of the application, a time domain coder is utilized to acquire time domain coding features of time sequence samples for training an initial time sequence prediction model, a regression is utilized to acquire time domain coding prediction results corresponding to the time domain coding features, the time domain coding features and the time domain coding prediction features are respectively converted into first frequency domain coding features and second frequency domain coding features, and then the time domain coding features, the time domain prediction results, the first frequency domain coding features and the second frequency domain coding features are utilized to jointly determine a global loss function of the initial time sequence prediction model so as to comprehensively train and supervise the initial time sequence prediction model. By fusing the time domain and frequency domain supervision training modes, the time domain information and the frequency domain information of the time sequence samples are fully utilized to obtain a global loss function for comprehensively training and supervising the initial time sequence prediction model, so that the time sequence prediction result output by the trained time sequence prediction model in application is more accurate, the problem that the time sequence prediction model training effect is poor due to the relevant data limitation of the time domain data is avoided, the purposes of improving the training quality of the time sequence prediction model and the accuracy of the time sequence prediction output result of the time sequence prediction model are achieved, the technical effect of improving the accuracy of the time sequence prediction is achieved, and the technical problem that the time sequence prediction accuracy is lower in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a schematic illustration of an application environment of an alternative training method of a time series prediction model according to an embodiment of the present application;
FIG. 2 is a schematic illustration of a flow of an alternative training method of a time series prediction model according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative training method of a time series prediction model according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative training method of a time series prediction model according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an alternative training method of a time series prediction model according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an alternative training apparatus for a time series prediction model according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Cloud technology (Cloud technology) refers to unifying serial resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation of data,Treatment and->Is->Techniques.
Cloud technology (Cloud technology) is based on the general terms of network technology, information technology, integration technology, management platform technology, application technology and the like applied by Cloud computing business models, and can form a resource pool, so that the Cloud computing business model is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing.
According to an aspect of the embodiment of the present application, there is provided a training method of a time series prediction model, optionally, as an optional implementation manner, the training method of a time series prediction model may be, but is not limited to, applied to an environment as shown in fig. 1. Including, but not limited to, a client 102 and a server 112, the client 102 may include, but is not limited to, a display 104, a processor 106, and a memory 108, and the server 112 includes a database 114 and a processing engine 116.
The specific process comprises the following steps:
step S102, the client 102 obtains an initial time sequence prediction model 1001 and a plurality of time sequence samples 1002, wherein the plurality of time sequence samples 1002 are original time domain sample sets obtained by continuously sampling original time sequence signals, and the time sequence prediction model 1001 is used for predicting unknown time sequence data according to known time sequence data;
step S104-S106, the client 102 initiates a model training supervision request to the server 112, wherein the model training supervision request is used for confirming a model training convergence request in the training process of the initial time sequence prediction model 1001;
step S108, the server 112 responds to the model training supervision request, and the processing engine 116 performs feature extraction on the time sequence samples to obtain time domain coding features;
Step S110, carrying out regression analysis on a plurality of time domain coding features to obtain a plurality of time domain prediction results;
step S112, converting the plurality of time sequence samples into a plurality of first frequency domain coding features and converting the plurality of time domain prediction results into a plurality of second frequency domain coding features;
step S114, determining a global loss function by utilizing the multi-time domain coding feature, the plurality of time domain prediction results, the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, and determining the training progress of the time sequence prediction model based on the global loss function;
steps S116-S118, the trained time series prediction model obtained when the global loss function meets the training convergence condition is sent to the client 102 through the network 110, where the processor 106 in the client 102 is configured to receive the trained time series prediction model and process the relevant training data, and display model information of the trained time series prediction model on the display 104, and store the relevant training data in the memory 108.
In addition to the example shown in fig. 1, the above steps may be performed by the user device or the server independently, or by the user device and the server cooperatively, such as by the client 102 performing the steps S108 to S described above, thereby relieving the processing pressure of the server 112. The client 102 includes, but is not limited to, a notebook computer, a tablet computer, a desktop computer, a smart television, etc., and the application is not limited to a specific implementation of the client 102. The server 112 may be a single server or a server cluster composed of a plurality of servers, or may be a cloud server.
Alternatively, as an optional implementation manner, as shown in fig. 2, the training method of the time sequence prediction model may be performed by an electronic device, such as a client or a server shown in fig. 1, and specific steps include:
s202, an initial time sequence prediction model and a plurality of time sequence samples are obtained, wherein the plurality of time sequence samples are original time domain sample sets obtained by continuously sampling original time sequence signals, and the time sequence prediction model is used for predicting unknown time sequence data according to known time sequence data;
s204, inputting a plurality of time sequence samples into a time domain coder of an initial time sequence prediction model to obtain a plurality of time domain coding features, wherein the time domain coder is used for extracting features of the time sequence samples, and the time domain coding features are used for representing time sequence characteristics of the time sequence samples;
s206, inputting the plurality of time domain coding features into a regressor of an initial time sequence prediction model to obtain a plurality of time domain prediction results, wherein the regressor is used for carrying out regression analysis on the time domain coding features;
s208, converting the time sequence samples into a plurality of first frequency domain coding features and converting the time domain prediction results into a plurality of second frequency domain coding features, wherein the first frequency domain coding features are used for representing probability densities of all frequency segments of the time sequence samples, and the second frequency domain coding features are used for representing probability densities of all frequency segments of the time domain prediction results;
S210, acquiring a global loss function of an initial time sequence prediction model by utilizing a plurality of time domain coding features, a plurality of time domain prediction results, a plurality of first frequency domain coding features and a plurality of second frequency domain coding features, wherein the global loss function is used for measuring training convergence conditions of the initial time sequence prediction model;
s212, obtaining a trained time sequence prediction model under the condition that the global loss function meets the training convergence condition.
Alternatively, in the present embodiment, the training method of the above-described time series prediction model may be applied to, but not limited to, a time series prediction (hereinafter, referred to as time series prediction) scene. Timing prediction scenarios find application in many areas, including finance, traffic, weather, and the like. By analyzing and modeling past time series data, future trends and behaviors can be predicted to aid in decision making and planning.
Further by way of example, in the above-described time series prediction scenario, a time series prediction technique may be used to predict the amount of electricity used for a day in the future. By modeling and analyzing time sequence data for indicating past electricity consumption information, a relevant electricity consumption rule is obtained, and electricity consumption information of a certain day in the future is predicted based on the rule.
Existing timing prediction techniques can be divided into three categories: the first is a time sequence prediction mode based on a mechanism model, which models the running state of the whole system by establishing a target system mechanism model so as to predict the future change of a time sequence signal; the second is a time sequence prediction mode based on a data driving method, a time sequence prediction model is established by using a statistics/machine learning/deep learning model, and the change of time sequence parameters is predicted; and thirdly, a time sequence prediction mode driven by the fusion model and data is realized by a fusion target system mechanism model and a data driving method.
It should be noted that, in the conventional time-series prediction technology, feature calculation and processing are often performed based on time-domain data to establish a time-series prediction model for outputting a time-series prediction result. However, the time domain data has unavoidable data limitations, such as insufficient data scale and missing time domain information, so that the accuracy of the time sequence prediction result output by the time sequence prediction model is poor, and the problem of low accuracy of the time sequence prediction is caused.
For the above problems, the training method of the time-sequence prediction model provided by the embodiment uses a time-domain encoder to obtain the time-domain coding feature of the time-sequence sample for training the initial time-sequence prediction model, uses a regression to obtain the time-domain coding prediction result corresponding to the time-domain coding feature, and converts the time-domain coding feature and the time-domain coding prediction feature into a first frequency-domain coding feature and a second frequency-domain coding feature, respectively, so as to determine the global loss function of the initial time-sequence prediction model by using the time-domain coding feature, the time-domain prediction result, the first frequency-domain coding feature and the second frequency-domain coding feature together, and perform comprehensive training supervision on the initial time-sequence prediction model. By fusing the time domain and frequency domain supervision training modes, the time domain information and the frequency domain information of the time sequence samples are fully utilized to obtain a global loss function for comprehensively training and supervising the initial time sequence prediction model, so that the time sequence prediction result output by the trained time sequence prediction model in application is more accurate, the problem that the time sequence prediction model training effect is poor due to the relevant data limitation of the time domain data is avoided, the purposes of improving the training quality of the time sequence prediction model and the accuracy of the time sequence prediction output result of the time sequence prediction model are achieved, the technical effect of improving the accuracy of the time sequence prediction is achieved, and the problem that the accuracy of the time sequence prediction is lower is solved.
Alternatively, in this embodiment, the timing prediction model may be used, but not limited to, predicting unknown timing data based on known timing data, where the known timing data may be, but not limited to, historical timing data for a past period of time, and the unknown timing data may be, but not limited to, timing data for a future period of time, for indicating a future timing change condition.
Further by way of example, the time series prediction model may output weather prediction information for a future period of time according to, but not limited to, input weather data information for a historical period of time during an actual application process, and may output traffic prediction information for a future period of time according to, but not limited to, input traffic data information for a historical period of time. The embodiment of the application does not limit the actual application scene and the field of the time sequence prediction model.
Alternatively, in this embodiment, the plurality of time-series samples may be, but not limited to, an original time-domain sample set obtained by continuously sampling an original time-series signal, where each time-series sample may be, but not limited to, information reflecting a change of a target object to be predicted over a period of time.
Optionally, in this embodiment, when a plurality of time-series samples are acquired, a time-domain encoder of an initial time-series prediction model is used to perform feature extraction on the plurality of time-series samples, so as to obtain a plurality of time-domain coding features, where the time-domain coding features are used to characterize the time-series features of the time-series samples in a time-domain dimension.
Optionally, in this embodiment, when a plurality of time-domain coding features are acquired, regression analysis is performed on the plurality of time-domain coding features by using a regression of an initial time-domain encoder to obtain a plurality of time-domain prediction results, where the time-domain prediction results are predicted according to the time-sequence coding features.
Optionally, in this embodiment, in a case where a plurality of time-series samples are acquired, the plurality of time-series samples are converted into a plurality of first frequency-domain coding features, and in a case where a plurality of time-domain prediction results are acquired, the plurality of time-domain prediction results are converted into a plurality of second frequency-domain coding features, where the first frequency-domain coding features are used to characterize each frequency-segment probability density of the time-series samples, and the second frequency-domain coding features are used to characterize each frequency-segment probability density of the time-domain prediction results.
The conversion process may be implemented, but not limited to, by fast fourier Transform (Fast Fourier Transform, abbreviated as FFT) to convert the data in the original time domain dimension into the data in the corresponding frequency domain dimension, or may be implemented, but not limited to, by other Transform methods, such as discrete fourier Transform (Discrete Fourier Transform, abbreviated as DFT) and Hilbert-Huang Transform (HHT) waiting.
Optionally, in this embodiment, under the condition that a plurality of time domain coding features, a plurality of time domain prediction results, a plurality of first frequency domain coding features and a plurality of second frequency domain coding features are obtained, a global loss function of the initial time sequence prediction model is obtained by using the plurality of features of the time domain dimension and the frequency domain dimension, where the global loss function is used to measure a training convergence condition of the initial time sequence prediction model.
Alternatively, in this embodiment, the smaller the global loss function is, the better the training convergence effect of the initial timing prediction model is.
Alternatively, in the present embodiment, the training convergence condition may be, but is not limited to, that the global loss function is less than or equal to a preset threshold.
It should be noted that, under the condition that the global loss function meets the training convergence condition, determining that the initial time sequence prediction model is trained, and obtaining a trained time sequence prediction model; and under the condition that the global loss function does not meet the training convergence condition, determining that the initial time sequence prediction model is not trained, and carrying out the next training round.
Further by way of example, as shown in fig. 3, an alternative training method of the time sequence prediction model specifically includes:
Step S1, performing feature extraction on an input time sequence sample 302 by using a time domain encoder 304 of an initialized time sequence prediction model to obtain time domain coding features 306 of the time sequence sample 302;
step S2, regression analysis is carried out on the input time domain coding features 306 by using a regressive device 308 of the initialized time domain prediction model to obtain a time domain prediction result 310;
step S3, performing Fourier transform on the sequence samples 302 to obtain converted first frequency domain coding features 312, and performing Fourier transform on the time domain prediction results 310 to obtain converted second frequency domain coding features 314;
step S4, determining a global loss function 316 of the initial time-series prediction model by using the time-series coding feature 306, the time-series prediction result 310, the first frequency-series coding feature 312 and the second frequency-series coding feature 314 to measure the training convergence condition of the initial time-series prediction model, and determining whether the model training of the initial time-series prediction model is completed.
According to the embodiment of the application, a time domain coder is utilized to acquire time domain coding features of time sequence samples for training an initial time sequence prediction model, a regressive is utilized to acquire time domain coding prediction results corresponding to the time domain coding features, the time domain coding features and the time domain coding prediction features are respectively converted into first frequency domain coding features and second frequency domain coding features, and then the time domain coding features, the time domain prediction results, the first frequency domain coding features and the second frequency domain coding features are utilized to jointly determine a global loss function of the initial time sequence prediction model so as to comprehensively train and supervise the initial time sequence prediction model. By fusing the time domain and frequency domain supervision training modes, the time domain information and the frequency domain information of the time sequence samples are fully utilized to obtain a global loss function for comprehensively training and supervising the initial time sequence prediction model, so that the time sequence prediction result output by the trained time sequence prediction model in application is more accurate, the problem that the time sequence prediction model training effect is poor due to the relevant data limitation of the time domain data is avoided, the purposes of improving the training quality of the time sequence prediction model and the accuracy of the time sequence prediction output result of the time sequence prediction model are achieved, and the technical effect of improving the accuracy of the time sequence prediction is achieved.
As an alternative, using the plurality of time-domain coding features, the plurality of time-domain prediction results, the plurality of first frequency-domain coding features, and the plurality of second frequency-domain coding features, obtaining a global loss function of the initial temporal prediction model includes:
s1, acquiring a first loss function based on a plurality of time domain coding features and a plurality of time domain prediction results, wherein the first loss function is used for restraining the time domain prediction results;
s2, acquiring a second loss function based on the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, wherein the second loss function is used for restraining probability density of each frequency segment of the time domain prediction result;
s3, acquiring a global loss function according to the first loss function and the second loss function.
Optionally, in this embodiment, a first loss function is obtained according to each time domain coding feature and a time domain prediction result corresponding to each time domain coding feature, where the first loss function is used to constrain the time domain prediction result.
It should be noted that the first loss function may be, but is not limited to, used to indicate a root mean square error value between each of the plurality of time-domain coding features and the corresponding frequency-domain coding feature, and may be, but is not limited to, used to indicate a loss of the time-domain prediction result and the time-domain coding feature in the time-domain dimension.
Optionally, in this embodiment, a second loss function is obtained according to each first frequency domain coding feature and a second frequency domain coding feature corresponding to each frequency domain coding feature, where the second loss function is used to constrain probability densities of frequency segments of the time domain prediction result.
It should be noted that the second loss function may be, but is not limited to, a probability density distribution overall difference and a probability density difference value in the frequency domain dimension, which are used to indicate the time domain prediction result and the time domain coding feature.
According to the embodiment provided by the application, the time domain information and the frequency domain information of the time sequence sample are fully utilized to obtain the global loss function for comprehensively training and supervising the initial time sequence prediction model, so that the time sequence prediction result output by the trained time sequence prediction model in application is more accurate, the purposes of improving the training quality of the time sequence prediction model and the accuracy of the time sequence prediction output result of the time sequence prediction model are achieved, and the technical effect of improving the accuracy of the time sequence prediction is achieved.
As an alternative, obtaining the first loss function based on the plurality of time-domain coding features and the plurality of time-domain predictors includes:
S1, calculating root mean square error between each time domain coding feature in the plurality of time domain coding features and each time domain prediction result in the plurality of time domain prediction results, and determining the root mean square error as a first loss function.
Optionally, in this embodiment, assuming that the original timing signal is X, the plurality of timing samples are original time-domain sample sets obtained by continuously sampling the original signal X, including n timing samples, which areA plurality of time sequence samplesThe corresponding time domain codes are characterized by +.>Multiple time-domain coding featuresThe corresponding time domain prediction result obtained by the regressive device is +.>. The first loss function may be calculated by the following equation (1)Determining, wherein->I.e. the first loss function.
(1)
As an alternative, obtaining the second loss function based on the plurality of first frequency domain coding features and the plurality of second frequency domain coding features includes:
s1, acquiring a first loss sub-function based on a plurality of first frequency domain coding features and a plurality of second frequency domain coding features, and acquiring a second loss sub-function based on a plurality of first frequency domain coding features and a plurality of second frequency domain coding features, wherein the first loss sub-function is used for restraining probability density distribution differences of a time domain prediction result and the time domain coding features in each frequency segment, and the second loss sub-function is used for restraining probability density differences of the time domain prediction result and the time domain coding features in each frequency segment;
S2, determining the sum of the first loss function and the second loss function as the second loss function.
Optionally, in this embodiment, the second loss function may, but is not limited to, include a first loss sub-function and a second loss sub-function, where the first loss sub-function is used to constrain the probability density distribution differences of the time domain prediction result and the time domain coding feature in each frequency segment, and the second loss sub-function is used to constrain the probability density differences of the time domain prediction result and the time domain coding feature in each frequency segment.
It should be noted that, the first loss sub-function may be, but is not limited to, integral difference information of probability density distribution of the time domain prediction result and the original time sequence sample in the frequency domain dimension, and is used for representing ratio information of the difference, and the theoretical value is between 0 and 1, where the smaller the value of the first loss sub-function is, the smaller the ratio of the integral difference of probability density distribution of the time domain prediction result and the original time sequence sample in the frequency domain dimension is, and the better the model training quality of the initial time sequence prediction model is.
It should be noted that the second loss function may be, but is not limited to, probability density difference information for constraining the time domain prediction result and the original time sequence sample in the frequency domain dimension, numerical value information for representing the difference value, and the theoretical value is between 0 and infinity, where the smaller the value of the second loss sub-function, the smaller the numerical value representing the probability density difference between the time domain prediction result and the original time sequence sample in the frequency domain dimension, and the better the model training quality of the original time sequence prediction model.
According to the embodiment provided by the application, the second loss function of the probability density difference information in the frequency domain dimension is calculated/indicated together by combining the probability density distribution integral difference information (namely the first loss sub-function) and the probability density difference information (namely the second loss sub-function), so that the distribution alignment relation in the frequency domain dimension is fully utilized, the purpose of model training supervision by fully utilizing the time domain information and the frequency domain information is achieved, and the technical effect of improving the accuracy of time sequence prediction is achieved.
As an alternative, obtaining the first loss sub-function based on the plurality of first frequency-domain coding features and the plurality of second frequency-domain coding features includes:
s1, acquiring a first frequency domain probability of a first frequency domain coding feature corresponding to an ith frequency segment and a second frequency domain probability of a second frequency domain coding feature corresponding to the ith frequency segment in each frequency segment, wherein i is a positive integer;
s2, under the condition that a multiplication result obtained by multiplying the first frequency domain probability and a weighting parameter is obtained, dividing the multiplication result by the second frequency domain probability to obtain a division result, and determining the division result as a probability density difference distribution value of an ith group of frequency domain coding feature combinations, wherein the frequency domain coding feature combinations of different groups correspond to the first frequency domain coding feature and the second frequency domain coding feature of different frequency segments, and the weighting parameter is a logarithmic value of the first frequency domain probability based on a preset parameter;
S3, determining the sum of probability density difference distribution values of the frequency domain coding feature combinations of each group as a first loss subfunction under the condition that the probability density difference distribution values of the frequency domain coding feature combinations of each group are obtained according to the determination mode of the probability density difference distribution values of the i-th group;
obtaining a second loss sub-function based on the plurality of first frequency-domain coding features and the plurality of second frequency-domain coding features, comprising:
s4, acquiring Euclidean distance between the first frequency domain probability and the second frequency domain probability, and determining the Euclidean distance as a probability density difference value of an ith group of frequency domain coding feature combination, wherein the Euclidean distance is used for indicating the square difference of the square sum of the difference value between the first frequency domain probability and the second frequency domain probability;
and S5, determining the sum of the probability density difference values of the frequency domain coding feature combinations as a second loss subfunction when the probability density difference value of the frequency domain coding feature combinations is obtained according to the determination mode of the probability density difference value of the i-th frequency domain coding feature combination.
Optionally, in this embodiment, assuming that the original timing signal is X, the plurality of timing samples are original time-domain sample sets obtained by continuously sampling the original signal X, including n timing samples, which are A plurality of time sequence samplesThe corresponding time domain codes are characterized by +.>Multiple time-domain coding featuresThe corresponding time domain prediction result obtained by the regressive device is +.>
Further, the features are encoded for a plurality of timingsPerforming Fourier transform to obtain multiple first frequency domain coding features of each frequency segment/>The specific conversion mode is shown in the following formula (2); for a plurality of time domain predictors +.>Performing Fourier transform to obtain multiple second frequency domain coding features of each frequency band>The specific conversion mode is shown in the following formula (3).
(2)
(3)
The first loss subfunction described above may then be determined computationally by equation (4) below, wherein,i.e. the first loss subfunction.
(4)
The probability density difference distribution value of the i-th set of frequency domain coding feature combination is the aboveWherein the preset parameter is 10, and the weighting parameter is +.>The multiplication result is->The division result is->
And, the second loss subfunction may be determined computationally by the following equation (5), wherein,i.e. the second loss subfunction.
(5)
It should be noted that the probability density difference value of the i-th set of frequency domain coding feature combinations is the above
As an alternative, before acquiring the global loss function according to the first loss function and the second loss function, the method includes:
S1, acquiring third frequency domain probability of a target frequency domain coding feature point corresponding to a jth frequency segment in each frequency segment and second frequency domain probability of a second frequency domain coding feature corresponding to the jth frequency segment, wherein the first frequency domain coding feature comprises the target frequency domain coding feature point, and j is a positive integer;
s2, determining the absolute value of the difference value between the third frequency domain probability and the second frequency domain probability as a single-point probability density value of the j-th group of frequency domain coding feature combination;
s3, under the condition that single-point probability density values of all the frequency domain coding feature combinations are obtained according to a determining mode of single-point probability density values of the j-th frequency domain coding feature combination, determining the sum of the single-point probability density values of all the frequency domain coding feature combinations as a third loss function, wherein the third loss function is used for restraining the single-point probability density of a time domain prediction result;
obtaining a global loss function from the first loss function and the second loss function, comprising:
and S4, carrying out weighted summation on the first loss function, the second loss function and the third loss function to obtain a global loss function.
Alternatively, in the present embodiment, the original timing signal is assumedThe number is X, the plurality of time sequence samples are original time domain sample sets obtained by continuously sampling an original signal X, and the time sequence samples comprise n time sequence samples which are A plurality of time sequence samplesThe corresponding time domain codes are characterized by +.>Multiple time-domain coding featuresThe corresponding time domain prediction result obtained by the regressive device is +.>
Further, the features are encoded for a plurality of timingsPerforming Fourier transform to obtain multiple first frequency domain coding features of each frequency band>And +.>Performing Fourier transform to obtain multiple second frequency domain coding features of each frequency band>The specific conversion modes are shown in the above formulas (2) and (3).
The third loss function described above may then be determined by calculation of equation (6) below, wherein,i.e. the third loss function.
(6)
Note that j in the third loss function determining process and in the formula (6) is not substantially different from i in the first loss function determining process, the second loss function determining process and the related formulas, and is a representative sample example in the summing process.
The target frequency domain coding feature point is the aboveFor a particular point in the first frequency-domain coding characteristic of the current sample, it may be, but is not limited to, determined by random.
It will be appreciated that in order to strengthen the constraint on the single-point frequency probability density, a multi-task learning mode is constructed, a fully connected FC layer is used to implement regression prediction of the time-domain coding feature to the probability density Freq of each frequency bin, and an L1 loss function is used to constrain the single-point probability density, so as to determine the third loss function, as shown in the above formula (6).
Optionally, in this embodiment, the first loss function, the second loss function, and the third loss function are weighted and summed to obtain a global loss function.
Alternatively, in this embodiment, the global loss function may be, but is not limited to being, a weighted sum of the first loss function, the first loss sub-function, the second loss sub-function, and the third loss sub-function, wherein,the weighting coefficients of the first loss function, the first loss sub-function, the second loss sub-function and the third loss function are preset respectively.
Further illustratively, the global loss function is combined with equations (1) through (6) aboveFrom the following componentsWeighted addition of->The weighting coefficients are shown in the formula (7).
(7)
As an alternative, inputting the plurality of time-domain coding features into a regressor of an initial time-sequence prediction model, and obtaining a plurality of time-domain prediction results includes:
s1, performing feature stitching on a plurality of time domain coding features to obtain a target time domain feature set;
s2, respectively inputting each time domain coding feature in the target time domain feature set into a regressor of an initial time sequence prediction model to obtain a target prediction result, wherein the target prediction result comprises a plurality of time domain prediction results.
Optionally, in this embodiment, under the condition that a plurality of time-domain coding features corresponding to a plurality of time-sequence samples are obtained, feature stitching is performed on the plurality of time-domain coding features to obtain a stitched target time-domain feature set, where the target time-domain feature set may be, but is not limited to, a stitched time-domain coding feature including the plurality of time-domain coding features.
After the plurality of time domain coding features are spliced, the target time domain feature set is further obtained, and the target time domain feature set corresponds to a subsequent target prediction result, a first target frequency domain feature and a second target frequency domain feature. It can be understood that when the global loss function is calculated later, the first target frequency domain feature and the second target frequency domain feature are determined according to the spliced target time domain feature set to calculate and determine the related loss function, and the loss result of each frequency segment is not required to be calculated separately and then weighted and summed, so that the determination efficiency of the global loss function is improved.
It should be noted that, the above calculation determines that the related loss function is substantially identical to the logic shown in the above formulas (1) to (7), and this embodiment will not be repeated. The difference point is that under the condition of feature stitching, a plurality of time domain coding features are taken as a whole, and the corresponding time sequence prediction result and the converted frequency domain features are taken as a whole, so that corresponding loss values in the time domain dimension and the frequency domain dimension are calculated.
According to the embodiment of the application, the characteristic splicing processing of the plurality of time domain coding characteristics is adopted, so that the purposes of improving the calculation and determination efficiency of the loss function in the model training process are achieved, and the technical effect of improving the training efficiency of the time sequence prediction model is realized.
As an alternative, after obtaining the trained target timing prediction model, the method further includes:
s1, responding to a time sequence prediction request triggered by a time sequence working condition signal, inputting the time sequence working condition signal into a time domain coder of a target time sequence prediction model to obtain a plurality of working condition coding features, wherein the working condition coding features are used for time sequence characteristics of the time sequence working condition signal;
s2, inputting the multiple working condition coding features into a regressor of the trained time sequence prediction model to obtain multiple working condition prediction results;
and S3, carrying out feature fusion on the plurality of working condition prediction results to obtain a fused target working condition prediction result.
Alternatively, in the present embodiment, the time-series operating condition signal may be, but is not limited to, a series of signals generated during a certain period of time according to the operation state and operation mode of the system. May include input signals, output signals, control signals, etc. of the system.
Optionally, in this embodiment, the input time sequence working condition signal may be predicted by using, but not limited to, a trained time sequence prediction model to obtain a working condition prediction result, where the working condition prediction result may be, but not limited to, prediction information for indicating a future period of system operation state, an operation mode, and the like.
Further by way of example, as shown in fig. 4, the training method of the time sequence prediction model is applied to an industrial signal prediction scene, and the specific steps include:
step S1, inputting an original time sequence working condition signal 402;
step S2, sampling the time sequence working condition signal 402 according to fixed time windows and different sampling scales;
step S3, extracting signal characteristics of different windows by using a time domain encoder 404;
s4, splicing the signal characteristics of different time windows, and fusing the characteristics of different scales;
step S5, the time sequence features after feature splicing (fusion) are sent to a regressor 406, and a working condition prediction result 408 is output.
As an alternative, acquiring the initial timing prediction model and the plurality of timing samples includes:
s1, acquiring an original input signal of a target time window, wherein the target time window is used for indicating a time period interval from a first time point to a second time point;
S2, sampling processing of different granularities is carried out on the original input signal, a plurality of window data are obtained, and the window data are determined to be the time sequence samples.
Optionally, in this embodiment, sampling processes (sampling processes of different scales) of different granularities are performed on the original timing signal X according to a fixed time window T, so as to obtain a multi-scale window signalThe segmented windowed signal serves as an original set of time domain samples.
Alternatively, in the present embodiment, the different sampling granularities may be used, but are not limited to, to indicate that the number of signal data contained in the different window data determined to be obtained in the fixed time window is different. It will be appreciated that window data of different sample granularity is window data of different signal data amounts.
It should be noted that, by sampling signals at different granularities, different features can be observed at different granularities (scales), so as to accomplish different tasks.
In the embodiment of the application, the training quality of the time sequence prediction model is improved by fully utilizing the time domain information and the frequency domain information to carry out model training supervision, wherein under the condition of limited original time sequence signals, the method of adopting different sampling scales can realize the differentiation and the comprehensiveness of samples in the process of converting related time domain features to obtain the first frequency domain coding features and the second frequency domain coding features, and further each time window has the differentiation due to different sampling scales, the obtained frequency domain information reflected between the frequency domain feature samples also has the differentiation, and the global/comprehensive feature information of a fixed time window can be covered as much as possible, but not the excessively similar information, so that the aim of more comprehensively and fully utilizing the relation of the frequency domain distribution is fulfilled under the condition of limited time sequence data samples, thereby further improving the prediction accuracy of the time sequence prediction model on the whole and realizing the technical effect of improving the accuracy of the time sequence prediction.
As an alternative, after inputting the plurality of time-series samples into the time-domain encoder of the initial time-series prediction model, the method further comprises:
s1, performing feature stitching on a plurality of time domain coding features to obtain target time domain features;
s2, inputting the target time domain features into a target regressive device of an initial time sequence prediction model to obtain a target prediction result, wherein the target regressive device is used for carrying out regression analysis on the time domain features obtained by feature stitching;
s3, converting the target time domain feature into a first target frequency domain feature and converting the target prediction result into a second target frequency domain feature, wherein the first target frequency domain feature is used for representing probability density of each frequency segment of the time sequence sample, and the second target frequency domain feature is used for representing probability density of each frequency segment of the target prediction result;
s4, acquiring a target global loss function of an initial time sequence prediction model by utilizing the target time domain feature, the target prediction result, the first target frequency domain feature and the second target frequency domain feature, wherein the target global loss function is used for measuring training convergence conditions of the time domain feature obtained by feature splicing of the initial time sequence prediction model;
And S5, obtaining a trained target time sequence prediction model under the condition that the target global loss function meets the target training convergence condition.
Optionally, in this embodiment, under the condition that a plurality of time domain coding features corresponding to a plurality of time sequence samples are obtained, feature stitching is performed on the plurality of time domain coding features, so as to obtain a stitched target time domain feature.
It should be noted that, after the splicing of the plurality of time domain coding features, only one target time domain feature is obtained, and a single target prediction result, a first target frequency domain feature and a second target frequency domain feature are obtained correspondingly, so that when the global loss function is calculated subsequently, the first loss function is calculated and determined directly by using the target time domain feature and the target prediction result, the second loss function and the third loss function are calculated and determined directly by using the first target frequency domain feature and the second target frequency domain feature, and the loss result of each frequency segment is not required to be calculated separately and then weighted and summed, thereby improving the determination efficiency of the global loss function.
It should be noted that, the target global loss function of the initial time-sequence prediction model is obtained by using the target time-domain feature, the target prediction result, the first target frequency-domain feature, and the second target frequency-domain feature, and is consistent with the logic shown in the above formulas (1) to (7), which is not described in detail in this embodiment. The difference point is that under the condition of feature stitching, a plurality of time sequence sample data are taken as a whole, and the corresponding time sequence prediction result and the converted frequency domain feature are taken as a whole, so that corresponding loss values in the time domain dimension and the frequency domain dimension are calculated.
As an alternative, after obtaining the trained target timing prediction model, the method further includes:
s1, responding to a time sequence prediction request triggered by a time sequence working condition signal, inputting the time sequence working condition signal into a time domain coder of a target time sequence prediction model to obtain a plurality of working condition coding features, wherein the working condition coding features are used for time sequence characteristics of the time sequence working condition signal;
s2, characteristic stitching is carried out on the plurality of working condition coding characteristics to obtain target working condition characteristics;
s3, inputting the target working condition characteristics into a target regressor of the target time sequence prediction model to obtain a working condition prediction result.
Alternatively, in the present embodiment, the time-series operating condition signal may be, but is not limited to, a series of signals generated during a certain period of time according to the operation state and operation mode of the system. May include input signals, output signals, control signals, etc. of the system.
Optionally, in this embodiment, the input time-series working condition signal may be predicted by, but not limited to, using a target time-series prediction model, to obtain a working condition prediction result, where the working condition prediction result may be, but not limited to, prediction information for indicating a system running state, a working mode, and the like for a period of time in the future, where the target time-series prediction model is a trained time-series prediction model.
As an alternative scheme, the training method of the prediction time sequence model is applied to a time sequence prediction scene adjusted based on multi-scale frequency domain distribution, and the time sequence prediction accuracy is improved by adjusting the frequency domain distribution of the prediction signal based on the consistency of multi-scale frequency domain information and more effectively extracting the frequency domain characteristics of the time sequence signal. Specifically, in the first step, sampling a historical time sequence signal according to a fixed time window to construct an original time domain sample set; performing fast Fourier transform on the original time domain sample set samples to obtain frequency domain distribution of the original time domain sample set samples; thirdly, carrying out multi-scale random sampling on the frequency domain signals to obtain frequency domain signals with different scales; fourthly, the predicted signals are similarly subjected to one to three steps to obtain predicted frequency domain signals with different scales; and fifthly, carrying out distribution constraint on the predicted and original frequency domain signals by using a mixed loss function, and realizing adjustment on the frequency domain distribution of the predicted signals.
Further by way of example, the training block diagram for time series prediction based on multi-scale frequency domain distribution adjustment, as shown in fig. 5, includes the following steps one to seven.
Step one:
different scale sampling is carried out on the original input signal X according to a fixed time window T to obtain a multi-scale window signal The segmented windowed signal serves as an original set of time domain samples.
Step two:
the time domain encoder_time is used for extracting the time domain coding feature Embedddings_time for the original time domain signal, and the encoding feature Embedddings_time is composed of three layers of one-dimensional residual convolution structures.
Step three:
obtaining a time domain prediction result by the Embeddings_time through a regressiveCalculation ofRMSE root mean square error with the original time domain signal to obtain +.>For constraining the time domain prediction result. The specific formula is as follows:
step four:
fourier transform is carried out on the time domain prediction result to obtain probability density of each frequency segment of the prediction signalSimilarly, the original signal is subjected to Fourier transform to obtain probability density of each frequency segment of the original signalThe specific formula is as follows:
step five:
and calculating KL divergence loss and L2 loss between the predicted signal and the original signal probability density of each frequency band, wherein the KL divergence loss is used for restraining the integral difference of the frequency domain probability density distribution of the predicted signal and the original signal, the L2 loss is used for the probability density difference of each frequency weight, and the alignment of the frequency domain distribution of the predicted signal and the frequency domain distribution of the predicted target can be realized through the KL divergence loss and the L2 loss restraint. The specific formula is as follows:
step six:
In order to further strengthen the constraint on the single-point frequency probability density, a multi-task learning mode is constructed, a fully connected FC layer is used for realizing regression prediction from the time domain coding feature to the probability density Freq of each frequency segment, and an L1 loss function is used for constraining the single-point probability density. The specific formula is as follows:
step seven:
global loss functionBy->Weighted addition of->Respectively weighting coefficients. The specific formula is as follows:
according to the embodiment of the application, a time sequence prediction method of multi-scale frequency domain distribution is provided, multi-scale frequency domain information alignment and multi-task learning are introduced, and the time sequence signal prediction precision is further improved. And the time domain and the frequency domain supervision learning are fused, so that the time sequence prediction effect under different prediction lengths is effectively improved.
It will be appreciated that in the specific embodiments of the present application, related data such as user information is involved, and when the above embodiments of the present application are applied to specific products or technologies, user permissions or consents need to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
According to another aspect of the embodiment of the present application, there is also provided a training device for a time series prediction model for implementing the training method of the time series prediction model. As shown in fig. 6, the apparatus includes:
a first obtaining unit 602, configured to obtain an initial time-sequence prediction model and a plurality of time-sequence samples, where the plurality of time-sequence samples are an original time-domain sample set obtained by continuously sampling an original time-sequence signal, and the time-sequence prediction model is configured to predict unknown time-sequence data according to known time-sequence data;
a first determining unit 604, configured to input a plurality of time-sequence samples into a time-domain encoder of an initial time-sequence prediction model, to obtain a plurality of time-domain coding features, where the time-domain encoder is configured to perform feature extraction on the time-sequence samples, and the time-domain coding features are configured to characterize time-sequence characteristics of the time-sequence samples;
a second determining unit 606, configured to input the plurality of time-domain coding features into a regressor of the initial time-sequence prediction model, to obtain a plurality of time-domain prediction results, where the regressor is configured to perform regression analysis on the time-domain coding features;
a conversion unit 608, configured to convert the plurality of time-series samples into a plurality of first frequency-domain coding features, and convert the plurality of time-domain prediction results into a plurality of second frequency-domain coding features, where the first frequency-domain coding features are used to characterize probability densities of each frequency segment of the time-series samples, and the second frequency-domain coding features are used to characterize probability densities of each frequency segment of the time-domain prediction results;
A second obtaining unit 610, configured to obtain a global loss function of the initial timing prediction model by using the plurality of time domain coding features, the plurality of time domain prediction results, the plurality of first frequency domain coding features, and the plurality of second frequency domain coding features, where the global loss function is used to measure a training convergence condition of the initial timing prediction model;
and a third determining unit 612, configured to obtain a trained timing prediction model when the global loss function meets the training convergence condition.
Specific embodiments may refer to examples shown in the training apparatus of the above-mentioned time-series prediction model, and this example will not be described herein.
As an alternative, the second obtaining unit 610 includes:
a first obtaining module, configured to obtain a first loss function based on the plurality of time-domain coding features and the plurality of time-domain prediction results, where the first loss function is used to constrain the time-domain prediction results;
the second acquisition module is used for acquiring a second loss function based on the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, wherein the second loss function is used for restraining probability density of each frequency segment of the time domain prediction result;
and the third acquisition module is used for acquiring the global loss function according to the first loss function and the second loss function.
Specific embodiments may refer to examples shown in the foregoing training method of the time sequence prediction model, and this example is not described herein.
As an alternative, the first obtaining module includes:
and a computing sub-module for computing a root mean square error between each of the plurality of time-domain coding features and each of the plurality of time-domain predictors, and determining the root mean square error as a first loss function.
Specific embodiments may refer to examples shown in the foregoing training method of the time sequence prediction model, and this example is not described herein.
As an alternative, the second obtaining module includes:
the acquisition sub-module is used for acquiring a first loss sub-function based on a plurality of first frequency domain coding features and a plurality of second frequency domain coding features and acquiring a second loss sub-function based on a plurality of first frequency domain coding features and a plurality of second frequency domain coding features, wherein the first loss sub-function is used for restraining probability density distribution differences of a time domain prediction result and the time domain coding features in each frequency segment, and the second loss sub-function is used for restraining probability density differences of the time domain prediction result and the time domain coding features in each frequency segment;
A determination submodule for determining a sum of the first loss function and the second loss function as the second loss function.
Specific embodiments may refer to examples shown in the foregoing training method of the time sequence prediction model, and this example is not described herein.
As an alternative, the obtaining sub-module includes:
a first obtaining subunit, configured to obtain a first frequency domain probability of a first frequency domain coding feature corresponding to an i-th frequency segment in each frequency segment, and a second frequency domain probability of a second frequency domain coding feature corresponding to the i-th frequency segment, where i is a positive integer;
the first determining subunit is configured to, when a multiplication result obtained by multiplying the first frequency domain probability by a weighting parameter is obtained, divide the multiplication result by the second frequency domain probability to obtain a division result, and determine the division result as a probability density difference distribution value of an i-th set of frequency domain coding feature combinations, where the frequency domain coding feature combinations of different sets correspond to a first frequency domain coding feature and a second frequency domain coding feature of different frequency bands, and the weighting parameter is a logarithmic value of the first frequency domain probability based on a preset parameter;
a second determining subunit, configured to determine, when the probability density difference distribution value of each set of frequency domain coding feature combinations is obtained according to the determination manner of the probability density difference distribution value of the ith set of frequency domain coding feature combinations, a sum of the probability density difference distribution values of each set of frequency domain coding feature combinations as a first loss subfunction;
An acquisition sub-module comprising:
a second obtaining subunit, configured to obtain a euclidean distance between the first frequency domain probability and the second frequency domain probability, and determine the euclidean distance as a probability density difference value of the ith set of frequency domain coding feature combinations, where the euclidean distance is used to indicate a square difference of a sum of squares of differences between the first frequency domain probability and the second frequency domain probability;
and a third determining subunit, configured to determine, as the second loss subfunction, a sum of probability density difference values of the frequency-domain coding feature combinations of each group, in a case where the probability density difference values of the frequency-domain coding feature combinations of each group are obtained according to the determination method of the probability density difference values of the i-th group.
Specific embodiments may refer to examples shown in the foregoing training method of the time sequence prediction model, and this example is not described herein.
As an alternative, the apparatus further includes:
a third obtaining subunit, configured to obtain, before obtaining the global loss function according to the first loss function and the second loss function, a third frequency domain probability of a target frequency domain coding feature point corresponding to a jth frequency segment in each frequency segment, and a second frequency domain probability of a second frequency domain coding feature corresponding to the jth frequency segment, where the first frequency domain coding feature includes the target frequency domain coding feature point, and j is a positive integer;
A fourth determining subunit, configured to determine, before acquiring the global loss function according to the first loss function and the second loss function, an absolute value of a difference value between the third frequency domain probability and the second frequency domain probability as a single-point probability density value of the j-th set of frequency domain coding feature combinations;
a fifth determining subunit, configured to determine, before acquiring the global loss function according to the first loss function and the second loss function, a sum of single-point probability density values of each set of frequency-domain coding feature combinations as a third loss function when the single-point probability density values of each set of frequency-domain coding feature combinations are obtained according to a determining manner of single-point probability density values of the j-th set of frequency-domain coding feature combinations, where the third loss function is used to constrain the single-point probability density of the time-domain prediction result;
a third acquisition module, comprising:
and the weighting sub-module is used for carrying out weighted summation on the first loss function, the second loss function and the third loss function to obtain a global loss function.
Specific embodiments may refer to examples shown in the foregoing training method of the time sequence prediction model, and this example is not described herein.
As an alternative, the second determining unit 606 includes:
The splicing module is used for carrying out characteristic splicing on the plurality of time domain coding characteristics to obtain a target time domain characteristic set;
and the first input module is used for respectively inputting each time domain coding feature in the target time domain feature set into the regressor of the initial time sequence prediction model to obtain a target prediction result, wherein the target prediction result comprises a plurality of time domain prediction results.
As an alternative, the apparatus further includes:
the third determining module is used for responding to the time sequence prediction request triggered by the time sequence working condition signal after the trained target time sequence prediction model is obtained, inputting the time sequence working condition signal into a time domain coder of the target time sequence prediction model to obtain a plurality of working condition coding features, wherein the working condition coding features are used for timing sequence characteristics of the time sequence working condition signal;
the second input module is used for inputting the plurality of working condition coding features into the regressor of the trained time sequence prediction model after the trained target time sequence prediction model is obtained, so as to obtain a plurality of working condition prediction results;
and the fusion module is used for carrying out feature fusion on the plurality of working condition prediction results after the trained target time sequence prediction model is obtained, so as to obtain a fused target working condition prediction result.
As an alternative, the first obtaining unit 602 includes:
a fifth acquisition module, configured to acquire an original input signal of a target time window, where the target time window is used to indicate a time period interval from a first time point to a second time point;
and the sampling module is used for carrying out sampling processing of different granularities on the original input signal to obtain a plurality of window data, and determining the window data as the time sequence samples.
According to yet another aspect of the embodiment of the present application, there is also provided an electronic device for implementing the training method of the time series prediction model, which may be, but is not limited to, the client 102 or the server 112 shown in fig. 1, the embodiment being illustrated by taking the electronic device as the client 102, and further as shown in fig. 7, the electronic device includes a memory 702 and a processor 704, the memory 702 storing a computer program, the processor 704 being configured to execute the steps of any of the method embodiments described above by the computer program.
Alternatively, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of the computer network.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, acquiring an initial time sequence prediction model and a plurality of time sequence samples, wherein the plurality of time sequence samples are original time domain sample sets obtained by continuously sampling original time sequence signals, and the time sequence prediction model is used for predicting unknown time sequence data according to known time sequence data;
s2, inputting a plurality of time sequence samples into a time domain coder of an initial time sequence prediction model to obtain a plurality of time domain coding features, wherein the time domain coder is used for extracting features of the time sequence samples, and the time domain coding features are used for representing time sequence characteristics of the time sequence samples;
s3, inputting the plurality of time domain coding features into a regressor of an initial time sequence prediction model to obtain a plurality of time domain prediction results, wherein the regressor is used for carrying out regression analysis on the time domain coding features;
s4, converting the time sequence samples into a plurality of first frequency domain coding features and converting the time domain prediction results into a plurality of second frequency domain coding features, wherein the first frequency domain coding features are used for representing probability densities of all frequency segments of the time sequence samples, and the second frequency domain coding features are used for representing probability densities of all frequency segments of the time domain prediction results;
S5, acquiring a global loss function of the initial time sequence prediction model by utilizing the plurality of time domain coding features, the plurality of time domain prediction results, the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, wherein the global loss function is used for measuring training convergence conditions of the initial time sequence prediction model;
and S6, obtaining a trained time sequence prediction model under the condition that the global loss function meets the training convergence condition.
Alternatively, it will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 7 is merely illustrative, and that fig. 7 is not intended to limit the configuration of the electronic device described above. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 7, or have a different configuration than shown in FIG. 7.
The memory 702 may be used to store software programs and modules, such as program instructions/modules corresponding to the training method and apparatus of the time sequence prediction model in the embodiment of the present application, and the processor 704 executes the software programs and modules stored in the memory 702, thereby executing various functional applications and data processing, that is, implementing the training method of the time sequence prediction model. The memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory 702 may further include memory remotely located relative to the processor 704, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 702 may be used for storing information such as, but not limited to, a time domain coding feature, a time domain prediction result, a first frequency domain coding feature, a second frequency domain coding feature, and the like. As an example, as shown in fig. 7, the memory 702 may include, but is not limited to, a first acquiring unit 602, a first determining unit 604, a second determining unit 606, a converting unit 608, a second acquiring unit 610, and a third determining unit 612 in the training apparatus including the time-series prediction model. In addition, other module units in the training device of the time sequence prediction model may be further included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 706 is used to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 706 includes a network adapter (Network Interface Controller, NIC) that may be connected to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 706 is a Radio Frequency (RF) module that is configured to communicate wirelessly with the internet.
In addition, the electronic device further includes: a display 708 for displaying information such as the time domain coding feature, the time domain prediction result, the first frequency domain coding feature, the second frequency domain coding feature, etc.; and a connection bus 710 for connecting the respective module parts in the above-described electronic device.
In other embodiments, the user device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the plurality of nodes through a network communication. The nodes may form a peer-to-peer network, and any type of computing device, such as a server, a user device, etc., may become a node in the blockchain system by joining the peer-to-peer network.
According to one aspect of the present application, there is provided a computer program product comprising a computer program/instruction containing program code for executing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via a communication portion, and/or installed from a removable medium. When executed by a central processing unit, performs various functions provided by embodiments of the present application.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
It should be noted that the computer system of the electronic device is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
The computer system includes a central processing unit (Central Processing Unit, CPU) which can execute various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) or a program loaded from a storage section into a random access Memory (Random Access Memory, RAM). In the random access memory, various programs and data required for the system operation are also stored. The CPU, the ROM and the RAM are connected to each other by bus. An Input/Output interface (i.e., I/O interface) is also connected to the bus.
The following components are connected to the input/output interface: an input section including a keyboard, a mouse, etc.; an output section including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and the like, and a speaker, and the like; a storage section including a hard disk or the like; and a communication section including a network interface card such as a local area network card, a modem, and the like. The communication section performs communication processing via a network such as the internet. The drive is also connected to the input/output interface as needed. Removable media such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, and the like are mounted on the drive as needed so that a computer program read therefrom is mounted into the storage section as needed.
In particular, the processes described in the various method flowcharts may be implemented as computer software programs according to embodiments of the application. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via a communication portion, and/or installed from a removable medium. The computer program, when executed by a central processing unit, performs the various functions defined in the system of the application.
According to one aspect of the present application, there is provided a computer-readable storage medium, from which a processor of a computer device reads the computer instructions, the processor executing the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring an initial time sequence prediction model and a plurality of time sequence samples, wherein the plurality of time sequence samples are original time domain sample sets obtained by continuously sampling original time sequence signals, and the time sequence prediction model is used for predicting unknown time sequence data according to known time sequence data;
s2, inputting a plurality of time sequence samples into a time domain coder of an initial time sequence prediction model to obtain a plurality of time domain coding features, wherein the time domain coder is used for extracting features of the time sequence samples, and the time domain coding features are used for representing time sequence characteristics of the time sequence samples;
s3, inputting the plurality of time domain coding features into a regressor of an initial time sequence prediction model to obtain a plurality of time domain prediction results, wherein the regressor is used for carrying out regression analysis on the time domain coding features;
S4, converting the time sequence samples into a plurality of first frequency domain coding features and converting the time domain prediction results into a plurality of second frequency domain coding features, wherein the first frequency domain coding features are used for representing probability densities of all frequency segments of the time sequence samples, and the second frequency domain coding features are used for representing probability densities of all frequency segments of the time domain prediction results;
s5, acquiring a global loss function of the initial time sequence prediction model by utilizing the plurality of time domain coding features, the plurality of time domain prediction results, the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, wherein the global loss function is used for measuring training convergence conditions of the initial time sequence prediction model;
and S6, obtaining a trained time sequence prediction model under the condition that the global loss function meets the training convergence condition.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing electronic equipment related hardware, and the program may be stored in a computer readable storage medium, where the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided in the present application, it should be understood that the disclosed user equipment may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (12)

1. A method of training a time series prediction model, comprising:
acquiring an initial time sequence prediction model and a plurality of time sequence samples, wherein the plurality of time sequence samples are original time domain sample sets obtained by continuously sampling original time sequence signals, and the time sequence prediction model is used for predicting unknown time sequence data according to known time sequence data;
Inputting the plurality of time sequence samples into a time domain coder of the initial time sequence prediction model to obtain a plurality of time domain coding features, wherein the time domain coder is used for extracting the features of the time sequence samples, and the time domain coding features are used for representing the time sequence characteristics of the time sequence samples;
inputting the plurality of time domain coding features into a regressive device of the initial time sequence prediction model to obtain a plurality of time domain prediction results, wherein the regressive device is used for carrying out regression analysis on the time domain coding features;
converting the plurality of time-series samples into a plurality of first frequency-domain coding features, and converting the plurality of time-domain prediction results into a plurality of second frequency-domain coding features, wherein the first frequency-domain coding features are used for representing probability densities of each frequency segment of the time-series samples, and the second frequency-domain coding features are used for representing probability densities of each frequency segment of the time-domain prediction results;
acquiring a global loss function of the initial time sequence prediction model by utilizing the plurality of time domain coding features, the plurality of time domain prediction results, the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, wherein the global loss function is used for measuring training convergence conditions of the initial time sequence prediction model;
And under the condition that the global loss function meets the training convergence condition, obtaining a trained time sequence prediction model.
2. The method of claim 1, wherein said obtaining a global loss function of the initial temporal prediction model using the plurality of temporal coding features, the plurality of temporal predictors, the plurality of first frequency domain coding features, and the plurality of second frequency domain coding features comprises:
obtaining a first loss function based on the plurality of time domain coding features and the plurality of time domain predictors, wherein the first loss function is used for constraining the time domain predictors;
acquiring a second loss function based on the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, wherein the second loss function is used for constraining probability density of each frequency segment of the time domain prediction result;
and acquiring the global loss function according to the first loss function and the second loss function.
3. The method of claim 2, wherein the obtaining a first loss function based on the plurality of time-domain coding features and the plurality of time-domain predictors comprises:
A root mean square error between each of the plurality of time domain coding features and each of the plurality of time domain predictors is calculated and determined as a first loss function.
4. The method of claim 2, wherein the obtaining a second loss function based on the plurality of first frequency-domain coding features and the plurality of second frequency-domain coding features comprises:
acquiring a first loss sub-function based on the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, and acquiring a second loss sub-function based on the plurality of first frequency domain coding features and the plurality of second frequency domain coding features, wherein the first loss sub-function is used for restraining probability density distribution differences of the time domain prediction result and the time domain coding features in each frequency segment, and the second loss sub-function is used for restraining probability density differences of the time domain prediction result and the time domain coding features in each frequency segment;
determining a sum of the first loss function and the second loss function as the second loss function.
5. The method of claim 4, wherein the step of determining the position of the first electrode is performed,
The obtaining a first loss sub-function based on the plurality of first frequency-domain coding features and the plurality of second frequency-domain coding features includes:
acquiring a first frequency domain probability of the first frequency domain coding feature corresponding to an ith frequency segment in each frequency segment and a second frequency domain probability of the second frequency domain coding feature corresponding to the ith frequency segment, wherein i is a positive integer;
under the condition that a multiplication result obtained by multiplying the first frequency domain probability and a weighting parameter is obtained, dividing the multiplication result by the second frequency domain probability to obtain a division result, and determining the division result as a probability density difference distribution value of an ith group of frequency domain coding feature combinations, wherein the frequency domain coding feature combinations of different groups correspond to the first frequency domain coding feature and the second frequency domain coding feature of different frequency segments, and the weighting parameter is a logarithmic value of the first frequency domain probability based on a preset parameter;
under the condition that probability density difference distribution values of all the frequency domain coding feature combinations are obtained according to a determination mode of the probability density difference distribution values of the i-th frequency domain coding feature combination, determining the sum of the probability density difference distribution values of all the frequency domain coding feature combinations as the first loss subfunction;
The obtaining a second loss sub-function based on the plurality of first frequency-domain coding features and the plurality of second frequency-domain coding features includes:
acquiring a Euclidean distance between the first frequency domain probability and the second frequency domain probability, and determining the Euclidean distance as a probability density difference value of the ith group of frequency domain coding feature combinations, wherein the Euclidean distance is used for indicating a square difference of a square sum of differences between the first frequency domain probability and the second frequency domain probability;
and determining the sum of the probability density difference values of the frequency domain coding feature combinations of each group as the second loss subfunction under the condition that the probability density difference value of the frequency domain coding feature combinations of each group is obtained according to the determination mode of the probability density difference value of the frequency domain coding feature combinations of the i group.
6. The method of claim 2, wherein the step of determining the position of the substrate comprises,
before the obtaining the global loss function according to the first loss function and the second loss function, the method comprises:
acquiring a third frequency domain probability of a target frequency domain coding feature point corresponding to a jth frequency segment in each frequency segment and a second frequency domain probability of the second frequency domain coding feature corresponding to the jth frequency segment, wherein the first frequency domain coding feature comprises the target frequency domain coding feature point, and j is a positive integer;
Determining an absolute value of a difference between the third frequency domain probability and the second frequency domain probability as a single point probability density value of the j-th set of frequency domain coding feature combinations;
under the condition that single-point probability density values of all the frequency domain coding feature combinations are obtained according to the determining mode of the single-point probability density values of the j-th frequency domain coding feature combination, determining the sum of the single-point probability density values of all the frequency domain coding feature combinations as a third loss function, wherein the third loss function is used for restraining the single-point probability density of the time domain prediction result;
the obtaining the global loss function according to the first loss function and the second loss function includes:
and carrying out weighted summation on the first loss function, the second loss function and the third loss function to obtain the global loss function.
7. The method of any one of claims 1 to 6, wherein the inputting the plurality of time-domain coding features into the regressor of the initial temporal prediction model, obtaining a plurality of time-domain prediction results comprises:
performing feature stitching on the plurality of time domain coding features to obtain a target time domain feature set;
And respectively inputting each time domain coding feature in the target time domain feature set into the regressor of the initial time sequence prediction model to obtain a target prediction result, wherein the target prediction result comprises the plurality of time domain prediction results.
8. The method according to any one of claims 1 to 6, wherein after the obtaining of the trained target timing prediction model, the method further comprises:
responding to a time sequence prediction request triggered by a time sequence working condition signal, inputting the time sequence working condition signal into a time domain coder of the target time sequence prediction model to obtain a plurality of working condition coding features, wherein the working condition coding features are used for time sequence characteristics of the time sequence working condition signal;
inputting the plurality of working condition coding features into the regressor of the trained time sequence prediction model to obtain a plurality of working condition prediction results;
and carrying out feature fusion on the plurality of working condition prediction results to obtain a fused target working condition prediction result.
9. The method of any one of claims 1 to 6, wherein the acquiring an initial timing prediction model and a plurality of timing samples comprises:
Acquiring an original input signal of a target time window, wherein the target time window is used for indicating a time period interval from a first time point to a second time point;
and carrying out sampling processing of different granularities on the original input signal to obtain a plurality of window data, and determining the plurality of window data as the plurality of time sequence samples.
10. A training device for a time series prediction model, comprising:
the first acquisition unit is used for acquiring an initial time sequence prediction model and a plurality of time sequence samples, wherein the plurality of time sequence samples are original time domain sample sets obtained by continuously sampling original time sequence signals, and the time sequence prediction model is used for predicting unknown time sequence data according to known time sequence data;
a first determining unit, configured to input the plurality of time-sequence samples into a time-domain encoder of the initial time-sequence prediction model, to obtain a plurality of time-domain coding features, where the time-domain encoder is configured to perform feature extraction on the time-sequence samples, and the time-domain coding features are configured to characterize a time sequence characteristic of the time-sequence samples;
the second determining unit is used for inputting the plurality of time domain coding features into a regressive device of the initial time sequence prediction model to obtain a plurality of time domain prediction results, wherein the regressive device is used for carrying out regression analysis on the time domain coding features;
A conversion unit, configured to convert the plurality of time-series samples into a plurality of first frequency-domain coding features, and convert the plurality of time-domain prediction results into a plurality of second frequency-domain coding features, where the first frequency-domain coding features are used to characterize probability densities of each frequency segment of the time-series samples, and the second frequency-domain coding features are used to characterize probability densities of each frequency segment of the time-domain prediction results;
a second obtaining unit, configured to obtain a global loss function of the initial time-sequence prediction model by using the plurality of time-domain coding features, the plurality of time-domain prediction results, the plurality of first frequency-domain coding features, and the plurality of second frequency-domain coding features, where the global loss function is used to measure a training convergence condition of the initial time-sequence prediction model;
and the third determining unit is used for obtaining a trained time sequence prediction model under the condition that the global loss function meets the training convergence condition.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program, when run by an electronic device, performs the method of any one of claims 1 to 9.
12. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 9 by means of the computer program.
CN202311313706.9A 2023-10-11 2023-10-11 Training method and device of time sequence prediction model, storage medium and electronic equipment Pending CN117056709A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311313706.9A CN117056709A (en) 2023-10-11 2023-10-11 Training method and device of time sequence prediction model, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311313706.9A CN117056709A (en) 2023-10-11 2023-10-11 Training method and device of time sequence prediction model, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117056709A true CN117056709A (en) 2023-11-14

Family

ID=88669621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311313706.9A Pending CN117056709A (en) 2023-10-11 2023-10-11 Training method and device of time sequence prediction model, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117056709A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444382A (en) * 2020-03-30 2020-07-24 腾讯科技(深圳)有限公司 Audio processing method and device, computer equipment and storage medium
CN114024811A (en) * 2021-09-18 2022-02-08 浙江大学 OTFS waveform PAPR suppression method and device based on deep learning
WO2022057637A1 (en) * 2020-09-18 2022-03-24 北京字节跳动网络技术有限公司 Speech translation method and apparatus, and device, and storage medium
US20230032385A1 (en) * 2020-10-12 2023-02-02 Tencent Technology (Shenzhen) Company Limited Speech recognition method and apparatus, device, and storage medium
US20230153608A1 (en) * 2021-11-15 2023-05-18 East China Jiaotong University Method for predicting remaining useful life of railway train bearing based on can-lstm
US20230186053A1 (en) * 2021-12-09 2023-06-15 SparkCognition, Inc. Machine-learning based behavior modeling
CN116433223A (en) * 2023-04-20 2023-07-14 国网山西省电力公司信息通信分公司 Substation equipment fault early warning method and equipment based on double-domain sparse transducer model
CN116451060A (en) * 2023-04-23 2023-07-18 广东电网有限责任公司 New energy output mode extraction method and device
CN116503791A (en) * 2023-06-30 2023-07-28 腾讯科技(深圳)有限公司 Model training method and device, electronic equipment and storage medium
CN116595356A (en) * 2023-07-17 2023-08-15 腾讯科技(深圳)有限公司 Time sequence signal prediction method and device, electronic equipment and storage medium
WO2023165006A1 (en) * 2022-03-03 2023-09-07 北京航空航天大学杭州创新研究院 Predictive maintenance method and apparatus for industrial equipment based on health status index, and electronic device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444382A (en) * 2020-03-30 2020-07-24 腾讯科技(深圳)有限公司 Audio processing method and device, computer equipment and storage medium
WO2022057637A1 (en) * 2020-09-18 2022-03-24 北京字节跳动网络技术有限公司 Speech translation method and apparatus, and device, and storage medium
US20230032385A1 (en) * 2020-10-12 2023-02-02 Tencent Technology (Shenzhen) Company Limited Speech recognition method and apparatus, device, and storage medium
CN114024811A (en) * 2021-09-18 2022-02-08 浙江大学 OTFS waveform PAPR suppression method and device based on deep learning
US20230153608A1 (en) * 2021-11-15 2023-05-18 East China Jiaotong University Method for predicting remaining useful life of railway train bearing based on can-lstm
US20230186053A1 (en) * 2021-12-09 2023-06-15 SparkCognition, Inc. Machine-learning based behavior modeling
WO2023165006A1 (en) * 2022-03-03 2023-09-07 北京航空航天大学杭州创新研究院 Predictive maintenance method and apparatus for industrial equipment based on health status index, and electronic device
CN116433223A (en) * 2023-04-20 2023-07-14 国网山西省电力公司信息通信分公司 Substation equipment fault early warning method and equipment based on double-domain sparse transducer model
CN116451060A (en) * 2023-04-23 2023-07-18 广东电网有限责任公司 New energy output mode extraction method and device
CN116503791A (en) * 2023-06-30 2023-07-28 腾讯科技(深圳)有限公司 Model training method and device, electronic equipment and storage medium
CN116595356A (en) * 2023-07-17 2023-08-15 腾讯科技(深圳)有限公司 Time sequence signal prediction method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JONG HYUK LEE ET AL: "Anomaly detection model using time serise dataset of small manufacturing industry", 《INTERNATIONAL CONFERENCE ON CONTROL, AUTOMATION AND SYSTEMS》, pages 1080 - 1083 *
申彦斌: "基于卷积自编码器的旋转机械故障特征提取方法研究", 南方农机, no. 03, pages 50 - 51 *

Similar Documents

Publication Publication Date Title
US11169911B2 (en) Method and apparatus for performing a fitting calculation on test data and generating data fluctuation values
US20200036611A1 (en) Method and apparatus for warning
CN111898578B (en) Crowd density acquisition method and device and electronic equipment
US20240127795A1 (en) Model training method, speech recognition method, device, medium, and apparatus
CN111526119A (en) Abnormal flow detection method and device, electronic equipment and computer readable medium
CN112200173B (en) Multi-network model training method, image labeling method and face image recognition method
US20210049414A1 (en) Deep graph de-noise by differentiable ranking
CN116362359A (en) User satisfaction prediction method, device, equipment and medium based on AI big data
CN116684330A (en) Traffic prediction method, device, equipment and storage medium based on artificial intelligence
CN113420722B (en) Emergency linkage method and system for airport security management platform
CN116192665B (en) Data processing method, device, computer equipment and storage medium
CN115546736B (en) River channel sand production monitoring processing method and system based on image acquisition
CN116578465A (en) Deep learning model performance detection system and method and prediction model generation method
CN117056709A (en) Training method and device of time sequence prediction model, storage medium and electronic equipment
CN113723712B (en) Wind power prediction method, system, equipment and medium
CN115225543A (en) Flow prediction method and device, electronic equipment and storage medium
CN114866438A (en) Abnormal hidden danger prediction method and system under cloud architecture
CN117056663B (en) Data processing method and device, electronic equipment and storage medium
CN116614431B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN117978612B (en) Network fault detection method, storage medium and electronic equipment
CN114237962B (en) Alarm root cause judging method, model training method, device, equipment and medium
CN114363951B (en) Inter-cell flow collaborative prediction method and device
CN118171098A (en) Abnormal data detection method, device, electronic equipment and storage medium
CN109831469B (en) Network recovery method, device, server and storage medium
CN116861980A (en) Granularity prediction model training method, resource occupation prediction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination