Construction method and device of time sequence model, equipment and medium

By using a shared sequence model construction method, this approach integrates information from multiple objects through a feature embedding layer, a heterogeneous graph embedding layer, and a multi-head attention fusion layer. This solves the problems of low training efficiency, poor consistency, and high resource consumption in time series models, and achieves efficient and accurate time series prediction.

CN120975146APending Publication Date: 2025-11-18PERSAGY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511080084.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-01
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing time series model building methods suffer from low training efficiency, poor modeling consistency, and insufficient model generalization ability, and also consume a lot of training resources.

Method used

A shared sequence model construction method is adopted, which constructs a neural network model by obtaining sequence construction commands. It integrates static attributes, dynamic time series data and graph structure information of multiple objects by using feature embedding layers, heterogeneous graph embedding layers, shared time series embedding layers and multi-head attention fusion layers, thereby reducing the model parameter scale and improving learning efficiency.

Benefits of technology

It achieves efficient construction of time series models, improves training and learning efficiency and modeling consistency, enhances the generalization ability of the model, and reduces training resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120975146A_ABST
    Figure CN120975146A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence model construction method and device, equipment and a medium. The method comprises the following steps: acquiring a sequence construction command, and constructing a neural network model based on the sequence construction command to obtain a shared sequence model; and obtaining a training sample set, and training the shared sequence model by using the training sample set to obtain a time sequence model. Through the technical scheme of the invention, the construction of the time sequence model can be realized, the training resource consumption of the time sequence model is reduced, and the training learning efficiency, modeling consistency and generalization ability of the time sequence model constructed by the construction method of the time sequence model are improved; and the training resource consumption of the time sequence model is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of model construction, in particular to a time series model construction method, device, equipment and medium. BACKGROUND

[0002] In today's big data era, time series data widely exist in many fields, such as financial market prediction, industrial equipment monitoring, weather forecasting, etc. Precise modeling of time series to mine the rules and trends contained therein is crucial for decision-making and development of various industries.

[0003] In the prior art, for time series model construction, a specific encoding module is often used to meet the differentiated feature expression needs of objects. This approach can indeed better depict the unique characteristics of each object to some extent. However, it also brings a series of serious problems. First, this approach results in a very large model parameter size. Each object needs specific parameters to express its features, and as the number of objects increases, the number of parameters grows exponentially, greatly increasing the complexity of the model. Second, training resource consumption is high. The large number of parameters requires a large amount of computing resources and time for training, not only increasing hardware costs, but also making training inefficient. Especially in practical scenarios with a large number of objects and complex structures, the efficiency bottleneck and lack of generalization ability caused by these problems are more prominent. For example, in large-scale financial transaction data modeling, traditional encoding modules greatly extend the model training time, and due to overfitting to individual object features, the generalization ability is poor when facing new data or different scenarios, making it difficult to accurately predict and analyze new time series data.

[0004] In summary, the existing time series model construction method has the problems of poor training learning efficiency, modeling consistency and generalization ability of the constructed time series model, and high training resource consumption of the time series model. SUMMARY

[0005] The present application provides a time series model construction method, device, equipment and medium, which can solve the problems of poor training learning efficiency, modeling consistency and generalization ability of the constructed time series model, and high training resource consumption of the time series model existing in the existing time series model construction method.

[0006] In a first aspect, the present application embodiment provides a time series model construction method, which comprises:

[0007] Obtaining a sequence construction command, and constructing a neural network model based on the sequence construction command to obtain a shared sequence model;

[0008] Obtain a training sample set and use the training sample set to train the shared sequence model to obtain a time series model.

[0009] Secondly, embodiments of the present invention provide an apparatus for constructing a time series model, the apparatus comprising:

[0010] The model building module is used to obtain sequence building commands and build a neural network model based on the sequence building commands to obtain a shared sequence model;

[0011] The model training unit is used to acquire a training sample set and use the training sample set to train the shared sequence model to obtain a time series model.

[0012] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising:

[0013] At least one processor; and

[0014] A memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform a method for constructing a time series model according to any embodiment of the present invention.

