Behavior prediction method and device, computer device and storage medium

CN111160600BActive Publication Date: 2026-10-23JINGDONG TECH HLDG CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201911147778.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-21
Publication Date
2026-10-23
Estimated Expiration
2039-11-21

AI Technical Summary

Technical Problem

[0006]在实现本发明过程中,发明人发现现有技术主要存在的问题包括:1)处理方式仅仅是将时间间隔作为一种特征,从而导致无法体现出时间间隔对其他特征的影响,使得预测结果并不准确;2)会导致数据量的急剧增加,并且增加的数据都是无用数据,过多的无效值会大大降低模型的拟合效率以及训练效果,从而也会降低预测结果的准确性

Benefits of technology

[0024]上述行为预测方法、装置、计算机设备和存储介质,所述方法包括:获取目标行为对应的已有时间序列数据,其中,已有时间序列数据包括至少两个采样时刻采集的特征数据;将各特征数据以及两两相邻采样时刻之间的时间间隔输入至预设时间递归神经网络模型中,其中,预设时间递归神经网络模型根据训练样本预先训练获得;预设时间递归神经网络模型包括预设时间间隔感知模块,预设时间间隔感知模块用于分别将特征数据和时间间隔进行高维映射,将特征数据的高维映射数据和时间间隔的高维映射数据进行融合,得到特征融合数据,将特征融合数据进行降维,得到降维数据,降维数据的维度与特征数据的维度相同;根据预设时间递归神经网络模型的输出确定目标行为对应的预测结果。该预设时间递归神经网络模型中增加了一个预设时间间隔感知模块,通过该预设时间间隔感知模块可以将输入的时间间隔与特征数据进行融合处理,从而从模型层面直接对时间序列数据和对应的时间间隔进行建模,使得预测结果可以考虑到时间间隔对特征数据的影响,并且无需增加无用数据,从而提高了预测准确性和预测效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111160600B_ABST
    Figure CN111160600B_ABST
Patent Text Reader

Abstract

The application relates to a behavior prediction method and device, computer equipment and a storage medium. The method comprises the following steps: obtaining existing time sequence data corresponding to a target behavior; inputting each feature data and a time interval between two adjacent sampling time points into a preset time recurrent neural network model, wherein the preset time recurrent neural network model is obtained by pre-training according to a training sample; the preset time recurrent neural network model comprises a preset time interval sensing module, the preset time interval sensing module is used for respectively performing high-dimensional mapping on the feature data and the time interval, fusing high-dimensional mapping data of the feature data and high-dimensional mapping data of the time interval to obtain feature fusion data, and performing dimension reduction on the feature fusion data to obtain dimension reduction data, wherein the dimension of the dimension reduction data is the same as that of the feature data; and determining a prediction result corresponding to the target behavior according to an output of the preset time recurrent neural network model, thereby improving the accuracy and prediction efficiency of the behavior prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to computer technology, and more particularly to a behavior prediction method, apparatus, computer device, and storage medium. Background Technology

[0002] Time series data refers to a sequence of data arranged according to the chronological order in which the same statistical indicator occurred. A large amount of time series data is typically generated in daily life. Examples include daily stock closing prices; monthly electricity consumption statistics; a bill generated after each mobile payment transaction, showing the order amount and payment time; quarterly revenue reports for listed companies; and browsing history generated after each webpage click.

[0003] Typically, time series models are used to analyze time series data and identify patterns in the development and changes of the research subject, enabling predictions about its future. Currently, existing time series models are mainly divided into two categories: one is traditional time series analysis models based on statistical theory, such as Autoregressive Models (AR), Moving Average Models (MA), Autoregressive Moving Average Models (ARMA), Autoregressive Conditional Heteroskedasticity Models (ARCH), and Generalized Autoregressive Conditional Heteroskedasticity Models (GARCH); the other is sequence models based on machine learning, such as Recurrent Neural Networks (RNN), Long Short-Term Memory Networks (LSTM), and Gated Recurrent Units (GRU).

[0004] When analyzing time series data based on existing time series models to predict user behavior, a fundamental assumption is required: the data collection is regular, meaning the time intervals between data points are equal. However, due to different methods of data observation and recording by observers, this assumption is difficult to satisfy in practical applications. For example, the time series data generated from a company's annual report, compiled once a year, will certainly be at equal time intervals; but for order data generated from each order placement, since the order placement time is random, it will form a series of data with unequal time intervals.

[0005] To address this, existing technologies employ two methods for processing time series data with unequal time intervals. The first method treats the interval between the current and previous moments in the time series data as a feature, incorporating it into the feature space of the current moment. For example, a customer completes one order on January 3rd and another on January 20th. The feature space for these orders is: [Amount (RMB), Payment Method (1 for online payment, 0 for cash on delivery), Delivery Method (0 for land transport, 1 for air transport)]. This means the feature data for these two orders can be represented as [100,1,0] and [78,1,1]. However, considering the time interval, the feature data for these two orders becomes: [100,1,0,0], [78,1,1,17], where 0 indicates no orders were placed before the January 3rd order, and 17 indicates an order placed 17 days before the January 20th order. The second processing method is to fill the data in the middle of the time interval with 0. That is, in the example above, these two feature data will be filled into 18 feature data. The first and last data are [100,1,0] and [78,1,1] respectively, and the 16 feature data in the middle are all [0,0,0].

[0006] In the process of realizing this invention, the inventors found that the main problems of the prior art include: 1) The processing method only treats the time interval as a feature, which makes it impossible to reflect the influence of the time interval on other features, resulting in inaccurate prediction results; 2) It will lead to a sharp increase in the amount of data, and the added data is all useless data. Too many invalid values ​​will greatly reduce the model's fitting efficiency and training effect, thereby also reducing the accuracy of the prediction results. Summary of the Invention

[0007] To address the aforementioned technical problems, this application provides a behavior prediction method, apparatus, computer device, and storage medium.

[0008] In a first aspect, embodiments of this application provide a behavior prediction method, including:

[0009] Obtain existing time series data corresponding to the target behavior, wherein the existing time series data includes feature data collected at least at two sampling times;

[0010] Each feature data and the time interval between any two adjacent sampling times are input into a preset time recurrent neural network model, which is pre-trained based on training samples. The preset time recurrent neural network model includes a preset time interval perception module, which is used to perform high-dimensional mapping on the feature data and the time interval respectively, fuse the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval to obtain feature fusion data, and reduce the dimensionality of the feature fusion data to obtain dimensionality-reduced data, the dimension of the dimensionality-reduced data being the same as the dimension of the feature data.

[0011] The prediction result corresponding to the target behavior is determined based on the output of the preset time recurrent neural network model.

[0012] Secondly, embodiments of this application provide a behavior prediction device, comprising:

[0013] The existing time series data acquisition module is used to acquire the existing time series data corresponding to the target behavior, wherein the existing time series data includes feature data collected at least at two sampling times;

[0014] The data input module is used to input each feature data and the time interval between any two adjacent sampling times into a preset time recurrent neural network model. The preset time recurrent neural network model is obtained by pre-training based on training samples. The preset time recurrent neural network model includes a preset time interval sensing module, which is used to perform high-dimensional mapping on the feature data and the time interval respectively, fuse the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval to obtain feature fusion data, and reduce the dimensionality of the feature fusion data to obtain dimensionality-reduced data. The dimension of the dimensionality-reduced data is the same as the dimension of the feature data.

