Multi-scene behavior sequence prediction method and system based on sequence decomposition, medium and product

Through the multi-scenario behavioral sequence prediction method based on sequence decomposition, the long short-term memory network and the graph neural network are used to decompose the sequence to be predicted, and combined with the basic and memory prediction model, the problem of model prediction performance degradation in multiple scenarios is solved, and new predictions are realized. Efficient capture and adaptation of scene behavior transfer rules reduce computing resource consumption.

CN118569347APending Publication Date: 2024-08-30SHANGHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410613231.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the face of multiple scenarios where behavior transfer patterns change, the existing technology's model prediction performance for new scenario behavior sequences declines. Moreover, existing methods fail to detect concept drift in a timely manner or consume large computing resources, making it difficult to effectively adapt to scene changes.

Method used

A multi-scenario behavior sequence prediction method based on sequence decomposition is used to build a basic prediction model and a memory prediction model through long short-term memory network, graph neural network and attention mechanism, decompose the sequence to be predicted to train the model, and use memory units to incrementally save new scenes. knowledge, and make predictions by querying similar historical sequences, and combine the basic and memory prediction results to make the final prediction.

Benefits of technology

It effectively overcomes the concept drift phenomenon caused by the passage of time and scene changes, improves the model's prediction performance in multiple scenarios, reduces the consumption of computing resources, and improves the ability to capture behavior transfer patterns in new scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569347A
    Figure CN118569347A
Patent Text Reader

Abstract

The invention discloses a multi-scene behavior sequence prediction method and system based on sequence decomposition, a medium and a product, and relates to the field of multi-scene behavior sequence prediction, and the method comprises the steps: obtaining a trained basic prediction model and a memory prediction model based on old scene training data and a to-be-predicted sequence; obtaining a first prediction label of the trained basic prediction model based on the to-be-predicted sequence and the trained basic prediction model; obtaining a second prediction label of the trained memory prediction model based on the to-be-predicted sequence, the trained basic prediction model and the trained memory prediction model; and obtaining an adjacent node set of the to-be-predicted sequence based on a first prediction label of the trained basic prediction model and a second prediction label of the trained memory prediction model, according to the method, the problem that the performance is reduced when the behavior sequence in multiple scenes is predicted by the model due to a concept drift phenomenon caused by factors such as time lapse and scene change can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of multi-scenario behavior sequence prediction, and in particular to a multi-scenario behavior sequence prediction method, system, medium and product based on sequence decomposition. Background Art

[0002] Since the behavior transfer rules are constantly changing, the behavior sequence prediction model needs to make predictions in multiple scenarios where the behavior transfer rules are different, which places high demands on the model's multi-scenario adaptability.

[0003] Existing methods for solving the problem of multi-scenario behavior sequence prediction include methods based on reconstruction models, methods based on partial adjustment models, and methods based on ensemble learning. The reconstruction model method refers to directly using new scene data to train the model, and then using the new model to predict the behavior sequence in the new scene; the partial adjustment model method refers to using new data to update the model weights; the ensemble learning method is a common method for dealing with concept drift problems. Its main idea is to retain multiple models at the same time to enhance the model's adaptability to different data.

[0004] The method based on model reconstruction uses new data to retrain the model when concept drift is detected to enhance the adaptability of the model in different scenarios. However, this method relies on the setting of the concept drift detector, and cannot handle the concept drift that occurs when the degree of concept drift does not reach the threshold; the method based on partial adjustment of the model uses new data to train part of the model to enhance the model's ability to capture new data features. This method has lower overhead than the method of model reconstruction. Since only part of the model is adjusted, the model's ability to capture new data features is limited; the method based on ensemble learning retains multiple models, and continuously uses new data to train new models and add new models to the ensemble model, so that the model has better ability to capture the features of old and new data. However, since this method retains more models, it requires more computing resources. In addition, this method also requires a concept drift detector. When the degree of concept drift does not reach the threshold, this method cannot adjust the model in time. Summary of the invention