[0016] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute a method for constructing a time series model as described in any embodiment of the present invention.

[0017] The technical solution of this invention obtains a sequence construction command, constructs a neural network model based on the sequence construction command to obtain a shared sequence model, then obtains a training sample set, and uses the training sample set to train the shared sequence model to obtain a time series model. This solves the problems of poor training efficiency, modeling consistency, and generalization ability of the time series model constructed by existing time series model construction methods, as well as high training resource consumption. It realizes the construction of time series models, reduces the training resource consumption of time series models, and improves the training efficiency, modeling consistency, and generalization ability of the time series models constructed by the time series model construction method, while reducing the training resource consumption of time series models.

[0018] It is to be understood that the details set forth herein do not limit the scope of the embodiments of the application to the specific embodiments described. Rather, the scope of the embodiments of the application is to be defined by the claims. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0020] Figure 1 is a flow chart of a time series model construction method according to an embodiment of the present application;

[0021] Figure 2 is a flow chart of a time series model construction method according to an embodiment of the present application;

[0022] Figure 3 is a structural schematic diagram of a time series model construction device according to an embodiment of the present application;

[0023] Figure 4 is a structural schematic diagram of an electronic device for implementing a time series model construction method according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the technical personnel in the art better understand the present application scheme, the following will combine the drawings in the embodiments of the present application, and the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0026] Embodiment one

[0027] Figure 1 A flowchart of a method for constructing a time series model is provided for embodiment one of the present application. The present embodiment can be applied to the construction of a time series model. The method can be performed by a time series model construction device, which can be implemented in the form of hardware and / or software. The time series model construction device can be configured in a terminal or server having a time series model construction function.

[0028] As shown in Figure 1 , the method comprises:

[0029] S110, a sequence construction command is obtained, and a neural network model is constructed based on the sequence construction command to obtain a shared sequence model.

[0030] The sequence construction command refers to a set of instructions for guiding the construction of a shared time series embedding layer.

[0031] The neural network model comprises a feature embedding layer, a heterogeneous graph embedding layer, a shared time series embedding layer, a multi-head attention fusion layer and a parameter adjustment layer connected in sequence.

[0032] In the embodiment, the feature embedding layer is designed separately for different types of objects, for processing the static features of the objects, which refer to attributes that do not change over time, such as the model of the equipment, the material, the area of the building, the purpose, etc., and the dynamic features, which are time series data that change over time, such as the real-time temperature and power consumption of the equipment, the real-time passenger flow in the building, etc. The feature embedding layer will convert the static features into fixed-length vectors through a fully connected layer or an embedding mapping layer, model each time step after arranging the dynamic features in chronological order, and different objects can select different structures according to their own characteristics. The heterogeneous graph embedding layer is shared by all objects, for processing the heterogeneous graph structure information containing multiple types of nodes and edges. The heterogeneous graph refers to a graph containing different types of nodes and different types of edges, for example, in a building environment system, the nodes can be different types such as equipment, sensors, and areas, and the edges can be the connection relationship between the equipment and the sensors, the inclusion relationship between the areas and the equipment, etc. This layer will use methods such as graph attention mechanism or heterogeneous graph Transformer to extract multi-relation structure information, such as through GAT to let each node focus on its important neighbor nodes, to build a unified graph context feature, providing a structural background for subsequent time series modeling. The shared time series embedding layer is the core level shared by all objects, which will be configured based on the sequence construction command, such as if the sequence construction command specifies the combination of a multi-layer Transformer encoder and a multi-head attention mechanism, and adopts the strategy of layer normalization first and then residual connection, and adds learnable position encoding, then the layer will be built according to this configuration, realizing the unified modeling of the time series data of all objects, while reducing the model parameters through parameter sharing and improving the learning efficiency. The multi-head attention fusion layer is used to strengthen the fusion of graph structure features and time series features, such as through cross-attention to let the graph features focus on the key time steps in the time series features, or through residual attention to retain important information of the original features when fusing, so as to improve the model's ability to capture the correlation between the two types of features. The parameter adjustment layer, i.e., the output layer, will adjust the parameters and structure according to the specific task target, for example, in device energy consumption prediction, a fully connected layer will be used to output continuous energy consumption values; in device fault classification, a fully connected layer containing a softmax function will be used to output the probabilities of different fault categories, to adapt to different prediction needs. Through such a construction process, the final shared sequence model can effectively integrate the static attributes, dynamic time series data, and graph structure information of multiple objects, solve the problems of large model parameters and insufficient generalization ability in the prior art, and realize efficient and accurate time series prediction.