[0015] The prediction result determination module is used to determine the prediction result corresponding to the target behavior based on the output of the preset time recurrent neural network model.

[0016] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the following steps:

[0017] Obtain existing time series data corresponding to the target behavior, wherein the existing time series data includes feature data collected at least at two sampling times;

[0018] Each feature data and the time interval between any two adjacent sampling times are input into a preset time recurrent neural network model, which is pre-trained based on training samples. The preset time recurrent neural network model includes a preset time interval perception module, which is used to perform high-dimensional mapping on the feature data and the time interval respectively, fuse the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval to obtain feature fusion data, and reduce the dimensionality of the feature fusion data to obtain dimensionality-reduced data, the dimension of the dimensionality-reduced data being the same as the dimension of the feature data.

[0019] The prediction result corresponding to the target behavior is determined based on the output of the preset time recurrent neural network model.

[0020] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0021] Obtain existing time series data corresponding to the target behavior, wherein the existing time series data includes feature data collected at least at two sampling times;

[0022] Each feature data and the time interval between any two adjacent sampling times are input into a preset time recurrent neural network model, which is pre-trained based on training samples. The preset time recurrent neural network model includes a preset time interval perception module, which is used to perform high-dimensional mapping on the feature data and the time interval respectively, fuse the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval to obtain feature fusion data, and reduce the dimensionality of the feature fusion data to obtain dimensionality-reduced data, the dimension of the dimensionality-reduced data being the same as the dimension of the feature data.

[0023] The prediction result corresponding to the target behavior is determined based on the output of the preset time recurrent neural network model.

[0024] The aforementioned behavior prediction method, apparatus, computer equipment, and storage medium, the method comprising: acquiring existing time series data corresponding to the target behavior, wherein the existing time series data includes feature data collected at least at two sampling times; inputting each feature data and the time interval between each pair of adjacent sampling times into a preset time recurrent neural network model, wherein the preset time recurrent neural network model is pre-trained based on training samples; the preset time recurrent neural network model includes a preset time interval sensing module, which is used to perform high-dimensional mapping on the feature data and the time interval respectively, fuse the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval to obtain feature fusion data, and reduce the dimensionality of the feature fusion data to obtain dimensionality-reduced data, wherein the dimensionality of the dimensionality-reduced data is the same as the dimensionality of the feature data; and determining the prediction result corresponding to the target behavior based on the output of the preset time recurrent neural network model. This preset time recurrent neural network model adds a preset time interval sensing module, which can fuse the input time interval with the feature data, thereby directly modeling the time series data and the corresponding time interval at the model level. This allows the prediction result to take into account the influence of the time interval on the feature data, without adding useless data, thus improving prediction accuracy and efficiency. Attached Figure Description

[0025] Figure 1 This is a diagram illustrating the application environment of the behavior prediction method in one embodiment;

[0026] Figure 2 This is a flowchart illustrating a behavior prediction method in one embodiment;

[0027] Figure 3 This is a schematic diagram of the structure of a preset time recurrent neural network model in one embodiment;

[0028] Figure 4 This is a schematic diagram of the structure of a preset neuron in one embodiment;

[0029] Figure 5 A flowchart of a behavior prediction method in another embodiment;

[0030] Figure 6 This is a schematic diagram of the structure of a preset neuron in another embodiment;

[0031] Figure 7 This is a schematic diagram of the behavior prediction device in one embodiment;

[0032] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] Figure 1 This is a diagram illustrating the application environment of the behavior prediction method in one embodiment. (Refer to...) Figure 1 This behavior prediction method is applied to a behavior prediction system. The behavior prediction system includes a terminal 110 and a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal; a mobile terminal can be at least one of a mobile phone, tablet computer, or laptop computer. The server 120 can be a standalone server or a server cluster consisting of multiple servers.

[0035] like Figure 2 As shown, in one embodiment, a behavior prediction method is provided. This embodiment mainly applies this method to the above-mentioned... Figure 1 Let's take terminal 110 (or server 120) as an example. (Refer to...) Figure 2 The behavior prediction method specifically includes the following steps:

[0036] Step S201: Obtain the existing time series data corresponding to the target behavior.

[0037] In this specific embodiment, the existing time series data includes feature data collected at at least two sampling times.

[0038] The target behavior can refer to any event that can occur multiple times over time, such as user borrowing behavior, shopping behavior, page browsing behavior, and order payment behavior on an e-commerce platform. Existing time series data can be a sequence of data generated by the target behavior at each historical moment. This embodiment can collect corresponding existing data as feature data for that sampling moment each time the target behavior occurs, where the sampling moment is the time when the target behavior occurs. The existing time series data can be a sequence of feature data collected at each sampling moment arranged in chronological order. The feature data collected at each sampling moment can include one or more feature parameters to characterize the target behavior data at that sampling moment. These feature parameters can form the feature space for that sampling moment.

[0039] In one embodiment, when the target behavior is a user's shopping behavior, each purchase generates an order, and each order includes, but is not limited to, information such as payment amount, payment method, and delivery method. This embodiment can use these three pieces of information—payment amount, payment method, and delivery method—as feature parameters. That is, the feature data collected at each sampling time is: payment amount, payment method, and delivery method. For example, in the payment method, 1 represents online payment and 0 represents cash on delivery; in the delivery method, 0 represents land transportation and 1 represents air transportation. The feature data collected at a certain sampling time can be represented using a vector as: [100,1,0]. The existing time series data corresponding to the target behavior refers to a sequence composed of the feature data collected at each sampling time arranged in chronological order. For example, the existing time series data could be: [100,1,0], [78,1,1], [150,1,1].

[0040] Step S202: Input each feature data and the time interval between each pair of adjacent sampling times into the preset time recurrent neural network model.

[0041] In this specific embodiment, the preset time recurrent neural network model is pre-trained based on training samples; the preset time recurrent neural network model includes a preset time interval perception module, which is used to perform high-dimensional mapping on feature data and the time interval respectively, fuse the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval to obtain feature fusion data, and reduce the dimensionality of the feature fusion data to obtain dimensionality-reduced data, wherein the dimension of the dimensionality-reduced data is the same as the dimension of the feature data.

[0042] The preset time recurrent neural network model refers to an artificial neural network model that recursively processes input information based on the connection order of network nodes. It utilizes the memory of input information from historical moments and the current input information to jointly determine the output result at the current moment, thus predicting future situations based on historical data. The specific structure of the preset time recurrent network model can be pre-set based on business scenarios and actual needs. The preset time interval perception module is a module obtained by directly modeling time series data and corresponding time intervals at the model level. It is used to fuse time intervals with feature data to analyze the impact of time intervals on feature data.

