AI-based traffic generation platform data processing methods and systems
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]本申请的目的在于提供一种基于AI的引流平台数据处理方法及系统,从用户行为数据和内容展示数据中准确识别出内容曝光驱动用户交互的因果链,并以此因果链作为结构先验,指导强化学习框架进行流量分配策略的持续优化,解决现有方法因依赖相关性而导致分配偏差和策略更新滞后的问题
通过将联合时间序列数据中的每个内容曝光事件作为候选因变量、每个用户交互事件作为候选果变量,利用格兰杰因果检验进行滞后相关性分析,筛选具有统计显著性的因果关系对,再对因果关系对进行方向性验证,比较内容曝光事件发生前后的用户行为变化幅度,确定从内容曝光到用户行为的因果方向,得到有向因果边,最终将多个有向因果边按时间顺序和逻辑依赖关系拼接成因果链。这一过程剥离了由内容热度、用户固有偏好等混杂因素造成的伪相关,所提取的因果链反映了内容展示位置对用户行为的真实驱动结构。相对于仅利用统计相关性进行流量分配的方式,基于该因果链的决策不再被高热度的展示位置绑架,能够将流量引导至具有真实转化潜力但曝光机会不足的位置,在提升整体转化效果的同时,保持了内容生态的多样性。将因果链中的每个内容展示位置定义为状态节点,将为其分配的权重值定义为动作,将用户响应结果转换为综合奖励信号,利用深度Q网络对状态节点、动作和奖励信号进行拟合,构建状态-动作价值函数,并通过经验回放机制和目标网络更新机制迭代更新网络参数,生成动态调整的流量分配策略。整个优化过程将因果链作为状态空间的结构先验,使得强化学习的探索范围被约束在有因果意义的展示位置上,避免了无因果关联的位置对学习过程的噪声干扰,同时利用深度Q网络的学习能力,对奖励信号中的是否转化、转化深度和转化耗时等多维度反馈进行综合评估,使策略更新能捕捉到比简单点击率更细粒度的用户响应差异。迭代优化过程持续在线运行,每当有新的用户反馈数据产生,即可对网络参数进行微调,使得流量分配策略能够实时适应流量分布变化和用户行为偏好的漂移,克服了传统离线评估和人工调参模式下的响应滞后。
Smart Images

