Behavior prediction method, device, equipment and program product

By dividing and clustering multiple time series, constructing sequence evolution charts and determining the correlation relationship between shopping behaviors, the problem of low mining efficiency of shopping behavior and time correlation rules in the existing technology is solved, and more accurate behavior prediction and Timeliness of marketing activities.

CN119066362APending Publication Date: 2024-12-03LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411195585.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively explore and utilize the rules of correlation between shopping behavior and time, resulting in low efficiency in marketing activities and inventory management, and it is difficult to identify the consumption behavior of risky users.

Method used

By dividing multiple time series into time series fragments of different lengths, clustering and constructing sequence evolution maps, determining the association relationship between the behaviors of the target objects, and conducting behavior prediction.

Benefits of technology

It realizes more timely and effective marketing activities and inventory management, helps identify the consumption behavior of risky users, and improves the accuracy and efficiency of shopping behavior prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066362A_ABST
    Figure CN119066362A_ABST
Patent Text Reader

Abstract

The invention discloses a behavior prediction method and device, equipment and a program product, and the method comprises the steps: dividing a multivariate time sequence used for representing the behavior characteristics of a target object into first candidate time sequence fragment sets with different lengths, and enabling the multivariate time sequence to comprise at least two time sequences with different dimension information; first candidate time sequence fragments in the first candidate time sequence fragment set are clustered, and second candidate time sequence fragments in a second candidate time sequence fragment set are determined based on at least one clustering center; and constructing a sequence evolution diagram by using the second candidate time sequence fragment set so as to determine an association relationship between behaviors of the target object by using the sequence evolution diagram, and performing behavior prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence, and relate to but are not limited to a behavior prediction method, device, equipment and program product. Background Art

[0002] Consumers' shopping behaviors are often correlated, and there are certain rules for the correlation between behaviors and time. Mining the correlation rules between these shopping behaviors and time can not only help launch more timely and effective marketing activities, but also assist in inventory management while identifying the consumption potential of a certain product, and also help locate a consumption behavior of risky users. Summary of the invention

[0003] In view of this, embodiments of the present application provide a behavior prediction method, apparatus, device, and program product.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a prediction method, comprising:

[0006] Dividing a multivariate time series used to characterize the behavior characteristics of a target object into a set of first candidate time series segments of different lengths, wherein the multivariate time series includes at least two time series of different dimensional information;

[0007] Clustering the first candidate time series segments in the first candidate time series segment set, and determining the second candidate time series segments in the second candidate time series segment set based on at least one cluster center;

[0008] A sequence evolution graph is constructed using the second candidate time series segment set, so as to determine the correlation between various behaviors of the target object using the sequence evolution graph and perform behavior prediction.

[0009] In a second aspect, the embodiment of the present application provides a behavior prediction, including:

[0010] A division module, used to divide the multivariate time series used to characterize the behavior characteristics of the target object into a set of first candidate time series segments of different lengths, wherein the multivariate time series includes at least two time series of different dimensional information;

[0011] A clustering module, configured to cluster the first candidate time series segments in the first candidate time series segment set, and determine the second candidate time series segments in the second candidate time series segment set based on at least one cluster center;

[0012] The construction module is used to construct a sequence evolution graph using the second candidate time series segment set, so as to determine the correlation relationship between various behaviors of the target object using the sequence evolution graph and perform behavior prediction.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the above method is implemented when the processor executes the program.

[0014] In a fourth aspect, an embodiment of the present application provides a storage medium storing executable instructions for implementing the above method when executed by a processor.

[0015] In a fifth aspect, a computer program product includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the steps in the above method are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of an implementation flow of a behavior prediction method provided in an embodiment of the present application;

[0017] Figure 2 A schematic diagram of an implementation flow of obtaining a second candidate time series segment provided in an embodiment of the present application;

[0018] Figure 3A A schematic diagram of an implementation process of constructing a sequence evolution graph provided in an embodiment of the present application;

[0019] Figure 3B A time series evolution diagram provided for an embodiment of the present application;

[0020] Figure 4A A schematic diagram of a process for obtaining a time-aware sequence segment provided in an embodiment of the present application;

[0021] Figure 4B A time series evolution diagram provided in an embodiment of the present application;

[0022] Figure 5 A schematic diagram of the structure of a behavior prediction device provided in an embodiment of the present application;

[0023] Figure 6 A hardware entity schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the embodiments of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.

[0025] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0026] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0028] The present application embodiment provides a behavior prediction method, such as Figure 1 As shown, the method includes:

[0029] Step S110, dividing the multivariate time series used to characterize the behavior characteristics of the target object into a set of first candidate time series segments of different lengths, wherein the multivariate time series includes at least two time series of different dimensional information;

[0030] Here, multivariate time series refers to a data series in which there is a correlation between multiple variables observed at different time points.