[0043] Specifically, in this embodiment, the feature data corresponding to each sampling moment and the time interval between any two adjacent sampling moments are independently input into a preset temporal recurrent neural network model. The preset temporal recurrent neural network model can include multiple preset neurons, and each preset neuron corresponds one-to-one with the feature data collected at each sampling moment. Each preset neuron can include a preset time interval sensing module, which uses this preset time interval processing model to perform high-dimensional mapping on the feature data input before the current sampling moment, obtaining high-dimensional mapping data of the feature data; to perform high-dimensional mapping on the time interval between the current sampling moment and the previous sampling moment, obtaining high-dimensional mapping data of the current time interval; to perform fusion processing on the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval, obtaining fused data; to perform dimensionality reduction processing on the fused data, obtaining dimensionality-reduced data; and to obtain the influence of the time interval on the previously input feature data by fusing the time interval data and the feature data, and to integrate the feature data at the current sampling moment based on the fusion result, so that the output of the preset temporal recurrent neural network model can take into account the influence of the time interval on the feature data.

[0044] It is important to note that the training process for the preset time recurrent neural network model is included before using it. In this embodiment, the training samples may include multiple time-series data samples corresponding to the target behavior and the expected output result for each time-series data sample. By inputting each time-series data sample and the time interval between any two adjacent sampling moments into the preset time recurrent neural network model, the actual output result of the preset time recurrent neural network model is obtained. The output error is determined based on the actual output result and the corresponding expected output result. When the output error is greater than the allowable error, it is backpropagated to the preset time recurrent neural network model to adjust the network parameters. This backpropagation mechanism is used to train the preset time recurrent neural network model until the output error is less than or equal to the preset error, indicating that the training of the preset time recurrent neural network model is complete.

[0045] Step S203: Determine the prediction result corresponding to the target behavior based on the output of the preset time recurrent neural network model.

[0046] Specifically, in this embodiment, the output of a preset time recurrent neural network model can be used as the prediction result corresponding to the target behavior. For example, when predicting the probability of loan default for future borrowing behavior, the output value of the preset time recurrent neural network model is the predicted loan default probability corresponding to the borrowing behavior. By utilizing the preset time interval perception module in the preset time recurrent neural network model, the impact of time intervals on feature data can be analyzed, so that the prediction result can also take into account the impact of time intervals, thereby improving the accuracy of the prediction result.

[0047] In the technical solution of this embodiment, the time interval between two adjacent sampling times is not incorporated as a feature into the feature space composed of feature data. Instead, it is input independently to a preset time recurrent neural network model. A preset time interval sensing module is added to the preset time interval sensing module. The preset time interval sensing module can fuse the input time interval with the feature data, thereby directly modeling the time series data and the corresponding time interval at the model level. This allows the prediction results to take into account the impact of the time interval on the feature data without adding useless data, thereby improving the prediction accuracy and prediction efficiency.

[0048] Based on the above technical solutions, Figure 3 A schematic diagram of a pre-defined time recurrent neural network model is given. Figure 4 A schematic diagram of a pre-defined neuron structure is given. For example... Figure 3 As shown, the preset temporal recurrent neural network model 300 includes at least two preset neurons 400, and adjacent preset neurons 400 are connected to perform temporal recursion. Memory information obtained from a previous preset neuron is passed to that preset neuron for processing, thereby enabling the use of historical data to predict future situations. Figure 4 As shown, each preset neuron 400 includes a forgetting module 410, an input module 420, a cellular memory state module 430, a hidden state module 440, an output module 450, and a preset time interval sensing module 460. The same module in preset neurons at different locations has the same function. In this embodiment, taking the current preset neuron as an example, the functions of each module 410-416 in the preset neuron are explained as follows.

[0049] In the current preset neuron, the forgetting module 410 is used to determine the data to be discarded from the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data. The historical time series data includes the feature data corresponding to each historical sampling time before the current sampling time. The historical encoded data is the output of the hidden state module 440 in the previous preset neuron. The input module 420 is used to determine the data to be added and candidate cell memory state data from the feature data corresponding to the current sampling time and the historical encoded data. The preset time interval perception module 460 is specifically used to: perform high-dimensional mapping on the previous memory cell state data and the time interval between the current sampling time and the previous sampling time, respectively; fuse the high-dimensional mapping data of the previous memory cell state data and the high-dimensional mapping data of the time interval between the current sampling time and the previous sampling time to obtain fused data of the previous memory cell state data; reduce the dimensionality of the fused data of the previous memory cell state data to obtain dimensionality-reduced fused data of the previous memory cell state data. The dimensions of the previous memory cell state data are the same, where the previous cell memory state data can refer to the useful feature data filtered from the feature data corresponding to each historical sampling time before the current sampling time; the previous cell memory state data is the output result data of the cell memory state module 430 in the previous preset neuron; the cell memory state module 430 is used to discard the data to be discarded from the fusion data of the dimensionality-reduced previous memory cell state data, and add data according to the data to be added and the candidate cell memory state data to obtain the current cell memory state data, and output the current cell memory state data; the hidden state module 440 is used to determine the data to be output according to the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data, and to determine the current encoded data corresponding to the current time series data according to the data to be output and the current cell memory state data; where the current time series data includes the feature data corresponding to the current sampling time and each historical sampling time; the output module 450 is used to determine the output data corresponding to the target behavior at the current sampling time according to the current encoded data.

[0050] In the current preset neuron, the time interval between the current sampling time and the previous sampling time is used by the preset time interval sensing module 460 to update the memory state data of the previous cell, so that the fused data of the memory state data of the previous cell after the dimension reduction is the data after the time interval, so that the final output data can take into account the influence of the time interval.

[0051] In the preset time recurrent neural network model 300, the number of preset neurons can be equal to the number of feature data. Each preset neuron corresponds one-to-one with a feature data, so that the feature data corresponding to the current sampling time and the time interval between the current sampling time and the previous sampling time are input into the corresponding current preset neuron. For example Figure 4 As shown, the connection between two adjacent preset neurons is as follows: the first input terminal 1 of the preset time interval sensing module 460 in the current preset neuron is connected to the output terminal of the cell memory state module 430 in the previous preset neuron; the input terminals of the forgetting module 410, the input terminal of the input module 420, and the first input terminal 1 of the hidden state module 440 in the current preset neuron are all connected to the output terminal of the hidden state module 440 in the previous preset neuron. It should be noted that the previous cell memory state data and historical encoding data of the first preset neuron in the preset time recurrent neural network model 300 are both empty data, that is, the first input terminal 1 of the preset time interval sensing module 460 in the first preset neuron is set to empty.

[0052] like Figure 4 As shown, the connection method of each module in the current preset neuron is as follows: the first input terminal 1 of the cell memory state module 430 is connected to the output terminal of the preset time interval perception module 460; the second input terminal 2 of the cell memory state module 430 is connected to the output terminal of the forgetting module 410; the third input terminal 3 of the cell memory state module 430 is connected to the output terminal of the input module 420; the output terminal of the cell memory state module 430 is connected to the second input terminal 2 of the hidden state module 440; and the output terminal of the hidden state module 440 is connected to the input terminal of the output module 450.

[0053] Based on the above technical solution, step S202 inputs each feature data and the time interval between two adjacent moments into a preset time recurrent neural network model, including: inputting the time interval between the current sampling moment and the previous sampling moment and the memory state data of the previous cell into the second input terminal 2 of the preset time interval perception module 460 in the current preset neuron; inputting the feature data corresponding to the current sampling moment into the input terminal of the forgetting module 410, the input terminal of the input module 420 and the second input terminal 2 of the hidden state module 440 in the current preset neuron.