[0033] It should be noted that the different types of objects in the above steps are various entities or elements that need to be modeled and analyzed in the time series prediction task, which have their own attribute characteristics and behavior data, and may belong to different types. For example, in the building environment prediction scenario, the objects can be various devices in the building, such as air conditioners, lighting systems, elevators, etc.; or different areas in the building, such as offices, conference rooms, corridors, etc. In the device energy consumption analysis scenario, the objects can be different types of production devices, energy supply devices, etc. These different types of objects have different static and dynamic characteristics, such as the static characteristics of an air conditioner may include power, refrigeration capacity, etc., and the dynamic characteristics may be real-time running power, outlet temperature, etc. time-varying data; while the static characteristics of an office may be area, orientation, etc., and the dynamic characteristics may be indoor temperature, number of personnel, etc. time series data.

[0034] Further, the sequence construction command includes at least one time modeling structure and a combination rule of each time modeling structure; wherein the time modeling structure is a neural network with time-dependent modeling capability.

[0035] Specifically, the time modeling structure is a model component with time series data processing capability, the Transformer encoder is a deep network structure based on self-attention mechanism, including multi-head attention module and feedforward neural network, which can effectively capture long-distance time-dependent relationships in sequences; the self-attention mechanism is a mechanism that allows each element in the sequence to pay attention to other elements, such as when processing a sentence, each word will pay attention to other words related to it; the multi-head attention mechanism is to learn different attention patterns through multiple parallel self-attention heads, and then concatenate the results to enhance the ability to capture complex time series features; the gated recurrent unit is a simplified recurrent neural network suitable for processing time series data, such as predicting stock prices, which can effectively capture the trend of price changes over time; the temporal convolution network is a network that uses convolution operations to process time series data, which can expand the receptive field through dilated convolution, suitable for capturing features of different time scales.

[0036] Further, the combination rule is the arrangement of these structures, for example, it can be the stacking of multi-layer Transformer encoders, or the series connection of gated recurrent units and temporal convolution networks, or the combination of multi-head attention mechanism and Transformer encoder, etc. The specific content of the combination rule is not limited in this embodiment, and can be set by relevant personnel according to the actual implementation scenario.

[0037] The shared sequence model is obtained by configuring a shared time sequence embedding layer in the neural network model based on the sequence construction command.

[0038] S120, a training sample set is acquired, and the shared sequence model is trained using the training sample set to obtain a time sequence model.

[0039] The technical scheme of the embodiment of the application acquires a sequence construction command, configures a neural network model based on the sequence construction command to obtain a shared sequence model, then acquires a training sample set, and trains the shared sequence model using the training sample set to obtain a time sequence model, thereby solving the problems of poor training learning efficiency, modeling consistency and generalization ability of the time sequence model obtained by the existing time sequence model construction method, and high training resource consumption of the time sequence model, and realizing the construction of the time sequence model, reducing the training resource consumption of the time sequence model, and improving the training learning efficiency, modeling consistency and generalization ability of the time sequence model obtained by the construction method.

[0040] Embodiment Two

[0041] Figure 2 A flowchart of a time sequence model construction method provided by the second embodiment of the application is provided, and the embodiment is refined based on the above-mentioned embodiment. In this embodiment, the method of training the shared sequence model using the training sample set to obtain a time sequence model is refined.

[0042] As shown in Figure 2 , the method comprises:

[0043] S210, a sequence construction command is acquired, and a neural network model is configured based on the sequence construction command to obtain a shared sequence model.

[0044] S220, a target training sample is acquired in a training sample set, and the target training sample is input into the shared sequence model.