[0031] The multivariate time series of the target object's behavioral characteristics can represent different characteristics, i.e., dimensions, of a user on the timeline. For example, it can be the behavioral characteristics of different dimensions such as the click frequency, active time, browsing information, and purchase information of a user on the timeline.

[0032] During implementation, a plurality of first candidate time series segments of different time lengths may be randomly extracted from the multivariate time series to form a set of first candidate time series segments.

[0033] Here, the first candidate time series segment is also called a segment. A segment refers to a continuous part or subset of a larger data set (such as a time series). In time series analysis, a segment can refer to a set of data points within a continuous time interval.

[0034] Step S120: clustering the first candidate time series segments in the first candidate time series segment set, and determining the second candidate time series segments in the second candidate time series segment set based on at least one cluster center;

[0035] In the implementation process, the distance between the first candidate time series segments can be calculated, for example, the Euclidean distance or the dynamic time warping (DTW) distance, the first candidate time series segments in the first candidate time series segment set can be clustered, at least one cluster center can be determined, and then the second candidate time series segments in the second candidate time series segment set can be determined based on the information in each cluster, that is, the shapelet candidate set. Among them, Shapelet is a concept in time series, representing a subsequence with significant distinguishing ability, and can reflect the characteristics of different time periods. Here, Shapelet is called a shape subsequence.

[0036] Here, the shape subsequence (the second candidate time series segment) refers to a subsequence with a specific shape and distinguishing ability, while the segment (the first candidate time series segment) refers to any continuous data segment.

[0037] Step S130: construct a sequence evolution graph using the second candidate time series segment set, so as to determine the correlation relationship between the behaviors of the target object using the sequence evolution graph and perform behavior prediction.

[0038] Here, the sequence evolution graph is a graphical structure used to represent and analyze the dynamic evolution patterns of shape subsequences (i.e., subsequences with significant distinguishing power) in time series data. This graphical structure uses shape subsequences as nodes and the transition relationships between shape subsequences as directed edges, with the weights of the edges representing the probability of such transitions. In this way, the shape subsequence evolution graph can intuitively show how shape subsequences change over time and their mutual influence.

[0039] In the implementation process, after extracting the time-aware shape subsequences, an evolution graph can be constructed to represent the transition relationship between them, including calculating the distance between the shape subsequences and constructing a directed weighted graph based on the distance results. The nodes of the graph represent the shape subsequences, the directed edges represent the probability of evolving from one shape subsequence to another, and the weights of the edges reflect the possibility of such evolution.

[0040] Graph embedding algorithms (such as DeepWalk) can be used to learn the representation of the shape subsequence evolution graph, determine the association between the behaviors of the target object, and perform behavior prediction.

[0041] In an embodiment of the present application, the multivariate time series used to characterize the behavioral characteristics of the target object is first divided into a set of first candidate time series segments of different lengths; then the first candidate time series segments in the set of first candidate time series segments are clustered, and the second candidate time series segments in the set of second candidate time series segments are determined based on at least one cluster center; finally, the set of second candidate time series segments is used to construct a sequence evolution graph. In this way, the sequence evolution graph can be used to determine the correlation between the various behaviors of the target object and perform behavioral prediction. Based on the interpretability of the time series and the state transition relationship of the time series, a dynamic evolution graph is constructed, which can combine the time series and the state transition matrix to make a certain explanation of the relationship between shopping behaviors, and can also help the business make the next decision.

[0042] In some embodiments, the above step S110 "dividing the multivariate time series used to characterize the behavior characteristics of the target object into a set of first candidate time series segments of different lengths" can be implemented by the following steps:

[0043] Step 111: randomly intercept the multivariate time series using a sliding window to obtain at least one subsequence of different lengths;

[0044] In the implementation process, a first candidate time series segment set of different lengths can be intercepted from the multivariate time series at a certain sampling interval through a sliding time window. For example, some candidate time series segments can be intercepted from the multidimensional shopping time series data at a certain sampling interval through a sliding time window as the first candidate time series segment set.

[0045] Step 112: Perform dimensionality reduction processing on the at least one subsequence to obtain the first candidate time series segment set.

[0046] Here, dimensionality reduction of sequences refers to the process of converting high-dimensional time series data into low-dimensional data while retaining the main information and features of the original data as much as possible.

[0047] During implementation, a neural network may be used to perform dimensionality reduction processing on at least one subsequence, reducing a multi-dimensional subsequence to a one-dimensional subsequence, and obtaining a first candidate time series segment set.

[0048] In the embodiment of the present application, the multivariate time series is first randomly intercepted using a sliding window to obtain at least one subsequence of different lengths; then the at least one subsequence is subjected to dimensionality reduction processing to obtain a first candidate time series segment set. In this way, it is possible to obtain a subsequence using a sliding window and perform dimensionality reduction processing on the subsequence, which helps to reduce data storage and processing costs, simplify data visualization, reduce model complexity, and improve the efficiency and accuracy of data analysis.