[0054] Specifically, when inputting the feature data corresponding to each sampling time and the time interval between any two adjacent sampling times into the preset time recurrent neural network model, the feature data corresponding to each sampling time and the time interval between any two adjacent sampling times are respectively input into the preset neuron corresponding to that feature data. In one embodiment, the first feature data and the time interval in the existing time series data are input into the first preset neuron in the preset time recurrent neural network model, wherein the time interval input into the first preset neuron is zero; the second feature data in the existing time series data and the time interval between the second sampling time and the first sampling time are respectively input into the second preset neuron in the preset time recurrent neural network model; and so on, until the last feature data in the existing time series data and the time interval between the last sampling time and the previous sampling time are respectively input into the last preset neuron in the preset time recurrent neural network model.

[0055] It is important to note that each preset neuron in the preset time recurrent neural network model corresponds to an output module, thereby obtaining the output data corresponding to each sampling time, which in turn yields the prediction result corresponding to each sampling time. This enables dynamic prediction and monitoring of the target behavior. Furthermore, since the output data of the last preset neuron integrates all the previous feature data, the prediction result of the last preset neuron is more accurate and has greater reference value.

[0056] In one embodiment, such as Figure 5 As shown, the behavior prediction method includes the following steps:

[0057] Step S301: Obtain the existing time series data corresponding to the target behavior.

[0058] In this specific embodiment, the existing time series data includes feature data collected at at least two sampling times.

[0059] Specifically, the number of preset neurons in the preset time recurrent neural network model is the same as the number of feature data, meaning there is a one-to-one correspondence between preset neurons and feature data. When inputting each feature data and the time interval between any two adjacent sampling times into the preset time recurrent neural network model, the feature data collected at each sampling time and the time interval between that sampling time and the previous sampling time are input into the corresponding preset neurons in the preset time recurrent neural network model. For the feature data collected at each sampling time in the existing time series data, the following steps S302-S307 are performed.

[0060] Step S302: Input the time interval between the current sampling time and the previous sampling time and the previous cell memory state data into the preset time interval sensing module 460.

[0061] In this specific embodiment, the preset time interval sensing module 460 performs high-dimensional mapping on the previous memory cell state data and the time interval between the current sampling time and the previous sampling time, respectively. The high-dimensional mapping data of the previous memory cell state data and the high-dimensional mapping data of the time interval between the current sampling time and the previous sampling time are fused to obtain the fused data of the previous memory cell state data. The fused data of the previous memory cell state data is then dimensionality reduced, and the dimensionality-reduced fused data of the previous memory cell state data is output. The dimensionality of the fused data of the previous memory cell state data is the same as that of the previous memory cell state data.

[0062] in, Figure 6 A schematic diagram of the structure of a current preset neuron is provided. Each preset neuron in this embodiment has the same structure. The previous cell memory state data is the output data of the cell memory state module 430 in the previous preset neuron of the current preset neuron.

[0063] In one embodiment, the preset time interval sensing module 460 can perform high-dimensional mapping on the previous memory cell state data and the time interval between the current sampling time and the previous sampling time based on the following formula: The high-dimensional mapping data of the previous memory cell state data and the high-dimensional mapping data of the time interval between the current sampling time and the previous sampling time are fused to obtain fused data of the previous memory cell state data; the fused data of the previous memory cell state data is then dimensionality-reduced to obtain dimensionality-reduced fused data of the previous memory cell state data, wherein the dimensionality of the dimensionality-reduced fused data of the previous memory cell state data is the same as that of the previous memory cell state data:

[0064]

[0065] in, The feature vector of the fused data of the previous memory cell state data after dimensionality reduction; tanh is the hyperbolic tangent function; c t-1 is the feature vector corresponding to the previous cell's memory state data; w H For the row vectors obtained through training, the w H Used for c t-1 Perform high-dimensional mapping, B H W R B R and B D The matrix obtained through training; Δt is the time interval between the current sampling time t and the previous sampling time t-1; wL For the row vectors obtained from training, b L ⊙ represents the column vectors obtained from training; ⊙ represents the Hadamard multiplication; W R Used to perform high-dimensional mapping of Δt to make W R With B H Having the same dimension, w L Used to reduce the dimensionality of fused data.