Figure CN122571024A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a data processing method and system for an AI-based traffic generation platform. Background Technology
[0002] In internet traffic acquisition platforms, efficiently allocating limited traffic resources to different content display positions to maximize user conversion is a core issue directly impacting platform revenue. Most existing traffic allocation methods are based on statistical correlation modeling, such as collaborative filtering, click-through rate prediction models, or simple multi-armed slot machine algorithms, determining the priority of content display based on the statistical correlation between historical exposure and clicks. Some solutions introduce contextual features for dynamic weighting, but they still essentially rely on the correlation between data, ignoring the causal driving structure hidden behind the observed data. Existing technical solutions have significant flaws. Allocation strategies based on correlation analysis are easily affected by confounding factors. For example, popular content may simultaneously receive high exposure and high clicks, but the high clicks are not driven by the traffic-generating effect of the display position itself, but rather by the inherent popularity of the content. This means that statistical correlation cannot distinguish true causal effects, causing traffic allocation strategies to deviate from the true optimization goal. Long-term implementation will lead to excessive concentration of traffic in high-popularity positions, forming information cocoons and inhibiting the diversity of the platform's content ecosystem and its ability to discover potential high-conversion positions. Furthermore, traditional traffic optimization strategies mostly rely on periodic offline evaluation and manual parameter tuning for updates. This lacks continuous adaptability to dynamic environmental changes, makes it difficult to capture real-time shifts in user behavior preferences, and results in lag in strategy adjustments, failing to respond promptly to the impact of traffic distribution and the emergence of new content. The solution lies in how to extract the true causal relationship between content display and user behavior from observational data, avoiding the interference of confounding biases in traffic allocation decisions, and how to achieve continuous online optimization of traffic allocation strategies based on this causal relationship, enabling the strategies to dynamically adjust according to real-time user feedback. Summary of the Invention
[0003] The purpose of this application is to provide an AI-based data processing method and system for traffic acquisition platforms, which can accurately identify the causal chain of content exposure driving user interaction from user behavior data and content display data, and use this causal chain as a structural prior to guide the reinforcement learning framework to continuously optimize traffic allocation strategies, thereby solving the problems of allocation deviation and strategy update lag caused by existing methods due to reliance on correlation.
[0004] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides an AI-based data processing method and system for traffic acquisition platforms, which solves the problem that traffic allocation strategies in traffic acquisition platforms are difficult to accurately reflect the real driving relationship between content display and user behavior, resulting in low conversion efficiency.
[0005] In one technical solution of the present invention, a traffic acquisition platform data processing method includes: receiving user behavior data and content display data from the traffic acquisition platform; performing time alignment processing on the user behavior data and the content display data to generate joint time series data containing user interaction sequences and content exposure sequences; based on the joint time series data, using a causal inference algorithm to identify the driving relationship between the user behavior data and the content display data, obtaining at least one causal chain with the content display data as the cause and the user behavior data as the effect; based on the causal chain, using a reinforcement learning framework to iteratively optimize the traffic acquisition strategy, generating a dynamically adjusted traffic allocation strategy, the traffic allocation strategy being used to determine the weight values of different content display positions; based on the dynamically adjusted traffic allocation strategy, responding to real-time user requests, mapping the user requests to the corresponding content display positions, and outputting traffic acquisition decision results. This solution mines the true causal effect of content exposure on user interaction through causal inference, and constructs a reinforcement learning state space guided by causal chains, enabling the traffic allocation strategy to focus on the key links that actually drive conversion, avoiding the interference of false associations caused by traditional correlation analysis, thereby significantly improving the accuracy of traffic acquisition conversion and resource utilization efficiency.
[0006] As a preferred technical solution of the present invention, when generating joint time series data, user behavior data and content display data are extracted from the log system of the traffic acquisition platform according to a unified timestamp granularity. The user behavior data includes click behavior, dwell time, and swipe operation, and the content display data includes content identifier, display time, and display position. For each user identifier, each behavior record in the user behavior data is matched with the content exposure record in the content display data within a preset time window before the occurrence of the behavior record to obtain behavior-exposure association pairs. All behavior-exposure association pairs under the same user identifier are sorted according to chronological order to generate the user interaction sequence and the content exposure sequence, and the user interaction sequence and the content exposure sequence are bound in the form of key-value pairs to obtain the joint time series data. Preferably, by setting a reasonable time window for the association of behavior and exposure, the scene context of the user operation can be effectively restored, ensuring that the data on which subsequent causal analysis depends has a complete temporal dependency relationship, and avoiding causal misjudgment caused by time mismatch.
[0007] As a further improvement of this invention, in the process of identifying causal chains, each content exposure event in the joint time series data is used as a candidate dependent variable, and each user interaction event is used as a candidate effect variable. Granger causality tests are used to perform lag correlation analysis on the candidate dependent and effect variables to screen out statistically significant causal relationship pairs. The causal relationship pairs are then subjected to directional verification processing. By comparing the magnitude of changes in user behavior before and after the content exposure event, the causal direction from content exposure to user behavior is determined, resulting in directed causal edges. Multiple directed causal edges are then concatenated according to time sequence and logical dependencies to form the causal chain from initial content exposure to final user conversion, and the causal strength value of each link in the causal chain is marked. This approach ensures that the relationship between content and behavior is no longer a simple co-occurrence statistics, but rather a clear causal path is constructed through statistical testing and directional confirmation. This provides interpretable, structured prior knowledge for subsequent strategy optimization and reduces the exploration cost of reinforcement learning.
[0008] In generating dynamically adjusted traffic allocation strategies, this invention proposes: defining each content display position in the causal chain as a state node, defining the weight value assigned to that content display position in the traffic allocation strategy as an action in the action space, and defining the user's response to the content display position as a reward signal; using a deep Q-network to fit the state nodes, actions, and reward signals to construct a state-action value function, which is used to evaluate the expected cumulative reward of performing a specific action in a given state; based on the state-action value function, using an experience replay mechanism and a target network update mechanism, iteratively updating the network parameters of the deep Q-network, and outputting the updated traffic allocation strategy after each iteration. This scheme directly maps the causal chain to the state and action structure of reinforcement learning, enabling the agent to explore and utilize only causally valid paths, significantly compressing the ineffective action space, improving the policy convergence speed, and the policy naturally possesses interpretable causal basis.
[0009] Preferably, when defining state nodes, actions, and reward signals, nodes with an out-degree greater than zero are extracted from the causal chain as state nodes. Each state node corresponds to a content display position and carries the historical conversion rate characteristics and contextual characteristics of that content display position. The action space is discretized into multiple preset weight levels, each weight level corresponding to a specific traffic allocation ratio. The action is to select a weight level from the action space and allocate it to the current state node. The conversion results after the user interacts at the content display position corresponding to the current state node are collected. Based on the three dimensions of whether a conversion occurs, the conversion depth, and the conversion time in the conversion results, a comprehensive reward value is calculated as the reward signal. Through multi-dimensional reward design, the strategy can be guided to take into account both short-term click feedback and long-term conversion depth, avoiding excessive bias of traffic allocation strategies towards low-quality, instantaneous click behavior, thereby improving the overall traffic acquisition value.
[0010] Furthermore, the construction process of the deep Q-network includes: inputting the feature vector of the state node into the input layer of the deep Q-network, which contains multiple fully connected layers and activation function layers for nonlinear transformation processing of the input; outputting a corresponding value prediction score for each possible action in the output layer of the deep Q-network, with all the value prediction scores corresponding to the actions constituting the output vector of the state-action value function in a given state; using temporal difference error as the loss function, adding a discount factor to the immediate reward signal obtained after performing an action in the current state node, multiplying it by the maximum value prediction of the next state output by the target network, and subtracting the current state-action value function output by the current network to calculate the training error; and using the training error for backpropagation to update the network parameters of the deep Q-network. This network structure can accurately approximate the long-term value in complex states, and, combined with experience replay and the target network, ensures the stability of the training process and the accuracy of value estimation.
[0011] Regarding real-time response, this invention adopts the following approach: When a user request is received in real time, the user identifier and request context information are extracted from the user request. Based on the user identifier, the corresponding joint time series data of the user is retrieved from historical storage to obtain the user's historical behavior characteristics. The user's historical behavior characteristics and the request context information are concatenated into a current state feature vector. The current state feature vector is input into the dynamically adjusted traffic allocation strategy to calculate the weight value of each content display position. The content display positions are sorted in descending order of weight value, and the content display position with the highest weight value is selected as the traffic redirection target position. The traffic redirection target position is then bound to the user request to generate the traffic redirection decision result. This step enables each real-time request to utilize the latest dynamic strategy and historical behavior representation to achieve personalized and causally reasonable accurate traffic redirection, improving the response quality of real-time decisions.
[0012] In the aforementioned real-time weight calculation process, preferably, the user's historical behavior features are sequence encoded, and a recurrent neural network is used to extract the temporal dependencies in the user's historical behavior features to obtain a user behavior embedding vector; the scene tag, device type, and current time in the request context information are discretely embedded to obtain a context embedding vector; the user behavior embedding vector and the context embedding vector are concatenated to generate the current state feature vector; the current state feature vector is forward propagated to the deep Q-network contained in the dynamically adjusted traffic allocation strategy, and the weight value corresponding to each content display position is output through the forward computation of the network. The processing of discrete features includes mapping the value of each discrete feature to a corresponding low-dimensional dense vector space. Furthermore, when extracting the user behavior embedding vector, each behavior event in the user's historical behavior features is arranged into a behavior sequence according to its timestamp. Each behavior event in the behavior sequence is then one-hot encoded to obtain a behavior encoding vector sequence. This behavior encoding vector sequence is input into a gated recurrent unit (GRU) network, where update and reset gates are used to update the state of the behavior encoding vector sequence step-by-step. The hidden state vector at the last time step is then used as the user behavior embedding vector. This encoding method effectively captures the long-term interest evolution and short-term behavior fluctuations of user behavior, giving the state vector input to the reinforcement learning strategy rich temporal semantics, thereby further optimizing the accuracy of weight calculation.
[0013] Furthermore, this invention also includes a strategy security mechanism: after generating a dynamically adjusted traffic allocation strategy, an offline evaluation process is performed on the dynamically adjusted traffic allocation strategy. Using user requests and corresponding real feedback from historical log data, the performance of the dynamically adjusted traffic allocation strategy in historical scenarios is simulated to obtain an offline evaluation score. When the offline evaluation score is lower than a preset threshold, a strategy rollback mechanism is triggered, rolling back the current dynamically adjusted traffic allocation strategy to the historical traffic allocation strategy generated in the previous iteration. This mechanism can predict the effect before the strategy goes live and automatically revert to a stable version when the strategy quality degrades, ensuring the smooth operation of the online traffic acquisition system and avoiding significant fluctuations in business metrics due to sudden strategy changes.
[0014] This invention also provides an AI-based traffic acquisition platform data processing system, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the aforementioned AI-based traffic acquisition platform data processing method. This system deeply integrates causal inference with deep reinforcement learning to construct an end-to-end intelligent traffic acquisition decision-making closed loop. It can autonomously discover causal patterns between content and user behavior in massive amounts of dynamic data and continuously evolve traffic allocation strategies based on these patterns, providing cost-effective traffic acquisition responses to real-time requests.
[0015] The technical effects and advantages provided by the present invention in the above technical solution are as follows: By using each content exposure event in the joint time series data as a candidate dependent variable and each user interaction event as a candidate outcome variable, lag correlation analysis is performed using Granger causality tests to screen statistically significant causal relationship pairs. These pairs are then subjected to directional verification, comparing the magnitude of changes in user behavior before and after the content exposure event to determine the causal direction from content exposure to user behavior, resulting in directed causal edges. Finally, multiple directed causal edges are concatenated into a causal chain according to time sequence and logical dependencies. This process eliminates spurious correlations caused by confounding factors such as content popularity and inherent user preferences. The extracted causal chain reflects the true driving structure of content display location on user behavior. Compared to methods that only utilize statistical correlation for traffic allocation, decisions based on this causal chain are no longer constrained by high-popularity display locations. It can guide traffic to locations with genuine conversion potential but insufficient exposure opportunities, improving overall conversion rates while maintaining the diversity of the content ecosystem. Each content display position in the causal chain is defined as a state node, and the assigned weight value is defined as an action. User response results are converted into a comprehensive reward signal. A deep Q-network is used to fit the state nodes, actions, and reward signal to construct a state-action value function. The network parameters are iteratively updated through an experience replay mechanism and a target network update mechanism to generate a dynamically adjusted traffic allocation strategy. The entire optimization process uses the causal chain as a structural prior in the state space, which restricts the exploration scope of reinforcement learning to causally meaningful display positions, avoiding noise interference from causally unrelated positions. At the same time, the learning capability of the deep Q-network is used to comprehensively evaluate multi-dimensional feedback in the reward signal, such as whether a conversion occurred, the depth of conversion, and the conversion time, so that the strategy update can capture more granular differences in user response than simple click-through rate. The iterative optimization process runs continuously online. Whenever new user feedback data is generated, the network parameters can be fine-tuned, so that the traffic allocation strategy can adapt to changes in traffic distribution and drift in user behavior preferences in real time, overcoming the response lag of traditional offline evaluation and manual parameter tuning modes. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0017] Figure 1 This is a flowchart of the data processing method for an AI-based traffic acquisition platform; Figure 2 It is a flowchart of offline evaluation and policy rollback for dynamically adjusted traffic allocation strategies; Figure 3This is the curve showing the changes in the cumulative comprehensive reward value and loss function value during the training process of a traffic allocation strategy based on a deep Q-network; Figure 4 This is a diagram illustrating the content display position weight ranking and traffic target and alternative positions based on a deep Q-network. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] See Figure 1 This invention provides an AI-based data processing method for a traffic acquisition platform, comprising: receiving user behavior data and content display data from the traffic acquisition platform; performing time alignment processing on the user behavior data and content display data to generate joint time series data containing user interaction sequences and content exposure sequences; based on the joint time series data, using a causal inference algorithm to identify the driving relationship between user behavior data and content display data, obtaining at least one causal chain with content display data as the cause and user behavior data as the effect; based on the causal chain, using a reinforcement learning framework to iteratively optimize the traffic acquisition strategy, generating a dynamically adjusted traffic allocation strategy, which is used to determine the weight values of different content display positions; and responding to real-time user requests according to the dynamically adjusted traffic allocation strategy, mapping user requests to corresponding content display positions, and outputting traffic acquisition decision results.
[0020] Example 1:
[0021] In practice, when extracting user behavior data and content display data from the traffic acquisition platform's log system, the raw logs stored in the system are first consolidated according to a unified timestamp granularity. The timestamp granularity is set to 1000 milliseconds, meaning the occurrence time of all events in the logs is rounded down to the second level. User behavior data includes click behavior records, dwell time records, and swipe operation records. Each click behavior record stores the user identifier, the time the click event occurred, and the identifier of the clicked page element. Each dwell time record stores the user identifier, the start time of the dwell, and the duration of the dwell. Each swipe operation record stores the user identifier, the start time of the swipe, and the swipe direction. Content display data includes the content identifier, the display time, and the display position. Each content display record stores the user identifier, the content identifier, the content display time, and the content display position code. The content display position code uses a combination of page identifier and slot number.
[0022] For each user identifier, a matching operation is performed between behavior records and content exposure records. For all behavior records of a user identifier within a given day, the time of occurrence of each behavior record is extracted. Then, the content display data is searched for all content display records of that user identifier within the same day whose content display time falls within a preset time window. The start time of the preset time window is... and the finish line Determined by the following formula:
[0023]
[0024] in: This indicates the time when the currently processed action record occurred. This indicates the time span of the preset time window. The value is set at 240 seconds. This value is based on: collecting user interaction data from the traffic acquisition platform over the past 60 days; for each click, tracing back to the most recent content display event before the click, calculating the time difference between the click and the content display, statistically analyzing the response delay distribution formed by all time differences, and taking the delay duration corresponding to the 99.9 percentile of the response delay distribution as the [details of the delay duration]. The value allows the preset time window to cover user response delays in extreme cases, reducing the omission of effective exposure records.
[0025] During the matching process, if the display time is found to fall within the content display data... For multiple content display records within a given interval, the current behavior record is associated with each retrieved content display record, generating multiple behavior-exposure association pairs. Each behavior-exposure association pair contains five fields: behavior type, behavior time, content identifier, display location, and display time. The behavior type field takes values of click, pause, or swipe, and the behavior time field is filled with the time when the current behavior record occurred. The content identifier field and the display location field are extracted from the corresponding content display record, and the display time field is filled with the content display time in the content display record.
[0026] For all behavior-exposure pairs generated under the same user identifier, they are sorted in ascending order of the behavior time field value. If the behavior time field values are the same, they are then sorted a second time in ascending order of the display time field value, resulting in a sorted sequence of behavior-exposure pairs. From this sorted sequence, the behavior type and behavior time fields are extracted sequentially to form a user interaction sequence; simultaneously, the content identifier, display location, and display time fields are extracted sequentially to form a content exposure sequence. The elements in the user interaction sequence and the content exposure sequence correspond one-to-one in their order.
[0027] When generating joint time-series data, user interaction sequences and content exposure sequences are bound together in key-value pairs. The key of each key-value pair is the timestamp corresponding to the value of the behavior time field in the behavior-exposure association pair. The value of each key-value pair is set as a composite structure containing a summary of all behavior records and a summary of all content exposure records associated with the same timestamp. Specifically, for a given timestamp, if multiple behavior-exposure association pairs have their behavior time fields merged into that timestamp, the behavior type and content identifier in these behavior-exposure association pairs are aggregated and stored in the behavior record list and exposure record list of the composite structure, respectively. For timestamps where no user behavior occurred, no key-value pairs are created in the joint time-series data. The final joint time-series data uses the user identifier as the first-level index and the timestamp sequence and the corresponding exposure-behavior composite structure as the second-level storage, forming a set of behavior-exposure joint records organized by user and time.
[0028] In an optional implementation, the content display location coding is further refined into three parts: page type identifier, region identifier, and slot number. The page type identifier includes homepage information flow pages, detail page recommendation pages, and search results pages. The region identifier includes top, middle, and bottom regions. The slot number is an integer index starting from 0 from left to right within the same region. The matching method between dwell time records and content exposure records in the behavior log is as follows: the start time of the dwell time record is taken as... The aforementioned time window matching operation is performed to associate the dwell behavior with the exposure record. The matching method between the swipe operation record and the content exposure record is as follows: the swipe start time of the swipe operation record is taken as... Perform the aforementioned time window matching operation.
[0029] In some implementations, the time span of the preset time window The settings are configured according to the different business scenarios of the traffic acquisition platform. For short video feed traffic acquisition scenarios, Set to 180 seconds; for image and text detail page recommendation traffic generation scenarios, Set to 300 seconds. Different scenarios. The value is set based on the 99th percentile of historical statistical data on the distribution of response delays from content display to user interaction in various scenarios.
[0030] Example 2:
[0031] In practical implementation, extracting candidate dependent and candidate outcome variables from the joint time series data involves creating a binary time series for each user. This binary time series consists of a content exposure event frequency sequence and a user interaction event frequency sequence. The content exposure event frequency sequence is generated by dividing the time axis into continuous time slices with a statistical granularity of 30 seconds. For each time slice, the number of content display records within that time slice is counted, forming a one-dimensional vector arranged by time. The user interaction event frequency sequence is generated by dividing the time axis into the same 30-second statistical granularity, counting the number of user behavior records within each time slice, forming a one-dimensional vector arranged by time. User behavior records include click behavior, dwell time behavior, and swipe behavior. Each content exposure event frequency sequence is used as a candidate dependent variable, and each user interaction event frequency sequence is used as a candidate outcome variable, constructing all possible candidate variable pairs.
[0032] For each pair of candidate dependent variable sequences and candidate result variable sequence The Granger causality test was performed, which is based on a vector autoregressive (VAR) model. The core architecture of the VAR model consists of two regression equations, one of which is... The current value is the explained variable, Past values and The past values of one variable are explanatory variables; the other is... The current value is the explained variable, Past values and The past values are explanatory variables. The hierarchical design of the vector autoregressive model is as follows: the input layer receives... and The lagged values are used to obtain the predicted values through a linear combination layer, and the loss layer calculates the sum of squared predicted residuals. The vector autoregressive model does not use backpropagation during training; instead, it directly solves for the regression coefficients using ordinary least squares. The training objective is to minimize the sum of squared residuals.
[0033] When using the Granger causality test to screen statistically significant causal pairs, constrained and unconstrained regression models are constructed. The expression for the unconstrained regression model is specified as follows: At any moment The value is determined by The lag value and The lagged values are jointly predicted, and the expression of the constrained regression model is specified. At any moment The value can be determined solely by Lag value prediction. Lag order. The method of determination is as follows: for and The joint sequence, from to Fit each vector autoregressive model and calculate each... The corresponding Akaike information content criterion value Akaike Information Content Criterion Value The calculation formula is ,in Take the lag order Estimation of the covariance matrix of the residuals of the time model. This represents the total number of parameters to be estimated in the model. The effective number of observations for a binary time series; select the number that makes... Take the smallest value As the lag order in Granger causality tests. In actual traffic acquisition platform data, the optimal lag order calculated by the Akaike information content criterion is often [value missing]. This means using the content exposure and user interaction history of the previous 150 seconds to predict the current value.
[0034] For each pair and In lag order Once determined, calculate the sum of squared residuals for the constrained regression model. and the sum of squared residuals of the unconstrained regression model Calculate the F-test statistic using the following formula:
[0035] in: Indicates Lag value prediction The constrained sum of squared regression residuals for the current value; Indicates The lag value and Lagged values for joint prediction The sum of squared unconstrained regression residuals for the current value; The specific value calculated according to the Akaike information content criterion is used as the input for the determined optimal lag order; This represents the number of valid time slices in a binary time series after removing missing values, and should be at least 1000 time slices. (Calculated...) The value follows the molecular degrees of freedom. The denominator has degrees of freedom. The F-distribution is used to calculate the probability of the right tail region as the significance level. If the significance level is lower than 0.05, then this pair is considered... and There exists a from arrive The statistical significance of a causal relationship is determined by establishing causal relationship pairs; if the significance level is not lower than 0.05, the candidate variable pair is discarded. The significance level threshold of 0.05 is based on controlling the probability of Type I error to within 5%, which is consistent with the general standard for statistical hypothesis testing.
[0036] The selected causal relationships underwent directional verification. This verification process used the content exposure event as a dividing point to define the observation period before and after exposure. Both periods were set to 300 seconds, based on the statistical distribution of interaction delays on the traffic acquisition platform, where the maximum delay from exposure to user behavior did not exceed 300 seconds. The intensity of user behavior was measured by the number of user interaction events per unit time, and the mean of the frequency sequence of user interaction events within a continuous window was calculated using a sliding window method. For each content exposure event, the user behavior intensity sequence was extracted for the 300 seconds before and after exposure, and the mean of the user behavior intensity before exposure was calculated. and the average intensity of user behavior after exposure Paired-samples t-tests were applied to the user behavior intensity sequences before and after exposure to calculate the t-statistic and its corresponding significance level. If the significance level of the t-test is below 0.05 and... Greater than Then the causal direction is determined to be from content exposure to user behavior, generating a directed causal edge. The starting point of the directed causal edge is the content exposure event identifier, and the ending point is the user interaction event identifier; if the significance level of the t-test is not lower than 0.05 or Not greater than If the causal relationship is unclear, it will be discarded.
[0037] In an optional implementation, the extraction granularity of the user behavior intensity sequence is consistent with the time slice granularity used in the Granger causality test, i.e., a time window of 30 seconds, with 10 intensity values corresponding to the 300 seconds before exposure and 10 intensity values corresponding to the 300 seconds after exposure.
[0038] After multiple directed causal edges are generated, a causal chain concatenation process is performed. This process starts with the initial content exposure event node, defined as a content exposure event node that does not terminate at any directed causal edge. Starting from each initial content exposure event node, downstream nodes are traced sequentially along the directed causal edges. At each node reached, a chain connection is established between the parent and child nodes, and the child node becomes the new starting point for tracing until the final user conversion node is encountered. The final user conversion node is defined as an interaction event node representing a user completing an order, registration, or payment. When multiple upstream nodes point to the same downstream node, all paths are preserved, forming a directed acyclic graph (DAG) structure. If a loop edge is detected during the tracing process, it is truncated to maintain the DAG property.
[0039] The causal strength value of each link in the completed causal chain is marked, and the causal strength value is measured using the standardized average causal effect size. The average causal effect size is defined as the expected difference in causal effect from the change in the state of a content exposure event to the change in the state of a downstream user interaction event, under the condition of controlling for confounding variables. It is estimated using an inverse probability weighting method and standardized by the standard deviation of the intensity of user behavior before exposure, ensuring that the causal strength value falls within the real number interval. Specifically, for each directed causal edge constituting the causal chain, the standardized average causal effect size is calculated. , The calculation method is as follows: the occurrence state of the content exposure event corresponding to the starting point of the causal edge is marked as the processing group, and the non-occurrence state is marked as the control group. After matching using propensity scores, the difference in the probability of downstream user interaction events between the two groups is calculated, and then divided by the standard deviation of the probability of downstream user interaction events in the control group. The larger the absolute value of the standardized average causal effect, the stronger the causal driving effect of that link. The calculated standardized average causal effect values of each directed causal edge are directly marked in the weight attribute of the corresponding edge in the causal chain for subsequent modules to read and use.
[0040] In some implementations, the lag order of the Granger causality test is not a globally uniform fixed value, but rather optimized for each pair of candidate variables using the Akaike information content criterion, thereby improving the test's adaptability to heterogeneous behavioral patterns. In the directional verification process, the lengths of the pre-exposure and post-exposure observation periods can be configured according to the content display type. For short video content, the period length is adjusted to 180 seconds; for text and image content, the period length is adjusted to 420 seconds. The adjustment is based on the maximum measured user response latency for each content type.
[0041] Example 3:
[0042] In practice, nodes with an out-degree greater than zero are extracted from the causal chain as state nodes. A node with an out-degree greater than zero is defined as a node in the directed acyclic graph structure of the causal chain where at least one directed causal edge originates from that node. Each state node corresponds to a content display location, which is uniquely identified by a code consisting of a page type identifier, a region identifier, and a slot number. Each state node carries the historical conversion rate characteristics and contextual characteristics of that content display location. The historical conversion rate characteristic is the ratio obtained by dividing the number of user conversion events that occurred at that content display location in the past 720 hours by the total number of times the content was displayed at that location. The historical conversion rate characteristic is updated hourly. The contextual features include page type number, region number, time period code, and device type code. The page type number has a value of 0 for the homepage feed, 1 for the details page / recommended section, and 2 for the search results page. The region number has a value of 0 for the top region, 1 for the middle region, and 2 for the bottom region. The time period code is an integer from 0 to 23 representing the hour on the hour the user request occurred. The device type code has a value of 0 for mobile devices, 1 for desktop devices, and 2 for tablet devices. These historical conversion rate features and contextual features are concatenated into a five-dimensional real-valued vector, which serves as the feature vector for the state node.
[0043] The action space is discretized into multiple preset weight levels. The number of weight levels is set to 10, corresponding to traffic allocation ratios of 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, and 1.0, respectively. The reason for setting the number of weight levels to 10 is to uniformly sample within the traffic allocation ratio range with a step size of 0.1, ensuring that the action space covers the complete range from low allocation to full allocation while keeping the number of actions within the scale that the output layer of the deep Q-network can efficiently compute. An action is selected from the action space and assigned to the current state node. Specifically, an action is output as an integer action index from 0 to 9, where action index 0 corresponds to weight level 0.1, action index 1 corresponds to weight level 0.2, and so on, up to action index 9 corresponding to weight level 1.0.
[0044] The system collects conversion results after users interact with content at the current state node. Based on three dimensions—conversion status, conversion depth, and conversion time—a comprehensive reward value is calculated as the reward signal. The conversion status dimension is defined as a base score: 0 for no conversion and 1 for a conversion. The conversion depth dimension assigns a tiered bonus coefficient based on the conversion stage completed by the user. Conversion stages are divided into four levels from shallow to deep: browsing details, adding to cart, submitting an order, and completing payment. The bonus coefficient is 0.5 for browsing details, 0.7 for adding to cart, 0.9 for submitting an order, and 1.0 for completing payment. The conversion time dimension calculates a time decay factor based on the principle that shorter conversion times result in higher rewards. The time decay factor is determined by the following formula:
[0045] in: This represents the time decay factor, with a value range of (0,1]. This represents the decay rate coefficient, with a value of 0.01. This value is chosen so that when the conversion time is 100 seconds, the time decay factor is approximately 0.368, thus forming a reasonable decay curve. The conversion time is the time interval from when the content is displayed to when the user completes the conversion action, measured in seconds. When the user has not converted... Not included in the calculation. Overall reward value. The calculation method is the product of the base score, the tiered bonus coefficient, and the time decay factor. When the user does not convert, the overall reward value is 0.
[0046] In some implementations, the conversion stage is aligned with the business funnel stages of the traffic acquisition platform. When the number of stages in the business funnel of the traffic acquisition platform changes, the number of tiers of the tiered bonus coefficient is adjusted synchronously. The tiered bonus coefficient of each tier gradually increases from 0.4 to 1.0 at intervals of 0.2.
[0047] A deep Q-network is used to fit state nodes, actions, and reward signals to construct a state-action value function. The core architecture of the deep Q-network consists of an input layer, three fully connected hidden layers, and an output layer. The input layer receives the five-dimensional feature vector of the state node and has 5 neurons. The first fully connected hidden layer contains 64 neurons, with a linear rectified function as the activation function. The second fully connected hidden layer contains 128 neurons, with a linear rectified function as the activation function. The third fully connected hidden layer contains 64 neurons, with a linear rectified function as the activation function. The output layer contains 10 neurons, each corresponding to an action value prediction for one of the 10 action indices. The output layer does not use an activation function and directly outputs the real-valued score. All fully connected hidden layers are fully connected, with connection weights and biases between neurons in adjacent layers.
[0048] The input data for the Deep Q-Network is configured as follows: During each training iteration, a batch of transition samples is sampled from the experience pool. Each transition sample contains the feature vector of the current state node, the index of the action performed, the obtained comprehensive reward value, the feature vector of the next state node, and a flag indicating whether the termination state has been reached. The feature vector of the current state node has a dimension of 5, and the feature vector of the next state node also has a dimension of 5. The output data is configured as follows: The Deep Q-Network outputs a 10-dimensional vector for the feature vector of the current state node. The k-th component of this 10-dimensional vector represents the estimated cumulative reward value for performing action index k in the current state node.
[0049] The training of deep Q-networks utilizes an experience replay mechanism and a target network update mechanism. The experience pool capacity is set to 50,000 transition samples, and the experience pool sampling batch size is set to 64 transition samples. The specific steps of the experience replay mechanism are as follows: at each training iteration, 64 transition samples are randomly and non-repeatingly drawn from the experience pool to form a mini-batch of training data. The specific steps of the target network update mechanism are as follows: a target deep Q-network is maintained, with an architecture completely identical to the current deep Q-network; every 100 training iterations, all connection weights and bias parameters in the current deep Q-network are copied to the parameters of the corresponding layers in the target deep Q-network, and the parameters of the target deep Q-network remain unchanged during the training iterations between two copies.
[0050] Temporal difference error is used as the loss function. For each transition sample sampled in the experience pool, the feature vector of the current state node is denoted as... The action performed is The instant reward signal obtained is The feature vector of the next state node is Whether the termination flag is ,in This indicates that the next state is the termination state. This indicates that the next state is a non-terminating state. The current depth Q-network is based on the input... Output a 10-dimensional action value vector ,in This represents the set of trainable parameters for the current deep Q-network. Indicates the action to be taken The corresponding output components. The target depth Q-network is based on the input... Output a 10-dimensional action value vector ,in This represents the set of parameters for the target depth Q-network, and the calculation... As the maximum predictive value of the next state. Temporal difference objective value. The calculation method is as follows: If ,but ;like ,but ,in The discount factor is set to 0.99, chosen to allocate a higher weight to long-term rewards, thus encouraging the deep Q-network to focus on long-term cumulative rewards. The training error is calculated using the temporal difference target value. minus The loss function is defined as the square of the training error. The gradient is calculated using backpropagation based on the loss function value, and the parameters of the current deep Q-network are updated using an adaptive moment estimation optimizer. The learning rate of the adaptive moment estimation optimizer is set to 0.0005.
[0051] After each iteration, an updated traffic allocation strategy is output. The traffic allocation strategy is determined by the parameters of the current deep Q-network. The implicit representation is that the output method is as follows: For each content display location, the five-dimensional feature vector of the state node corresponding to that content display location is input into the current deep Q-network to obtain the action value prediction of the 10 neurons in the output layer. The action index corresponding to the highest predicted score is selected, and the action index is mapped back to the corresponding weight level. This weight level is the weight value of that content display location in the updated traffic allocation strategy. Performing the above operation on all content display locations yields a complete traffic allocation strategy weight configuration table.
[0052] In an optional implementation, the sampling strategy of the experience pool can be combined with priority experience replay to assign a priority to each transferred sample. The priority is calculated based on the absolute value of the temporal difference error corresponding to the transferred sample. The larger the absolute value of the temporal difference error, the higher the priority. The sampling probability is proportional to the priority to reduce the waste of high-value samples.
[0053] In some implementations, the feature vector dimension of the state node can be expanded according to the additional attributes of the content display location. When the content display location carries a content category tag, the embedding vector of the content category tag is concatenated to the five-dimensional feature vector. The dimension of the embedding vector is set to 8, and the dimension of the expanded feature vector is 13. The number of neurons in the input layer of the deep Q network is simultaneously adjusted to 13.
[0054] See Figure 3 In the graph, the horizontal axis represents the number of training iterations, ranging from 0 to 600. The left vertical axis represents the cumulative comprehensive reward value, and the right vertical axis represents the loss function value. Solid lines represent the cumulative comprehensive reward value, while dashed lines with dots represent the loss function value. The cumulative comprehensive reward value shows an overall upward trend with the number of training iterations. In the initial stage (from 0 to approximately 100 iterations), the cumulative comprehensive reward value increases rapidly, then enters a relatively stable, slow upward phase, eventually stabilizing with fluctuations, and reaching a value close to 2.5 to 3.0. The loss function value shows a significant downward trend with the number of training iterations. In the initial stage, the loss function value is relatively high, above approximately 8.0, and decreases rapidly as training progresses, dropping below 1.0 after approximately 300 iterations. In subsequent iterations, the loss function value remains within a low fluctuation range. The figure illustrates the process of using a deep Q-network to fit and train state nodes, actions, and reward signals in Example 3. During the training process, the model's overall reward value continuously increases, and the loss function gradually decreases, indicating that the deep Q-network achieves effective strategy optimization and convergence in the training of dynamically adjusted traffic allocation strategies, thereby improving the traffic allocation effect of the content display position on the traffic-driving platform.
[0055] Example 4:
[0056] In practice, when a user request is received in real time, the user identifier field and request context information field in the request are parsed. The user identifier field is a unique string identifier assigned to the user by the traffic acquisition platform. The request context information includes a scene tag, device type, and current time. The scene tag is the code of the user's current page type, which includes homepage information feed pages, detail page recommendation pages, and search results pages. The device type is the type code corresponding to mobile, desktop, or tablet. The current time is the server system time when the user request arrives at the traffic acquisition platform server, accurate to the hour.
[0057] The system retrieves the corresponding federated time-series data for a user from historical storage based on the user identifier. Historical storage employs a distributed key-value database, using the user identifier as the key and the federated time-series data generated within the last 90 days as the values. The federated time-series data contains user interaction sequences and content exposure sequences arranged in timestamp order. User historical behavioral features are extracted from the retrieved federated time-series data. These features are a list of behavioral events arranged in ascending order of occurrence time, with each event including the behavior type and the time of occurrence. Behavior types include clicks, dwell time, and swipe actions.
[0058] Sequence encoding is performed on user historical behavior features. A recurrent neural network is used to extract the temporal dependencies in the user historical behavior features, resulting in user behavior embedding vectors. The first step of the sequence encoding process is to arrange each behavior event in the user historical behavior features into a behavior sequence according to its timestamp. The length of the behavior sequence is the length of the 50 most recent behavior events. If the number of behavior events in the user historical behavior features is less than 50, it is padded with all zeros to a length of 50. One-hot encoding is performed on each behavior event in the behavior sequence. The total number of behavior types is 3, and the length of the one-hot encoding vector is 3. Click behavior is encoded as [1,0,0], dwell time behavior is encoded as [0,1,0], and swipe behavior is encoded as [0,0,1]. The one-hot encoding vectors of each behavior event in the behavior sequence are arranged in chronological order to obtain a behavior encoding vector sequence with a dimension of 50 rows and 3 columns.
[0059] The behavior encoding vector sequence is input into a gated recurrent unit (GRU) network. The core architecture of the GRU network consists of a GRU layer and an output mapping layer. The input dimension of the GRU layer is 3, and the hidden state dimension is set to 64. The GRU layer contains an update gate, a reset gate, and a candidate hidden state calculation module. At each time step, the update gate receives the behavior encoding vector of the current time step and the hidden state vector of the previous time step, and outputs a gating signal with a value between 0 and 1, used to control how much information from the hidden state vector of the previous time step is retained in the hidden state vector of the current time step. The reset gate receives the behavior encoding vector of the current time step and the hidden state vector of the previous time step, and outputs a gating signal with a value between 0 and 1, used to control the degree to which the hidden state vector of the previous time step is utilized in the candidate hidden state calculation. The candidate hidden state calculation module performs a linear transformation and nonlinear activation on the hidden state vector of the previous time step (adjusted by the reset gate) and the behavior encoding vector of the current time step to generate candidate hidden state vectors. The hidden state vector at the current time step is obtained by weighting the hidden state vector from the previous time step and the candidate hidden state vector through the update gate. The gated recurrent unit network performs the above state update step by step. After processing all 50 time steps of the behavior encoding vector sequence, the 64-dimensional hidden state vector output from the last time step is used as the user behavior embedding vector.
[0060] The parameters of the gated recurrent unit (GRU) network are obtained through pre-training. The pre-training task is to predict the next action, using the historical behavior sequences of all users on the traffic acquisition platform over the past 180 days as training data to construct supervised learning samples: the input is the first N-1 behavioral events in the sequence, and the output target is the behavior type of the Nth behavioral event. During pre-training, the cross-entropy loss function is used, the optimizer is an adaptive moment estimation optimizer, the learning rate is set to 0.001, and the batch size is set to 128. Training iterations stop when the loss function converges, and the parameters of the GRU network are saved. During the stage of obtaining the user behavior embedding vector, the pre-trained parameters are loaded, and the GRU network does not perform parameter updates.
[0061] Discrete feature embedding is performed on the scene tag, device type, and current time in the request context information. The scene tag has a total of 3 discrete values, and an embedding matrix is assigned to it. This matrix has 3 rows and 8 columns, with each row corresponding to an 8-dimensional embedding vector for one scene tag value. The device type has a total of 3 discrete values, and an embedding matrix is assigned to it. This matrix has 3 rows and 8 columns, with each row corresponding to an 8-dimensional embedding vector for one device type value. The current time has a total of 24 discrete values, representing the 24 hours of the day. An embedding matrix is assigned to it. This matrix has 24 rows and 8 columns, with each row corresponding to an 8-dimensional embedding vector for one hour of the day. The discrete feature embedding process is as follows: based on the specific value of the scene tag in the request context information, the corresponding 8-dimensional vector is found in the scene tag embedding matrix; based on the specific value of the device type, the corresponding 8-dimensional vector is found in the device type embedding matrix; and based on the hour of the current time, the corresponding 8-dimensional vector is found in the current time embedding matrix. The three 8-dimensional vectors obtained are concatenated in sequence to obtain a context embedding vector of length 24. The parameters of the three embedding matrices are jointly optimized with the parameters of the deep Q-network during the training process, without using independent pre-training methods.
[0062] The user behavior embedding vector and the context embedding vector are concatenated. The user behavior embedding vector has a dimension of 64, and the context embedding vector has a dimension of 24. The concatenation generates a current state feature vector with a dimension of 88.
[0063] The current state feature vector is forward-propagated to the deep Q-network contained in the dynamically adjusted traffic allocation strategy. The architecture of the deep Q-network was determined during the generation of the dynamically adjusted traffic allocation strategy. Its input layer has a dimension of 88 and contains three fully connected hidden layers with 128, 256, and 128 neurons respectively. The activation function for all hidden layers is a linear rectified function. The number of neurons in the output layer is the total number of all content display positions on the traffic-generating platform, with each output layer neuron corresponding to one content display position. Through the forward computation of the network, the weight prediction value corresponding to each content display position is obtained in the output layer. The weight prediction value is used as the weight value of that content display position. The weight value is a real number; the larger the value, the more traffic the traffic-generating platform should allocate to that content display position.
[0064] Content display positions are sorted in descending order of weight value, using a descending sorting algorithm to compare and rank all content display positions. The content display position with the highest weight value is selected as the target traffic location. The content display position code of the target traffic location is bound to the user identifier and request identifier in the user request. The binding method is to fill in the page address and slot identifier of the target content display position in the response data packet, generating a traffic referral decision result. The traffic referral decision result is returned to the access gateway of the traffic referral platform in a structured response message format, and the access gateway redirects the user request to the page resource corresponding to the target traffic location.
[0065] In some implementations, the behavior sequence length is dynamically adjusted based on the sparsity of the user's historical behavior. For users with more than 100 active behavior events in the past 30 days, the behavior sequence length is set to 100; for users with fewer than 20 active behavior events in the past 30 days, the behavior sequence length is set to 20. The hidden state dimension of the gated recurrent unit network scales accordingly with the adjustment of the behavior sequence length. When the behavior sequence length is 100, the hidden state dimension is set to 128; when the behavior sequence length is 20, the hidden state dimension is set to 32, in order to maintain the match between the model capacity and the amount of input information.
[0066] In an optional implementation, the dimension of the embedding vector in the discrete feature embedding process is uniformly set to 16 to enhance the expressive power of context information. The corresponding dimension of the context embedding vector becomes 48, the dimension of the concatenated current state feature vector becomes 112, and the dimension of the input layer of the deep Q network is synchronously adjusted to 112.
[0067] In an optional implementation, in addition to binding the target location, the traffic redirection decision result also outputs a list of alternative traffic redirection locations. The list of alternative traffic redirection locations includes the content display location codes ranked second and third by weight value, so that the target location can be downgraded and switched when the target location fails to load resources or when the location inventory is insufficient.
[0068] See Figure 4 In the graph, the horizontal axis represents the sorting index of the content display position, arranged in descending order of corresponding weight values, with an index range of 1 to 200; the vertical axis represents the weight value corresponding to each content display position. The weight value curve shows a clear decreasing trend. The weight values of the first ten content display positions are significantly higher than those of subsequent positions. The weight value drops rapidly from approximately 6.4 at the highest position to approximately 1.5 at the tenth position, and then decreases slowly until the weight value approaches zero at the later positions in the sorting index.
[0069] The diagram marks three key nodes: the target location marked with a box has the highest weight value, with a sorting index of 1 and a weight value of approximately 6.4, indicating that this location is given priority in allocating the maximum traffic resources in the dynamically adjusted traffic allocation strategy; the alternative traffic locations marked with triangles and rhombuses have sorting indices of 2 and 3, respectively, with corresponding weight values of approximately 3.7 and 3.3, indicating that these two alternative locations are the second-best targets for traffic scheduling, with the second-highest weight values, and are used as alternative solutions for traffic switching or resource protection in the strategy output.
[0070] Overall, the weight distribution reflects the differentiated scheduling of content display positions based on the content display position weight predictions output by the deep Q-network in Example 4. The traffic allocation strategy focuses on a few top-ranking positions, supporting efficient traffic acquisition decisions. The rapid decline of the weight curve and the relatively high weights of the alternative positions align with the strategy design in Example 4, which obtains weight predictions through forward propagation, selects the highest-weighted position as the traffic acquisition target, and provides alternative positions to address dynamic resource changes in real-world scenarios.
[0071] Example 5:
[0072] In specific implementation, please refer to Figure 2 The dynamically adjusted traffic allocation strategy undergoes offline evaluation. The data source used for this offline evaluation is the historical log data of the traffic acquisition platform. This historical log data contains every user request recorded chronologically, the corresponding actual user feedback, and the actual traffic acquisition decisions implemented. The historical log data is extracted from the traffic acquisition platform's log storage system by date, with the extraction time range being the past 30 days, ensuring that the evaluation sample size covers different time periods and different user groups.
[0073] A user request is retrieved from historical log data. The user request data structure includes a user identifier field, a request context information field, and a request arrival time field. Based on a dynamically adjusted traffic allocation strategy, the decision-making behavior of this user request under the strategy is simulated. The specific steps for simulating the decision-making behavior are as follows: The user identifier and request context information are extracted from the user request. Following the same processing flow as the online service, a current state feature vector is generated. This current state feature vector is forward-propagated to the deep Q-network contained in the dynamically adjusted traffic allocation strategy to obtain the weight value of each content display position. The content display position with the highest weight value is selected as the simulated decision content display position. The simulated decision content display position code is compared with the actual content display position code recorded in the historical log data. The comparison result is recorded, including a hit flag. If the two codes match, the hit flag is set to 1; if the two codes do not match, the hit flag is set to 0.
[0074] Based on real user feedback recorded in historical log data, the cumulative reward under simulated decision-making is calculated. Real user feedback includes whether the user converted based on the actual displayed content, the depth and stage of the conversion, and the conversion time in seconds. Real user feedback is mapped to the content display position in the simulated decision. The mapping method is as follows: assuming that the user feedback behavior remains unchanged after the actual content display position in the historical scenario is replaced with the content display position in the simulated decision, the conversion status, conversion depth and stage, and conversion time in seconds from the real user feedback are used. Following the comprehensive reward value calculation method used during training with the dynamically adjusted traffic allocation strategy, a comprehensive reward value corresponding to each user request is calculated as the immediate reward for the simulated decision. The immediate reward for the simulated decision is calculated for all user requests retrieved from the historical log data, and then accumulated in order of request arrival time to obtain the simulated cumulative reward, denoted as . Extract the actual cumulative rewards generated under the traffic acquisition decisions from the historical log data, and record them as follows: The calculation method for the actual cumulative reward is to accumulate the actual comprehensive reward value obtained by each user request at the actual content display position in the order of request arrival time.
[0075] Offline assessment scores were calculated using a normalization method. The calculation formula is as follows:
[0076] in: Represents the smoothing constant. The simulated cumulative reward is the sum of the comprehensive reward values obtained by all user requests in the historical log data under the simulated decision of dynamically adjusted traffic allocation strategy; The true cumulative reward represents the total true comprehensive reward value obtained by all user requests in the historical log data under the actual traffic redirection decisions; This represents the baseline cumulative reward, which is the cumulative reward obtained from simulations using a random uniform distribution strategy based on historical log data. The random uniform distribution strategy is defined as randomly selecting a position from all content display locations with equal probability for each user request. The baseline cumulative reward is calculated by repeatedly executing the random uniform distribution strategy 100 times and taking the average of the cumulative rewards from these 100 simulations. The value of ; This represents the smoothing constant, with a value of 0.01. The value is chosen to avoid smoothing when... and The numerical instability arises when the values are extremely close, causing the denominator to approach zero. (Offline score evaluation) The larger the value, the better the simulated performance of the dynamically adjusted traffic allocation strategy compared to the actual execution strategy; A value close to 1 indicates that the simulated cumulative reward is comparable to the real cumulative reward level. A value greater than 1 indicates that the simulated cumulative reward exceeds the real cumulative reward.
[0077] The offline evaluation score is compared with a preset threshold. The preset threshold is set at 0.75, based on the statistical analysis of historical strategy iteration records on the traffic acquisition platform. When the offline evaluation score of a new strategy falls below 0.75, there is a greater than 90% probability that core business metrics will decline in online A / B testing. Therefore, 0.75 is used as a risk warning line. When the offline evaluation score falls below the preset threshold of 0.75, the strategy rollback mechanism is triggered.
[0078] The strategy rollback mechanism is triggered as follows: After receiving a notification signal that the offline evaluation score is lower than a preset threshold, the strategy management module suspends the distribution of the currently dynamically adjusted traffic allocation strategy to the online traffic decision service. It reads a complete snapshot of the historical traffic allocation strategy generated in the previous iteration from the strategy version storage system. This snapshot includes the complete set of network parameters of the deep Q-network in the traffic allocation strategy, a discretized mapping table of weight levels, and the status node feature configuration corresponding to each content display position. The read historical traffic allocation strategy network parameters are loaded into the inference engine of the online deep Q-network, overwriting the network parameters of the currently dynamically adjusted traffic allocation strategy, thus completing the strategy rollback. The strategy version storage system uses version numbers to index the traffic allocation strategy generated in each iteration. The version number increments according to the iteration number, and the target version number during strategy rollback is the current version number minus 1.
[0079] After the rollback is completed, the online traffic allocation decision service continues to handle traffic allocation tasks using the historical traffic allocation strategy after the rollback. At the same time, a rollback notification is sent to the policy monitoring and alarm system. The rollback notification includes the rollback time, the policy version number before the rollback, the policy version number after the rollback, and the offline evaluation score that triggered the rollback, so that operations and maintenance personnel can investigate the cause of policy degradation.
[0080] In some implementations, the sample size for offline evaluation processing is dynamically determined based on the availability of historical log data. If the number of user request records in the historical log data over the past 30 days is less than 1 million, the extraction time range is extended to the past 60 days. Baseline Cumulative Rewards The number of simulations is adjusted according to the size of the evaluation sample. When the size of the evaluation sample is less than 500,000, the number of simulations is increased to 200 to improve the stability of the baseline cumulative reward estimate.
[0081] In an optional implementation, the preset threshold is configured differently based on the business stage of the traffic acquisition platform. During the stable period of the platform's business, the preset threshold is increased to 0.85, tightening the tolerance for strategy rollback; during the platform's business exploration period, the preset threshold is decreased to 0.65, giving more room for trial and error in strategy optimization.
[0082] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A data processing method for an AI-based traffic acquisition platform, characterized in that, include: Receive user behavior data and content display data from the traffic acquisition platform, perform time alignment processing on the user behavior data and the content display data, and generate joint time series data containing user interaction sequences and content exposure sequences; Based on the joint time series data, a causal inference algorithm is used to identify the driving relationship between the user behavior data and the content display data, and at least one causal chain is obtained with the content display data as the cause and the user behavior data as the effect. Based on the causal chain, the traffic acquisition strategy is iteratively optimized using a reinforcement learning framework to generate a dynamically adjusted traffic allocation strategy, which is used to determine the weight values of different content display positions. Based on the dynamically adjusted traffic allocation strategy, the system responds to real-time user requests, maps the user requests to the corresponding content display locations, and outputs traffic redirection decision results.
2. The AI-based traffic acquisition platform data processing method according to claim 1, characterized in that, The process of receiving user behavior data and content display data from the traffic acquisition platform, performing time alignment processing on the user behavior data and the content display data, and generating joint time series data containing user interaction sequences and content exposure sequences includes: According to a unified timestamp granularity, the user behavior data and the content display data are extracted from the log system of the traffic acquisition platform. The user behavior data includes click behavior, dwell time and swipe operation, and the content display data includes content identifier, display time and display position. For each user identifier, each behavior record in the user behavior data is matched with the content exposure records in the content display data within a preset time window before the behavior record occurs, to obtain a behavior-exposure association pair; According to the chronological order, all behavior-exposure association pairs under the same user identifier are sorted to generate the user interaction sequence and the content exposure sequence. The user interaction sequence and the content exposure sequence are then bound in key-value pairs to obtain the joint time series data.
3. The AI-based traffic acquisition platform data processing method according to claim 2, characterized in that, Based on the joint time series data, a causal inference algorithm is used to identify the driving relationship between the user behavior data and the content display data, resulting in at least one causal chain with the content display data as the cause and the user behavior data as the effect, including: Each content exposure event in the joint time series data is used as a candidate dependent variable, and each user interaction event is used as a candidate result variable. The Granger causality test is used to perform lagged correlation analysis on the candidate dependent variables and the candidate result variables to screen out statistically significant causal relationship pairs. The causal relationship is subjected to directional verification processing. By comparing the changes in user behavior before and after the content exposure event, the causal direction from content exposure to user behavior is determined, and a directed causal edge is obtained. Multiple directed causal edges are spliced together according to time sequence and logical dependency to form the causal chain from initial content exposure to final user conversion, and the causal strength value of each link is marked on the causal chain.
4. The AI-based traffic acquisition platform data processing method according to claim 3, characterized in that, Based on the causal chain, a reinforcement learning framework is used to iteratively optimize the traffic acquisition strategy, generating a dynamically adjusted traffic allocation strategy. This traffic allocation strategy determines the weight values for different content display positions, including: Each content display position in the causal chain is defined as a state node, the weight value assigned to the content display position in the traffic allocation strategy is defined as an action in the action space, and the user's response to the content display position is defined as a reward signal. A deep Q-network is used to fit the state nodes, the actions, and the reward signals to construct a state-action value function, which is used to evaluate the expected cumulative reward of performing a specific action in a given state. Based on the state-action value function, the network parameters of the deep Q-network are iteratively updated using an experience replay mechanism and a target network update mechanism, and the updated traffic allocation strategy is output after each iteration.
5. The AI-based traffic acquisition platform data processing method according to claim 4, characterized in that, Each content display location in the causal chain is defined as a state node, the weight value assigned to that content display location in the traffic allocation strategy is defined as an action in the action space, and the user's response to the content display location is defined as a reward signal, including: Nodes with an out-degree greater than zero are extracted from the causal chain as state nodes. Each state node corresponds to a content display position and carries the historical conversion rate characteristics and contextual characteristics of that content display position. The action space is discretized into multiple preset weight levels, each weight level corresponding to a specific traffic allocation ratio. The action is to select a weight level from the action space and assign it to the current state node. Collect the conversion results after the user interacts with the content displayed at the current state node. Calculate the comprehensive reward value as the reward signal based on the three dimensions of whether the conversion occurred, the conversion depth, and the conversion time.
6. The AI-based traffic acquisition platform data processing method according to claim 4, characterized in that, The process involves fitting the state nodes, actions, and reward signals using a deep Q-network to construct a state-action value function. This function evaluates the expected cumulative reward for performing a specific action in a given state, including: The feature vector of the state node is used as input to the input layer of the deep Q network, which contains multiple fully connected layers and activation function layers to perform nonlinear transformation processing on the input. In the output layer of the deep Q network, a corresponding value prediction score is output for each possible action, and the value prediction scores corresponding to all actions constitute the output vector of the state-action value function in a given state. Using temporal difference error as the loss function, the training error is calculated by adding a discount factor to the immediate reward signal obtained after performing an action at the current state node, multiplying it by the maximum value prediction of the next state output by the target network, and subtracting the current state-action value function output by the current network. The training error is then used to backpropagate and update the network parameters of the deep Q network.
7. The AI-based traffic acquisition platform data processing method according to claim 1, characterized in that, Based on the dynamically adjusted traffic allocation strategy, the system responds to real-time user requests, maps the user requests to corresponding content display locations, and outputs traffic redirection decision results, including: When a user request is received in real time, the user identifier and request context information in the user request are extracted. Based on the user identifier, the joint time series data corresponding to the user is retrieved from the historical storage to obtain the user's historical behavior characteristics. The user's historical behavior features and the request context information are concatenated into a current state feature vector, and the current state feature vector is input into the dynamically adjusted traffic allocation strategy to calculate the weight value of each content display position. The content display positions are sorted in descending order of weight value, and the content display position with the highest weight value is selected as the target position for traffic redirection. The target position for traffic redirection is then bound to the user request to generate the traffic redirection decision result.
8. The AI-based traffic acquisition platform data processing method according to claim 7, characterized in that, The user's historical behavior features and the request context information are concatenated into a current state feature vector. This current state feature vector is then input into the dynamically adjusted traffic allocation strategy to calculate the weight value for each content display position, including: The user's historical behavior features are sequence encoded, and a recurrent neural network is used to extract the temporal dependencies in the user's historical behavior features to obtain the user behavior embedding vector. Discrete feature embedding processing is performed on the scene tag, device type and current time in the request context information to obtain a context embedding vector. The user behavior embedding vector and the context embedding vector are concatenated to generate the current state feature vector. The current state feature vector is forward propagated to the deep Q-network contained in the dynamically adjusted traffic allocation strategy. Through the forward computation of the network, the weight value corresponding to each content display position is output.
9. The AI-based traffic acquisition platform data processing method according to claim 8, characterized in that, The discrete feature embedding process for the scene label, device type, and current time in the request context information includes mapping the value of each discrete feature to the corresponding low-dimensional dense vector space.
10. An AI-based traffic acquisition platform data processing system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the AI-based traffic generation platform data processing method as described in any one of claims 1 to 9.