[0049] In some embodiments, the above step S120 "clustering the first candidate time series segments in the first candidate time series segment set, and determining the second candidate time series segments in the second candidate time series segment set based on at least one cluster center" is as follows: Figure 2 As shown, this can be achieved by following the steps below:

[0050] Step S210, determining a first loss function of the target cluster center based on positive samples and negative samples of the target cluster;

[0051] During the implementation process, the positive sample and the negative sample can be determined based on the distance between the sample and the anchor point, and then the first loss function is obtained based on the distance between the anchor point and the positive sample, the distance between the anchor point and the negative sample, and the intra-class distance (that is, the sum of the distance between the positive sample and the positive sample and the distance between the negative sample and the negative sample).

[0052] Step S220: determining a cluster center of the target cluster when at least the target cluster is determined to have converged by using the first loss function;

[0053] During the implementation process, the convergence of the target cluster can be determined based on the convergence of the first loss function; and then the cluster center of the target cluster can be determined.

[0054] Step S230: Determine a second candidate time series segment in the second candidate time series segment set based on the cluster center of the target cluster.

[0055] During the implementation process, the cluster centers of multiple target clusters may be determined; and then the second candidate time series segment in the second candidate time series segment set may be determined based on the correspondence among the multiple clusters.

[0056] In the embodiment of the present application, the first loss function of the target cluster center is first determined based on the positive samples and negative samples of the target cluster cluster; then, when at least the target cluster cluster is determined to converge using the first loss function, the cluster center of the target cluster cluster is determined; finally, the second candidate time series segment in the second candidate time series segment set is determined based on the cluster center of the target cluster cluster. In this way, the cluster center of the target cluster cluster can be determined using the first loss function, and then the second candidate time series segment is determined based on the cluster center.

[0057] In some embodiments, the above step S210 "determining the first loss function of the target cluster center based on the positive samples and negative samples of the target cluster cluster" can be implemented by the following steps:

[0058] Step 211: determining positive samples and negative samples of the target cluster based on the distances between the first candidate time series segments and the distances between each of the first candidate time series segments and the anchor points of the target cluster;

[0059] Here, an anchor point can be randomly selected first; then based on the distance between the first candidate time series segments and the distance between each first candidate time series segment and the anchor point of the target cluster, the first candidate time series segments that are closer to the anchor point are clustered as positive samples, and at the same time, the first candidate time series segments that are farther from the anchor point are determined as negative samples.

[0060] Step 212: Determine a first loss function of the target cluster based on the distance between the positive sample and the anchor point, the distance between the negative sample and the anchor point, and the intra-class distance.

[0061] In the implementation process, the following formula (1) can be used to determine the first loss function L(f(x),f(x) + ),f(x - )):

[0062]

[0063] Among them, L represents the loss function, and the three x in the brackets represent the anchor point x, the positive sample x, and + and negative samples x - , D AP Represents the distance between the anchor point and the positive sample, D AN Represents the distance between the anchor point and the negative sample, D intra Represents the intra-class distance, that is, the sum of the distance between positive samples and positive samples and the distance between negative samples and negative samples.

[0064] In the embodiment of the present application, firstly, based on the distance between the first candidate time series segments and the distance between each first candidate time series segment and the anchor point of the target cluster, the positive samples and negative samples of the target cluster are determined; then, based on the distance between the positive sample and the anchor point, the distance between the negative sample and the anchor point, and the intra-class distance, the first loss function of the target cluster is determined. In this way, the first loss function for convergent clustering can be determined.

[0065] In some embodiments, the above step S130 "using the second candidate time series segment set to construct a sequence evolution graph, so as to use the sequence evolution graph to determine the association relationship between the various behaviors of the target object and perform behavior prediction", such as Figure 3A As shown, this can be achieved by following the steps below:

[0066] Step S310: construct a local extraction factor to determine the distance between the second candidate time series segment in the second candidate time series segment set and the first candidate time series segment in the first candidate time series segment set;

[0067] Here, the importance of data at different times in the shape subsequence is different, and the same shape subsequence has different influences at different times. In order to capture the importance of different elements in the shape subsequence and the global importance of the shape subsequence, a local extraction factor ω and a global extraction factor μ are constructed, and a time-aware shape subsequence is obtained through supervised learning.

[0068] In the implementation process, the distance between the candidate single shape subsequence and the single fragment can be calculated by the local extraction factor ω using the following formula (2):

[0069]

[0070] Among them, s represents the fragment to be classified, v represents the labeled shape subsequence, ω is the local extraction factor, and P on the upper right of the summation symbol represents the fragment length. The local factor ω and the shape subsequence are vectors of equal length, for example, ω = [ω1, ω2, ω3, ω4], shape subsequence = [s1, s2, s3, s4], a* refers to the importance of the nth element in the shape subsequence to the shape subsequence, for example, ω1 refers to the importance of s1 to the entire shape subsequence. The subscript a(k) can be regarded as a whole, a1 is shared by ω and the shape subsequence, and a2 is set separately for the fragment to be classified.