[0005] The purpose of the present invention is to provide a multi-scenario behavior sequence prediction method, system, medium and product based on sequence decomposition, which can overcome the problem of performance degradation of the model when predicting behavior sequences in multiple scenarios caused by concept drift caused by factors such as the passage of time and scene changes.

[0006] To achieve the above object, the present invention provides the following solutions:

[0007] A multi-scenario behavior sequence prediction method based on sequence decomposition includes:

[0008] A trained basic prediction model and a memory prediction model are obtained based on old scene training data and a sequence to be predicted; the basic prediction model is constructed based on a long short-term memory network, a graph neural network and an attention mechanism; the memory prediction model includes an encoder structure and a decoder structure; the encoder structure is constructed based on a neural network model; the decoder structure is constructed based on a neural network model;

[0009] Obtaining a first prediction label of the trained basic prediction model based on the sequence to be predicted and the trained basic prediction model; the first prediction label includes a set of adjacent nodes predicted by the basic prediction model and a prediction score corresponding to each node in the set of adjacent nodes predicted by the basic prediction model;

[0010] Obtaining a second prediction label of the trained memory prediction model based on the sequence to be predicted, the trained basic prediction model and the trained memory prediction model; the second prediction label includes a set of adjacent nodes predicted by the memory prediction model and a prediction score corresponding to each node in the set of adjacent nodes predicted by the memory prediction model;

[0011] A set of adjacent nodes of a sequence to be predicted is obtained based on the first prediction label of the trained basic prediction model and the second prediction label of the trained memory prediction model.

[0012] A computer system comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-mentioned method for predicting multi-scenario behavior sequences based on sequence decomposition.

[0013] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned multi-scenario behavior sequence prediction method based on sequence decomposition.

[0014] A computer program product includes a computer program, which, when executed by a processor, implements the steps of the above-mentioned multi-scenario behavior sequence prediction method based on sequence decomposition.

[0015] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0016] The present invention discloses a method, system, medium and product for predicting multi-scenario behavior sequences based on sequence decomposition. The method comprises the following steps: obtaining a trained basic prediction model and a memory prediction model based on old scenario training data and a sequence to be predicted; obtaining a first prediction label of the trained basic prediction model based on the sequence to be predicted and the trained basic prediction model; obtaining a second prediction label of the trained memory prediction model based on the sequence to be predicted, the trained basic prediction model and the trained memory prediction model; and obtaining a set of adjacent nodes of the sequence to be predicted based on the first prediction label of the trained basic prediction model and the second prediction label of the trained memory prediction model. The present invention overcomes the problem of performance degradation of a model when predicting behavior sequences in multiple scenarios due to concept drift caused by factors such as the passage of time and changes in scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A schematic flow chart of a multi-scenario behavior sequence prediction method based on sequence decomposition provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] The purpose of the present invention is to provide a multi-scenario behavior sequence prediction method, system, medium and product based on sequence decomposition, aiming to realize multi-scenario behavior sequence prediction based on sequence decomposition.

[0021] 1) Concept drift: In supervised learning tasks, the distribution or concepts of training data and test data change, which may lead to a decrease in model performance.

[0022] 2) Sequence decomposition: A common data augmentation method in behavior sequence prediction tasks. By decomposing the sequence to be predicted, the efficiency of the model in learning the behavior transfer rules of new scenarios is improved.

[0023] 3) Mix: A multi-scenario behavior sequence prediction algorithm based on sequence decomposition proposed in this invention.

[0024] The present invention trains the model by decomposing the subsequence data obtained from the sequence to be predicted, helping the model learn the rules of behavior transfer in new scenarios. At the same time, the memory unit increment is used to save the knowledge of new scenarios, and prediction is performed by querying the historical sequences similar to the sequence to be predicted, so as to improve the performance of the model in new scenarios. The overall idea is as follows:

[0025] First, the sequence to be predicted is decomposed into subsequences, and the model is trained using the subsequence data to enhance the model's ability to capture the behavior transfer rules in new scenarios. Then, the basic prediction model learns the behavior transfer rules in new scenarios through real-time training methods, and the memory prediction model updates the subsequence representation and label increments output by the basic prediction model to the memory unit, and predicts by querying the historical sequence information of the neighbors of the sequence to be predicted in the memory unit. The prediction is completed by combining the prediction results of the basic prediction model and the memory prediction model.