[0066] Specifically, feature vector and eigenvector c t-1 A column vector of the same dimension; w H For the row vectors obtained during training, w H Used for c t-1 Perform a high-dimensional mapping, i.e., column vector c t-1 With row vector w H Multiplication yields matrix c t-1 w H This means increasing the dimensionality of one-dimensional data to obtain a two-dimensional matrix. For matrix c... t-1 w H Add bias matrix B H Performing the tanh operation yields matrix C. t-1 =tanh(c t-1 w H +B H ). Matrix W R Used for high-dimensional mapping of Δt, so that W R With B H Having the same dimension, the sampling matrix increases the dimension of the constant Δt, i.e., W R *Δt, plus the bias matrix B R Then, perform tanh to obtain the exponent, where the exponent is the natural base e, thus obtaining the matrix. matrix Use C as a conversion factor. t-1 =tanh(c t-1 w H +B H ) and prepared conversion factors Multiply and add the bias matrix B. D Then perform the tanh operation to obtain The conversion factor is used to convert C in high-dimensional space. t-1 =tanh(c t-1 w H +B H Each element of the matrix is ​​discounted. With row vector w L Multiplying them gives a column vector, and adding b to this column vector gives a column vector. L And perform the tanh operation to obtain Because different datasets overlap in low-dimensional space, the data is first mapped to a high-dimensional space before being processed. This ensures that data that overlaps in low-dimensional space becomes disjoint in high-dimensional space, thus achieving data splitting. H W R B R and B D Let B be the matrix obtained through training. H B R and B D b is the bias matrix, used to add nonlinear characteristics; L The bias vector obtained during training is used to add non-linear features, which enriches the feature set. Reducing the dimensionality of the data after dimensionality increase back to its original dimensionality ensures dimensionality consistency and facilitates computation.

[0067] In this embodiment, the expression is as follows: W is the discount function. R It is obtained based on pre-trained training samples and can specifically reflect the impact of time intervals on future behavior. In one embodiment, when W R When it is positive, the discount function It is a monotonically increasing function with respect to Δt, meaning that the longer the time interval, the more... The larger the value of W, for example, when predicting the probability of loan default, the more the impact of each previous default amount on the future increases cumulatively. R When the value is negative, the discount function It is a monotonically decreasing function of Δt, meaning that the longer the time interval, the more... The smaller the value, for example, when predicting spending power, the more the impact of each past expenditure on the future is a cumulative decreasing process. That is, the longer the time interval, the less the past spending power can represent the present spending power.

[0068] Step S303: Input the feature data corresponding to the current sampling time into the forgetting module 410.

[0069] In this specific embodiment, the forgetting module 410 determines and outputs the data to be discarded from the feature data and historical encoded data corresponding to the current sampling time.

[0070] The historical encoded data is the output of the hidden state module 440 in the previous preset neuron. Specifically, the internal structure of the forgetting module in this embodiment may include a sigmoid forgetting gate to selectively filter the feature data and historical encoded data corresponding to the current sampling time to determine the data to be discarded.

[0071] In one embodiment, the forgetting module 410 can determine the data to be discarded from the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data based on the following formula:

[0072] f t =σ(W f x t +U f h t-1 +b f )

[0073] Among them, f t x is the data vector corresponding to the data to be discarded; t h is the feature vector corresponding to the feature data at the current sampling time t. t-1 Historical encoded data corresponding to historical time series data; W f and U f Both are forgetting weight matrices obtained through pre-training based on training samples; b f It is the forgetting bias vector obtained by pre-training based on the training samples; σ is the Sigmoid growth curve function.

[0074] Specifically, in this embodiment, the forgetting module 410 first performs a linear transformation on the feature data and historical encoded data corresponding to the current sampling time, and then performs Sigmoid activation, thereby determining the data f to be discarded in the feature data and historical encoded data corresponding to the current sampling time. t At this time, the output f t The value is a number between 0 and 1, where "1" means "keep completely" and "0" means "discard completely".

[0075] Step S304: Input the feature data corresponding to the current sampling time into the input module 420.

[0076] In this specific embodiment, the input module 420 determines and outputs the data to be added and the candidate cell memory state data from the feature data and historical encoded data corresponding to the current sampling time.

[0077] Specifically, the internal structure of the input module 420 in this embodiment may include an input gate sigmoid and a tanh layer. The input gate sigmoid can selectively update the feature data and historical encoded data corresponding to the current sampling time to determine the data to be added. The tanh layer can create a new candidate cell memory state data so that it can be added to the cell memory state data.

[0078] In one embodiment, the input module 420 can determine the data to be added and the candidate cell memory state data from the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data based on the following formula:

[0079] i t =σ(W i x t +U i h t-1 +b i )

[0080]

[0081] Among them, i t This is the data vector corresponding to the data to be added; x is the feature vector corresponding to the candidate cell memory state data; t h is the eigenvector corresponding to the feature data at the current sampling time t. t-1 Historical encoded data corresponding to historical time series data; W i and U i Both are input weight matrices obtained through pre-training based on training samples; b i It is the input bias vector obtained through pre-training based on training samples; W c and U c Both are memory weight matrices obtained through pre-training based on training samples; b c It is the memory bias vector obtained by pre-training based on training samples; σ is the Sigmoid growth curve function; tanh is the hyperbolic tangent function.

[0082] Specifically, in this embodiment, the input module 420 first performs a linear transformation on the feature data and historical encoded data corresponding to the current sampling time, and then performs Sigmoid activation, thereby determining the data i to be added in the feature data and historical encoded data corresponding to the current sampling time. t At this point, the output i t The input is a data point between 0 and 1, where "1" represents "increase" and "0" represents "no increase". The input module 420 also performs a linear transformation on the feature data and historical encoded data corresponding to the current sampling time, and then performs tanh activation to obtain a candidate cell memory state data.

[0083] In step S305, the cell memory state module 430 discards the data to be discarded from the fused data of the previous cell memory state data after dimensionality reduction, adds data according to the data to be added and the candidate cell memory state data, obtains the current cell memory state data, and outputs the current cell memory state data.

[0084] In one embodiment, the cell memory state module 430 can discard the data to be discarded from the updated previous cell memory state data based on the following formula, and add data according to the data to be added and the candidate cell memory state data to obtain the current cell memory state data:

[0085]

[0086] Among them, c t f is the feature vector corresponding to the current cell memory state data at the current sampling time t; t c is the data vector corresponding to the data to be discarded. t-1 * i is the feature vector corresponding to the updated memory state data of the previous cell; t This is the data vector corresponding to the data to be added; is the feature vector corresponding to the candidate cell memory state data; ⊙ is the Hadamard multiplication.

[0087] Specifically, in the cell memory state module 430, the data to be discarded is first multiplied by the updated previous cell memory state data by f. t ⊙c t-1 * Discard the data that is determined to be discarded, and then multiply the data to be added with the candidate cell memory state data. Add the data to be added, and finally add the two calculation results to obtain the current cell memory state data.

[0088] Step S306: Input the feature data corresponding to the current sampling time into the hidden state module 440.

[0089] In this embodiment, the hidden state module 440 determines the data to be output based on the feature data and historical encoded data corresponding to the current sampling time, and determines the current encoded data corresponding to the current time series data based on the data to be output and the current cell memory state data.

[0090] The hidden state module 440 includes an output gate sigmoid, which selectively filters the feature data and historical encoded data corresponding to the current sampling time to determine the data to be output.

[0091] In one embodiment, the hidden state module 440 can determine the data to be output based on the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data according to the following formula, and determine the current encoded data corresponding to the current time series data according to the data to be output and the current cell memory state data:

[0092] o t =σ(Wo x t +U o h t-1 +b o )

[0093] h t =o t ⊙tanh(c t )

[0094] Among them, h t The current encoded data corresponding to the current time series data; o t x is the data vector corresponding to the data to be output; t h is the feature vector corresponding to the feature data at the current sampling time t. t-1 Historical encoded data corresponding to historical time series data; W o and U o Both are hidden state weight matrices obtained through pre-training based on training samples; b o It is the hidden state bias vector obtained by pre-training based on training samples; c t is the feature vector corresponding to the current cell memory state data at the current sampling time t; tanh is the hyperbolic tangent function; ⊙ is the Hadamard multiplication.

[0095] Specifically, in this embodiment, the hidden state module 440 first performs a linear transformation on the feature data and historical encoded data corresponding to the current sampling time, and then performs Sigmoid activation, thereby determining the output data o in the feature data and historical encoded data corresponding to the current sampling time. t The output at this time is o t This is a data value between 0 and 1, where "1" represents "output" and "0" represents "no output". Current cell memory state data c t The tanh operator is used to obtain a value between -1 and 1, which is then multiplied by the output of the sigmoid gate, thus allowing only the useful data h to be output. t The feature data corresponding to the current sampling time and the previous sampling time are both encoded into the current encoded data h. t In the middle, the current encoded data h t It is the data after a time interval has been applied to the feature data.

[0096] Step S307: The output module 450 determines the output data corresponding to the target behavior at the current sampling time based on the current encoded data.

[0097] Specifically, the internal structure of the output module 450 can be pre-configured according to the business scenario and actual situation. In one embodiment, when predicting the probability of loan default in future lending behavior, the output module 450 can perform processing operations such as multiplying the output weights obtained in advance based on the training samples with the current encoded data to output the predicted probability of loan default corresponding to the lending behavior, thereby obtaining the prediction result of the target behavior at the current sampling time based on the output data.

[0098] The technical solution of this embodiment utilizes the discounting function in the preset time interval sensing module 460 to perform function calculation on the time interval input between the current sampling time and the previous sampling time, and performs Hadamard multiplication operation on the calculation result and the previous cell memory state data. The result obtained is the updated previous cell memory state data, which can more accurately take into account the impact of time interval on feature data and further improve the accuracy of prediction results.

[0099] Based on the above technical solution, in matrix W R The value can be positive or negative. In this embodiment, matrix W... R

[0100] These are parameters learned and determined based on training sample data, indicating that W... R Whether this parameter takes a positive or negative value is determined by the data itself, thus W r The positive or negative value of the time interval can indicate whether the effect of the time interval on a certain statistic in the feature data is a cumulative increasing effect or a cumulative decreasing effect. In this embodiment, matrix W... R Output, thus based on W r The positive or negative value can directly show whether the time interval has a cumulative or decreasing effect on the feature data, so that users can obtain the results of the impact of the time interval on the feature data more clearly and intuitively.

[0101] In one embodiment, such as Figure 7 As shown, a behavior prediction device 200 is provided, comprising:

[0102] The existing time series data acquisition module 201 is used to acquire the existing time series data corresponding to the target behavior, wherein the existing time series data includes feature data collected at least at two sampling times.

[0103] The data input module 202 is used to input each feature data and the time interval between any two adjacent sampling times into a preset time recurrent neural network model. The preset time recurrent neural network model is obtained by pre-training based on training samples. The preset time recurrent neural network model includes a preset time interval sensing module, which is used to perform high-dimensional mapping on the feature data and the time interval respectively, fuse the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval to obtain feature fusion data, and reduce the dimensionality of the feature fusion data to obtain dimensionality-reduced data. The dimension of the dimensionality-reduced data is the same as the dimension of the feature data.

[0104] The prediction result determination module 203 is used to determine the prediction result corresponding to the target behavior based on the output of the preset time recurrent neural network model.

[0105] In one embodiment, the preset time recurrent neural network model includes at least two preset neurons, each preset neuron including a forgetting module, an input module, a cellular memory state module, a hidden state module, an output module, and a preset time interval sensing module; wherein...

[0106] The forgetting module is used to determine the data to be discarded from the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data. The historical time series data includes the feature data corresponding to each historical sampling time before the current sampling time; the historical encoded data is the output of the hidden state module in the previous preset neuron.

[0107] The input module is used to determine the data to be added and the candidate cell memory state data from the feature data and historical encoded data corresponding to the current sampling time;

[0108] The preset time interval sensing module is specifically used to: perform high-dimensional mapping on the previous memory cell state data and the time interval between the current sampling time and the previous sampling time, respectively; fuse the high-dimensional mapping data of the previous memory cell state data and the high-dimensional mapping data of the time interval between the current sampling time and the previous sampling time to obtain the fused data of the previous memory cell state data; reduce the dimensionality of the fused data of the previous memory cell state data to obtain the dimensionality-reduced fused data of the previous memory cell state data, and the dimensionality-reduced fused data of the previous memory cell state data has the same dimension as the previous memory cell state data;

[0109] The cell memory state module is used to discard the data to be discarded from the fused data of the previous memory cell state data after dimensionality reduction, and add data according to the data to be added and the candidate cell memory state data to obtain the current cell memory state data and output the current cell memory state data.

[0110] The hidden state module is used to determine the data to be output based on the feature data corresponding to the current sampling time and the historical encoded data, and to determine the current encoded data corresponding to the current time series data based on the data to be output and the current cell memory state data; wherein the current time series data includes the feature data corresponding to the current sampling time and each historical sampling time;

[0111] The output module is used to determine the output data corresponding to the target behavior at the current sampling time based on the current encoded data.

[0112] In one embodiment, the number of preset neurons is equal to the number of feature data; wherein, the first input terminal of the preset time interval sensing module in the current preset neuron is connected to the output terminal of the cell memory state module in the previous preset neuron; the input terminal of the forgetting module, the input terminal of the input module, and the first input terminal of the hidden state module in the current preset neuron are all connected to the output terminal of the hidden state module in the previous preset neuron.

[0113] In the current preset neuron, the first input terminal of the cell memory state module is connected to the output terminal of the preset time interval perception module; the second input terminal of the cell memory state module is connected to the output terminal of the forgetting module; the third input terminal of the cell memory state module is connected to the output terminal of the input module; the output terminal of the cell memory state module is connected to the second input terminal of the hidden state module; and the output terminal of the hidden state module is connected to the input terminal of the output module.

[0114] In one embodiment, the data input module 202 is specifically used to: input the time interval between the current sampling time and the previous sampling time to the second input terminal of the preset time interval perception module in the current preset neuron; and input the feature data corresponding to the current sampling time to the input terminal of the forgetting module, the input terminal of the input module, and the second input terminal of the hidden state module in the current preset neuron.

[0115] In one embodiment, the preset time interval sensing module performs high-dimensional mapping on the previous memory cell state data and the time interval between the current sampling time and the previous sampling time based on the following formulas. It then fuses the high-dimensional mapping data of the previous memory cell state data and the high-dimensional mapping data of the time interval between the current sampling time and the previous sampling time to obtain fused data of the previous memory cell state data. Finally, it reduces the dimensionality of the fused data of the previous memory cell state data to obtain the dimensionality-reduced fused data of the previous memory cell state data.

[0116]

[0117]

[0118] in, The feature vector of the fused data of the previous memory cell state data after dimensionality reduction; tanh is the hyperbolic tangent function; c t-1 is the feature vector corresponding to the previous cell's memory state data; w H For the row vectors obtained during training, w H Used for the c t-1 Perform high-dimensional mapping, B H W R B R and B D The matrix obtained through training; Δt is the time interval between the current sampling time t and the previous sampling time t-1; w L For the row vectors obtained from training, b L ⊙ represents the column vectors obtained from training; ⊙ represents the Hadamard multiplication; W R Used to perform high-dimensional mapping of Δt to make W R With B H Having the same dimension, w L Used to reduce the dimensionality of fused data.

[0119] In one embodiment, W in the preset time interval sensing module R It can be a positive or negative value.

[0120] In one implementation, the forgetting module determines the data to be discarded based on the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data, using the following formula:

[0121] f t =σ(W f x t +U f h t-1 +b f )

[0122] Among them, f t x is the data vector corresponding to the data to be discarded; t h is the feature vector corresponding to the feature data at the current sampling time t. t-1 Historical encoded data corresponding to historical time series data; W f and U f Both are forgetting weight matrices obtained through pre-training based on training samples; b f It is the forgetting bias vector obtained by pre-training based on the training samples; σ is the Sigmoid growth curve function.

[0123] In one embodiment, the input module determines the data to be added and the candidate cell memory state data from the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data based on the following formula:

[0124] i t =σ(W i x t +U i h t-1 +b i )

[0125]

[0126] Among them, i t This is the data vector corresponding to the data to be added; x is the feature vector corresponding to the candidate cell memory state data; t h is the eigenvector corresponding to the feature data at the current sampling time t. t-1 Historical encoded data corresponding to historical time series data; W i and U i Both are input weight matrices obtained through pre-training based on training samples; b i It is the input bias vector obtained through pre-training based on training samples; W c and U c Both are memory weight matrices obtained through pre-training based on training samples; b c It is the memory bias vector obtained by pre-training based on training samples; σ is the Sigmoid growth curve function; tanh is the hyperbolic tangent function.

[0127] In one embodiment, the cell memory state module discards the data to be discarded from the fused data of the previous memory cell state data after dimensionality reduction based on the following formula, and adds data according to the data to be added and the candidate cell memory state data to obtain the current cell memory state data:

[0128]

[0129] Among them, c t f is the feature vector corresponding to the current cell memory state data at the current sampling time t; t c is the data vector corresponding to the data to be discarded. t-1 * i is the feature vector corresponding to the fused data of the previous memory cell state data after dimensionality reduction; t This is the data vector corresponding to the data to be added; The feature vector corresponding to the candidate cell memory state data; ⊙ represents the Hadamard multiplication.

[0130] In one embodiment, the hidden state module determines the data to be output based on the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data according to the following formula, and determines the current encoded data corresponding to the current time series data based on the data to be output and the current cell memory state data:

[0131] o t =σ(W o x t +U o h t-1 +b o )

[0132] h t =o t ⊙tanh(c t )

[0133] Among them, h t The current encoded data corresponding to the current time series data; o t x is the data vector corresponding to the data to be output; t h is the feature vector corresponding to the feature data at the current sampling time t. t-1 Historical encoded data corresponding to historical time series data; W o and U o Both are hidden state weight matrices obtained through pre-training based on training samples; b o It is the hidden state bias vector obtained by pre-training based on training samples; c t is the feature vector corresponding to the current cell memory state data at the current sampling time t; tanh is the hyperbolic tangent function; ⊙ is the Hadamard multiplication.

[0134] The behavior prediction device provided in this application embodiment can execute the behavior prediction method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the behavior prediction method.

[0135] Figure 8 An internal structural diagram of a computer device in one embodiment is shown. Specifically, this computer device may be... Figure 1 Terminal 110 (or server 120) in the middle. For example... Figure 8As shown, the computer device comprises a processor, memory, network interface, input device, and display screen connected via a system bus. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and may also store computer programs. When executed by the processor, these programs enable the processor to implement behavior prediction methods. The internal memory may also store computer programs, which, when executed by the processor, enable the processor to perform behavior prediction methods. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0136] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0137] In one embodiment, the behavior prediction device provided in this application can be implemented as a computer program, which can be implemented in the form of, for example, Figure 8 It runs on the computer device shown. The computer device's memory can store the various program modules that make up the behavior prediction device, for example, Figure 7 The diagram shows an existing time series data acquisition module 201, a data input module 202, and a prediction result determination module 203. The computer program comprised of these modules causes the processor to execute the steps in the behavior prediction methods of the various embodiments of this application described in this specification.