[0071] Step S320: construct a global factor to determine the weights of the second candidate time series segments at different times;

[0072] In the implementation process, the influence of a single shape subsequence between fragments can be calculated by a global factor, as shown in formula (3):

[0073]

[0074] in, represents the Euclidean distance between the fragment and the shape subsequence calculated by formula (2), u represents the global factor, and m represents the number of fragments.

[0075] Step S330: determining a second loss function based on the local extraction factor and the global extraction factor;

[0076] During implementation, the second loss function can be constructed using the following formula (4), where when the gradient descent makes the value of the loss function smaller and smaller, ω and μ can make the difference between the distance of the shape subsequence to the positive sample (positive) and the negative sample (negative) larger and larger, so that the shape subsequence can better represent a class, and the calculated loss value is used as the score of the shape subsequence. The smaller the loss value, the more representative the shape subsequence is, and the top k shape subsequences are selected as the final time-aware shape subsequences.

[0077]

[0078] Among them, S(*) represents the distance set between the segment and the positive and negative samples, g(S pos (v,T),S neg (v,T)) represents the distance between two sets, which can be measured using the relative entropy (KL) divergence, which is used to measure the difference between two probability distributions. The following two terms λ||ω|| and ∈||μ|| are penalty terms.

[0079] Step S340: Determine a target time series segment set through supervised learning using the second loss function, so as to construct a sequence evolution graph using the target time series segment set.

[0080] Here, supervised learning is a training method in machine learning. By letting the machine learn a large amount of labeled sample data, a model is trained so that the model can get the corresponding output according to the input. In supervised learning, feature extraction is an important link, which involves extracting feature information related to the model prediction target from the original data. In this process, the extraction factors can be divided into local extraction factors and global extraction factors according to the scope and method of feature extraction.

[0081] During implementation, the local extraction factor and the global extraction factor can be used to determine the second loss function, and a set of target time series segments can be output through supervised learning.

[0082] In the embodiment of the present application, a local extraction factor is first constructed to determine the distance between the second candidate time series fragment in the second candidate time series fragment set and the first candidate time series fragment in the first candidate time series fragment set; then a global extraction factor is constructed to determine the weights corresponding to the second candidate time series fragment at different times; a second loss function is determined based on the local extraction factor and the global extraction factor; finally, the target time series fragment set is determined through supervised learning using the second loss function, so as to construct a sequence evolution graph using the target time series fragment set. In this way, the target time series fragment set can be obtained through supervised learning using the second loss function determined by the local extraction factor and the global extraction factor, and the sequence evolution graph can be further constructed using the target time series fragment set.

[0083] In some embodiments, the above step S130 "using the second candidate time series segment set to construct a sequence evolution graph, so as to use the sequence evolution graph to determine the association relationship between the various behaviors of the target object and perform behavior prediction" further includes the following steps:

[0084] Step S350, constructing a time series evolution graph using the target time series segment set;

[0085] Figure 3B The time series evolution diagram provided in the embodiment of the present application is as follows: Figure 3B As shown, the sequence evolution graph includes node 85, node 72, node 7, node 67, node 78, node 43 and node 86. Each node can represent a fragment.

[0086] In the implementation process, each target time series segment in the target time series segment set can be used to construct a time series evolution graph. The input target time series is segmented to obtain different segments, and the shape subsequence with the largest probability of association with it is calculated by the following formula (5). Two adjacent segments represent the flow from one state to another different state, that is, from one shape subsequence to another shape subsequence. The edge weight of the transfer is the product of the association probabilities between the two segments and their respective shape subsequences. The probability of repeated paths is summed, so the thicker the path, the greater the probability of occurrence.

[0087]

[0088] Among them, the subscript of s is j, which represents the normalized probability between different shape subsequences i and the same segment j; The meaning of is the same as that of the previous formula (2), representing the Euclidean distance between the shape subsequence and the fragment, max represents the maximum distance, and min represents the minimum distance. The calculated probability range is 0-1, and the probability of association of the shape subsequence with the smallest distance is 1, and that of the shape subsequence with the largest distance is 0.

[0089] The shape subsequence evolution graph constructed by using each target time series segment in the above target time series segment set can be used to describe the transfer relationship between shape subsequences. Through this shape subsequence evolution graph, the original time series sample can be represented as several paths in the graph.

[0090] Step S360, obtaining the time series to be predicted;

[0091] During the implementation process, the events that have occurred to the target object can be obtained as the time series to be predicted. For example, the shopping time that the target object has performed, including browsing time, clicking time and purchasing time, can be obtained to form the time series to be predicted.

[0092] Step S370: Match the time series to be predicted with the time series evolution graph to predict the next behavior corresponding to the time series to be predicted.