[0045] The target training sample comprises sample data and labeled data.

[0046] The training sample set refers to a collection of historical data of multiple objects at different time points, which is used for learning and parameter optimization of the model. Further, the target training sample is a single or a group of data selected from the training sample set for a specific training step, which includes sample data and labeled data. The sample data is the input information of the model, covering various attributes and time series data of the object. For example, in the building environment prediction scenario, if the object is an air conditioning device, the sample data may include the static and dynamic characteristics of the air conditioning. The labeled data is the target result that the model needs to predict, such as the energy consumption value of the air conditioning in the next 1 hour, whether a fault will occur, etc.

[0047] In S230, the sample data in the training sample is processed by a feature embedding layer in the shared sequence model to obtain sample features matching the sample data.

[0048] Specifically, the feature embedding layer is a module designed separately for different types of objects in the model, which converts the original features in the sample data that are difficult to be directly used for model calculation into a unified, low-dimensional vector form. For static features in the sample data, for dynamic features such as device operating temperature recorded every 10 minutes, the data at each time step is modeled according to the object characteristics by selecting a gated recurrent unit, a convolutional neural network, or a linear network, etc. after arranging in time sequence. The sample features obtained after such processing are a set of vector-form features that can be effectively processed by the subsequent modules of the shared sequence model.

[0049] In S240, the sample features are processed by a heterogeneous graph embedding layer in the shared sequence model to obtain sample structure information.

[0050] The heterogeneous graph embedding layer is a module shared by all objects in the model, which is used to process the graph structure relationship hidden behind the sample features. The heterogeneous graph refers to a graph structure containing multiple types of nodes and multiple types of edges. For example, in a building system, nodes may include different types of objects such as air conditioners, sensors, and rooms, and edges may include "data collection" relationships between air conditioners and sensors, "containment" relationships between rooms and air conditioners, etc.

[0051] Further, the heterogeneous graph embedding layer uses methods such as graph attention mechanism or heterogeneous graph Transformer to analyze the associations between different types of nodes and edges. For example, through the graph attention mechanism, each node pays attention to nodes with closer relationships, thereby extracting multi-relationship structure information. The final sample structure information is a feature set reflecting the mutual influence and dependence of various features in the graph structure.

[0052] S250, processing the sample structure information through a shared time series embedding layer in the shared sequence model to obtain a sample time series.

[0053] The shared time series embedding layer comprises a time modeling structure layer, a pre-normalization and residual connection layer, and a position encoding layer connected in sequence.

[0054] Specifically, processing the sample structure information through the shared time series embedding layer in the shared sequence model to obtain the sample time series comprises: performing a time alignment operation on the sample structure information to obtain time series data; modeling a time dependency relationship of the time series data through the time modeling structure layer of the shared time series embedding layer to obtain a time dependency relationship; performing a normalization process on the time dependency relationship through the pre-normalization and residual connection layer of the shared time series embedding layer to obtain target normalized data; and processing the target normalized data through the position encoding layer of the shared time series embedding layer to obtain the sample time series.

[0055] In this embodiment, the shared time series embedding layer comprises a time modeling structure layer, a pre-normalization and residual connection layer, and a position encoding layer connected in sequence. The time modeling structure layer is the core of time series dependency modeling and can adopt structures such as a Transformer encoder, a multi-head attention mechanism, a gated recurrent unit, and a temporal convolution network. For example, a multi-layer gated recurrent unit can capture long-term time dependencies of data, and a temporal convolution network can capture features of different time scales through dilated convolution. In the pre-normalization and residual connection layer, pre-normalization is performed before each sub-layer calculation to avoid the influence of data distribution differences on model training, and residual connection is used to add the input and output of the sub-layer to alleviate the gradient vanishing problem in deep network training. The combination of the two can improve the stability of the deep network. The position encoding layer is used to add position information to the time series data. Since structures such as the Transformer do not have the ability to perceive the time sequence, the combination of the learnable position encoding vector and the data can enable the model to distinguish features of different time steps. For example, the data at t1 is added with a position vector p1, and the data at t2 is added with p2, so that the model knows the sequence of t1 and t2.