[0138] For example, Figure 8 The computer device shown can be used as follows Figure 7The behavior prediction device shown includes an existing time series data acquisition module 201 that acquires existing time series data corresponding to the target behavior. This existing time series data includes feature data collected at least at two sampling times. The computer device can use a data input module 202 to input each feature data and the time interval between any two adjacent sampling times into a preset time recurrent neural network model. This preset time recurrent neural network model is pre-trained based on training samples. The model includes a preset time interval perception module, which performs high-dimensional mapping on the feature data and the time intervals, fuses the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time intervals to obtain fused feature data, and then reduces the dimensionality of the fused feature data to obtain dimensionality-reduced data, where the dimensionality of the dimensionality-reduced data is the same as that of the feature data. The computer device can use a prediction result determination module 203 to determine the prediction result corresponding to the target behavior based on the output of the preset time recurrent neural network model.

[0139] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the behavior prediction method steps provided in any embodiment of this application.

[0140] The process involves acquiring existing time-series data corresponding to the target behavior, including feature data collected at least at two sampling times; inputting each feature data and the time interval between any two adjacent sampling times into a preset time recurrent neural network model, which is pre-trained based on training samples; the preset time recurrent neural network model includes a preset time interval perception module, which performs high-dimensional mapping on the feature data and the time interval respectively, fuses the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval to obtain feature fusion data, and reduces the dimensionality of the feature fusion data to obtain dimensionality-reduced data, the dimension of the dimensionality-reduced data being the same as the dimension of the feature data;