[0093] In the implementation process, the user's activity sequence can be matched and identified based on the shape subsequence of classic shopping behavior, and the time series can be converted into a shape subsequence evolution graph for interpretable reasoning through shape subsequences to describe the transition relationship between shape subsequences and make a certain explanation for the state transition relationship between shopping behaviors. The transfer relationship is used to predict the next purchase behavior of the target object.

[0094] In the embodiment of the present application, firstly, a time series evolution graph is constructed using a target time series segment set; then the time series to be predicted is obtained; finally, the time series to be predicted is matched with the time series evolution graph to predict the next behavior corresponding to the time series to be predicted. In this way, the time series evolution graph can be used to predict the next behavior corresponding to the time series to be predicted.

[0095] In some embodiments, the above step S370 "matching the time series to be predicted with the time series evolution graph to predict the next behavior corresponding to the time series to be predicted" can be implemented by the following steps:

[0096] Step 371: segment the time series to be predicted to obtain at least one time series segment to be predicted;

[0097] During the implementation process, since the acquired time series to be predicted may be a relatively long time series, the time series to be predicted may be segmented based on a preset sequence length to obtain multiple time series segments.

[0098] Step 372: Match the at least one time series segment to be predicted with a node in the time series evolution graph, and determine a probability that the at least one time series segment to be predicted is transferred to a target node.

[0099] During implementation, the time series segment to be predicted can be matched with the similarity of the time series segment corresponding to the node in the time series evolution graph to determine the transfer relationship between the time series segments, that is, the probability of the time series segment to be predicted corresponding to the transfer to the target node.

[0100] Step 373: predict the next step behavior corresponding to the time series to be predicted based on the probability of the at least one time series segment to be predicted corresponding to the transfer to the target node.

[0101] During the implementation process, a node with a relatively high probability of being transferred to a target node corresponding to at least one time series segment to be predicted is determined as the next behavior to be executed by the target object.

[0102] In some embodiments, a shape subsequence representation of a time series can be calculated by a graph embedding algorithm (such as DeepWalk), and the calculated representation can be used for downstream tasks to segment a complete time series into multiple segments, and the representation of each segment Φ i The following formula (6) can be used:

[0103] Φ i =(Σ j p i,j ·μ(ν i,j )),1≤i≤m (6);

[0104] Among them, P i,j represents the association probability, μ(v) represents the representation of the associated shape subsequence calculated using the graph embedding method, and the results are summed to obtain Φ i .

[0105] In the embodiment of the present application, the time series to be predicted is first segmented to obtain at least one time series segment to be predicted; then at least one time series segment to be predicted is matched with a node in the time series evolution graph to determine the probability of at least one time series segment to be predicted corresponding to the transfer to the target node; finally, based on the probability of at least one time series segment to be predicted corresponding to the transfer to the target node, the next behavior corresponding to the time series to be predicted is predicted. In this way, the relationship between the time series segment and the node matching in the time series evolution graph can be used to determine the probability of transfer to the target node, so as to determine the node with a larger transfer probability as the next behavior to be executed by the target object.

[0106] Figure 4AA schematic diagram of a process for obtaining a time-aware sequence segment provided in an embodiment of the present application is as follows: Figure 4A As shown, this can be achieved by following the steps below:

[0107] Step 1: Extract some candidate time series segments from the multidimensional shopping time series data at a certain sampling interval by sliding the time window, which can be expressed as X m×n , and then reduce the dimension through a simple neural network to obtain the first candidate time series segment;

[0108] Step 2, by calculating the distance between the first candidate time series segments, for example, the Euclidean distance or the DTW distance, the clustering result of the candidate shape subsequences is obtained based on a triple loss function, and the cluster center is selected to form a shape subsequence candidate set (second candidate time series segment);

[0109] In the implementation process, the following formula (1) can be used to determine the first loss function L(f(x),f(x) + ),f(x - )):

[0110]

[0111] Among them, L represents the loss function, and the three x in the brackets represent the anchor point x, the positive sample x, and + and negative samples x - , D AP Represents the distance between the anchor point and the positive sample, D AN Represents the distance between the anchor point and the negative sample, D intra Represents the intra-class distance, that is, the sum of the distance between positive samples and positive samples and the distance between negative samples and negative samples.

[0112] Step 3: The importance of data at different times in the shape subsequence is different, and the same shape subsequence has different influences at different times. In order to capture the importance of different elements in the shape subsequence and the global importance of the shape subsequence, a local extraction factor ω and a global extraction factor μ are constructed, and a time-aware shape subsequence is obtained through supervised learning.

[0113] In the implementation process, the distance between the candidate single shape subsequence and the single segment t can be calculated by the local extraction factor ω using the following formula (2):

[0114]

[0115] Among them, s represents the segment to be classified, v represents the labeled shape subsequence, ω is the local extraction factor, and P on the upper right of the summation symbol represents the segment length.