[0056] On the basis of the above steps, the process of processing sample structure information through the shared time series embedding layer to obtain the sample time series is as follows: first, the sample structure information is subjected to time alignment operation to obtain time series data. For example, the sample structure information contains running related structure characteristics of different devices at different time periods. Some device data covers 8 time points in a day, and some covers 12 time points. After alignment, 12 time points are unified. The missing part can be supplemented by interpolation or other methods to ensure that all data remain consistent in the time dimension. Next, the aligned time series data is input into the time modeling structure layer in the shared time series embedding layer, and the time modeling structure layer is used to model the time dependence relationship of the time series data to obtain the time dependence relationship. For example, if a multi-head attention mechanism is used, it calculates the correlation degree of each time step data with other time step data. For example, the running state of a device at t3 time may be closely related to the states at t1 and t2 times. Through modeling, this association can be captured. Then, the time dependence relationship is normalized by the pre-normalization and residual connection layer to obtain the target normalized data. Assuming that the data distribution fluctuates greatly after time modeling, pre-normalization adjusts it to a more stable distribution range, and residual connection retains the original time dependence feature, so that the model can also effectively learn during deep training. Finally, the target normalized data is processed by the position encoding layer to obtain the sample time series. For example, the corresponding position encoding is added to each time step feature of the target normalized data, so that the model can clearly determine the time position corresponding to each feature, thereby finally obtaining a sample time series containing time sequence information and dependence relationship, providing a basis for subsequent fusion and prediction.

[0057] S260, processing the sample time series through a multi-head attention fusion layer in the shared sequence model to obtain a sample fusion result.

[0058] The multi-head attention fusion layer is a module for enhancing the association between graph structure features and time series features. It captures feature dependence relationships in different dimensions through multiple parallel attention heads and integrates the results. The attention head allows the sample time series and the structure features output by the heterogeneous graph embedding layer to pay attention to each other. For example, in device energy consumption prediction, the time series running data of a device pays attention to the structural relationship of the sensors connected to it. The residual attention preserves part of the original features during fusion to avoid loss of useful information. Through these mechanisms, this layer can deeply integrate the time series dynamic changes and the structural association between objects to obtain a sample fusion result containing multi-dimensional dependence relationships.

[0059] S270, adjusting the parameters of the shared sequence model according to the sample fusion result and the labeled data in the target training sample through the parameter adjustment layer in the shared sequence model.

[0060] Specifically, the parameter adjustment layer can first generate a predicted value based on the sample fusion result, then calculate the difference between the predicted value and the labeled data through a loss function, and then feed back the error to each layer of the model through a back propagation algorithm, adjust the full connection weight of the feature embedding layer, the attention parameter of the shared time sequence embedding layer, etc., so that the prediction of the shared sequence model gradually approaches the true value.

[0061] S280, return to execute the operation of obtaining the target training sample in the training sample set until the end training condition is met, and determine the trained shared sequence model as the time sequence model.

[0062] The end training condition can be that the number of iterations reaches a preset value or the loss function value stabilizes at a low level. Each iteration selects a new target training sample from the training sample set to repeat the training, and continuously optimizes the model parameters until the model performance no longer improves significantly. At this time, the trained shared sequence model becomes a time sequence model that can handle multi-object time sequence prediction tasks, and can be used in actual scenarios such as building energy consumption prediction, equipment fault warning, etc.

[0063] The technical scheme of the embodiment of the application obtains a sequence construction command, constructs a neural network model based on the sequence construction command to obtain a shared sequence model, then obtains a target training sample in a training sample set and inputs the target training sample into the shared sequence model, the target training sample includes sample data and labeled data, then performs feature embedding processing on the sample data in the training sample through a feature embedding layer in the shared sequence model to obtain sample features matched with the sample data, processes the sample features through a heterogeneous graph embedding layer in the shared sequence model to obtain sample structure information, processes the sample structure information through a shared time sequence embedding layer in the shared sequence model to obtain a sample time sequence, processes the sample time sequence through a multi-head attention fusion layer in the shared sequence model to obtain a sample fusion result, then adjusts parameters of the shared sequence model according to the sample fusion result and the labeled data in the target training sample through a parameter adjustment layer in the shared sequence model, finally returns to execute the operation of obtaining the target training sample in the training sample set until the end training condition is met, and determines the trained shared sequence model as the time sequence model, thereby realizing construction of the time sequence model, reducing training resource consumption of the time sequence model, and improving training learning efficiency, modeling consistency and generalization ability of the time sequence model constructed by the construction method of the time sequence model.