[0026] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0027] Example 1

[0028] like Figure 1 As shown, a multi-scenario behavior sequence prediction method based on sequence decomposition in this embodiment includes:

[0029] The input of the present invention is the old scene prediction model Model pretrain , sequence decomposition method SplitFun, memory prediction network MemoryNet, the set of sequences to be predicted Z = {s1, s2, ..., s |S|}, candidate node set V = {v1,v2,…,v |V| The final output of the present invention is the final prediction result of the sequence to be predicted.

[0030] Step 101: Obtain a trained basic prediction model and a memory prediction model based on old scene training data and the sequence to be predicted. The basic prediction model is constructed based on a long short-term memory network, a graph neural network, and an attention mechanism; the memory prediction model includes an encoder structure and a decoder structure; the encoder structure is constructed based on a neural network model; and the decoder structure is constructed based on a neural network model.

[0031] A basic prediction model of the old scene training data is obtained based on the old scene training data.

[0032] The sequence decomposition method SplitFun is used to decompose the sequence to be predicted to obtain new scene training data; the new scene training data includes multiple subsequence data and a label corresponding to each subsequence data.

[0033]

[0034] The subsequence data in the new scene training data is used as the input of the basic prediction model of the old scene training data, and the label corresponding to the subsequence data in the new scene training data is used as the output of the basic prediction model of the old scene training data. The basic prediction model of the old scene training data is trained to achieve a preset number of iterations to obtain a trained basic prediction model.

[0035] The subsequence data in the new scene training data is input into the trained basic prediction model to obtain a subsequence representation corresponding to each subsequence data in the new scene training data.

[0036] The subsequence representation corresponding to the subsequence data is used as the input of the memory prediction model, and the label corresponding to the subsequence data in the new scene training data is used as the output of the memory prediction model. The memory prediction model is trained to achieve a preset number of iterations to obtain a trained memory prediction model.

[0037]

[0038] Use the old scene training data to train the behavior sequence prediction model proposed in this invention to obtain the pre-trained model Model pretrain Before the prediction process begins, use Model pretrain Initialize the basic prediction model Model base :

[0039] Model base =Model pretrain .

[0040] The memory unit and the basic prediction model are initialized based on the old scene training data to obtain the initialized memory unit and the initialized prediction model.

[0041] Step 102: Obtain a first prediction label of the trained basic prediction model based on the sequence to be predicted and the trained basic prediction model. The first prediction label includes a set of adjacent nodes predicted by the basic prediction model and a prediction score corresponding to each node in the set of adjacent nodes predicted by the basic prediction model.

[0042] Based on the Encoder structure of the sequence to be predicted and the trained basic prediction model, the representation of the sequence to be predicted is obtained:

[0043] R cur =Model base .Encoder(s).

[0044] Based on the representation of the sequence to be predicted and the decoder structure of the trained basic prediction model, the first prediction label of the trained basic prediction model is obtained:

[0045] P N =Model base .Decoder(R cur ).

[0046] Among them, P N Represents the first prediction label of the trained basic prediction model; Model base .Encoder() represents the Encoder structure of the basic prediction model after training; Model base .Decoder() represents the Decoder structure of the trained basic prediction model; R cur represents the representation of the sequence to be predicted; s represents the sequence to be predicted.

[0047] Step 103: Obtain a second prediction label of the trained memory prediction model based on the sequence to be predicted, the trained basic prediction model and the trained memory prediction model. The second prediction label includes a set of adjacent nodes predicted by the memory prediction model and a prediction score corresponding to each node in the set of adjacent nodes predicted by the memory prediction model.

[0048] A sequence decomposition method is used to decompose the sequence to be predicted to obtain new scene training data; the new scene training data includes a plurality of subsequence data and a label corresponding to each subsequence data.

[0049] Each subsequence data in the new scene training data is input into the trained basic prediction model to obtain the subsequence representation corresponding to each subsequence data:

[0050]

[0051] The initialized memory unit is updated based on the subsequence representation and label corresponding to each subsequence data to obtain an updated memory unit. The memory unit is used to store the subsequence representation and label corresponding to the subsequence data.

[0052]

[0053] Based on the Encoder structure of the sequence to be predicted and the trained basic prediction model, the representation of the sequence to be predicted is obtained:

[0054] R cur =Model base .Encoder(s).

[0055] Based on the updated memory unit, the representation of the sequence to be predicted and the representation of the subsequence, a neighbor sequence representation is obtained.

[0056] The Euclidean distance is used to measure the similarity between the representation of the sequence to be predicted and the subsequence representation corresponding to each subsequence data.

[0057]

[0058] distance represents the similarity between the representation of the sequence to be predicted and the representation of the subsequence; Euclidean represents the calculation function of the Euclidean distance.

[0059] Based on the similarity between the representation of the sequence to be predicted and the subsequence representation corresponding to each subsequence data, the neighbor sequence representation in the updated memory unit is queried to obtain the neighbor sequence representation of the sequence to be predicted.

[0060] The similarity between the neighbor sequence representation in the updated memory unit and the representation of the sequence to be predicted is calculated, and the neighbor sequence representation with similarity between the neighbor sequence representation in the updated memory unit and the representation of the sequence to be predicted and the similarity between the representation of the sequence to be predicted and the subsequence representation corresponding to each subsequence data is taken as the neighbor sequence representation of the sequence to be predicted.

[0061] Sort the neighbor sequences in ascending order by distance, and obtain the sequence representation and label information of the first K neighbor sequences similar to s:

[0062]

[0063] The representation of the sequence to be predicted and the representation of the neighboring sequence are input into the trained memory prediction network to obtain the second prediction label of the memory prediction model:

[0064]

[0065] Among them, Z sub Represents subsequence data; SplitFun() represents the decomposition function; MemoryNet represents the trained memory prediction network; Represents the subsequence representation corresponding to the r-th subsequence data; Represents the rth subsequence data; R cur represents the sequence representation to be predicted; P M represents the second prediction label of the trained memory prediction model; represents the neighbor sequence representation; y r represents the subsequence label corresponding to the r-th subsequence data; M represents the updated memory unit.

[0066] Step 104: Obtain a set of adjacent nodes of the sequence to be predicted based on the first prediction label of the trained basic prediction model and the second prediction label of the trained memory prediction model.

[0067] The prediction score corresponding to each node in the final predicted adjacent node set is determined based on the first prediction label of the trained basic prediction model and the second prediction label of the trained memory prediction model.

[0068] The prediction score corresponding to each node in the final predicted adjacent node set is input into the sorting function to calculate the adjacent node set of the sequence to be predicted:

[0069] H=Sort(F i ,V i ).

[0070] Among them, F i represents the prediction score corresponding to the i-th node in the final predicted adjacent node set; H represents the adjacent node set of the sequence to be predicted; Sort() represents the sorting function; V i Represents the i-th node in the final predicted adjacent node set.

[0071] Before using the memory prediction network for prediction, use the real-time training method to train the memory prediction network to enhance the memory prediction network's ability to capture the data distribution characteristics in the current sequence:

[0072]

[0073] represents the first subsequence data; y1 represents the label corresponding to the first subsequence data; represents the |s|-1th subsequence data; y |s|-1 Indicates the label corresponding to the |s|-1th subsequence data.

[0074] The purpose of this invention is to overcome the problem of performance degradation when the model predicts behavior sequences in multiple scenarios due to concept drift caused by factors such as the passage of time and scene changes. In order to efficiently learn the behavior transfer rules of new scenes, the prediction ability of the model in complex and dynamically changing multiple scenes is improved.

[0075] Specific embodiments of the present invention:

[0076] This embodiment uses Diginetica, Yoochoose and Rec-Tmall data sets as examples to evaluate the application of the method proposed in the present invention.

[0077] First, construct a multi-scenario dataset with different behavior transfer rules: divide the original dataset into a training set and a test set in a ratio of 9:1, and remove the nodes in the test set that do not appear in the training set. Use the training set to train the behavior sequence prediction model, and select the model with the highest HIT@20 value in the test set as the representation model. PUsing Model P The encoder structure is used to obtain the representation of the sequences in the training set, and then the K-Means algorithm is used to cluster these representations to visualize the distribution of sequences of different categories. Next, the new scene and the old scene are formed by selecting the two categories with the farthest centroid distance in the clustering results. The category with a large number of sequences is regarded as the old scene and divided into the training set Train in a ratio of 9:1. old and the test set Test old The categories with fewer sequences are set as new scenarios, and all the data in them are used as test sets Test new At this time, the sequence decomposition method is used to train old Perform data augmentation and delete Test old With Test new Not appearing in Train old Nodes that appear to ensure data consistency. Further, use Train old Train the behavior sequence prediction model and extract the old The model with the highest HIT@20 value is used as the pre-trained model pretrain .

[0078] The real-time training method decomposes each test sequence to be predicted and uses the obtained subsequence data to train the model. In order to maintain the rigor of the experiment and simulate the workflow of the algorithm in actual applications, the present invention performs a single prediction on the test set, divides the test set into sequence groups to be predicted according to the set Batch size, traverses all sequence groups to be predicted in turn, and uses the model to predict the predicted results, and then adds them to the prediction result set. When all sequence groups to be predicted are traversed, the relevant indicators are calculated according to the prediction result set. The following comparison model is set to conduct experiments on the Yoochoose and Diginetica datasets:

[0079] 1) Pretrain: Use pre-trained model pretrain Predict new scene behavior sequences to explore the performance of the original model in different scenarios.