[0116] In the implementation process, the influence of a single shape subsequence between fragments can be calculated by a global factor, as shown in formula (3):

[0117]

[0118] in, represents the Euclidean distance between the fragment and the shape subsequence calculated by formula (2), u represents the global factor, and m represents the number of fragments.

[0119] During implementation, the second loss function can be constructed using the following formula (4), where when the gradient descent makes the value of the loss function smaller and smaller, ω and μ can make the difference between the distance of the shape subsequence t to the positive sample (positive) and the negative sample (negative) larger and larger, so that the shape subsequence can better represent a class, and the calculated loss value is used as the score of the shape subsequence. The smaller the loss value, the more representative the shape subsequence is, and the top k shape subsequences are selected as the final time-aware shape subsequences.

[0120]

[0121] Among them, S(*) represents the distance set between the segment and the positive and negative samples, g(S pos (v,T),S neg (v,T)) represents the distance between two sets, which can be measured using KL divergence. The following two terms λ||ω| and ∈||μ|| are penalty terms.

[0122] In the embodiment of the present application, for a multivariate time series, a sliding window is used to randomly intercept some subsequences of different lengths as candidates, and unsupervised training is performed through a mapper and a cluster-based triple loss function, and sequence fragments of cluster centers are selected as candidate shape subsequence sets. A local extraction factor ω and a global extraction factor μ are constructed, and supervised learning is used to obtain shape subsequences with time awareness. In this way, the time series data is converted into independent events through s-shape subsequences, giving the time series discriminable features, and further capturing the dynamic evolution pattern of the time series based on the transfer relationship between events.

[0123] In some embodiments, some steps 4 to 7 may also be performed to predict downstream tasks:

[0124] Step 4: A time series with a large time span contains many segment subsequences. When each segment subsequence corresponds to multiple shape subsequences, for example, the first segment subsequence is very close to the three shape subsequences, and the second segment subsequence is also very close to the three shape subsequences, then there will be 3*3=9 different combinations between the six shape subsequences.

[0125] Figure 4B A time series evolution diagram provided in an embodiment of the present application, such as Figure 4B As shown, the sequence evolution graph includes node 1, node 2, node 3 and node 4. Each node can represent a fragment.

[0126] In the implementation process, you can use Figure 4B The structure shown is used to capture this evolution of shape subsequences, and the weight between the edges between two shape subsequence nodes is calculated based on the product of the probability of two consecutive fragments being associated with their respective shape subsequences.

[0127] Step 5: Segment the input time series to obtain different segments. The shape subsequence with the highest probability of association with it is calculated using the following formula (5). Two adjacent s segments represent the flow from one state to another different state, that is, the transfer from one shape subsequence to another shape subsequence. The edge weight of the transfer is the product of the association probabilities between the previous and next segments and their respective shape subsequences. The probabilities of repeated paths are summed. Therefore, the thicker the path, the greater the probability of occurrence.

[0128]

[0129] Among them, the subscript of s is j, which represents the normalized probability between different shape subsequences i and the same segment j; The meaning of is the same as that of the previous formula (2), representing the Euclidean distance between the shape subsequence and the fragment, max represents the maximum distance, and min represents the minimum distance. The calculated probability ranges from 0 to 1. The probability of association of the shape subsequence with the smallest distance is 1, and that of the shape subsequence with the largest distance is 0.

[0130] Step 6: Use the above data to construct a time series segment evolution diagram to describe the transfer relationship between time series segments.

[0131] Through this time series fragment evolution graph, the original time series samples can be represented as several paths in the graph.

[0132] Step 7: Calculate the shape subsequence representation of the time series through a graph embedding algorithm (such as DeepWalk), and use the calculated representation for downstream tasks.

[0133] A complete time series is divided into multiple segments, and the representation of each segment is Φ i The following formula (6) can be used:

[0134] Φ i =(∑ j p i,j ·μ(ν i,j)),1≤i≤m (6);

[0135] Among them, P i,j represents the association probability, μ(v) represents the representation of the associated shape subsequence calculated using the graph embedding method, and the results are summed to obtain Φ i .

[0136] In some embodiments, the associations between subtle shopping behaviors can be mined from the transfer paths of the shape subsequences, and potential consumption hotspots can be identified through the changing trends of the current paths, providing certain references and data support for the design and preparation of promotional activities.

[0137] In an embodiment of the present application, a shape subsequence is a subsequence in a time series data, and this subsequence is the most significant feature of the time series data, representing a very discriminative feature of a certain pattern in the time series. Based on the shape subsequence of classic shopping behavior, the user's activity sequence is matched and identified, and the time series is converted into a shape subsequence evolution graph for interpretable reasoning through the shape subsequence, which is used to describe the transfer relationship between the shape subsequences and to make a certain explanation for the state transition relationship between shopping behaviors. In this way, based on the interpretability of the shape subsequence and the state transition relationship of the shape subsequence, a dynamic evolution graph is constructed, which can combine the shape subsequence and the state transition matrix to make a certain explanation for the relationship between shopping behaviors, and can also help the business make the next decision.