[0141] The prediction result corresponding to the target behavior is determined based on the output of the preset time recurrent neural network model.

[0142] Of course, those skilled in the art will understand that the processor can also implement the technical solutions of the method for determining the amount of retained inventory provided in any embodiment of this application.

[0143] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the behavior prediction method steps provided in any embodiment of this application.

[0144] This fifth embodiment provides a computer-readable storage medium storing a computer program. When executed by a processor, the program implements the behavior prediction method steps provided in any embodiment of this application. The method includes: acquiring existing time series data corresponding to a target behavior, wherein the existing time series data includes feature data collected at least at two sampling times; inputting each feature data and the time interval between any two adjacent sampling times into a preset time recurrent neural network model, wherein the preset time recurrent neural network model is pre-trained based on training samples; the preset time recurrent neural network model includes a preset time interval sensing module, which is used to perform high-dimensional mapping on the feature data and the time interval respectively, fuse the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval to obtain feature fusion data, reduce the dimensionality of the feature fusion data to obtain dimensionality-reduced data, wherein the dimensionality of the dimensionality-reduced data is the same as the dimensionality of the feature data; and determining the prediction result corresponding to the target behavior based on the output of the preset time recurrent neural network model.

[0145] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0146] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0147] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A behavior prediction method, characterized in that, include: Obtain existing time series data corresponding to the target behavior, wherein the existing time series data includes feature data collected at at least two sampling times; Each of the aforementioned feature data and the time interval between any two adjacent sampling times are input into a preset temporal recurrent neural network model, wherein the preset temporal recurrent neural network model is pre-trained based on training samples; the preset temporal recurrent neural network model includes a preset time interval sensing module, which is used to perform high-dimensional mapping on the feature data and the time interval respectively, fuse the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval to obtain feature fusion data, and reduce the dimensionality of the feature fusion data to obtain dimensionality-reduced data, wherein the dimensionality of the dimensionality-reduced data is the same as the dimensionality of the feature data; the preset time interval sensing module performs high-dimensional mapping on the previous memory cell state data and the time interval between the current sampling time and the previous sampling time based on the following formula, fuses the high-dimensional mapping data of the previous memory cell state data and the high-dimensional mapping data of the time interval between the current sampling time and the previous sampling time to obtain fused data of the previous memory cell state data, and reduces the dimensionality of the fused data of the previous memory cell state data to obtain dimensionality-reduced fused data of the previous memory cell state data: ; in, is the feature vector of the fused data of the previous memory cell state data after dimensionality reduction; tanh is the hyperbolic tangent function. This is the feature vector corresponding to the memory state data of the previous cell; For the row vectors obtained through training, the Used for the Perform high-dimensional mapping, , , and The matrix obtained through training; It is the current sampling time. Compared with the previous sampling time The time interval between; These are the row vectors obtained during training. The column vectors obtained during training; For Hadamard's Adamant multiplication; the stated Used to the Perform high-dimensional mapping to make the With the Having the same dimension, the Used to reduce the dimensionality of the fused data; The prediction result corresponding to the target behavior is determined based on the output of the preset time recurrent neural network model.