[0064] Embodiment three

[0065] Figure 3A structural schematic diagram of a time series model construction device provided for embodiment three of the application is shown in FIG. 3. Figure 3 As shown in the figure, the device comprises:

[0066] A model construction module 310 is configured to acquire a sequence construction command and construct a neural network model based on the sequence construction command to obtain a shared sequence model.

[0067] A model training unit 320 is configured to acquire a training sample set and train the shared sequence model using the training sample set to obtain a time series model.

[0068] The technical solution of the embodiment of the application acquires a sequence construction command, constructs a neural network model based on the sequence construction command to obtain a shared sequence model, then acquires a training sample set and trains the shared sequence model using the training sample set to obtain a time series model, thereby solving the problems of poor training learning efficiency, modeling consistency and generalization ability of the time series model constructed by the existing time series model construction method, and high training resource consumption of the time series model, achieving the construction of the time series model, reducing the training resource consumption of the time series model, and improving the training learning efficiency, modeling consistency and generalization ability of the time series model constructed by the time series model construction method, and reducing the training resource consumption of the time series model.

[0069] On the basis of the above embodiment, the model construction module 310 is specifically configured to:

[0070] Configure the shared time series embedding layer in the neural network model based on the sequence construction command to obtain a shared sequence model.

[0071] On the basis of the above embodiment, the model training unit 320 comprises:

[0072] A target sample determination unit is configured to acquire a target training sample in the training sample set and input the target training sample into the shared sequence model, wherein the target training sample comprises sample data and labeled data.

[0073] A feature embedding unit is configured to perform feature embedding processing on the sample data in the training sample through a feature embedding layer in the shared sequence model to obtain sample features matching the sample data.

[0074] A heterogeneous graph embedding unit is configured to process the sample features through a heterogeneous graph embedding layer in the shared sequence model to obtain sample structure information.

[0075] A shared time sequence unit is configured to process the sample structure information through a shared time sequence embedding layer in the shared sequence model to obtain a sample time sequence.

[0076] An attention fusion unit is configured to process the sample time sequence through a multi-head attention fusion layer in the shared sequence model to obtain a sample fusion result.

[0077] A parameter adjustment unit is configured to adjust parameters of the shared sequence model according to the sample fusion result and the labeled data in the target training sample through a parameter adjustment layer in the shared sequence model.

[0078] A return execution unit is configured to return to execute the operation of obtaining the target training sample in the training sample set until the end training condition is met, and determine the obtained shared sequence model as the time sequence model.

[0079] In the above embodiment, the shared time sequence unit comprises:

[0080] A time alignment unit is configured to perform a time alignment operation on the sample structure information to obtain time sequence data.

[0081] A time modeling unit is configured to model a time-dependent relationship of the time sequence data through a time modeling structure layer of the shared time sequence embedding layer to obtain a time-dependent relationship.

[0082] A normalization unit is configured to normalize the time-dependent relationship through a pre-normalization and residual connection layer of the shared time sequence embedding layer to obtain target normalized data.

[0083] A position encoding unit is configured to process the target normalized data through a position encoding layer of the shared time sequence embedding layer to obtain a sample time sequence.

[0084] The time sequence model construction device provided in the embodiment of the application can execute the time sequence model construction method provided in any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.

[0085] Embodiment four

[0086] Figure 4A structural diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.

[0087] As shown in Figure 4 The electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected in communication with the at least one processor 11, where the memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 12 or loaded into the random access memory (RAM) 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0088] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a speaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0089] The processor 11 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as a method of constructing a time series model.