[0138] Based on the foregoing embodiments, the embodiments of the present application provide a behavior prediction device, which includes the modules included, each module includes each sub-module, each sub-module includes a unit, which can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0139] Figure 5 A schematic diagram of the structure of the behavior prediction device provided in the embodiment of the present application is shown in FIG. Figure 5 As shown, the device 500 includes:

[0140] A division module 510 is used to divide the multivariate time series used to characterize the behavior characteristics of the target object into a set of first candidate time series segments of different lengths, wherein the multivariate time series includes at least two time series of different dimensional information;

[0141] A clustering module 520, configured to cluster the first candidate time series segments in the first candidate time series segment set, and determine the second candidate time series segments in the second candidate time series segment set based on at least one cluster center;

[0142] The construction module 530 is used to construct a sequence evolution graph using the second candidate time series segment set, so as to determine the correlation relationship between various behaviors of the target object using the sequence evolution graph and perform behavior prediction.

[0143] In some embodiments, the partitioning module 510 includes a truncation submodule and a dimensionality reduction processing submodule, wherein the truncation module is used to randomly truncate the multivariate time series using a sliding window to obtain at least one subsequence of different lengths; and the dimensionality reduction processing submodule is used to perform dimensionality reduction processing on the at least one subsequence to obtain the first candidate time series segment set.

[0144] In some embodiments, the clustering module 520 includes a first determination submodule, a second determination submodule and a third determination submodule, wherein the first determination submodule is used to determine the first loss function of the target cluster center based on the positive samples and negative samples of the target cluster cluster; the second determination submodule is used to determine the cluster center of the target cluster cluster when at least the target cluster cluster converges using the first loss function; the third determination submodule is used to determine the second candidate time series segment in the second candidate time series segment set based on the cluster center of the target cluster cluster.

[0145] In some embodiments, the first determination submodule includes a first determination unit and a second determination unit, wherein the first determination unit is used to determine the positive samples and negative samples of the target cluster based on the distance between the first candidate time series segments and the distance between each of the first candidate time series segments and the anchor point of the target cluster; and the second determination unit is used to determine the first loss function of the target cluster based on the distance between the positive sample and the anchor point, the distance between the negative sample and the anchor point, and the intra-class distance.

[0146] In some embodiments, the construction module 530 includes a first construction submodule, a second construction submodule, a fourth determination submodule and a fifth determination submodule, wherein the first construction submodule is used to construct a local extraction factor to determine the distance between the second candidate time series segment in the second candidate time series segment set and the first candidate time series segment in the first candidate time series segment set; the second construction submodule is used to construct a global extraction factor to determine the weights corresponding to the second candidate time series segment at different times; the fourth determination submodule is used to determine a second loss function based on the local extraction factor and the global extraction factor; the fifth determination submodule is used to determine a target time series segment set through supervised learning using the second loss function, so as to construct a sequence evolution graph using the target time series segment set.

[0147] In some embodiments, the construction module 530 also includes a construction submodule, an acquisition submodule and a matching submodule, wherein the construction submodule is used to construct a time series evolution graph using the target time series segment set; the acquisition submodule is used to acquire the time series to be predicted; and the matching submodule is used to match the time series to be predicted with the time series evolution graph to predict the next behavior corresponding to the time series to be predicted.

[0148] In some embodiments, the matching submodule includes a segmentation unit, a matching unit and a prediction unit, wherein the segmentation unit is used to segment the time series to be predicted to obtain at least one time series segment to be predicted; the matching unit is used to match the at least one time series segment to be predicted with the nodes in the time series evolution graph to determine the probability of the at least one time series segment to be predicted being transferred to the target node; and the prediction unit is used to predict the next step behavior of the time series to be predicted based on the probability of the at least one time series segment to be predicted being transferred to the target node.

[0149] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0150] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable an electronic device (which can be a mobile phone, a tablet computer, a laptop computer, a desktop computer, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0151] Correspondingly, an embodiment of the present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the behavior prediction method provided in the above embodiment are implemented.

[0152] Correspondingly, an embodiment of the present application provides an electronic device, Figure 6 A hardware entity diagram of an electronic device provided in an embodiment of the present application, such as Figure 6 As shown, the hardware entity of the device 600 includes: a memory 601 and a processor 602, wherein the memory 601 stores a computer program that can be run on the processor 602, and the processor 602 implements the steps in the behavior prediction method provided in the above embodiment when executing the program.

[0153] The memory 601 is configured to store instructions and applications executable by the processor 602, and can also cache data to be processed or processed by the processor 602 and various modules in the electronic device 600 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).