[0080] 2) DDGDA: Predict future data distribution based on the changing patterns of historical data, and use the predicted results of future data distribution to train the model to enhance the model's ability to capture the data features of new scenarios.

[0081] 3) AUE2: Divide the data into data blocks by time, and incrementally train the model on each data block to enhance the model's ability to adapt to changes in data features.

[0082] 4) Condor: Regularly train the model, but still keep the old model. The network distributes the ratio of the results between the new model and the old model, which enhances the model's ability to capture new scene features while maintaining a certain ability to capture old scene features.

[0083] 5) LearnNSE: When the accuracy of the model on recent data is too low, retrain the model based on recent data and assign weights to different models based on their accuracy.

[0084] 6) Windows: Set a window to store the processed data. When the window reaches the specified capacity, use the data in the window to retrain the model and clear the window. Set the window size to 1 / 2, 1 / 3, and 1 / 4 of the number of all sequences to be predicted for related experiments.

[0085] 7) Mix: A multi-scenario behavior sequence prediction algorithm based on sequence decomposition proposed in this invention.

[0086] As can be seen from Table 1, the present invention achieves the best results in both data sets. This shows that the new scene knowledge in the sequence to be predicted can be fully mined by sequence decomposition, helping the model learn the behavior transfer rules in the sequence to be predicted. At the same time, the memory prediction model makes predictions by querying the neighbor information similar to the sequence to be predicted in the memory unit, and corrects the prediction results of the basic prediction model.