[0090] Correspondingly, the method includes:

[0091] obtain a sequence construction command, and construct the neural network model based on the sequence construction command to obtain a shared sequence model;

[0092] obtain a training sample set, and train the shared sequence model using the training sample set to obtain a time series model.

[0093] In some embodiments, a method of constructing a time series model can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto electronic device 10 via, for example, ROM 12 and / or communication unit 19. When the computer program is loaded onto RAM 13 and executed by processor 11, one or more steps of a method of constructing a time series model as described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform a method of constructing a time series model by way of other any suitable means, such as by way of firmware.

[0094] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0095] Computer programs used to implement the methods of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed, implements the functions / acts specified in the flowcharts and / or block diagrams.

[0096] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0097] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0098] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0099] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0100] It should be understood that the various forms of flow shown above can be reordered, additional steps added, or steps deleted. For example, the steps described in the present application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which are not limited herein.

Claims

1. A method for constructing a time series model, characterized in that, The method comprises the following steps: acquiring a sequence construction command and constructing a neural network model based on the sequence construction command to obtain a shared sequence model; acquiring a training sample set and training the shared sequence model using the training sample set to obtain a time sequence model.

2. The method of claim 1, wherein, The neural network model comprises, in sequence, a feature embedding layer, a heterogeneous graph embedding layer, a shared time sequence embedding layer, a multi-head attention fusion layer, and a parameter adjustment layer.

3. The method of claim 1, wherein, The sequence construction command comprises at least one time modeling structure and combination rules of each time modeling structure; wherein the time modeling structure is a neural network with time dependency modeling capability.

4. The method according to any one of claims 1 to 3, characterized in that, Based on the sequence construction command, the neural network model is constructed to obtain a shared sequence model, which comprises: Based on the sequence construction command, the shared time sequence embedding layer in the neural network model is configured to obtain a shared sequence model.

5. The method of claim 1, wherein, Using the training sample set to train the shared sequence model to obtain a time sequence model comprises: acquiring a target training sample in the training sample set and inputting the target training sample into the shared sequence model, wherein the target training sample comprises sample data and labeled data; performing feature embedding processing on the sample data in the training sample through the feature embedding layer in the shared sequence model to obtain sample features matched with the sample data; processing the sample features through the heterogeneous graph embedding layer in the shared sequence model to obtain sample structure information; processing the sample structure information through the shared time sequence embedding layer in the shared sequence model to obtain a sample time sequence; processing the sample time sequence through the multi-head attention fusion layer in the shared sequence model to obtain a sample fusion result; adjusting the parameters of the shared sequence model according to the sample fusion result and the labeled data in the target training sample through the parameter adjustment layer in the shared sequence model; returning to the operation of acquiring a target training sample in the training sample set until the end of training conditions are met, and determining the trained shared sequence model as a time sequence model.

6. The method of claim 2, wherein, The shared time sequence embedding layer comprises: a time modeling structure layer, a pre-normalization and residual connection layer, and a position encoding layer connected in sequence.

7. The method according to any of claims 5-6, characterized by, Processing the sample structure information through the shared time sequence embedding layer in the shared sequence model to obtain a sample time sequence comprises: performing time alignment on the sample structure information to obtain time sequence data; performing time dependency relationship modeling processing on the time sequence data through the time modeling structure layer of the shared time sequence embedding layer to obtain a time dependency relationship; performing normalization processing on the time dependency relationship through the pre-normalization and residual connection layer of the shared time sequence embedding layer to obtain target normalized data; processing the target normalized data through the position encoding layer of the shared time sequence embedding layer to obtain a sample time sequence.

8. A time series model construction apparatus characterized by comprising: The method comprises the following steps: a model construction module is configured to acquire a sequence construction command and construct a neural network model based on the sequence construction command to obtain a shared sequence model; The model training unit is configured to obtain a training sample set, and train the shared sequence model using the training sample set to obtain a time sequence model.

9. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the method for constructing a time sequence model according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to perform the method for constructing a time sequence model according to any one of claims 1-7 when executed.