[0154] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0155] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0156] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0157] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0158] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0159] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately configured as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0160] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0161] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly reflected in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable an electronic device (which can be a mobile phone, a tablet computer, a laptop computer, a desktop computer, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0162] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0163] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0164] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0165] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A behavior prediction method, the method include: Dividing a multivariate time series used to characterize the behavior characteristics of a target object into a set of first candidate time series segments of different lengths, wherein the multivariate time series includes at least two time series of different dimensional information; Clustering the first candidate time series segments in the first candidate time series segment set, and determining the second candidate time series segments in the second candidate time series segment set based on at least one cluster center; A sequence evolution graph is constructed using the second candidate time series segment set, so as to determine the correlation relationship between the behaviors of the target object using the sequence evolution graph and perform behavior prediction.

2. The method according to claim 1, wherein the multivariate time series used to characterize the behavior characteristics of the target object is divided into a first candidate time series segment set of different lengths, include: Randomly intercepting the multivariate time series using a sliding window to obtain at least one subsequence of different lengths; Perform dimensionality reduction processing on the at least one subsequence to obtain the first candidate time series segment set.

3. The method according to claim 1, wherein the first candidate time series segment set is clustered, and a second candidate time series segment in the second candidate time series segment set is determined based on at least one cluster center. include: Determine a first loss function of the target cluster center based on positive samples and negative samples of the target cluster; In a case where it is determined by using the first loss function that at least the target cluster cluster converges, determining a cluster center of the target cluster cluster; A second candidate time series segment in the second candidate time series segment set is determined based on the cluster center of the target cluster.

4. The method of claim 3, wherein the first loss function of determining the target cluster center based on positive samples and negative samples of the target cluster cluster is: include: Determine positive samples and negative samples of the target cluster based on the distances between the first candidate time series segments and the distances between each of the first candidate time series segments and the anchor point of the target cluster; A first loss function of the target cluster is determined based on the distance between the positive sample and the anchor point, the distance between the negative sample and the anchor point, and the intra-class distance.

5. The method according to claim 1, wherein the second candidate time series segment set is used to construct a sequence evolution graph, and the association relationship between the behaviors of the target object is determined by using the constructed sequence evolution graph, and the behavior prediction is performed. include: constructing a local extraction factor to determine a distance between a second candidate time series segment in the second candidate time series segment set and a first candidate time series segment in the first candidate time series segment set; Constructing a global factor to determine the weights of the second candidate time series segments at different times; Determining a second loss function based on the local extraction factor and the global extraction factor; The target time series segment set is determined through supervised learning using the second loss function, so as to construct a sequence evolution graph using the target time series segment set.

6. The method according to claim 5, further comprising: include: Constructing a time series evolution graph using the target time series segment set; Get the time series to be predicted; The time series to be predicted is matched with the time series evolution graph to predict the next step behavior corresponding to the time series to be predicted.

7. The method according to claim 6, wherein the time series to be predicted is matched with the time series evolution graph to predict the next behavior corresponding to the time series to be predicted, include: Segmenting the time series to be predicted to obtain at least one time series segment to be predicted; Matching the at least one time series segment to be predicted with a node in the time series evolution graph, and determining a probability that the at least one time series segment to be predicted is transferred to a target node; The next step behavior corresponding to the time series to be predicted is predicted based on the probability of the at least one time series segment to be predicted corresponding to the transfer to the target node.

8. A behavior prediction device, the device include: A division module, used to divide the multivariate time series used to characterize the behavior characteristics of the target object into a set of first candidate time series segments of different lengths, wherein the multivariate time series includes at least two time series of different dimensional information; a clustering module, configured to cluster the first candidate time series segments in the first candidate time series segment set, and determine the second candidate time series segments in the second candidate time series segment set based on at least one cluster center; A construction module is used to construct a sequence evolution graph using the second candidate time series segment set, so as to use the sequence evolution graph to determine the correlation relationship between the various behaviors of the target object and perform behavior prediction.

9. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor is used to divide a multivariate time series used to characterize the behavior characteristics of a target object into a set of first candidate time series segments of different lengths, in, The multivariate time series includes at least two time series with different dimensional information; clustering the first candidate time series segments in the first candidate time series segment set, and determining the second candidate time series segments in the second candidate time series segment set based on at least one cluster center; A sequence evolution graph is constructed using the second candidate time series segment set, so as to determine the correlation relationship between the behaviors of the target object using the sequence evolution graph and perform behavior prediction.

10. A computer program product, comprising a computer program or an instruction, which, when executed by a processor, implements dividing a multivariate time series used to characterize a behavior feature of a target object into a set of first candidate time series segments of different lengths, in, The multivariate time series includes at least two time series with different dimensional information; clustering the first candidate time series segments in the first candidate time series segment set, and determining the second candidate time series segments in the second candidate time series segment set based on at least one cluster center; A sequence evolution graph is constructed using the second candidate time series segment set, so as to determine the correlation relationship between the behaviors of the target object using the sequence evolution graph and perform behavior prediction.