A method, apparatus, device, and storage medium for predicting behavioral sequences.
By embedding features from time information and historical behavior sequences, a comprehensive feature vector is constructed to predict future user behavior. This solves the problem of deviation between user and project interaction behavior, improves the real-time performance and accuracy of behavior prediction, and is applicable to scenarios such as content distribution, resource scheduling, and advertising.
Patent Information
- Application Number
- CN202510625896.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, user interaction behavior is influenced by a variety of factors, resulting in insufficient accuracy in behavior prediction and an inability to accurately reflect users' true preferences.
By acquiring time information sequences for feature embedding and combining them with historical behavior sequences to construct a comprehensive feature vector, future behavior sequences can be predicted, avoiding dependence on specific projects and improving the real-time performance and accuracy of behavior prediction.
It enables the prediction of user behavior in advance without waiting for the project to arrive, improving the real-time performance and accuracy of behavior prediction, and is applicable to more time-related scenarios.
Smart Images

Figure CN123115533A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, related apparatus, device, and storage medium for predicting behavioral sequences. Background Technology
[0002] With the rapid development of the internet, online content is becoming increasingly abundant, and users' choices are becoming more diverse and complex. Against this backdrop, predicting user behavior sequences over a period of time is of paramount importance. The core value of predicting behavioral sequences lies in uncovering latent user needs through temporal patterns, empowering refined operations and intelligent decision-making.
[0003] In related technologies, sequential recommendation tasks encompass the temporal interactions between users and items, such as browsing, clicking, and purchase conversions. Based on this, various modeling methods are employed to uncover sequential patterns between behaviors and items, which are then used to recommend one or more items to the user in the next moment.
[0004] However, the inventors have discovered at least the following problems with the current solution: User interaction with items can be influenced by various factors, such as the item's display location and the guidance of recommendation algorithms. Therefore, this can lead to biases in the interaction behavior, failing to accurately reflect the user's true preferences and thus reducing the accuracy of behavior prediction. Summary of the Invention
[0005] This application provides a method, related apparatus, device, and storage medium for predicting behavior sequences. It enables prediction based on the behavior of an object in advance, without waiting for the project to arrive, thus improving the real-time performance and accuracy of behavior prediction, and is applicable to more time-related scenarios.
[0006] In view of this, this application provides a method for predicting behavioral sequences, including:
[0007] Obtain a time information sequence, which includes a historical time sequence and a future time sequence. The historical time sequence includes L time information corresponding to L time periods, and the future time sequence includes H time information corresponding to H time periods, where L and H are both integers greater than or equal to 1.
[0008] The time information sequence is processed by feature embedding to obtain a time vector sequence, which includes a historical vector sequence and a future vector sequence;
[0009] Obtain the historical behavior sequence of the target object, wherein the historical behavior sequence includes L actual triggering results corresponding to L time periods, and the actual triggering results are used to indicate whether the target object triggers interactive behavior within the time period;
[0010] Construct a comprehensive feature vector based on historical vector sequences and historical behavior sequences;
[0011] Based on the future vector sequence and the comprehensive feature vector, a recombined vector sequence is constructed, wherein the recombined vector sequence includes H recombined feature vectors;
[0012] Based on the recombined vector sequence, the future behavior sequence of the target object is predicted. The future behavior sequence includes H predicted trigger results corresponding to H time periods. The predicted trigger results are used to indicate whether the target object triggers interactive behavior within the time period.
[0013] This application also provides a behavior sequence prediction apparatus, comprising:
[0014] The acquisition module is used to acquire time information sequences, which include historical time sequences and future time sequences. The historical time sequence includes L time information corresponding to L time periods, and the future time sequence includes H time information corresponding to H time periods, where L and H are both integers greater than or equal to 1.
[0015] The processing module is used to perform feature embedding processing on the time information sequence to obtain a time vector sequence, which includes a historical vector sequence and a future vector sequence.
[0016] The acquisition module is also used to acquire the historical behavior sequence of the target object, wherein the historical behavior sequence includes L actual triggering results corresponding to L time periods, and the actual triggering results are used to indicate whether the target object triggers interactive behavior within the time period;
[0017] The building module is used to construct a comprehensive feature vector based on historical vector sequences and historical behavior sequences;
[0018] The building module is also used to construct a recombined vector sequence based on the future vector sequence and the comprehensive feature vector, wherein the recombined vector sequence includes H recombined feature vectors;
[0019] The prediction module is used to predict the future behavior sequence of the target object based on the recombined vector sequence. The future behavior sequence includes H predicted trigger results corresponding to H time periods. The predicted trigger results are used to indicate whether the target object triggers interactive behavior within the time period.
[0020] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0021] The acquisition module is specifically used to acquire the time information of each of the L time periods, where the time information of the time period includes the timestamp of a historical moment within the time period;
[0022] Retrieve the time information for each of the H time periods, where the time information for each time period includes a timestamp of a future moment within the time period;
[0023] Generate a historical time series based on the time information of each of the L time periods;
[0024] Generate a future time series based on the time information of each of the H time periods.
[0025] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0026] The acquisition module is specifically used to acquire the time information of each of the L time periods, wherein the time information of the time period includes a time period identifier used to uniquely indicate the time period;
[0027] Obtain the time information for each of the H time periods, where the time information for each time period includes a time period identifier used to uniquely identify the time period;
[0028] Generate a historical time series based on the time information of each of the L time periods;
[0029] Generate a future time series based on the time information of each of the H time periods.
[0030] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0031] The acquisition module is specifically used to acquire the time information of each time period in L time periods. The time information of each time period includes the time period identifier, date determination attribute, hour ordinal number, time period ordinal number, and rest time determination attribute.
[0032] Obtain the time information for each of the H time periods. The time information for each time period includes the time period identifier, date determination attribute, hour ordinal number, time period ordinal number, and rest time determination attribute.
[0033] Generate a historical time series based on the time information of each of the L time periods;
[0034] Generate a future time series based on the time information of each of the H time periods.
[0035] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0036] The module is specifically used to flatten the historical vector sequence to obtain historical feature vectors;
[0037] By concatenating the historical feature vector and the historical behavior sequence, a comprehensive feature vector is obtained.
[0038] The module is specifically used to expand the comprehensive feature vector to obtain H intermediate feature vectors;
[0039] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0040] The prediction module is specifically used to obtain the behavioral probability sequence of the target object based on the recombined vector sequence through a behavioral prediction model;
[0041] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0042] In one possible design, in another implementation of another aspect of the embodiments of this application, the behavior sequence prediction device further includes a training module;
[0043] The acquisition module is also used to acquire a training sample set, wherein the training sample set includes N training samples, each training sample includes a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample of the training object. The historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods, and the future behavior sequence sample includes H actual triggering results corresponding to H sample time periods, where N is an integer greater than or equal to 1.
[0044] The processing module is also used to perform feature embedding processing on the time information sequence samples for each training sample to obtain time vector sequence samples, wherein the time vector sequence samples include historical vector sequence samples and future vector sequence samples.
[0045] The building module is also used to construct a comprehensive feature vector sample for each training sample based on historical vector sequence samples and historical behavior sequence samples;
[0046] The building module is also used to construct a recombined vector sequence sample for each training sample based on future time series samples and comprehensive feature vector samples;
[0047] The acquisition module is also used to acquire the behavior probability sequence sample of the training object based on the recombined vector sequence sample and the behavior prediction model for each training sample.
[0048] The training module is used to train the behavior prediction model based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0049] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0050] The construction module is specifically used to obtain the basic information of the target object, where the basic information of the object is used to describe the basic attributes of the target object;
[0051] The basic information of the object is processed by feature embedding to obtain a static feature vector;
[0052] Flatten the historical vector sequence to obtain the historical feature vector;
[0053] The static feature vector, historical feature vector, and historical behavior sequence are concatenated to obtain a comprehensive feature vector.
[0054] The module is specifically used to expand the comprehensive feature vector to obtain H intermediate feature vectors;
[0055] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0056] The prediction module is specifically used to obtain the behavioral probability sequence of the target object based on the recombined vector sequence through a behavioral prediction model;
[0057] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0058] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0059] The acquisition module is also used to acquire a training sample set, wherein the training sample set includes N training samples, each training sample includes a basic information sample of the training object, a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample. The basic information sample of the object is used to describe the basic attributes of the object. The historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods. The future behavior sequence sample includes H actual triggering results corresponding to H sample time periods. N is an integer greater than or equal to 1.
[0060] The processing module is also used to perform feature embedding processing on the object basic information sample for each training sample to obtain a static feature vector sample.
[0061] The processing module is also used to perform feature embedding processing on the time information sequence samples for each training sample to obtain time vector sequence samples, wherein the time vector sequence samples include historical vector sequence samples and future vector sequence samples.
[0062] The building module is also used to construct a comprehensive feature vector sample for each training sample based on the static feature vector sample, the historical vector sequence sample, and the historical behavior sequence sample.
[0063] The building module is also used to construct a recombined vector sequence sample for each training sample based on future time series samples and comprehensive feature vector samples;
[0064] The acquisition module is also used to acquire the behavior probability sequence sample of the training object based on the recombined vector sequence sample and the behavior prediction model for each training sample.
[0065] The training module is also used to train the behavior prediction model based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0066] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0067] The module is specifically used to flatten the historical vector sequence to obtain historical feature vectors;
[0068] By concatenating the historical feature vector and the historical behavior sequence, a comprehensive feature vector is obtained.
[0069] The module is specifically used to obtain encoded feature vectors from the encoder in the behavior prediction model based on the comprehensive feature vectors.
[0070] Based on the encoded feature vector, the decoded feature vector is obtained through the decoder in the behavior prediction model;
[0071] The decoded feature vectors are expanded to obtain H intermediate feature vectors;
[0072] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0073] The prediction module is specifically used to obtain the behavioral probability sequence of the target object based on the recombined vector sequence through a behavioral prediction model;
[0074] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0075] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0076] The acquisition module is also used to acquire a training sample set, wherein the training sample set includes N training samples, each training sample includes a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample of the training object. The historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods, and the future behavior sequence sample includes H actual triggering results corresponding to H sample time periods, where N is an integer greater than or equal to 1.
[0077] The processing module is also used to perform feature embedding processing on the time information sequence samples for each training sample to obtain time vector sequence samples, wherein the time vector sequence samples include historical vector sequence samples and future vector sequence samples.
[0078] The processing module is also used to construct a comprehensive feature vector sample for each training sample based on historical vector sequence samples and historical behavior sequence samples.
[0079] The acquisition module is also used to acquire encoded feature vector samples for each training sample, based on the comprehensive feature vector samples, through the encoder in the behavior prediction model;
[0080] The acquisition module is also used to acquire decoded feature vector samples for each training sample, based on the encoded feature vector samples, through the decoder in the behavior prediction model;
[0081] The building module is also used to construct a reconstructed vector sequence sample for each training sample, based on future time series samples and decoded feature vector samples;
[0082] The acquisition module is also used to acquire the behavior probability sequence sample of the training object based on the recombined vector sequence sample and the behavior prediction model for each training sample.
[0083] The training module is also used to train the behavior prediction model based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0084] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0085] The construction module is specifically used to obtain the basic information of the target object, where the basic information of the object is used to describe the basic attributes of the target object;
[0086] The basic information of the object is processed by feature embedding to obtain a static feature vector;
[0087] Flatten the historical vector sequence to obtain the historical feature vector;
[0088] The static feature vector, historical feature vector, and historical behavior sequence are concatenated to obtain a comprehensive feature vector.
[0089] The module is specifically used to obtain encoded feature vectors from the encoder in the behavior prediction model based on the comprehensive feature vectors.
[0090] Based on the encoded feature vector, the decoded feature vector is obtained through the decoder in the behavior prediction model;
[0091] The decoded feature vectors are expanded to obtain H intermediate feature vectors;
[0092] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0093] The prediction module is specifically used to obtain the behavioral probability sequence of the target object based on the recombined vector sequence through a behavioral prediction model;
[0094] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0095] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0096] The acquisition module is also used to acquire a training sample set, wherein the training sample set includes N training samples, each training sample includes a basic information sample of the training object, a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample. The basic information sample of the object is used to describe the basic attributes of the object. The historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods. The future behavior sequence sample includes H actual triggering results corresponding to H sample time periods. N is an integer greater than or equal to 1.
[0097] The processing module is also used to perform feature embedding processing on the object basic information sample for each training sample to obtain a static feature vector sample.
[0098] The processing module is also used to perform feature embedding processing on the time information sequence samples for each training sample to obtain time vector sequence samples, wherein the time vector sequence samples include historical vector sequence samples and future vector sequence samples.
[0099] The building module is also used to construct a comprehensive feature vector sample for each training sample based on the static feature vector sample, the historical vector sequence sample, and the historical behavior sequence sample.
[0100] The acquisition module is also used to acquire encoded feature vector samples for each training sample, based on the comprehensive feature vector samples, through the encoder in the behavior prediction model;
[0101] The acquisition module is also used to acquire decoded feature vector samples for each training sample, based on the encoded feature vector samples, through the decoder in the behavior prediction model;
[0102] The building module is also used to construct a reconstructed vector sequence sample for each training sample, based on future time series samples and decoded feature vector samples;
[0103] The acquisition module is also used to acquire the behavior probability sequence sample of the training object based on the recombined vector sequence sample and the behavior prediction model for each training sample.
[0104] The training module is also used to train the behavior prediction model based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0105] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0106] The training module is specifically used to square the difference between the actual triggering result and the triggering probability at the corresponding element position for each training sample, which includes future behavior sequence samples and predicted behavior probability sequences, to obtain H squared differences.
[0107] The mean squared error value for each training sample is obtained by averaging the H squared differences corresponding to each training sample.
[0108] Construct a mean squared error loss function based on the mean squared error value corresponding to each training sample;
[0109] The mean squared error loss function is used to update the model parameters of the behavior prediction model.
[0110] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0111] The training module is specifically used to calculate H cross-entropy components for each training sample, including the future behavior sequence samples and the predicted behavior probability sequence, based on the actual triggering result and triggering probability of the corresponding element position.
[0112] The average value of the H cross-entropy components corresponding to each training sample is calculated to obtain the cross-entropy loss value for each training sample.
[0113] Construct a cross-entropy loss function based on the cross-entropy loss value corresponding to each training sample;
[0114] The cross-entropy loss function is used to update the model parameters of the behavior prediction model.
[0115] In one possible design, in another implementation of another aspect of the embodiments of this application, the behavior sequence prediction device further includes a determination module and a push module;
[0116] The determination module is used to predict the future behavior sequence of the target object based on the recombined vector sequence, and then determine the set of time periods in which the target object triggers interactive behavior based on the future behavior sequence.
[0117] The determination module is also used to determine the target time period from the time period set when the content to be pushed is received, wherein the target time period is the time period closest to the time of receiving the content to be pushed;
[0118] The push module is used to push content to be pushed within a target time period.
[0119] In one possible design, in another implementation of another aspect of the embodiments of this application,
[0120] The acquisition module is also used to acquire a sequence of future behaviors for K objects, where K is an integer greater than or equal to 1;
[0121] The determination module is also used to determine the frequency of interactive behavior triggers for each of the H time periods based on the future behavior sequences of K objects.
[0122] The determination module is also used to determine the resource allocation result based on the frequency of interaction behavior triggers for each time period.
[0123] In another aspect, this application provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the methods described above.
[0124] Another aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods described above.
[0125] Another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the methods described above.
[0126] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0127] This application provides a method for predicting behavior sequences. A time information sequence, including historical and future time sequences, is processed by feature embedding to obtain a time vector sequence. Furthermore, the historical behavior sequence of the target object needs to be obtained. Based on this, a comprehensive feature vector is constructed by combining the historical vector sequence and the historical behavior sequence. Then, a reconstructed vector sequence is constructed based on the future vector sequence and the comprehensive feature vector. Finally, the future behavior sequence of the target object is predicted using the reconstructed vector sequence. Through this method, the historical behavior sequence avoids dependence on specific projects. Therefore, on the one hand, predictions can be made in advance based on the object's own behavior without waiting for the project to arrive, thus improving the real-time performance and accuracy of behavior prediction. On the other hand, since the future behavior sequence is only related to time, it is applicable to more time-related scenarios. Attached Figure Description
[0128] Figure 1 This is a schematic diagram illustrating an application of this application in a content distribution scenario;
[0129] Figure 2 This is a schematic diagram illustrating a resource scheduling scenario in an embodiment of this application;
[0130] Figure 3 This is a schematic diagram illustrating an application of this application in an advertising delivery scenario;
[0131] Figure 4 This is a schematic diagram of an implementation environment for the behavior sequence prediction method in this application.
[0132] Figure 5 This is a flowchart illustrating the behavior sequence prediction method in an embodiment of this application;
[0133] Figure 6 This is a schematic diagram of the architecture of the behavior prediction model in the embodiments of this application;
[0134] Figure 7 This is another schematic diagram of the behavior prediction model in the embodiments of this application;
[0135] Figure 8 This is another schematic diagram of the behavior prediction model in the embodiments of this application;
[0136] Figure 9 This is another schematic diagram of the behavior prediction model in the embodiments of this application;
[0137] Figure 10 This is a schematic diagram of a behavior sequence prediction device in an embodiment of this application;
[0138] Figure 11 This is a schematic diagram of the structure of a computer device in an embodiment of this application. Detailed Implementation
[0139] This application provides a method, related apparatus, device, and storage medium for predicting behavior sequences. It enables prediction based on the behavior of an object in advance, without waiting for the project to arrive, thus improving the real-time performance and accuracy of behavior prediction, and is applicable to more time-related scenarios.
[0140] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0141] It is understood that, in the specific embodiments of this application, data related to interactive behaviors, etc., requires user permission or consent before being used in specific products or technologies. That is, before collecting user data, users can be notified through prompt interfaces, pop-up windows, or voice prompts. The process of collecting user data only begins after obtaining user permission or consent. In other words, all user data collected in this application is collected with the user's consent, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0142] Predicting user interactions over a future period without relying on specific projects allows for the anticipation of user intentions and potential needs, enabling proactive service delivery and risk assessment. This leads to personalized experience optimization and systemic efficiency improvements without the user's awareness, creating sustainable value for business decisions and public services.
[0143] This application provides a method for predicting behavioral sequences. Unlike traditional methods that predict the probability of a user triggering an interaction with a project, this application directly predicts the time sequence of user interactions within a time period, allowing the prediction results to be applied to more time-related scenarios. Simultaneously, it combines recent user behavior sequences to predict future user behavior sequences; that is, by establishing data with temporal continuity, the model can better capture the periodic patterns of interactive behavior.
[0144] Before introducing the specific methods of this application, the application scenarios of this application will be illustrated by example. It should be understood that the following application scenarios are merely illustrative and are not limited to these examples.
[0145] (1) Content distribution scenario;
[0146] Predicting user behavior sequences over a future period plays a crucial role in content distribution. By analyzing past user behavior sequences and predicting their future behavior sequences, content distribution (e.g., search, recommendation) can be made more accurate. Content that aligns with user interests and needs can be pushed based on future behavior sequences, thereby improving user experience and content dissemination effectiveness.
[0147] For example, please refer to Figure 1 , Figure 1 This is a schematic diagram illustrating a content distribution scenario in this application embodiment. As shown in the figure, the content platform provides users with an entry point for "Official Account Messages," and each user has their preferred time to access and read the Official Account. When user A clicks on the "Official Account Messages" entry point indicated by 101, the terminal sends an Official Account access request to the server.
[0148] Taking a day divided into 8 time periods as an example, the server counts whether User A triggered a public account access request in each time period of the day to obtain a historical behavior sequence. Next, the server predicts User A's future behavior sequence for the following day based on this historical behavior sequence. The table shown in the diagram represents the predicted trigger results for User A in each future time period. Based on this, the server can prepare high-quality content in advance according to User A's future behavior sequence. Content updates and pushes are performed during the time periods when User A is most likely to read the content, thus maintaining its timeliness and reach. Here, 102 indicates the public account message notification being pushed.
[0149] (2) Resource scheduling scenario;
[0150] In terms of system resource scheduling, by analyzing the future behavior sequences of a large number of users, the active time periods of user groups can be determined, thereby achieving a reasonable allocation of computing and storage resources. The system can be expanded in advance before the active time period to avoid overload. The system can schedule system maintenance during inactive periods to reduce the impact on user experience.
[0151] For example, please refer to Figure 2 , Figure 2 This is a schematic diagram illustrating a resource scheduling scenario in this application embodiment. As shown in the figure, the content platform provides users with an entry point for "Official Account Messages," and each user has their preferred time to access and read the Official Account. When user A clicks the "Official Account Messages" entry point indicated by 201, terminal 1 sends an Official Account access request to the server. Similarly, when user B clicks the "Official Account Messages" entry point indicated by 202, terminal 2 sends an Official Account access request to the server. This process continues, allowing the server to receive Official Account access requests from each terminal for their respective users.
[0152] Taking a day divided into eight time periods as an example, the server counts whether each user has triggered a request to access the official account during each time period of the day, thus obtaining each user's historical behavior sequence. Next, the server predicts the corresponding future behavior sequence based on each user's historical behavior sequence. The table shown in the figure illustrates the predicted trigger results for users A and B in each future time period. Based on this, the server can determine the active time periods of a user group according to each user's future behavior sequence, thereby providing appropriate services during the appropriate time periods.
[0153] (3) Advertising placement scenarios;
[0154] Predicting user behavior patterns over a future period can guide ad timing, optimize ad inventory forecasting and pricing strategies, and improve user conversion rates and ad revenue. By providing the right service at the right time, the ultimate goal is to achieve a dual improvement in user experience and business efficiency.
[0155] For example, please refer to Figure 3 , Figure 3 This is a schematic diagram illustrating an advertising scenario in this application embodiment. As shown in the figure, the content platform provides users with an entry point for "Official Account Messages," and each user has their preferred time to access the Official Account for clicking and reading. When user A clicks the "Official Account Messages" entry point indicated by 301, that is, the terminal sends an Official Account access request to the server, and user A can see an information stream composed of multiple text and image messages, video messages, etc.
[0156] Taking a day divided into 8 time periods as an example, the server counts whether User A triggered a request to access the official account during each time period of the day, thus obtaining a historical behavior sequence. Next, the server predicts User A's future behavior sequence for the following day based on this historical behavior sequence. The table shown in the diagram represents the predicted trigger results for User A in each future time period. Based on this, the server can push advertisements during the time periods when User A is most likely to read, according to User A's future behavior sequence. The 302 error indicates the content of the pushed advertisement.
[0157] It should be noted that the above application scenarios are merely examples. The behavior sequence prediction method provided in this embodiment can also be applied to other scenarios, such as online customer service scheduling and market trend prediction, etc., without limitation.
[0158] The method provided in this application can be applied to... Figure 4The illustrated implementation environment includes a terminal 401 and a server 402, and the terminal 401 and server 402 can communicate via a network 403. The network 403 uses standard communication technologies and / or protocols, typically the Internet, but can also be any network, including but not limited to Bluetooth, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), mobile, private networks, or any combination of virtual private networks. In some embodiments, customized or dedicated data communication technologies may be used to replace or supplement the aforementioned data communication technologies.
[0159] The terminal 401 involved in this application includes, but is not limited to, mobile phones, tablets, laptops, desktop computers, intelligent voice interaction devices, virtual reality devices, smart home appliances, vehicle terminals, and aircraft. The client is deployed on the terminal 401 and can run on the terminal 401 via a browser, a standalone application (APP), or a mini-program.
[0160] The server 402 involved in this application can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence (AI) platforms.
[0161] It should be noted that this application uses the configuration and deployment of the behavior prediction model on server 402 as an example for illustration. In some embodiments, the configuration of the behavior prediction model can also be deployed on terminal 401. In some embodiments, part of the configuration of the behavior prediction model is deployed on terminal 401, and part of the configuration is deployed on server 402.
[0162] In the above implementation environment, in step S1, if the target user triggers an interactive behavior (e.g., viewing a public account message) through terminal 401, terminal 401 sends an interactive behavior trigger request to server 402 via network 403. While pushing a message to terminal 401, server 402 records the time when the target user triggers the interactive behavior trigger request. In step S2, server 402 obtains a historical behavior sequence and a time information sequence based on the times when the target user triggers interactive behavior trigger requests within a certain period. In step S3, server 402 performs feature embedding processing on the time information sequence to obtain a time vector sequence. In step S4, server 402 constructs a comprehensive feature vector based on the historical vector sequence and the historical behavior sequence. In step S5, server 402 constructs a reconstructed vector sequence based on the future vector sequence and the comprehensive feature vector. In step S6, server 402 calls a behavior prediction model to obtain a future behavior sequence based on the reconstructed vector sequence.
[0163] Based on the above introduction, the prediction method for behavioral sequences in this application will be described below. Please refer to [link / reference needed]. Figure 5 In this application, the method for predicting behavioral sequences can be performed independently by the server, independently by the terminal, or jointly by the terminal and the server. The method provided in this application includes:
[0164] S501. Obtain a time information sequence, wherein the time information sequence includes a historical time sequence and a future time sequence. The historical time sequence includes L time information corresponding to L time periods, and the future time sequence includes H time information corresponding to H time periods. L and H are both integers greater than or equal to 1.
[0165] In one or more embodiments, a time information sequence including historical time series and future time series is obtained. The historical time series includes L time information items, each of which corresponds to a past time period. The future time series includes H time information items, each of which corresponds to a future time period. L represents the number of historical time periods (i.e., the number of time steps from the past to the present). H represents the number of future time periods (i.e., the number of future time steps to be predicted).
[0166] Specifically, taking the prediction of future day's behavior data based on past day's behavior data as an example, assuming a time granularity of 10 minutes, then L = 144, H = 144 (i.e., a day includes 144 ten-minute intervals). Taking the current time as April 12, 2025 as an example, "14:00:00 on April 11, 2025 to 14:10:00 on April 11, 2025" can be considered a time period within the past day, that is, one of L time periods. "16:00:00 on April 13, 2025 to 16:10:00 on April 13, 2025" can be considered a time period within the future day, that is, one of H time periods.
[0167] S502. Perform feature embedding processing on the time information sequence to obtain a time vector sequence, wherein the time vector sequence includes a historical vector sequence and a future vector sequence;
[0168] In one or more embodiments, each time information in the time information sequence is converted into a continuous representation vector, thereby obtaining a time vector sequence. That is, feature embedding processing is performed on the historical time series in the time information sequence to obtain a historical vector sequence, and feature embedding processing is performed on the future time series in the time information sequence to obtain a future vector sequence. The historical vector sequence and the future vector sequence together constitute the time vector sequence.
[0169] Specifically, the time information sequence includes (L+H) time information items. Therefore, a time embedding layer is invoked to perform feature embedding processing on each time information item, obtaining a time feature vector corresponding to each time information item. The time feature vectors corresponding to the L time information items in the historical time sequence constitute a historical vector sequence, represented as x. 1:L The time feature vectors corresponding to the H time information points in the future time series constitute the future vector sequence, which is represented as x. L+1:L+H Based on this, the time vector sequence is represented as x. 1:L+H Furthermore, its dimensions are represented as [(L+H),D t ]. Wherein, the subscript "1:L+H" represents the time feature vector corresponding to the time information from index 1 to (L+H), D t The dimension of the time feature vector (e.g., D) t =32).
[0170] It should be noted that the temporal embedding layer is used to encode temporal information into low-dimensional vectors, enhancing the model's understanding of temporal patterns by capturing the periodicity and sequential features of time series (e.g., hours, days, months). Typically, sine and cosine functions or neural network mappings are used to transform continuous time points into dense vectors.
[0171] S503. Obtain the historical behavior sequence of the target object, wherein the historical behavior sequence includes L actual triggering results corresponding to L time periods, and the actual triggering results are used to indicate whether the target object triggers interactive behavior within the time period.
[0172] In one or more embodiments, the actual triggering results corresponding to each of the L time periods for the target object are obtained, thereby obtaining L actual triggering results. Here, the actual triggering result refers to whether the target object has triggered a relevant behavior (e.g., clicked or not clicked, read or not read, downloaded or not downloaded).
[0173] Specifically, the historical behavior sequence includes L actual triggering results, that is, the historical behavior sequence is represented as y. 1:L The subscript "1:L" represents the actual triggering result from index 1 to L. For example, if the actual triggering result is that the relevant behavior has been triggered, the corresponding element will have a value of 1. If the actual triggering result is that the relevant behavior has not been triggered, the corresponding element will have a value of 0.
[0174] It should be noted that the target object can be a real user, an intelligent robot (e.g., a robot with the ability to interact with the outside world), an automated software program (e.g., a click behavior that can simulate a real user), a game character, etc., and there are no restrictions here.
[0175] S504. Construct a comprehensive feature vector based on the historical vector sequence and the historical behavior sequence;
[0176] In one or more embodiments, the historical vector sequence includes L D t The dimension of the time feature vector is D. t The historical behavior sequence is a one-dimensional feature vector containing L elements; that is, the dimension of the historical behavior sequence is represented by L. Integrating the historical vector sequence and the historical behavior sequence yields a comprehensive feature vector.
[0177] Specifically, the historical vector sequence can first be flattened to obtain an L×D vector. t L×D eigenvectors. Then L×D t The feature vector of dimension D is concatenated with the historical behavior sequence to obtain a comprehensive feature vector. For example, with L = 144 and D... t For example, with a value of 32, the dimension of the comprehensive feature vector is 4752 (i.e., 144 + 144 * 32).
[0178] S505. Based on the future vector sequence and the comprehensive feature vector, construct a recombined vector sequence, wherein the recombined vector sequence includes H recombined feature vectors;
[0179] In one or more embodiments, after obtaining the comprehensive feature vector, one feasible approach is to integrate the comprehensive feature vector with the future vector sequence to obtain a recombined vector sequence. Another feasible approach is to encode and decode the comprehensive feature vector before integrating it with the future vector sequence to obtain a recombined vector sequence. The recombined vector sequence includes H recombined feature vectors, where each recombined feature vector represents a recombined feature vector corresponding to a future time period (i.e., one of the H time periods).
[0180] S506. Based on the recombined vector sequence, predict the future behavior sequence of the target object, wherein the future behavior sequence includes H predicted trigger results corresponding to H time periods, and the predicted trigger results are used to indicate whether the target object triggers interactive behavior within the time period.
[0181] In one or more embodiments, the recombined vector sequence is used as input to a behavior prediction model, which outputs a behavior probability sequence. The behavior probability sequence includes the trigger probability for each of H time periods, and the trigger probability is used to predict the likelihood of the target object triggering interactive behavior within future time periods.
[0182] Specifically, taking H=5 as an example, assume the behavior probability sequence is (0.2, 0.8, 0.7, 0.1, 0.1), and the probability threshold is set to 0.7. For clarity, please refer to Table 1, which is an illustration of determining future behavior sequences based on the behavior probability sequence of the target object.
[0183] Table 1
[0184]
[0185]
[0186] As can be seen, each element in the behavior probability sequence represents the probability that the target object will trigger an interactive behavior within a certain time period in the future. With a probability threshold of 0.7, if an element in the behavior probability sequence is greater than or equal to 0.7, it means the target object will trigger an interactive behavior. If an element in the behavior probability sequence is less than 0.7, it means the target object will not trigger an interactive behavior.
[0187] This application provides a method for predicting behavioral sequences. Through this method, historical behavioral sequences avoid dependence on specific projects, and the fine-grained time-series prediction capability allows the model to capture the fluctuation patterns of a target object within a day. Therefore, on the one hand, predictions can be made in advance based on the object's behavior without waiting for the project to arrive, thus improving the real-time performance and accuracy of behavioral prediction. On the other hand, since future behavioral sequences are only related to time, it is applicable to more time-related scenarios.
[0188] Optionally, in the above Figure 5 Based on one or more corresponding embodiments, in another optional embodiment provided by this application, obtaining the time information sequence specifically includes:
[0189] Obtain the time information for each of the L time periods, where the time information for each time period includes the timestamp of a historical moment within the time period;
[0190] Retrieve the time information for each of the H time periods, where the time information for each time period includes a timestamp of a future moment within the time period;
[0191] Generate a historical time series based on the time information of each of the L time periods;
[0192] Generate a future time series based on the time information of each of the H time periods.
[0193] In one or more embodiments, a method for constructing a time information sequence is described. As can be seen from the foregoing embodiments, timestamps can be used to represent the time information of each time period (i.e., L time periods and H time periods). The following will use a time period of 10 minutes in length and the date of the current day as April 17, 2025 as an example for illustration.
[0194] Specifically, one of the L time periods can be "10:00:00 to 10:10:00 on April 16, 2025". Therefore, a specific moment within this time period is considered a historical moment. For example, the historical moment "10:00:00 on April 16, 2025" would have a timestamp of "1744797600". Based on this, the timestamps corresponding to each of the L time periods are arranged in ascending order to obtain the historical time series.
[0195] Similarly, one of the H time periods can be "10:00:00 to 10:10:00 on April 18, 2025". Therefore, a specific moment within this time period is considered a future moment. For example, if the future moment is "10:00:00 on April 18, 2025", its corresponding timestamp can be represented as "1745035200". Based on this, the timestamps corresponding to each of the H time periods are arranged in ascending order to obtain the future time series.
[0196] Secondly, this application provides a method for constructing a time information sequence. By using timestamps as time information, not only can accurate time identifiers be provided for each data point in the time series, but it also facilitates sorting the data according to timestamps.
[0197] Optionally, in the above Figure 5 Based on one or more corresponding embodiments, in another optional embodiment provided by this application, obtaining the time information sequence specifically includes:
[0198] Obtain the time information for each of the L time periods, where the time information for each time period includes a time period identifier used to uniquely identify the time period;
[0199] Obtain the time information for each of the H time periods, where the time information for each time period includes a time period identifier used to uniquely identify the time period;
[0200] Generate a historical time series based on the time information of each of the L time periods;
[0201] Generate a future time series based on the time information of each of the H time periods.
[0202] In one or more embodiments, another method for constructing time information sequences is introduced. As can be seen from the foregoing embodiments, time period identifiers can be used to represent the time information of each time period (i.e., L time periods and H time periods). The following will take the time period "10:00:00 to 10:10:00 on April 16, 2025" as an example, and the time period identifiers for this time period can be generated in the following three ways.
[0203] Method 1: Use a combination of start and end timestamps;
[0204] Specifically, the timestamps of the start and end times of a time period are combined. For example, in "10:00:00 on April 16, 2025", the timestamp of the start time can be represented as "1744797600" and the timestamp of the end time can be represented as "1744798200". Therefore, the time period identifier of this period can be represented as "1744797600-1744798200".
[0205] Method 2: Use time period coding rules;
[0206] Specifically, the time period identifier can be generated using the format "YYYYMMDDHHMMSS-YYYYMMDDHHMMSS". Therefore, the time period identifier can be represented as "20250416100000-20250416101000".
[0207] Method 3: Use cycle type and sequence number;
[0208] Specifically, taking a time period of 10 minutes as an example, a day (i.e., 24 hours) can be divided into 144 time periods. Each time period is then numbered sequentially from 1 to 144. A time period identifier is generated by combining this identifier with the date. For example, 10:00:00 to 10:10:00 belongs to the 61st time period, and therefore, its identifier can be represented as "2025041661".
[0209] Based on this, after obtaining the time period identifier of each of the L time periods, the L time period identifiers are arranged in order from early to late to obtain the historical time series. After obtaining the time period identifier of each of the H time periods, the H time period identifiers are arranged in order from early to late to obtain the future time series.
[0210] Secondly, this application provides another method for constructing time information sequences. By using time period identifiers as time information in this way, the uniqueness and continuity of data records can be ensured. At the same time, standardized time period identifiers help improve data processing efficiency, reduce the risk of data duplication or omission, and provide a reliable foundation for time series data analysis and trend prediction.
[0211] Optionally, in the above Figure 5 Based on one or more corresponding embodiments, in another optional embodiment provided by this application, obtaining the time information sequence specifically includes:
[0212] Obtain the time information for each of the L time periods. The time information for each time period includes the time period identifier, date determination attribute, hour ordinal number, time period ordinal number, and rest time determination attribute.
[0213] Obtain the time information for each of the H time periods. The time information for each time period includes the time period identifier, date determination attribute, hour ordinal number, time period ordinal number, and rest time determination attribute.
[0214] Generate a historical time series based on the time information of each of the L time periods;
[0215] Generate a future time series based on the time information of each of the H time periods.
[0216] In one or more embodiments, another method for constructing time information sequences is provided. As can be seen from the foregoing embodiments, time information for each time period (i.e., L time periods and H time periods) can be represented by time period identifiers, date determination attributes, hour ordinal numbers, time period ordinal numbers, and rest time determination attributes. The following will use the time period "10:00:00 to 10:10:00 on April 16, 2025" as an example for introduction.
[0217] It should be noted that the method for generating time period identifiers can refer to the aforementioned embodiments, and will not be repeated here.
[0218] For example, the date determination attribute indicates whether the date is a working day. If it is a working day, the date determination attribute is "1"; if it is not a working day, the date determination attribute is "0". A working day refers to the time unit within which an employee works during the legally mandated working hours, typically Monday to Friday (excluding statutory holidays). Since April 16, 2025, is a Wednesday and not a statutory holiday, its corresponding date determination attribute is "1".
[0219] For example, hour ordinal numbers are usually generated by numbering the 24 hours of a day sequentially starting from 0, such as 0, 1, 2, 3...23. Since 10:00:00 to 10:10:00 on April 16, 2025 is the 10th hour, its corresponding hour ordinal number is "10".
[0220] For example, time segment ordinal numbers are a way of segmenting and numbering time to identify the position or order of different time segments within a series of time intervals. Taking a time interval of 1 hour as an example, assuming each 10-minute interval is divided into a time segment, there are 6 time segments. The first 10-minute interval has an ordinal number of "1", the second 10-minute interval has an ordinal number of "2", and so on. Since 10:00:00 to 10:10:00 on April 16, 2025 belongs to the first hour, its corresponding hour ordinal number is "1".
[0221] For example, the rest time determination attribute indicates whether the time falls within a rest period. If it falls within a rest period, the rest time determination attribute is "1"; otherwise, it is "0". The rest period can be set to 19:00:00 to 23:00:00. Since 10:00:00 to 10:10:00 on April 16, 2025, is not within a rest period, its corresponding rest time determination attribute is "0".
[0222] In summary, the time information corresponding to the time period "10:00:00 to 10:10:00 on April 16, 2025" can be represented as (2025041661,1,10,1,0).
[0223] Based on this, after obtaining the relevant information for each of the L time periods (i.e., time period identifier, date determination attribute, hour ordinal number, time period ordinal number, and rest period determination attribute), the L relevant information are arranged in order from morning to night to obtain the historical time series. After obtaining the relevant information for each of the H time periods, the H relevant information are arranged in order from morning to night to obtain the future time series.
[0224] Secondly, this application provides another method for constructing time information sequences. By using the time period identifier, date determination attribute, hourly ordinal number, time period ordinal number, and rest period determination attribute as time information, a more comprehensive and accurate description of time information can be achieved, enhancing the ability to express time information and facilitating more accurate analysis and prediction of time. Simultaneously, it also improves the model's adaptability and generalization ability, enabling it to better handle various complex time series data and practical application scenarios.
[0225] Optionally, in the above Figure 5 Based on one or more corresponding embodiments, in another optional embodiment provided by this application, a comprehensive feature vector is constructed according to the historical vector sequence and the historical behavior sequence, specifically including:
[0226] Flatten the historical vector sequence to obtain the historical feature vector;
[0227] By concatenating the historical feature vector and the historical behavior sequence, a comprehensive feature vector is obtained.
[0228] Based on the future vector sequence and the comprehensive feature vector, a reconstructed vector sequence is constructed, specifically including:
[0229] The comprehensive feature vector is expanded to obtain H intermediate feature vectors;
[0230] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0231] Based on the recombined vector sequence, the future behavior sequence of the target object is predicted, specifically including:
[0232] Based on the recombined vector sequence, the behavioral probability sequence of the target object is obtained through a behavioral prediction model;
[0233] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0234] In one or more embodiments, a method for predicting future behavioral sequences is described. As can be seen from the foregoing embodiments, after flattening the historical vector sequence, an L×D sequence can be obtained. t The historical eigenvectors of dimension L×D. t By concatenating the historical feature vector of dimension L with the historical behavior sequence of dimension L, we can obtain L+L×D. t A comprehensive feature vector of dimension 1. The following section uses the i-th object as an example to illustrate the process of predicting the future behavior sequence of the i-th object based on its comprehensive feature vector.
[0235] Specifically, the behavior prediction model is an end-to-end time-series prediction architecture. For easier understanding, please refer to [link to relevant documentation]. Figure 6 , Figure 6 As shown in the figure, this is a schematic diagram of the architecture of the behavior prediction model in this application embodiment. First, the time embedding layer of the behavior prediction model is called to process the time information sequence of the i-th object. Feature embedding is performed to obtain a time vector sequence. That is, the historical time series in the time information series. The historical vector sequence is obtained after feature embedding. Future time series in time information series The future vector sequence is obtained after feature embedding processing.
[0236] Then, the historical vector sequence of the i-th object is extracted from the time vector sequence. Subsequently, the historical vector sequence is flattened and compared with the historical behavior sequence. The features are concatenated to obtain the combined feature vector (F_combined).
[0237] Next, the comprehensive feature vector is unflattened to obtain the intermediate vector sequence. The intermediate vector sequence consists of H intermediate feature vectors. The unpacking process refers to restoring a flattened data structure into a hierarchical data form. Assuming the comprehensive feature vector has a dimension of 4752, with H equal to 144, unpacking the comprehensive feature vector yields H intermediate feature vectors, each with a dimension of 33.
[0238] Based on this, the future vector sequence of the i-th object is extracted from the time vector sequence. Then, each intermediate feature vector is concatenated with the time feature vector of the corresponding time period in the future vector sequence to obtain H recombined feature vectors. These H recombined feature vectors constitute a recombined vector sequence. Since the dimension of the time feature vector is D... t The dimension of the intermediate feature vector is D. d Therefore, the dimension of the recombined feature vector is represented as D. t +D d The dimensions of the recombined vector sequence are represented as [H, (D t +D d )).
[0239] Finally, the recombined vector sequence is processed by the temporal predictor in the behavior prediction model, thereby obtaining the behavior probability sequence of the i-th object. The timing predictor in this application can employ a multi-layer perceptron (MLP). An MLP is a feedforward neural network consisting of at least three layers of neurons: an input layer, a hidden layer, and an output layer. Each layer combines linear and nonlinear transformations.
[0240] It is understood that the method for determining the future behavior sequence based on the behavior probability sequence of the i-th object can be found in the aforementioned embodiments, and will not be repeated here.
[0241] Secondly, this application provides a method for predicting future behavior sequences. Through the above method, the comprehensive feature vector is expanded and then concatenated with the future vector sequence to form a recombined vector sequence for predicting future behavior sequences. Therefore, the model can directly process the original data, preserving the complete characteristics of the data and reducing information loss. At the same time, it simplifies the model structure, thereby reducing computational costs and time consumption, and improving the model's inference efficiency.
[0242] Optionally, in the above Figure 5 In addition to one or more corresponding embodiments, another optional embodiment provided in this application may further include:
[0243] Obtain a training sample set, which includes N training samples. Each training sample includes historical behavior sequence samples, time information sequence samples, and future behavior sequence samples of the training object. The historical behavior sequence samples include L actual triggering results corresponding to L sample time periods, and the future behavior sequence samples include H actual triggering results corresponding to H sample time periods. N is an integer greater than or equal to 1.
[0244] For each training sample, feature embedding processing is performed on the time information sequence sample to obtain a time vector sequence sample, which includes historical vector sequence samples and future vector sequence samples.
[0245] For each training sample, a comprehensive feature vector sample is constructed based on historical vector sequence samples and historical behavior sequence samples;
[0246] For each training sample, a reconstructed vector sequence sample is constructed based on future time series samples and comprehensive feature vector samples;
[0247] For each training sample, based on the recombined vector sequence sample, the behavior probability sequence sample of the training object is obtained through the behavior prediction model;
[0248] The behavior prediction model is trained based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0249] In one or more embodiments, a method for training a behavior prediction model is described. As can be seen from the foregoing embodiments, in order to improve the prediction accuracy of the behavior prediction model, it is also necessary to train the behavior prediction model using a training sample set.
[0250] Specifically, first, a training sample set is obtained, which includes N training samples. Taking the i-th training sample as an example, its composition is as follows: in, This represents a historical behavior sequence sample of the i-th training object. This represents the time vector sequence sample of the i-th training object. This represents a future behavior sequence sample for the i-th training object.
[0251] Based on this, taking the i-th training object as an example, the temporal embedding layer of the behavior prediction model is invoked to perform feature embedding processing on the temporal information sequence samples, resulting in a temporal vector sequence sample. This temporal vector sequence sample includes historical vector sequence samples and future vector sequence samples. Then, the historical vector sequence sample is flattened and concatenated with the historical behavior sequence sample to obtain a comprehensive feature vector sample. Next, the comprehensive feature vector sample is expanded to obtain H intermediate feature vector samples. Based on this, each intermediate feature vector sample is concatenated with the temporal feature vector of the corresponding time period in the future vector sequence sample to obtain H recombined feature vector samples. These H recombined feature vector samples constitute a recombined vector sequence sample. Finally, the temporal predictor in the behavior prediction model processes the recombined vector sequence sample, thereby obtaining the behavior probability sequence sample of the i-th training object.
[0252] Since the probability sequence sample of the behavior of the i-th object belongs to the predicted result, and the sample of the future behavior belongs to the true result, the behavior prediction model is called to fit the mapping function so that the predicted result approximates the true result on the training sample set. This process can be represented as follows:
[0253]
[0254] Where f represents the mapping function fitted by the behavior prediction model.
[0255] Furthermore, this application provides a method for training a behavior prediction model. Through this method, the model can directly process the raw data, preserving the complete characteristics of the data and reducing information loss. Simultaneously, it simplifies the model structure, thereby reducing the complexity of the training process and improving the model's training efficiency.
[0256] Optionally, in the above Figure 5 Based on one or more corresponding embodiments, in another optional embodiment provided by this application, a comprehensive feature vector is constructed according to the historical vector sequence and the historical behavior sequence, specifically including:
[0257] Obtain the basic information of the target object, where the basic information describes the basic attributes of the target object;
[0258] The basic information of the object is processed by feature embedding to obtain a static feature vector;
[0259] Flatten the historical vector sequence to obtain the historical feature vector;
[0260] The static feature vector, historical feature vector, and historical behavior sequence are concatenated to obtain a comprehensive feature vector.
[0261] Based on the future vector sequence and the comprehensive feature vector, a reconstructed vector sequence is constructed, specifically including:
[0262] The comprehensive feature vector is expanded to obtain H intermediate feature vectors;
[0263] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0264] Based on the recombined vector sequence, the future behavior sequence of the target object is predicted, specifically including:
[0265] Based on the recombined vector sequence, the behavioral probability sequence of the target object is obtained through a behavioral prediction model;
[0266] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0267] In one or more embodiments, a method for predicting future behavioral sequences is described. As can be seen from the foregoing embodiments, after flattening the historical vector sequence, an L×D sequence can be obtained. t A historical feature vector of dimension D. Furthermore, feature embedding processing is performed on basic object information (e.g., object's age, gender, interest categories, etc.) to obtain D. a A static eigenvector of dimension L×D. t L-dimensional historical feature vectors and L-dimensional historical behavior sequences and D a After concatenating the static feature vectors of dimension L, we can obtain L+L×D. t +D a A comprehensive feature vector of dimension 1. The following section uses the i-th object as an example to illustrate the process of predicting the future behavior sequence of the i-th object based on its comprehensive feature vector.
[0268] Specifically, the behavior prediction model is an end-to-end time-series prediction architecture. For easier understanding, please refer to [link to relevant documentation]. Figure 7 , Figure 7 As shown in the figure, another architectural diagram of the behavior prediction model in this application embodiment is presented. First, the temporal embedding layer of the behavior prediction model is called to obtain the temporal information sequence of the i-th object. Feature embedding is performed to obtain a time vector sequence. That is, the historical time series in the time information series. The historical vector sequence is obtained after feature embedding. Future time series in time information series The future vector sequence is obtained after feature embedding processing. In addition, it is necessary to call the attribute embedding layer of the behavior prediction model to obtain the basic object information (w) of the i-th object.i The feature embedding process is performed to obtain the static feature vector (a). i ).
[0269] Then, the historical vector sequence of the i-th object is extracted from the time vector sequence. Subsequently, the historical vector sequence is flattened and compared with the historical behavior sequence. The static feature vectors are concatenated to obtain the comprehensive feature vector (F_combined).
[0270] Next, the comprehensive feature vector is expanded to obtain the intermediate vector sequence. The intermediate vector sequence consists of H intermediate feature vectors.
[0271] Based on this, the future vector sequence of the i-th object is extracted from the time vector sequence. Then, each intermediate feature vector is concatenated with the time feature vector of the corresponding time period in the future vector sequence to obtain H recombined feature vectors. These H recombined feature vectors constitute a recombined vector sequence. Since the dimension of the time feature vector is D... t The dimension of the intermediate feature vector is D. d Therefore, the dimension of the recombined feature vector is represented as D. t +D d The dimensions of the recombined vector sequence are represented as [H, (D t +D d )).
[0272] Finally, the recombined vector sequence is processed by the temporal predictor in the behavior prediction model, thereby obtaining the behavior probability sequence of the i-th object.
[0273] It is understood that the method for determining the future behavior sequence based on the behavior probability sequence of the i-th object can be found in the aforementioned embodiments, and will not be repeated here.
[0274] Secondly, this application provides another method for predicting future behavior sequences. This method, on the one hand, introduces basic object information as the basis for model prediction, improving prediction accuracy. On the other hand, after expanding the comprehensive feature vector, it is concatenated with the future vector sequence to form a recombined vector sequence for predicting future behavior sequences. Therefore, the model can directly process the original data, preserving the complete characteristics of the data and reducing information loss. Simultaneously, it simplifies the model structure, thereby reducing computational costs and time consumption, and improving the model's inference efficiency.
[0275] Optionally, in the above Figure 5 In addition to one or more corresponding embodiments, another optional embodiment provided in this application may further include:
[0276] Obtain a training sample set, which includes N training samples. Each training sample includes a basic information sample of the training object, a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample. The historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods, and the future behavior sequence sample includes H actual triggering results corresponding to H sample time periods. N is an integer greater than or equal to 1.
[0277] For each training sample, feature embedding processing is performed on the object's basic information sample to obtain a static feature vector sample;
[0278] For each training sample, feature embedding processing is performed on the time information sequence sample to obtain a time vector sequence sample, which includes historical vector sequence samples and future vector sequence samples.
[0279] For each training sample, a comprehensive feature vector sample is constructed based on the static feature vector sample, the historical vector sequence sample, and the historical behavior sequence sample.
[0280] For each training sample, a reconstructed vector sequence sample is constructed based on future time series samples and comprehensive feature vector samples;
[0281] For each training sample, based on the recombined vector sequence sample, the behavior probability sequence sample of the training object is obtained through the behavior prediction model;
[0282] The behavior prediction model is trained based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0283] In one or more embodiments, another method for training a behavior prediction model is described. As can be seen from the foregoing embodiments, in order to improve the prediction accuracy of the behavior prediction model, it is also necessary to train the behavior prediction model using a training sample set.
[0284] Specifically, first, a training sample set is obtained, which includes N training samples. Taking the i-th training sample as an example, its composition is as follows: in, This represents a historical behavior sequence sample of the i-th training object. w represents the time vector sequence sample of the i-th training object. (i) This represents a sample of basic information about the i-th training object. This represents a future behavior sequence sample for the i-th training object.
[0285] Based on this, taking the i-th training object as an example, the temporal embedding layer of the behavior prediction model is called to perform feature embedding processing on the temporal information sequence samples, resulting in a time vector sequence sample. This time vector sequence sample includes historical vector sequence samples and future vector sequence samples. Furthermore, the attribute embedding layer of the behavior prediction model is called to perform feature embedding processing on the object's basic information samples, resulting in a static feature vector sample.
[0286] Therefore, the historical vector sequence samples are flattened and concatenated with the static feature vector samples and historical behavior sequence samples to obtain a comprehensive feature vector sample. Next, the comprehensive feature vector sample is expanded to obtain H intermediate feature vector samples. Based on this, each intermediate feature vector sample is concatenated with the time feature vector of the corresponding time period in the future vector sequence samples to obtain H recombined feature vector samples. These H recombined feature vector samples constitute the recombined vector sequence sample. Finally, the recombined vector sequence sample is processed by the temporal predictor in the behavior prediction model to obtain the behavior probability sequence sample of the i-th training object.
[0287] Since the probability sequence sample of the behavior of the i-th object belongs to the predicted result, and the sample of the future behavior belongs to the true result, the behavior prediction model is called to fit the mapping function so that the predicted result approximates the true result on the training sample set. This process can be represented as follows:
[0288]
[0289] Where f represents the mapping function fitted by the behavior prediction model.
[0290] Furthermore, this application provides another method for training behavior prediction models. By introducing basic object information samples for model training, the feature dimensions of the model can be enriched, which helps improve the model's generalization ability and makes it more accurate in prediction. In addition, the model can directly process raw data, preserving the complete characteristics of the data and reducing information loss. At the same time, it simplifies the model structure, thereby reducing the complexity of the training process and improving the model's training efficiency.
[0291] Optionally, in the above Figure 5 Based on one or more corresponding embodiments, in another optional embodiment provided by this application, a comprehensive feature vector is constructed according to the historical vector sequence and the historical behavior sequence, specifically including:
[0292] Flatten the historical vector sequence to obtain the historical feature vector;
[0293] By concatenating the historical feature vector and the historical behavior sequence, a comprehensive feature vector is obtained.
[0294] Based on the future vector sequence and the comprehensive feature vector, a reconstructed vector sequence is constructed, specifically including:
[0295] Based on the comprehensive feature vector, the encoded feature vector is obtained through the encoder in the behavior prediction model;
[0296] Based on the encoded feature vector, the decoded feature vector is obtained through the decoder in the behavior prediction model;
[0297] The decoded feature vectors are expanded to obtain H intermediate feature vectors;
[0298] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0299] Based on the recombined vector sequence, the future behavior sequence of the target object is predicted, specifically including:
[0300] Based on the recombined vector sequence, the behavioral probability sequence of the target object is obtained through a behavioral prediction model;
[0301] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0302] In one or more embodiments, another method for predicting future behavioral sequences is introduced. As can be seen from the foregoing embodiments, after flattening the historical vector sequence, an L×D sequence can be obtained. t The historical eigenvectors of dimension L×D. t By concatenating the historical feature vector of dimension L with the historical behavior sequence of dimension L, we can obtain L+L×D. t A comprehensive feature vector of dimension 1. The following section uses the i-th object as an example to illustrate the process of predicting the future behavior sequence of the i-th object based on its comprehensive feature vector.
[0303] Specifically, the behavior prediction model is an end-to-end time-series prediction architecture. For easier understanding, please refer to [link to relevant documentation]. Figure 8 , Figure 8 As shown in the figure, another architectural diagram of the behavior prediction model in this application embodiment is presented. First, the temporal embedding layer of the behavior prediction model is called to obtain the temporal information sequence of the i-th object. Feature embedding is performed to obtain a time vector sequence. That is, the historical time series in the time information series. The historical vector sequence is obtained after feature embedding. Future time series in time information series The future vector sequence is obtained after feature embedding processing.
[0304] Then, the historical vector sequence of the i-th object is extracted from the time vector sequence. Subsequently, the historical vector sequence is flattened and compared with the historical behavior sequence. The features are concatenated to obtain the combined feature vector (F_combined).
[0305] Next, the comprehensive feature vector of the i-th object is input into the encoder in the behavior prediction model, and the encoder outputs D. e dimensional encoded feature vector (e) i ), where D e It can be 256. The encoded feature vector of the i-th object is input into the decoder in the behavior prediction model, and the decoder outputs the decoded feature vector (d). i ).
[0306] Therefore, the decoded feature vectors are expanded to obtain the intermediate vector sequence. The intermediate vector sequence consists of H intermediate feature vectors.
[0307] Based on this, the future vector sequence of the i-th object is extracted from the time vector sequence. Then, each intermediate feature vector is concatenated with the time feature vector of the corresponding time period in the future vector sequence to obtain H recombined feature vectors. These H recombined feature vectors constitute a recombined vector sequence. Since the dimension of the time feature vector is D... t The dimension of the intermediate feature vector is D. d Therefore, the dimension of the recombined feature vector is represented as D. t +D d The dimensions of the recombined vector sequence are represented as [H, (D t +D d )).
[0308] Finally, the recombined vector sequence is processed by the temporal predictor in the behavior prediction model, thereby obtaining the behavior probability sequence of the i-th object.
[0309] It is understood that the method for determining the future behavior sequence based on the behavior probability sequence of the i-th object can be found in the aforementioned embodiments, and will not be repeated here.
[0310] Secondly, this application provides another method for predicting future behavior sequences. Using the method described above, the comprehensive feature vector is encoded and decoded, and then the decoded feature vector is expanded and concatenated with the future vector sequence to form a recombinant vector sequence for predicting future behavior sequences. Based on this, the encoder compresses the comprehensive feature vector to retain regular behavior patterns, while the decoder diffuses these patterns across different time periods. This enhances the expressive power of the features, enabling the model to better capture the inherent patterns in the data, thereby improving the model's prediction accuracy.
[0311] Optionally, in the above Figure 5 In addition to one or more corresponding embodiments, another optional embodiment provided in this application may further include:
[0312] Obtain a training sample set, which includes N training samples. Each training sample includes historical behavior sequence samples, time information sequence samples, and future behavior sequence samples of the training object. The historical behavior sequence samples include L actual triggering results corresponding to L sample time periods, and the future behavior sequence samples include H actual triggering results corresponding to H sample time periods. N is an integer greater than or equal to 1.
[0313] For each training sample, feature embedding processing is performed on the time information sequence sample to obtain a time vector sequence sample, which includes historical vector sequence samples and future vector sequence samples.
[0314] For each training sample, a comprehensive feature vector sample is constructed based on historical vector sequence samples and historical behavior sequence samples;
[0315] For each training sample, based on the comprehensive feature vector sample, the encoded feature vector sample is obtained through the encoder in the behavior prediction model;
[0316] For each training sample, based on the encoded feature vector sample, the decoded feature vector sample is obtained through the decoder in the behavior prediction model;
[0317] For each training sample, a reconstructed vector sequence sample is constructed based on future time series samples and decoded feature vector samples;
[0318] For each training sample, based on the recombined vector sequence sample, the behavior probability sequence sample of the training object is obtained through the behavior prediction model;
[0319] The behavior prediction model is trained based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0320] In one or more embodiments, another method for training a behavior prediction model is described. As can be seen from the foregoing embodiments, in order to improve the prediction accuracy of the behavior prediction model, it is also necessary to train the behavior prediction model using a training sample set.
[0321] Specifically, first, a training sample set is obtained, which includes N training samples. Taking the i-th training sample as an example, its composition is as follows: in, This represents a historical behavior sequence sample of the i-th training object. This represents the time vector sequence sample of the i-th training object. This represents a future behavior sequence sample for the i-th training object.
[0322] Based on this, taking the i-th training object as an example, the temporal embedding layer of the behavior prediction model is invoked to perform feature embedding processing on the temporal information sequence samples, obtaining a temporal vector sequence sample. This temporal vector sequence sample includes historical vector sequence samples and future vector sequence samples. Then, the historical vector sequence sample is flattened and concatenated with the historical behavior sequence sample to obtain a comprehensive feature vector sample. Next, the comprehensive feature vector sample of the i-th training object is input into the encoder in the behavior prediction model, and the encoder outputs an encoded feature vector sample. Finally, the encoded feature vector sample of the i-th training object is input into the decoder in the behavior prediction model, and the decoder outputs a decoded feature vector sample.
[0323] Therefore, the decoded feature vector samples are expanded to obtain H intermediate feature vector samples. Based on this, each intermediate feature vector sample is concatenated with the time feature vector of the corresponding time period in the future vector sequence samples to obtain H recombined feature vector samples. These H recombined feature vector samples constitute the recombined vector sequence samples. Finally, the recombined vector sequence samples are processed by the temporal predictor in the behavior prediction model to obtain the behavior probability sequence sample of the i-th training object.
[0324] Since the probability sequence sample of the behavior of the i-th object belongs to the predicted result, and the sample of the future behavior belongs to the true result, the behavior prediction model is called to fit the mapping function so that the predicted result approximates the true result on the training sample set. This process can be represented as follows:
[0325]
[0326] Where f represents the mapping function fitted by the behavior prediction model.
[0327] Furthermore, this application provides another method for training behavior prediction models. By using an encoder and decoder to process the data in this way, the expressive power of features can be enhanced, enabling the model to better capture the inherent patterns in the data, thereby improving the model's prediction accuracy.
[0328] Optionally, in the above Figure 5 Based on one or more corresponding embodiments, in another optional embodiment provided by this application, a comprehensive feature vector is constructed according to the historical vector sequence and the historical behavior sequence, specifically including:
[0329] Obtain the basic information of the target object, where the basic information describes the basic attributes of the target object;
[0330] The basic information of the object is processed by feature embedding to obtain a static feature vector;
[0331] Flatten the historical vector sequence to obtain the historical feature vector;
[0332] The static feature vector, historical feature vector, and historical behavior sequence are concatenated to obtain a comprehensive feature vector.
[0333] Based on the future vector sequence and the comprehensive feature vector, a reconstructed vector sequence is constructed, specifically including:
[0334] Based on the comprehensive feature vector, the encoded feature vector is obtained through the encoder in the behavior prediction model;
[0335] Based on the encoded feature vector, the decoded feature vector is obtained through the decoder in the behavior prediction model;
[0336] The decoded feature vectors are expanded to obtain H intermediate feature vectors;
[0337] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0338] Based on the recombined vector sequence, the future behavior sequence of the target object is predicted, specifically including:
[0339] Based on the recombined vector sequence, the behavioral probability sequence of the target object is obtained through a behavioral prediction model;
[0340] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0341] In one or more embodiments, another method for predicting future behavioral sequences is introduced. As can be seen from the foregoing embodiments, after flattening the historical vector sequence, an L×D sequence can be obtained. t A historical feature vector of dimension D. Furthermore, feature embedding processing is performed on basic object information (e.g., object's age, gender, interest categories, etc.) to obtain D. a A static eigenvector of dimension L×D. t L-dimensional historical feature vectors and L-dimensional historical behavior sequences and D a After concatenating the static feature vectors of dimension L, we can obtain L+L×D. t +D a A comprehensive feature vector of dimension 1. The following section uses the i-th object as an example to illustrate the process of predicting the future behavior sequence of the i-th object based on its comprehensive feature vector.
[0342] Specifically, the behavior prediction model is an end-to-end time-series prediction architecture. For easier understanding, please refer to [link to relevant documentation]. Figure 9, Figure 9 As shown in the figure, another architectural diagram of the behavior prediction model in this application embodiment is presented. First, the temporal embedding layer of the behavior prediction model is called to obtain the temporal information sequence of the i-th object. Feature embedding is performed to obtain a time vector sequence. That is, the historical time series in the time information series. The historical vector sequence is obtained after feature embedding. Future time series in time information series The future vector sequence is obtained after feature embedding processing. In addition, it is necessary to call the attribute embedding layer of the behavior prediction model to obtain the object basic information (w) of the i-th object. i The feature embedding process is performed to obtain the static feature vector (a). i ).
[0343] Then, the historical vector sequence of the i-th object is extracted from the time vector sequence. Subsequently, the historical vector sequence is flattened and compared with the historical behavior sequence. The static feature vectors are concatenated to obtain the comprehensive feature vector (F_combined).
[0344] Next, the comprehensive feature vector of the i-th object is input into the encoder in the behavior prediction model, and the encoder outputs D. e dimensional encoded feature vector (e) i ), where D e It can be 256. The encoded feature vector of the i-th object is input into the decoder in the behavior prediction model, and the decoder outputs the decoded feature vector (d). i ).
[0345] Therefore, the decoded feature vectors are expanded to obtain the intermediate vector sequence. The intermediate vector sequence consists of H intermediate feature vectors.
[0346] Based on this, the future vector sequence of the i-th object is extracted from the time vector sequence. Then, each intermediate feature vector is concatenated with the time feature vector of the corresponding time period in the future vector sequence to obtain H recombined feature vectors. These H recombined feature vectors constitute a recombined vector sequence. Since the dimension of the time feature vector is D... t The dimension of the intermediate feature vector is D. d Therefore, the dimension of the recombined feature vector is represented as D. t +D d The dimensions of the recombined vector sequence are represented as [H, (D t +D d )).
[0347] Finally, the recombined vector sequence is processed by the temporal predictor in the behavior prediction model, thereby obtaining the behavior probability sequence of the i-th object.
[0348] It is understood that the method for determining the future behavior sequence based on the behavior probability sequence of the i-th object can be found in the aforementioned embodiments, and will not be repeated here.
[0349] Secondly, this application provides another method for predicting future behavioral sequences. This method, on the one hand, introduces basic object information as the basis for model prediction, improving prediction accuracy. On the other hand, it utilizes an encoder to compress the comprehensive feature vector, thereby preserving regular behavioral patterns, and a decoder to diffuse these patterns across different time periods. This enhances the expressive power of the features, enabling the model to better capture the inherent patterns in the data, thus improving the model's prediction accuracy.
[0350] Optionally, in the above Figure 5 In addition to one or more corresponding embodiments, another optional embodiment provided in this application may further include:
[0351] Obtain a training sample set, which includes N training samples. Each training sample includes a basic information sample of the training object, a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample. The historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods, and the future behavior sequence sample includes H actual triggering results corresponding to H sample time periods. N is an integer greater than or equal to 1.
[0352] For each training sample, feature embedding processing is performed on the object's basic information sample to obtain a static feature vector sample;
[0353] For each training sample, feature embedding processing is performed on the time information sequence sample to obtain a time vector sequence sample, which includes historical vector sequence samples and future vector sequence samples.
[0354] For each training sample, a comprehensive feature vector sample is constructed based on the static feature vector sample, the historical vector sequence sample, and the historical behavior sequence sample.
[0355] For each training sample, based on the comprehensive feature vector sample, the encoded feature vector sample is obtained through the encoder in the behavior prediction model;
[0356] For each training sample, based on the encoded feature vector sample, the decoded feature vector sample is obtained through the decoder in the behavior prediction model;
[0357] For each training sample, a reconstructed vector sequence sample is constructed based on future time series samples and decoded feature vector samples;
[0358] For each training sample, based on the recombined vector sequence sample, the behavior probability sequence sample of the training object is obtained through the behavior prediction model;
[0359] The behavior prediction model is trained based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0360] In one or more embodiments, another method for training a behavior prediction model is described. As can be seen from the foregoing embodiments, in order to improve the prediction accuracy of the behavior prediction model, it is also necessary to train the behavior prediction model using a training sample set.
[0361] Specifically, first, a training sample set is obtained, which includes N training samples. Taking the i-th training sample as an example, its composition is as follows: in, This represents a historical behavior sequence sample of the i-th training object. w represents the time vector sequence sample of the i-th training object. (i) This represents a sample of basic information about the i-th training object. This represents a future behavior sequence sample for the i-th training object.
[0362] Based on this, taking the i-th training object as an example, the temporal embedding layer of the behavior prediction model is called to perform feature embedding processing on the temporal information sequence samples, resulting in a time vector sequence sample. This time vector sequence sample includes historical vector sequence samples and future vector sequence samples. Furthermore, the attribute embedding layer of the behavior prediction model is called to perform feature embedding processing on the object's basic information samples, resulting in a static feature vector sample.
[0363] Therefore, the historical vector sequence samples are flattened and concatenated with the static feature vector samples and historical behavior sequence samples to obtain a comprehensive feature vector sample. Next, the comprehensive feature vector sample of the i-th training object is input into the encoder in the behavior prediction model, and the encoder outputs an encoded feature vector sample. The encoded feature vector sample of the i-th training object is then input into the decoder in the behavior prediction model, and the decoder outputs a decoded feature vector sample.
[0364] Therefore, the decoded feature vector samples are expanded to obtain H intermediate feature vector samples. Based on this, each intermediate feature vector sample is concatenated with the time feature vector of the corresponding time period in the future vector sequence samples to obtain H recombined feature vector samples. These H recombined feature vector samples constitute the recombined vector sequence samples. Finally, the recombined vector sequence samples are processed by the temporal predictor in the behavior prediction model to obtain the behavior probability sequence sample of the i-th training object.
[0365] Since the probability sequence sample of the behavior of the i-th object belongs to the predicted result, and the sample of the future behavior belongs to the true result, the behavior prediction model is called to fit the mapping function so that the predicted result approximates the true result on the training sample set. This process can be represented as follows:
[0366]
[0367] Where f represents the mapping function fitted by the behavior prediction model.
[0368] Furthermore, this application provides another method for training behavior prediction models. By introducing basic object information samples for model training in this way, the feature dimensions of the model can be enriched, which helps improve the model's generalization ability. In addition, processing the data using encoders and decoders can enhance the expressive power of features, enabling the model to better capture the inherent patterns in the data, thereby improving the model's prediction accuracy.
[0369] Optionally, in the above Figure 5 Based on one or more corresponding embodiments, in another optional embodiment provided by this application, the behavior prediction model is trained according to the future behavior sequence samples included in each training sample and the predicted behavior probability sequence, specifically including:
[0370] For each training sample, including the future behavior sequence samples and the predicted behavior probability sequence, the difference between the actual triggering result and the triggering probability at the corresponding element position is squared to obtain H squared differences.
[0371] The mean squared error value for each training sample is obtained by averaging the H squared differences corresponding to each training sample.
[0372] Construct a mean squared error loss function based on the mean squared error value corresponding to each training sample;
[0373] The mean squared error loss function is used to update the model parameters of the behavior prediction model.
[0374] In one or more embodiments, a method for updating model parameters based on the mean squared error (MSE) loss function is introduced. As described in the foregoing embodiments, a loss function is required during the training of a behavior prediction model. It is understood that the loss function is the objective function for training the neural network model, and it is minimized using gradient descent to obtain the adjustment gradient of the model parameters during the training iteration process.
[0375] Specifically, taking the training of a behavior prediction model using the MSE loss function as an example, the MSE loss function can be constructed as follows:
[0376]
[0377] Where N represents the number of training samples in the training sample set. i represents the i-th training sample. H represents the number of future time periods. L represents the number of historical time periods. t represents the t-th time period, and the t-th time period belongs to a future time period. This represents the trigger probability of the i-th training sample in the t-th time period. This represents the actual triggering result of the i-th training sample in the t-th time period (e.g., This indicates that it has been triggered. (Indicates that it was not triggered).
[0378] visible, Let H represent the H squared differences corresponding to the i-th training sample. This represents the mean squared error value corresponding to the i-th training sample.
[0379] Therefore, stochastic gradient descent (SGD) can be used to perform gradient backward calculation based on the loss value calculated by the MSE loss function, so as to obtain the updated values of the model parameters and update the behavior prediction model.
[0380] Furthermore, this application provides a method for updating model parameters based on the MSE loss function. Through this method, the mean squared error loss function not only intuitively reflects the difference between predicted and true values, but also is sensitive to outliers, which is beneficial for model comparison and selection, providing clear quantitative indicators for model optimization.
[0381] Optionally, in the above Figure 5 Based on one or more corresponding embodiments, in another optional embodiment provided by this application, the behavior prediction model is trained according to the future behavior sequence samples included in each training sample and the predicted behavior probability sequence, specifically including:
[0382] For each training sample, including the future behavior sequence samples and the predicted behavior probability sequence, H cross-entropy components are calculated based on the actual triggering result and triggering probability of the corresponding element position.
[0383] The average value of the H cross-entropy components corresponding to each training sample is calculated to obtain the cross-entropy loss value for each training sample.
[0384] Construct a cross-entropy loss function based on the cross-entropy loss value corresponding to each training sample;
[0385] The cross-entropy loss function is used to update the model parameters of the behavior prediction model.
[0386] In one or more embodiments, a method for updating model parameters based on the cross-entropy loss function is described. As can be seen from the foregoing embodiments, a loss function is required during the training of the behavior prediction model.
[0387] Specifically, taking the training of a behavior prediction model using the cross-entropy loss function as an example, the cross-entropy loss function can be constructed as follows:
[0388]
[0389] Where N represents the number of training samples in the training sample set. i represents the i-th training sample. H represents the number of future time periods. L represents the number of historical time periods. t represents the t-th time period, and the t-th time period belongs to a future time period. This represents the trigger probability of the i-th training sample in the t-th time period. This represents the actual triggering result of the i-th training sample in the t-th time period (e.g., This indicates that it has been triggered. (Indicates that it was not triggered).
[0390] visible, Let H represent the H cross-entropy components corresponding to the i-th training sample. This represents the cross-entropy loss value corresponding to the i-th training sample.
[0391] Therefore, SGD can be used to perform gradient backward calculation based on the loss value obtained from the cross-entropy loss function, so as to obtain the updated values of the model parameters and update the behavior prediction model.
[0392] Furthermore, this application provides a method for updating model parameters based on the cross-entropy loss function. This method facilitates gradient calculation using the cross-entropy loss function, making model training more efficient and stable, and enabling faster convergence to the optimal or near-optimal solution. In addition, the cross-entropy loss function can alleviate overfitting to some extent, allowing the model to learn more generalizable features and improving classification accuracy.
[0393] Optionally, in the above Figure 5 Based on one or more corresponding embodiments, in another optional embodiment provided by this application, after predicting the future behavior sequence of the target object according to the recombined vector sequence, it may further include:
[0394] Based on the future behavior sequence, determine the set of time periods in which the target object will trigger interactive behaviors;
[0395] When content to be pushed is received, the target time period is determined from the set of time periods, where the target time period is the time period closest to the time when the content to be pushed was received;
[0396] The content to be pushed will be sent within the target time period.
[0397] In one or more embodiments, a method for content push based on future behavior sequences is described. As can be seen from the foregoing embodiments, the future time periods in which a target object may trigger interactive behavior can be determined based on the future behavior sequence, and these future time periods constitute a time period set. Therefore, a time period can be selected from the time period set, and a message can be pushed within that time period.
[0398] Specifically, for clarity, please refer to Table 2, which is a schematic diagram of the future behavior sequence of the target object.
[0399] Table 2
[0400] Future time period Predict whether to trigger interactive behavior 10:00-10:10 No trigger 10:10-10:20 trigger 10:20-10:30 trigger 10:30-10:40 No trigger 10:40-10:50 No trigger
[0401] Based on this, when a terminal receives content to be pushed from the server, it can select a target time period from the set of time periods for push.
[0402] For example, suppose the time when the terminal receives the content to be pushed (i.e., the receiving time) is within a certain time period in the set of time periods. For example, if the terminal receives the content to be pushed at 10:15, since the time period in which 10:15 is located belongs to the set of time periods, 10:10-10:20 is taken as the target time period and the content to be pushed is pushed directly.
[0403] For example, suppose the time when the terminal receives the content to be pushed is not within a time period in the time period set. For instance, if the terminal receives the content to be pushed at 10:08, since the time period at 10:08 is not in the time period set, the time period closest to the reception time is found from the time period set (i.e., 10:10-10:20). Therefore, 10:10-10:20 is selected as the target time period, and the content to be pushed is pushed within the target time period.
[0404] Secondly, this application provides a method for content push based on future behavior sequences. This method optimizes content distribution timing by selecting time periods with a higher probability of triggering relevant behaviors, thus significantly improving reach efficiency. With the same push frequency, the intelligent push solution based on future behavior sequences can increase click-through rate by approximately 1.2%. Simultaneously, by reducing pushes during periods of low activity, the total number of pushes is reduced by approximately 7%, avoiding excessive disruption to users.
[0405] Optionally, in the above Figure 5 In addition to one or more corresponding embodiments, another optional embodiment provided in this application may further include:
[0406] Get the future behavior sequence of K objects, where K is an integer greater than or equal to 1;
[0407] Based on the future behavior sequence of K objects, determine the frequency of interactive behavior triggers for each of the H time periods;
[0408] The resource allocation results are determined based on the frequency of interactive behavior triggers for each time period.
[0409] In one or more embodiments, a method for resource scheduling based on future behavior sequences is described. As can be seen from the foregoing embodiments, in practical applications, future behavior sequences of multiple objects can be predicted, thereby statistically analyzing the active and inactive time periods of user groups, and thus determining the resource allocation (e.g., bandwidth, storage resources, traffic, etc.) for each time period.
[0410] Specifically, for ease of explanation, let's take 100 objects as an example. Please refer to Table 3, which is a schematic diagram of the frequency of interactive behavior triggers for each time period.
[0411] Table 3
[0412] Future time period Frequency of interactive behavior triggers 10:00-10:10 80 10:10-10:20 50 10:20-10:30 20 10:30-10:40 30 10:40-10:50 70
[0413] Interaction trigger frequency refers to the number of times an interaction is triggered within a certain time period. Interaction trigger frequency is a quantitative indicator that measures how frequently an interaction occurs.
[0414] For example, a trigger ratio can be further generated based on the frequency of interaction behavior. For instance, the trigger ratio for 10:00-10:10 is 0.8, the trigger ratio for 10:10-10:20 is 0.5, and so on. The time period with a trigger ratio greater than or equal to a ratio threshold (e.g., 0.6) can be considered the active time period of the user group, and the time period with a trigger ratio less than the ratio threshold can be considered the inactive time period of the user group.
[0415] Secondly, this application provides a method for resource scheduling based on future behavior sequences. By combining the future behavior sequences of multiple objects for resource scheduling, resource allocation can be optimized, avoiding resource idleness or overuse and improving resource utilization. Furthermore, by rationally planning resources, unnecessary resource waste can be reduced, thereby lowering operating costs.
[0416] The behavior sequence prediction device in this application is described in detail below. Please refer to [link / reference]. Figure 10 , Figure 10 This is a schematic diagram of one embodiment of the behavior sequence prediction device in this application. The behavior sequence prediction device 100 includes:
[0417] The acquisition module 1001 is used to acquire time information sequences, wherein the time information sequences include historical time sequences and future time sequences. The historical time sequences include L time information corresponding to L time periods, and the future time sequences include H time information corresponding to H time periods, where L and H are both integers greater than or equal to 1.
[0418] The processing module 1002 is used to perform feature embedding processing on the time information sequence to obtain a time vector sequence, wherein the time vector sequence includes a historical vector sequence and a future vector sequence;
[0419] The acquisition module 1001 is also used to acquire the historical behavior sequence of the target object, wherein the historical behavior sequence includes L actual triggering results corresponding to L time periods, and the actual triggering results are used to indicate whether the target object triggers interactive behavior within the time period;
[0420] Module 1003 is used to construct a comprehensive feature vector based on historical vector sequences and historical behavior sequences.
[0421] The construction module 1003 is also used to construct a recombined vector sequence based on the future vector sequence and the comprehensive feature vector, wherein the recombined vector sequence includes H recombined feature vectors;
[0422] The prediction module 1004 is used to predict the future behavior sequence of the target object based on the recombined vector sequence. The future behavior sequence includes H predicted trigger results corresponding to H time periods. The predicted trigger results are used to indicate whether the target object triggers interactive behavior within the time period.
[0423] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0424] The acquisition module 1001 is specifically used to acquire the time information of each of the L time periods, wherein the time information of the time period includes the timestamp of a historical moment within the time period;
[0425] Retrieve the time information for each of the H time periods, where the time information for each time period includes a timestamp of a future moment within the time period;
[0426] Generate a historical time series based on the time information of each of the L time periods;
[0427] Generate a future time series based on the time information of each of the H time periods.
[0428] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0429] The acquisition module 1001 is specifically used to acquire the time information of each of the L time periods, wherein the time information of the time period includes a time period identifier used to uniquely indicate the time period.
[0430] Obtain the time information for each of the H time periods, where the time information for each time period includes a time period identifier used to uniquely identify the time period;
[0431] Generate a historical time series based on the time information of each of the L time periods;
[0432] Generate a future time series based on the time information of each of the H time periods.
[0433] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0434] The acquisition module 1001 is specifically used to acquire the time information of each time period in L time periods. The time information of the time period includes the time period identifier, date determination attribute, hour ordinal number, time period ordinal number, and rest time determination attribute.
[0435] Obtain the time information for each of the H time periods. The time information for each time period includes the time period identifier, date determination attribute, hour ordinal number, time period ordinal number, and rest time determination attribute.
[0436] Generate a historical time series based on the time information of each of the L time periods;
[0437] Generate a future time series based on the time information of each of the H time periods.
[0438] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0439] Module 1003 is specifically used to flatten the historical vector sequence to obtain historical feature vectors.
[0440] By concatenating the historical feature vector and the historical behavior sequence, a comprehensive feature vector is obtained.
[0441] Module 1003 is specifically used to expand the comprehensive feature vector to obtain H intermediate feature vectors;
[0442] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0443] Prediction module 1004 is specifically used to obtain the behavioral probability sequence of the target object based on the recombined vector sequence through a behavioral prediction model;
[0444] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0445] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavior sequence prediction device 100 provided in this application, the behavior sequence prediction device 100 further includes a training module 1005;
[0446] The acquisition module 1001 is also used to acquire a training sample set, wherein the training sample set includes N training samples, each training sample includes a historical behavior sequence sample, a time information sequence sample and a future behavior sequence sample of the training object, the historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods, and the future behavior sequence sample includes H actual triggering results corresponding to H sample time periods, where N is an integer greater than or equal to 1.
[0447] The processing module 1002 is also used to perform feature embedding processing on the time information sequence sample for each training sample to obtain a time vector sequence sample, wherein the time vector sequence sample includes historical vector sequence samples and future vector sequence samples.
[0448] The construction module 1003 is also used to construct a comprehensive feature vector sample for each training sample based on historical vector sequence samples and historical behavior sequence samples;
[0449] The construction module 1003 is also used to construct a recombined vector sequence sample for each training sample based on future time series samples and comprehensive feature vector samples;
[0450] The acquisition module 1001 is also used to acquire the behavior probability sequence sample of the training object based on the recombined vector sequence sample and the behavior prediction model for each training sample.
[0451] Training module 1005 is used to train the behavior prediction model based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0452] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0453] Module 1003 is specifically used to obtain the basic information of the target object, whereby the basic information of the object is used to describe the basic attributes of the target object.
[0454] The basic information of the object is processed by feature embedding to obtain a static feature vector;
[0455] Flatten the historical vector sequence to obtain the historical feature vector;
[0456] The static feature vector, historical feature vector, and historical behavior sequence are concatenated to obtain a comprehensive feature vector.
[0457] Module 1003 is specifically used to expand the comprehensive feature vector to obtain H intermediate feature vectors;
[0458] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0459] Prediction module 1004 is specifically used to obtain the behavioral probability sequence of the target object based on the recombined vector sequence through a behavioral prediction model;
[0460] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0461] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0462] The acquisition module 1001 is also used to acquire a training sample set, wherein the training sample set includes N training samples, each training sample includes a basic information sample of the training object, a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample. The basic information sample of the object is used to describe the basic attributes of the object. The historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods. The future behavior sequence sample includes H actual triggering results corresponding to H sample time periods. N is an integer greater than or equal to 1.
[0463] The processing module 1002 is also used to perform feature embedding processing on the object basic information sample for each training sample to obtain a static feature vector sample.
[0464] The processing module 1002 is also used to perform feature embedding processing on the time information sequence sample for each training sample to obtain a time vector sequence sample, wherein the time vector sequence sample includes historical vector sequence samples and future vector sequence samples.
[0465] The construction module 1003 is also used to construct a comprehensive feature vector sample for each training sample based on the static feature vector sample, the historical vector sequence sample, and the historical behavior sequence sample.
[0466] The construction module 1003 is also used to construct a recombined vector sequence sample for each training sample based on future time series samples and comprehensive feature vector samples;
[0467] The acquisition module 1001 is also used to acquire the behavior probability sequence sample of the training object based on the recombined vector sequence sample and the behavior prediction model for each training sample.
[0468] The training module 1005 is also used to train the behavior prediction model based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0469] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0470] Module 1003 is specifically used to flatten the historical vector sequence to obtain historical feature vectors.
[0471] By concatenating the historical feature vector and the historical behavior sequence, a comprehensive feature vector is obtained.
[0472] Module 1003 is specifically used to obtain encoded feature vectors based on the comprehensive feature vectors through the encoder in the behavior prediction model.
[0473] Based on the encoded feature vector, the decoded feature vector is obtained through the decoder in the behavior prediction model;
[0474] The decoded feature vectors are expanded to obtain H intermediate feature vectors;
[0475] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0476] Prediction module 1004 is specifically used to obtain the behavioral probability sequence of the target object based on the recombined vector sequence through a behavioral prediction model;
[0477] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0478] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0479] The acquisition module 1001 is also used to acquire a training sample set, wherein the training sample set includes N training samples, each training sample includes a historical behavior sequence sample, a time information sequence sample and a future behavior sequence sample of the training object, the historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods, and the future behavior sequence sample includes H actual triggering results corresponding to H sample time periods, where N is an integer greater than or equal to 1.
[0480] The processing module 1002 is also used to perform feature embedding processing on the time information sequence sample for each training sample to obtain a time vector sequence sample, wherein the time vector sequence sample includes historical vector sequence samples and future vector sequence samples.
[0481] The processing module 1002 is also used to construct a comprehensive feature vector sample for each training sample based on the historical vector sequence sample and the historical behavior sequence sample;
[0482] The acquisition module 1001 is also used to acquire encoded feature vector samples for each training sample, based on the comprehensive feature vector samples, through the encoder in the behavior prediction model;
[0483] The acquisition module 1001 is also used to acquire the decoded feature vector sample based on the encoded feature vector sample through the decoder in the behavior prediction model for each training sample.
[0484] The building module 1003 is also used to construct a recombined vector sequence sample for each training sample based on future time series samples and decoded feature vector samples;
[0485] The acquisition module 1001 is also used to acquire the behavior probability sequence sample of the training object based on the recombined vector sequence sample and the behavior prediction model for each training sample.
[0486] The training module 1005 is also used to train the behavior prediction model based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0487] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0488] Module 1003 is specifically used to obtain the basic information of the target object, whereby the basic information of the object is used to describe the basic attributes of the target object.
[0489] The basic information of the object is processed by feature embedding to obtain a static feature vector;
[0490] Flatten the historical vector sequence to obtain the historical feature vector;
[0491] The static feature vector, historical feature vector, and historical behavior sequence are concatenated to obtain a comprehensive feature vector.
[0492] Module 1003 is specifically used to obtain encoded feature vectors based on the comprehensive feature vectors through the encoder in the behavior prediction model.
[0493] Based on the encoded feature vector, the decoded feature vector is obtained through the decoder in the behavior prediction model;
[0494] The decoded feature vectors are expanded to obtain H intermediate feature vectors;
[0495] The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence.
[0496] Prediction module 1004 is specifically used to obtain the behavioral probability sequence of the target object based on the recombined vector sequence through a behavioral prediction model;
[0497] Generate the future behavior sequence of the target object based on the behavior probability sequence of the target object.
[0498] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0499] The acquisition module 1001 is also used to acquire a training sample set, wherein the training sample set includes N training samples, each training sample includes a basic information sample of the training object, a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample. The basic information sample of the object is used to describe the basic attributes of the object. The historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods. The future behavior sequence sample includes H actual triggering results corresponding to H sample time periods. N is an integer greater than or equal to 1.
[0500] The processing module 1002 is also used to perform feature embedding processing on the object basic information sample for each training sample to obtain a static feature vector sample.
[0501] The processing module 1002 is also used to perform feature embedding processing on the time information sequence sample for each training sample to obtain a time vector sequence sample, wherein the time vector sequence sample includes historical vector sequence samples and future vector sequence samples.
[0502] The construction module 1003 is also used to construct a comprehensive feature vector sample for each training sample based on the static feature vector sample, the historical vector sequence sample, and the historical behavior sequence sample.
[0503] The acquisition module 1001 is also used to acquire encoded feature vector samples for each training sample, based on the comprehensive feature vector samples, through the encoder in the behavior prediction model;
[0504] The acquisition module 1001 is also used to acquire the decoded feature vector sample based on the encoded feature vector sample through the decoder in the behavior prediction model for each training sample.
[0505] The building module 1003 is also used to construct a recombined vector sequence sample for each training sample based on future time series samples and decoded feature vector samples;
[0506] The acquisition module 1001 is also used to acquire the behavior probability sequence sample of the training object based on the recombined vector sequence sample and the behavior prediction model for each training sample.
[0507] The training module 1005 is also used to train the behavior prediction model based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
[0508] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0509] The training module 1005 is specifically used to square the difference between the actual triggering result and the triggering probability at the corresponding element position for each training sample, including the future behavior sequence sample and the predicted behavior probability sequence, to obtain H squared differences.
[0510] The mean squared error value for each training sample is obtained by averaging the H squared differences corresponding to each training sample.
[0511] Construct a mean squared error loss function based on the mean squared error value corresponding to each training sample;
[0512] The mean squared error loss function is used to update the model parameters of the behavior prediction model.
[0513] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0514] The training module 1005 is specifically used to calculate H cross-entropy components for each training sample, including the future behavior sequence samples and the predicted behavior probability sequence, based on the actual triggering result and triggering probability of the corresponding element position.
[0515] The average value of the H cross-entropy components corresponding to each training sample is calculated to obtain the cross-entropy loss value for each training sample.
[0516] Construct a cross-entropy loss function based on the cross-entropy loss value corresponding to each training sample;
[0517] The cross-entropy loss function is used to update the model parameters of the behavior prediction model.
[0518] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavior sequence prediction device 100 provided in this application, the behavior sequence prediction device 100 further includes a determination module 1006 and a push module 1007.
[0519] The determination module 1006 is used to predict the future behavior sequence of the target object based on the recombined vector sequence, and then determine the set of time periods in which the target object triggers interactive behavior based on the future behavior sequence.
[0520] The determining module 1006 is also used to determine a target time period from a set of time periods when it receives content to be pushed, wherein the target time period is the time period closest to the time of receiving the content to be pushed;
[0521] The push module 1007 is used to push content to be pushed within a target time period.
[0522] Optionally, in the above Figure 10 Based on the corresponding embodiments, in another embodiment of the behavioral sequence prediction device 100 provided in this application,
[0523] The acquisition module 1001 is also used to acquire the future behavior sequence of K objects, where K is an integer greater than or equal to 1;
[0524] The determination module 1006 is also used to determine the frequency of interactive behavior triggering for each of the H time periods based on the future behavior sequence of the K objects;
[0525] The determination module 1006 is also used to determine the resource allocation result based on the frequency of interactive behavior triggers corresponding to each time period.
[0526] Figure 11 This is a schematic diagram of a computer device structure provided in an embodiment of this application. The computer device 1100 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1122 (e.g., one or more processors) and a memory 1132, and one or more storage media 1130 (e.g., one or more mass storage devices) for storing application programs 1142 or data 1144. The memory 1132 and storage media 1130 can be temporary or persistent storage. The program stored in the storage media 1130 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the computer device. Furthermore, the CPU 1122 may be configured to communicate with the storage media 1130 and execute the series of instruction operations in the storage media 1130 on the computer device 1100.
[0527] Computer device 1100 may also include one or more power supplies 1126, one or more wired or wireless network interfaces 1150, one or more input / output interfaces 1158, and / or one or more operating systems 1141, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.
[0528] The steps performed by the computer device in the above embodiments can be based on this Figure 11 The computer device structure shown.
[0529] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the methods described in the foregoing embodiments.
[0530] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the methods described in the foregoing embodiments.
[0531] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0532] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0533] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0534] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0535] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0536] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a server or terminal device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing computer programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0537] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for predicting behavioral sequences, characterized in that, include: Obtain a time information sequence, wherein the time information sequence includes a historical time sequence and a future time sequence, the historical time sequence includes L time information corresponding to L time periods, and the future time sequence includes H time information corresponding to H time periods, where L and H are both integers greater than or equal to 1; The time information sequence is subjected to feature embedding processing to obtain a time vector sequence, wherein the time vector sequence includes a historical vector sequence and a future vector sequence; Obtain the historical behavior sequence of the target object, wherein the historical behavior sequence includes L actual triggering results corresponding to the L time periods, and the actual triggering results are used to indicate whether the target object triggers interactive behavior within the time period; Based on the historical vector sequence and the historical behavior sequence, a comprehensive feature vector is constructed; Based on the future vector sequence and the comprehensive feature vector, a recombined vector sequence is constructed, wherein the recombined vector sequence includes H recombined feature vectors; Based on the recombined vector sequence, the future behavior sequence of the target object is predicted, wherein the future behavior sequence includes H predicted trigger results corresponding to the H time periods, and the predicted trigger results are used to indicate whether the target object triggers interactive behavior within the time period.
2. The prediction method according to claim 1, characterized in that, The acquisition of the time information sequence includes: Obtain the time information of each of the L time periods, wherein the time information of the time period includes the timestamp of a historical moment within the time period; Obtain the time information of each of the H time periods, wherein the time information of the time period includes a timestamp of a future moment within the time period; The historical time series is generated based on the time information of each of the L time periods; The future time series is generated based on the time information of each of the H time periods.
3. The prediction method according to claim 1, characterized in that, The acquisition of the time information sequence includes: Obtain the time information of each of the L time periods, wherein the time information of the time period includes a time period identifier for uniquely indicating the time period; Obtain the time information of each of the H time periods, wherein the time information of the time period includes a time period identifier for uniquely indicating the time period; The historical time series is generated based on the time information of each of the L time periods; The future time series is generated based on the time information of each of the H time periods.
4. The prediction method according to claim 1, characterized in that, The acquisition of the time information sequence includes: Obtain the time information of each of the L time periods, wherein the time information of the time period includes time period identifier, date determination attribute, hour ordinal number, time period ordinal number, and rest time determination attribute; Obtain the time information of each of the H time periods, wherein the time information of the time period includes time period identifier, date determination attribute, hour ordinal number, time period ordinal number, and rest time determination attribute; The historical time series is generated based on the time information of each of the L time periods; The future time series is generated based on the time information of each of the H time periods.
5. The prediction method according to any one of claims 1 to 4, characterized in that, The step of constructing a comprehensive feature vector based on the historical vector sequence and the historical behavior sequence includes: The historical vector sequence is flattened to obtain historical feature vectors; The historical feature vector and the historical behavior sequence are concatenated to obtain the comprehensive feature vector. The step of constructing a recombined vector sequence based on the future vector sequence and the comprehensive feature vector includes: The comprehensive feature vector is expanded to obtain H intermediate feature vectors; The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence; The step of predicting the future behavior sequence of the target object based on the recombined vector sequence includes: Based on the recombined vector sequence, the behavior probability sequence of the target object is obtained through a behavior prediction model; Based on the probability sequence of the target object's behavior, a future behavior sequence of the target object is generated.
6. The prediction method according to claim 5, characterized in that, The method further includes: Obtain a training sample set, wherein the training sample set includes N training samples, each training sample includes a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample of the training object, the historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods, the future behavior sequence sample includes H actual triggering results corresponding to H sample time periods, and N is an integer greater than or equal to 1; For each training sample, feature embedding processing is performed on the time information sequence sample to obtain a time vector sequence sample, wherein the time vector sequence sample includes historical vector sequence samples and future vector sequence samples; For each training sample, a comprehensive feature vector sample is constructed based on the historical vector sequence sample and the historical behavior sequence sample; For each training sample, a reconstructed vector sequence sample is constructed based on future time series samples and comprehensive feature vector samples; For each training sample, based on the recombined vector sequence sample, the behavior probability sequence sample of the training object is obtained through the behavior prediction model; The behavior prediction model is trained based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
7. The prediction method according to any one of claims 1 to 4, characterized in that, The step of constructing a comprehensive feature vector based on the historical vector sequence and the historical behavior sequence includes: Obtain the object basic information corresponding to the target object, wherein the object basic information is used to describe the basic attributes of the target object; The basic information of the object is subjected to feature embedding processing to obtain a static feature vector; The historical vector sequence is flattened to obtain historical feature vectors; The static feature vector, the historical feature vector, and the historical behavior sequence are concatenated to obtain the comprehensive feature vector. The step of constructing a recombined vector sequence based on the future vector sequence and the comprehensive feature vector includes: The comprehensive feature vector is expanded to obtain H intermediate feature vectors; The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence; The step of predicting the future behavior sequence of the target object based on the recombined vector sequence includes: Based on the recombined vector sequence, the behavior probability sequence of the target object is obtained through a behavior prediction model; Based on the probability sequence of the target object's behavior, a future behavior sequence of the target object is generated.
8. The prediction method according to claim 7, characterized in that, The method further includes: Obtain a training sample set, wherein the training sample set includes N training samples, each training sample includes a basic information sample of the training object, a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample. The historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods, and the future behavior sequence sample includes H actual triggering results corresponding to H sample time periods. N is an integer greater than or equal to 1. For each training sample, feature embedding processing is performed on the object basic information sample to obtain a static feature vector sample; For each training sample, feature embedding processing is performed on the time information sequence sample to obtain a time vector sequence sample, wherein the time vector sequence sample includes historical vector sequence samples and future vector sequence samples; For each training sample, a comprehensive feature vector sample is constructed based on the static feature vector sample, the historical vector sequence sample, and the historical behavior sequence sample. For each training sample, a reconstructed vector sequence sample is constructed based on future time series samples and comprehensive feature vector samples; For each training sample, based on the recombined vector sequence sample, the behavior probability sequence sample of the training object is obtained through the behavior prediction model; The behavior prediction model is trained based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
9. The prediction method according to any one of claims 1 to 4, characterized in that, The step of constructing a comprehensive feature vector based on the historical vector sequence and the historical behavior sequence includes: The historical vector sequence is flattened to obtain historical feature vectors; The historical feature vector and the historical behavior sequence are concatenated to obtain the comprehensive feature vector. The step of constructing a recombined vector sequence based on the future vector sequence and the comprehensive feature vector includes: Based on the comprehensive feature vector, the encoded feature vector is obtained through the encoder in the behavior prediction model; Based on the encoded feature vector, the decoded feature vector is obtained through the decoder in the behavior prediction model; The decoded feature vectors are expanded to obtain H intermediate feature vectors; The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence; The step of predicting the future behavior sequence of the target object based on the recombined vector sequence includes: Based on the recombined vector sequence, the behavior probability sequence of the target object is obtained through the behavior prediction model; Based on the probability sequence of the target object's behavior, a future behavior sequence of the target object is generated.
10. The prediction method according to claim 9, characterized in that, The method further includes: Obtain a training sample set, wherein the training sample set includes N training samples, each training sample includes a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample of the training object, the historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods, the future behavior sequence sample includes H actual triggering results corresponding to H sample time periods, and N is an integer greater than or equal to 1; For each training sample, feature embedding processing is performed on the time information sequence sample to obtain a time vector sequence sample, wherein the time vector sequence sample includes historical vector sequence samples and future vector sequence samples; For each training sample, a comprehensive feature vector sample is constructed based on the historical vector sequence sample and the historical behavior sequence sample; For each training sample, based on the comprehensive feature vector sample, the encoded feature vector sample is obtained through the encoder in the behavior prediction model; For each training sample, a decoded feature vector sample is obtained through the decoder in the behavior prediction model based on the encoded feature vector sample. For each training sample, a reconstructed vector sequence sample is constructed based on future time series samples and decoded feature vector samples; For each training sample, based on the recombined vector sequence sample, the behavior probability sequence sample of the training object is obtained through the behavior prediction model; The behavior prediction model is trained based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
11. The prediction method according to any one of claims 1 to 4, characterized in that, The step of constructing a comprehensive feature vector based on the historical vector sequence and the historical behavior sequence includes: Obtain the object basic information corresponding to the target object, wherein the object basic information is used to describe the basic attributes of the target object; The basic information of the object is subjected to feature embedding processing to obtain a static feature vector; The historical vector sequence is flattened to obtain historical feature vectors; The static feature vector, the historical feature vector, and the historical behavior sequence are concatenated to obtain the comprehensive feature vector. The step of constructing a recombined vector sequence based on the future vector sequence and the comprehensive feature vector includes: Based on the comprehensive feature vector, the encoded feature vector is obtained through the encoder in the behavior prediction model; Based on the encoded feature vector, the decoded feature vector is obtained through the decoder in the behavior prediction model; The decoded feature vectors are expanded to obtain H intermediate feature vectors; The H intermediate feature vectors and the future vector sequence are concatenated to obtain the recombined vector sequence; The step of predicting the future behavior sequence of the target object based on the recombined vector sequence includes: Based on the recombined vector sequence, the behavior probability sequence of the target object is obtained through the behavior prediction model; Based on the probability sequence of the target object's behavior, a future behavior sequence of the target object is generated.
12. The prediction method according to claim 7, characterized in that, The method further includes: Obtain a training sample set, wherein the training sample set includes N training samples, each training sample includes a basic information sample of the training object, a historical behavior sequence sample, a time information sequence sample, and a future behavior sequence sample. The historical behavior sequence sample includes L actual triggering results corresponding to L sample time periods, and the future behavior sequence sample includes H actual triggering results corresponding to H sample time periods. N is an integer greater than or equal to 1. For each training sample, feature embedding processing is performed on the object basic information sample to obtain a static feature vector sample; For each training sample, feature embedding processing is performed on the time information sequence sample to obtain a time vector sequence sample, wherein the time vector sequence sample includes historical vector sequence samples and future vector sequence samples; For each training sample, a comprehensive feature vector sample is constructed based on the static feature vector sample, the historical vector sequence sample, and the historical behavior sequence sample. For each training sample, based on the comprehensive feature vector sample, the encoded feature vector sample is obtained through the encoder in the behavior prediction model; For each training sample, a decoded feature vector sample is obtained through the decoder in the behavior prediction model based on the encoded feature vector sample. For each training sample, a reconstructed vector sequence sample is constructed based on future time series samples and decoded feature vector samples; For each training sample, based on the recombined vector sequence sample, the behavior probability sequence sample of the training object is obtained through the behavior prediction model; The behavior prediction model is trained based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence.
13. The prediction method according to claim 6, 8, 10 or 12, characterized in that, The step of training the behavior prediction model based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence includes: For each training sample, including the future behavior sequence sample and the predicted behavior probability sequence, the difference between the actual triggering result and the triggering probability at the corresponding element position is squared to obtain H squared differences. The mean squared error value for each training sample is obtained by averaging the H squared differences corresponding to each training sample. Based on the mean squared error value corresponding to each training sample, a mean squared error loss function is constructed. The model parameters of the behavior prediction model are updated using the mean squared error loss function.
14. The prediction method according to claim 6, 8, 10 or 12, characterized in that, The step of training the behavior prediction model based on the future behavior sequence samples included in each training sample and the predicted behavior probability sequence includes: For each training sample, including the future behavior sequence sample and the predicted behavior probability sequence, H cross-entropy components are calculated based on the actual triggering result and triggering probability of the corresponding element position. The average value of the H cross-entropy components corresponding to each training sample is calculated to obtain the cross-entropy loss value corresponding to each training sample. Construct a cross-entropy loss function based on the cross-entropy loss value corresponding to each training sample; The model parameters of the behavior prediction model are updated using the cross-entropy loss function.
15. The prediction method according to any one of claims 1 to 14, characterized in that, After predicting the future behavior sequence of the target object based on the recombined vector sequence, the method further includes: Based on the future behavior sequence, determine the set of time periods in which the target object triggers interactive behavior; When content to be pushed is received, a target time period is determined from the set of time periods, wherein the target time period is the time period closest to the time of receiving the content to be pushed; The content to be pushed will be pushed within the target time period.
16. The prediction method according to any one of claims 1 to 14, characterized in that, The method further includes: Obtain a sequence of future behaviors for K objects, where K is an integer greater than or equal to 1; Based on the future behavior sequence of the K objects, determine the frequency of interactive behavior triggering for each of the H time periods; The resource allocation result is determined based on the frequency of interactive behavior triggers corresponding to each time period.
17. A behavior sequence prediction device, characterized in that, include: The acquisition module is used to acquire a time information sequence, wherein the time information sequence includes a historical time sequence and a future time sequence, the historical time sequence includes L time information corresponding to L time periods, and the future time sequence includes H time information corresponding to H time periods, wherein L and H are both integers greater than or equal to 1; The processing module is used to perform feature embedding processing on the time information sequence to obtain a time vector sequence, wherein the time vector sequence includes a historical vector sequence and a future vector sequence; The acquisition module is further configured to acquire the historical behavior sequence of the target object, wherein the historical behavior sequence includes L actual triggering results corresponding to the L time periods, and the actual triggering results are used to indicate whether the target object triggers interactive behavior within the time period; A construction module is used to construct a comprehensive feature vector based on the historical vector sequence and the historical behavior sequence; The construction module is further configured to construct a recombined vector sequence based on the future vector sequence and the comprehensive feature vector, wherein the recombined vector sequence includes H recombined feature vectors; The prediction module is used to predict the future behavior sequence of the target object based on the recombined vector sequence, wherein the future behavior sequence includes H predicted trigger results corresponding to the H time periods, and the predicted trigger results are used to indicate whether the target object triggers interactive behavior within the time period.
18. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method for predicting behavioral sequences according to any one of claims 1 to 16.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for predicting behavioral sequences according to any one of claims 1 to 16.
20. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method for predicting behavioral sequences according to any one of claims 1 to 16.
