CN-122022946-A - Data processing method, apparatus, device, storage medium, and program product
Abstract
The embodiment of the application discloses a data processing method, a device, equipment, a storage medium and a program product, wherein the method comprises the steps of acquiring first behavior sequence data of a target object in a first time period; the method comprises the steps of carrying out causal relation learning on first behavior sequence data through a causal attention mechanism to obtain a behavior causal relation and a behavior demand relation of a target object, obtaining second behavior sequence data of the target object in a second time period, carrying out anti-causal reasoning on the target object based on the second behavior sequence data and the behavior causal relation to obtain a predicted demand probability distribution of the target object, wherein the first time period is earlier than the second time period, and carrying out anti-demand reasoning on the target object based on the predicted demand probability distribution and the behavior demand relation to obtain a predicted behavior of the target object. By adopting the embodiment of the application, the causal relationship and the deep demand can be automatically deduced from the user behavior, and more accurate user understanding and prediction can be realized, so that the user guiding capability is effectively improved.
Inventors
- TANG ZHUCHENG
- WANG QINWEN
Assignees
- 书行科技(北京)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260113
Claims (13)
- 1. A method of data processing, the method comprising: Acquiring first behavior sequence data of a target object in a first time period, wherein the first behavior sequence data comprises behavior data of a plurality of behaviors; performing causal relation learning on the first behavior sequence data through a causal attention mechanism to obtain a behavior causal relation and a behavior demand relation of the target object, wherein the behavior causal relation comprises causal relations between each behavior and other behaviors in the plurality of behaviors, and the behavior demand relation comprises distances between priori demands of each behavior and behaviors driven by the priori demands; Acquiring second behavior sequence data of the target object in a second time period, and performing anti-causal reasoning on the target object based on the second behavior sequence data and the behavior causal relation to obtain a predicted demand probability distribution of the target object, wherein the first time period is earlier than the second time period; and carrying out reverse demand reasoning on the target object based on the predicted demand probability distribution and the behavior demand relation to obtain the predicted behavior of the target object.
- 2. The method of claim 1, wherein the performing causal relationship learning on the first behavioral sequence data by a causal attention mechanism to obtain the behavioral causal relationship of the target object comprises: Performing attention calculation on the first behavior sequence data through the causal attention mechanism and the causal mask to obtain attention weights between each behavior in the plurality of behaviors and at least one behavior before each behavior; screening target attention weights with attention weights greater than a first preset weight threshold from the obtained attention weights; and constructing the action causal relation of the target object based on the target attention weight.
- 3. The method of claim 2, wherein the method further comprises: Performing causal relation learning on the second behavior sequence data through the causal attention mechanism to obtain a local behavior causal relation of the target object, wherein the local behavior causal relation comprises causal relations between each behavior and other behaviors in a plurality of behaviors included in the second behavior sequence data; and updating the action causal relationship and the action demand relationship based on the local action causal relationship to obtain a new action causal relationship and a new action demand relationship.
- 4. A method as claimed in claim 3, wherein the method further comprises: Carrying out attenuation treatment on the attention weights between two behaviors which are not updated in the new behavior causal relationship every interval preset time period to obtain the new behavior causal relationship; And if the target attention weight smaller than the second preset weight threshold exists in the new behavior causal relationship obtained in the last time, deleting the causal relationship between the two behaviors corresponding to the target attention weight from the new behavior causal relationship obtained in the last time so as to obtain the new behavior causal relationship.
- 5. The method of claim 1, wherein said performing an inverse causal inference on the target object based on the second behavioral sequence data and the behavioral causal relationship to obtain a predicted demand probability distribution for the target object comprises: And inputting the second behavior sequence data and the behavior causal relationship to a variation encoder, and encoding the second behavior sequence data by using the behavior causal relationship as a constraint through the variation encoder to obtain a predicted demand probability distribution of the target object, wherein the predicted demand probability distribution is used for representing the probability that each predicted demand drives the behavior in the second behavior sequence data.
- 6. The method of claim 5, wherein the method further comprises: The predicted demand probability distribution and the behavior demand relation are input to a variation decoder, and the predicted demand probability distribution is decoded by the variation decoder with the behavior demand relation as a constraint to obtain a predicted behavior probability distribution, wherein the predicted behavior probability distribution is used for representing the probability that each preset behavior is a behavior to be generated of the target object; and determining the predicted behavior of the target object from a plurality of preset behaviors based on the predicted behavior probability distribution.
- 7. The method of claim 1, wherein the method further comprises: Constructing a five-tuple vector of each behavior based on the first behavior sequence data, wherein the five-tuple vector of any behavior comprises a behavior type, a behavior object, a time stamp, a content feature and a context feature of any behavior, and the behavior type, the behavior object, the time stamp, the content feature and the context feature of any behavior are obtained from the first behavior sequence data; constructing a behavior representation matrix corresponding to the first behavior sequence data based on the five-tuple vector of each behavior, wherein the behavior representation matrix comprises the five-tuple vector of each behavior; The performing causal relationship learning on the first behavioral sequence data through a causal attention mechanism to obtain the behavioral causal relationship of the target object includes: and performing causal relation learning on the behavior representation matrix through the causal attention mechanism to obtain the behavior causal relation of the target object.
- 8. The method of claim 1, wherein the predicted behavior is obtained from a trained behavior prediction model, the training method of the trained behavior prediction model comprising: Obtaining a training sample, wherein the training sample comprises third behavior sequence data of a training object in a third time period and first behaviors generated by the training object after the fourth time period, the third behavior sequence data comprises fourth behavior sequence data of the training object in a fourth time period, the third time period comprises the fourth time period, and a cut-off time point of the fourth time period is a cut-off time point of the third time period; Performing causal relation learning on the third behavior sequence data by using a causal attention mechanism through a behavior prediction model to obtain a behavior causal relation and a behavior demand relation of the training object, wherein the behavior causal relation of the training object comprises causal relations between each behavior in the third behavior sequence data and other behaviors, and the behavior demand relation of the training object comprises distances between priori requirements of each behavior in the third behavior sequence data and behaviors driven by corresponding priori requirements; based on the fourth behavior sequence data and the behavior causal relation of the training object, performing anti-causal reasoning on the training object to obtain the predicted demand probability distribution of the training object; Based on the predicted demand probability distribution of the training object and the behavior demand relation of the training object, carrying out reverse demand reasoning on the training object to obtain the predicted behavior of the training object; And training the behavior prediction model by taking the difference between the predicted behavior of the training object and the first behavior generated by the training object after the fourth time period as a training target to obtain the trained behavior prediction model.
- 9. The method of claim 8, wherein training the behavior prediction model with the training objective being minimizing a difference between the predicted behavior of the training object and a first behavior of the training object that occurs after the fourth period of time, comprises: Determining a priori demand probability distribution of behaviors in the fourth behavior sequence data based on the behavior demand relationship; And training the behavior prediction model by taking the minimum difference between the predicted behavior of the training object and the first behavior generated by the training object after the fourth time period and the minimum difference between the predicted demand probability distribution of the training object and the prior demand probability distribution as training targets to obtain the trained behavior prediction model.
- 10. A data processing apparatus, the apparatus comprising: The system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring first behavior sequence data of a target object in a first time period, and the first behavior sequence data comprises behavior data of a plurality of behaviors; The learning unit is used for carrying out causal relation learning on the first behavior sequence data through a causal attention mechanism to obtain a behavior causal relation and a behavior demand relation of the target object, wherein the behavior causal relation comprises causal relations between each behavior and other behaviors in the plurality of behaviors, and the behavior demand relation comprises distances between priori demands of each behavior and behaviors driven by the priori demands; The reasoning unit is used for acquiring second behavior sequence data of the target object in a second time period, and carrying out reverse causal reasoning on the target object based on the second behavior sequence data and the behavior causal relationship to obtain the predicted demand probability distribution of the target object, wherein the first time period is earlier than the second time period; The reasoning unit is further configured to perform reverse demand reasoning on the target object based on the predicted demand probability distribution and the behavior demand relationship, so as to obtain a predicted behavior of the target object.
- 11. A computer device, characterized in that it comprises a memory, a communication interface and a processor, wherein the memory, the communication interface and the processor are connected to each other, the memory stores a computer program, and the processor invokes the computer program stored in the memory for implementing the data processing method according to any one of claims 1 to 9.
- 12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the data processing method according to any one of claims 1 to 9.
- 13. A computer program product, characterized in that the computer program product comprises a computer program stored in a computer storage medium, from which computer storage medium a processor of a computer device reads the computer program, which processor executes the computer program, so that the computer device performs the data processing method according to any one of claims 1 to 9.
Description
Data processing method, apparatus, device, storage medium, and program product Technical Field The present application relates to the field of computer technologies, and in particular, to a data processing method, apparatus, device, storage medium, and program product. Background Along with the rapid development of information technology and the increasing enrichment of internet content, the recall system is widely applied to platforms such as electronic commerce, content information, social media and the like, and the existing recall system is mainly used for recalling data in a collaborative filtering or content matching mode based on search keywords input by users. Thus, existing recall systems can only passively respond to user behavior, and cannot answer the counterfactual question of "how user behavior would change if a certain condition was changed," limiting the ability of the user to guide. Disclosure of Invention The technical problem to be solved by the embodiment of the application is to provide a data processing method, a device, equipment, a storage medium and a program product, which can automatically infer causal relationship and deep requirements from user behaviors, realize more accurate user understanding and prediction, and effectively improve the user guiding capability. In one aspect, an embodiment of the present application provides a data processing method, where the method includes: Acquiring first behavior sequence data of a target object in a first time period, wherein the first behavior sequence data comprises behavior data of a plurality of behaviors; performing causal relation learning on the first behavior sequence data through a causal attention mechanism to obtain a behavior causal relation and a behavior demand relation of the target object, wherein the behavior causal relation comprises causal relations between each behavior and other behaviors in the plurality of behaviors, and the behavior demand relation comprises distances between priori demands of each behavior and behaviors driven by the priori demands; Acquiring second behavior sequence data of the target object in a second time period, and performing anti-causal reasoning on the target object based on the second behavior sequence data and the behavior causal relation to obtain a predicted demand probability distribution of the target object, wherein the first time period is earlier than the second time period; and carrying out reverse demand reasoning on the target object based on the predicted demand probability distribution and the behavior demand relation to obtain the predicted behavior of the target object. In another aspect, an embodiment of the present application provides a data processing apparatus, including: The system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring first behavior sequence data of a target object in a first time period, and the first behavior sequence data comprises behavior data of a plurality of behaviors; The learning unit is used for carrying out causal relation learning on the first behavior sequence data through a causal attention mechanism to obtain a behavior causal relation and a behavior demand relation of the target object, wherein the behavior causal relation comprises causal relations between each behavior and other behaviors in the plurality of behaviors, and the behavior demand relation comprises distances between priori demands of each behavior and behaviors driven by the priori demands; The reasoning unit is used for acquiring second behavior sequence data of the target object in a second time period, and carrying out reverse causal reasoning on the target object based on the second behavior sequence data and the behavior causal relationship to obtain the predicted demand probability distribution of the target object, wherein the first time period is earlier than the second time period; The reasoning unit is further configured to perform reverse demand reasoning on the target object based on the predicted demand probability distribution and the behavior demand relationship, so as to obtain a predicted behavior of the target object. In one embodiment, the learning unit performs causal relationship learning on the first behavioral sequence data through a causal attention mechanism, and obtains a behavioral causal relationship of the target object, which may be used for: Performing attention calculation on the first behavior sequence data through the causal attention mechanism and the causal mask to obtain attention weights between each behavior in the plurality of behaviors and at least one behavior before each behavior; screening target attention weights with attention weights greater than a first preset weight threshold from the obtained attention weights; and constructing the action causal relation of the target object based on the target attention weight. In one embodiment, the learning unit may