[0087] Table 1 Performance of different models in new scenarios

[0088]

[0089]

[0090] In order to better illustrate the performance and prediction effect of the model, a specific example is given below. Taking the user with user ID Z001 as an example, his historical behavior sequence includes browsing Huawei MateBook X Pro, clicking Xiaomi 10 mobile phone, viewing Haier refrigerator, adding Gree air conditioner to shopping cart, and purchasing Honor MagicBook. The model of the present invention predicts the user's future behavior in this scenario and outputs the user's behavior prediction sequence: viewing Gree refrigerator, clicking Midea air purifier, clicking Xiaomi smart camera, purchasing Huawei Bluetooth headset, and purchasing Xiaomi power bank. Through multiple experiments, it is found that the model is quite stable and accurate in predicting the user's future behavior, which highlights the excellent performance of the present invention in different data sets and scenarios.

[0091] Technical effects of the present invention:

[0092] In the real-time training method of the present invention, by performing sequence decomposition on the sequence to be predicted, subsequence data containing the behavior transfer characteristics of the sequence to be predicted is obtained, and the model is trained using these subsequence data to help the model capture the behavior transfer rules of new scenes; in the memory prediction model, the memory unit incrementally stores the subsequence data, and by querying the neighboring sequences similar to the sequence to be predicted, the probability distribution of the corresponding label nodes is obtained using the memory prediction network. Finally, the final prediction is completed by combining the memory prediction model with the basic prediction model.