2. The method according to claim 1, characterized in that, The preset time recurrent neural network model includes at least two preset neurons, each preset neuron including a forgetting module, an input module, a cellular memory state module, a hidden state module, an output module, and the preset time interval sensing module; wherein... The forgetting module is used to determine the data to be discarded from the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data. The historical time series data includes the feature data corresponding to each historical sampling time before the current sampling time. The historical encoded data is the output result of the hidden state module in the previous preset neuron. The input module is used to determine the data to be added and the candidate cell memory state data from the feature data corresponding to the current sampling time and the historical encoded data; The preset time interval sensing module is specifically used for: performing high-dimensional mapping on the previous memory cell state data and the time interval between the current sampling time and the previous sampling time, fusing the high-dimensional mapping data of the previous memory cell state data and the high-dimensional mapping data of the time interval between the current sampling time and the previous sampling time to obtain fused data of the previous memory cell state data, and reducing the dimensionality of the fused data of the previous memory cell state data to obtain dimensionality-reduced fused data of the previous memory cell state data, wherein the dimensionality-reduced fused data of the previous memory cell state data has the same dimension as the previous memory cell state data, and wherein the previous cell memory state data is the output result data of the cell memory state module in the previous preset neuron; The cell memory state module is used to discard the data to be discarded from the fused data of the previous memory cell state data after dimensionality reduction, and add data according to the data to be added and the candidate cell memory state data to obtain the current cell memory state data, and output the current cell memory state data. The hidden state module is used to determine the data to be output based on the feature data corresponding to the current sampling time and the historical encoded data, and to determine the current encoded data corresponding to the current time series data based on the data to be output and the current cell memory state data; wherein the current time series data includes the feature data corresponding to the current sampling time and each historical sampling time; The output module is used to determine the output data corresponding to the target behavior at the current sampling time based on the current encoded data.

3. The method according to claim 2, characterized in that, The number of the preset neurons is equal to the number of the feature data; wherein, The first input terminal of the preset time interval sensing module in the current preset neuron is connected to the output terminal of the cell memory state module in the previous preset neuron; The input terminal of the forgetting module, the input terminal of the input module, and the first input terminal of the hidden state module in the current preset neuron are all connected to the output terminal of the hidden state module in the previous preset neuron. Among the currently preset neurons, The first input terminal of the cell memory state module is connected to the output terminal of the preset time interval sensing module; The second input terminal of the cell memory state module is connected to the output terminal of the forgetting module; The third input terminal of the cell memory state module is connected to the output terminal of the input module; The output terminal of the cell memory state module is connected to the second input terminal of the hidden state module; The output terminal of the hidden state module is connected to the input terminal of the output module.

4. The method according to claim 3, characterized in that, The feature data and the time intervals between any two adjacent time points are input into a preset time recurrent neural network model, including: The time interval between the current sampling time and the previous sampling time and the state data of the previous memory cell are input to the second input terminal of the preset time interval sensing module in the current preset neuron; The feature data corresponding to the current sampling time are all input to the input terminal of the forgetting module, the input terminal of the input module, and the second input terminal of the hidden state module in the current preset neuron.

5. The method according to claim 2, characterized in that, The forgetting module determines the data to be discarded from the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data based on the following formula: ; in, This is the data vector corresponding to the data to be discarded; The current sampling time The corresponding feature vector is the feature data of the corresponding feature. Historical coded data corresponding to historical time series data; and Both are forgetting weight matrices obtained through pre-training based on training samples; It is a forgetting bias vector obtained by pre-training based on training samples; This is the Sigmoid growth curve function.

6. The method according to claim 2, characterized in that, The input module determines the data to be added and the candidate cell memory state data from the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data based on the following formula: ; ; in, This is the data vector corresponding to the data to be added; This is the feature vector corresponding to the candidate cell memory state data; The current sampling time The feature vector corresponding to the corresponding feature data; Historical coded data corresponding to historical time series data; and Both are input weight matrices obtained through pre-training based on training samples; It is an input bias vector obtained by pre-training based on training samples; and All of them are memory weight matrices obtained by pre-training based on training samples; It is a memory bias vector obtained by pre-training based on training samples; This is the Sigmoid growth curve function; It is the hyperbolic tangent function.

7. The method according to claim 2, characterized in that, The cell memory state module discards the data to be discarded from the fused data of the previous cell memory state data after dimensionality reduction based on the following formula, and adds data according to the data to be added and the candidate cell memory state data to obtain the current cell memory state data: ; in, The current sampling time The feature vector corresponding to the current cell memory state data; The data vector corresponding to the data to be discarded; This is the feature vector corresponding to the fused data of the previous memory cell state data after dimensionality reduction; The data vector corresponding to the data to be added; This is the feature vector corresponding to the candidate cell memory state data; This is the Hadamard multiplication method.

8. The method according to claim 2, characterized in that, The hidden state module determines the data to be output based on the feature data corresponding to the current sampling time and the historical encoded data corresponding to the historical time series data according to the following formula, and determines the current encoded data corresponding to the current time series data according to the data to be output and the current cell memory state data: ; ; in, This refers to the current encoded data corresponding to the current time series data. This is the data vector corresponding to the data to be output; The current sampling time The corresponding feature vector is the feature data of the corresponding feature. Historical coded data corresponding to historical time series data; and All of them are hidden state weight matrices obtained by pre-training based on training samples; It is a hidden state bias vector obtained by pre-training based on training samples; The current sampling time The feature vector corresponding to the current cell memory state data; It is the hyperbolic tangent function; This is the Hadamard multiplication method.

9. A behavior prediction device, characterized in that, include: An existing time series data acquisition module is used to acquire existing time series data corresponding to the target behavior, wherein the existing time series data includes feature data collected at least at two sampling times; A data input module is used to input the feature data and the time interval between any two adjacent sampling times into a preset time recurrent neural network model, wherein the preset time recurrent neural network model is pre-trained based on training samples; the preset time recurrent neural network model includes a preset time interval sensing module, which is used to perform high-dimensional mapping on the feature data and the time interval respectively, fuse the high-dimensional mapping data of the feature data and the high-dimensional mapping data of the time interval to obtain feature fusion data, and reduce the dimensionality of the feature fusion data to obtain dimensionality-reduced data, wherein the dimensionality of the dimensionality-reduced data is the same as the dimensionality of the feature data; the preset time interval sensing module performs high-dimensional mapping on the previous memory cell state data and the time interval between the current sampling time and the previous sampling time based on the following formula, fuses the high-dimensional mapping data of the previous memory cell state data and the high-dimensional mapping data of the time interval between the current sampling time and the previous sampling time to obtain fused data of the previous memory cell state data, and reduces the dimensionality of the fused data of the previous memory cell state data to obtain dimensionality-reduced fused data of the previous memory cell state data: ; in, is the feature vector of the fused data of the previous memory cell state data after dimensionality reduction; tanh is the hyperbolic tangent function. This is the feature vector corresponding to the memory state data of the previous cell; For the row vectors obtained through training, the Used for the Perform high-dimensional mapping, , , and The matrix obtained through training; It is the current sampling time. Compared with the previous sampling time The time interval between; These are the row vectors obtained during training. The column vectors obtained during training; For Hadamard's Adamant multiplication; the stated Used to the Perform high-dimensional mapping to make the With the Having the same dimension, the Used to reduce the dimensionality of the fused data; The prediction result determination module is used to determine the prediction result corresponding to the target behavior based on the output of the preset time recurrent neural network model.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Behavior prediction method and device, apparatus and storage medium

    CN110264270A