[0093] In summary, two methods are used to improve the performance of the model in new scenarios: 1) The real-time training method uses the subsequence data obtained by decomposing the sequence to be predicted to continuously train the model; 2) The memory unit increments in the memory prediction model store subsequence representations and corresponding label information, and guide the model prediction by querying the neighboring sequences similar to the sequence to be predicted. In addition, the possible problems of the algorithm in practical application are explored, and solutions are proposed to solve the multi-scenario adaptability problem of the behavior sequence prediction model in practical application.

[0094] Example 2

[0095] A computer system includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the multi-scenario behavior sequence prediction method based on sequence decomposition in Example 1.

[0096] Example 3

[0097] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the multi-scenario behavior sequence prediction method based on sequence decomposition in Example 1.

[0098] Example 4

[0099] A computer program product includes a computer program, which, when executed by a processor, implements the steps of the multi-scenario behavior sequence prediction method based on sequence decomposition in Example 1.

[0100] Example 5

[0101] A computer device, which may be a database. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Wherein, the processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. Wherein, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the multi-scenario behavior sequence prediction method based on sequence decomposition in Example 1 is implemented.

[0102] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0103] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present invention may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided by the present invention may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.

[0104] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0105] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A multi-scenario behavior sequence prediction method based on sequence decomposition, characterized in that: The method comprises: A trained basic prediction model and a memory prediction model are obtained based on old scene training data and a sequence to be predicted; the basic prediction model is constructed based on a long short-term memory network, a graph neural network and an attention mechanism; the memory prediction model includes an encoder structure and a decoder structure; the encoder structure is constructed based on a neural network model; the decoder structure is constructed based on a neural network model; Obtaining a first prediction label of the trained basic prediction model based on the sequence to be predicted and the trained basic prediction model; the first prediction label includes a set of adjacent nodes predicted by the basic prediction model and a prediction score corresponding to each node in the set of adjacent nodes predicted by the basic prediction model; Obtaining a second prediction label of the trained memory prediction model based on the sequence to be predicted, the trained basic prediction model and the trained memory prediction model; the second prediction label includes a set of adjacent nodes predicted by the memory prediction model and a prediction score corresponding to each node in the set of adjacent nodes predicted by the memory prediction model; A set of adjacent nodes of a sequence to be predicted is obtained based on the first prediction label of the trained basic prediction model and the second prediction label of the trained memory prediction model.

2. The multi-scenario behavior sequence prediction method based on sequence decomposition according to claim 1 is characterized in that: Based on the old scene training data and the sequence to be predicted, the trained basic prediction model and memory prediction model are obtained, including: Obtaining a basic prediction model of old scene training data based on old scene training data; Decomposing the sequence to be predicted by using a sequence decomposition method to obtain new scene training data; the new scene training data includes a plurality of subsequence data and a label corresponding to each subsequence data; Using the subsequence data in the new scene training data as the input of the basic prediction model of the old scene training data, using the label corresponding to the subsequence data in the new scene training data as the output of the basic prediction model of the old scene training data, training the basic prediction model of the old scene training data for the purpose of achieving a preset number of iterations, and obtaining a trained basic prediction model; Inputting the subsequence data in the new scene training data into the trained basic prediction model to obtain a subsequence representation corresponding to each subsequence data in the new scene training data; The subsequence representation corresponding to the subsequence data is used as the input of the memory prediction model, and the label corresponding to the subsequence data in the new scene training data is used as the output of the memory prediction model. The memory prediction model is trained to achieve a preset number of iterations to obtain a trained memory prediction model.

3. The multi-scenario behavior sequence prediction method based on sequence decomposition according to claim 1 is characterized in that: Obtaining a first prediction label of the trained basic prediction model based on the sequence to be predicted and the trained basic prediction model specifically includes: Based on the Encoder structure of the sequence to be predicted and the trained basic prediction model, the representation of the sequence to be predicted is obtained: R cur =Model base .Encoder(s); Based on the representation of the sequence to be predicted and the decoder structure of the trained basic prediction model, the first prediction label of the trained basic prediction model is obtained: P N =Model base .Decoder(R cur ); Among them, P N Represents the first prediction label of the trained basic prediction model; Model base .Encoder() represents the Encoder structure of the basic prediction model after training; Model base .Decoder() represents the Decoder structure of the trained basic prediction model; R cur represents the representation of the sequence to be predicted; s represents the sequence to be predicted.

4. The multi-scenario behavior sequence prediction method based on sequence decomposition according to claim 1 is characterized in that: Obtaining a second prediction label of the trained memory prediction model based on the sequence to be predicted, the trained basic prediction model and the trained memory prediction model specifically includes: Decomposing the sequence to be predicted by using a sequence decomposition method to obtain new scene training data; the new scene training data includes a plurality of subsequence data and a label corresponding to each subsequence data; Each subsequence data in the new scene training data is input into the trained basic prediction model to obtain the subsequence representation corresponding to each subsequence data: Based on the subsequence representation and label corresponding to each subsequence data, an initialized memory unit is updated to obtain an updated memory unit; the memory unit is used to store the subsequence representation and label corresponding to the subsequence data; Based on the Encoder structure of the sequence to be predicted and the trained basic prediction model, the representation of the sequence to be predicted is obtained: R cur =Model base .Encoder(s); Based on the updated memory unit, the representation of the sequence to be predicted and the representation of the subsequence, a neighbor sequence representation is obtained; The representation of the sequence to be predicted and the representation of the neighboring sequence are input into the trained memory prediction network to obtain the second prediction label of the memory prediction model: Among them, Z sub Represents subsequence data; s represents the sequence to be predicted; SplitFun() represents the decomposition function; MemortyNet represents the trained memory prediction network; Represents the subsequence representation corresponding to the r-th subsequence data; Represents the rth subsequence data; R cur Represents the sequence representation to be predicted; Model base .Encoder() represents the Encoder structure of the basic prediction model after training; P M represents the second prediction label of the trained memory prediction model; Represents the neighbor sequence representation.

5. The multi-scenario behavior sequence prediction method based on sequence decomposition according to claim 4 is characterized in that: Based on the updated memory unit, the representation of the sequence to be predicted and the representation of the subsequence, the neighbor sequence representation is obtained, which specifically includes: Use Euclidean distance to measure the similarity between the representation of the sequence to be predicted and the subsequence representation corresponding to each subsequence data; Based on the similarity between the representation of the sequence to be predicted and the subsequence representation corresponding to each subsequence data, the neighbor sequence representation in the updated memory unit is queried to obtain the neighbor sequence representation of the sequence to be predicted.

6. The multi-scenario behavior sequence prediction method based on sequence decomposition according to claim 1 is characterized in that: The adjacent node set of the sequence to be predicted is obtained based on the first prediction label of the trained basic prediction model and the second prediction label of the trained memory prediction model, specifically including: Determine a prediction score corresponding to each node in the final predicted adjacent node set based on the first prediction label of the trained basic prediction model and the second prediction label of the trained memory prediction model; The prediction score corresponding to each node in the final predicted adjacent node set is input into the sorting function to calculate the adjacent node set of the sequence to be predicted: H=Sort(F i ,V i ); Among them, F i represents the prediction score corresponding to the i-th node in the final predicted adjacent node set; H represents the adjacent node set of the sequence to be predicted; Sort() represents the sorting function; V i Represents the i-th node in the final predicted adjacent node set.

7. A computer system comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the multi-scenario behavior sequence prediction method based on sequence decomposition as described in any one of claims 1 to 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the multi-scenario behavior sequence prediction method based on sequence decomposition described in any one of claims 1 to 6 are implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the multi-scenario behavior sequence prediction method based on sequence decomposition described in any one of claims 1 to 6 are implemented.