CN116186411A - Method and device for constructing user behavior prediction model based on depth recommendation model - Google Patents
Method and device for constructing user behavior prediction model based on depth recommendation model Download PDFInfo
- Publication number
- CN116186411A CN116186411A CN202310217236.XA CN202310217236A CN116186411A CN 116186411 A CN116186411 A CN 116186411A CN 202310217236 A CN202310217236 A CN 202310217236A CN 116186411 A CN116186411 A CN 116186411A
- Authority
- CN
- China
- Prior art keywords
- behavior
- user
- matrix
- article
- characteristic information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 230000006399 behavior Effects 0.000 claims abstract description 476
- 239000011159 matrix material Substances 0.000 claims abstract description 253
- 238000012549 training Methods 0.000 claims abstract description 123
- 239000013598 vector Substances 0.000 claims description 38
- 238000012545 processing Methods 0.000 claims description 31
- 230000006870 function Effects 0.000 claims description 23
- 230000000750 progressive effect Effects 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 16
- 238000002372 labelling Methods 0.000 claims description 14
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000007477 logistic regression Methods 0.000 claims description 5
- 238000012216 screening Methods 0.000 claims description 5
- 238000012795 verification Methods 0.000 claims description 3
- 238000010276 construction Methods 0.000 abstract description 20
- 238000004891 communication Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000003542 behavioural effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000013501 data transformation Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method, a device, equipment and a medium for constructing a user behavior prediction model and predicting user behaviors. The construction method of the user behavior prediction model comprises the following steps: generating an original sample set according to the historical behavior data of multiple users; generating matrixes corresponding to the original samples respectively according to the behavior sets in the original samples; forming a training sample set; and training the depth recommendation model by using the training sample set to obtain a user behavior prediction model. The user behavior prediction method comprises the following steps: acquiring user characteristic information of a user to be predicted and article characteristic information of an article to be predicted; acquiring a behavior prediction probability matrix of a user to be predicted; and verifying whether the item to be predicted is recommended to the user to be predicted according to the behavior prediction probability matrix. The technical scheme of the invention provides a new mode for constructing the user behavior prediction model so as to improve the accuracy of user behavior prediction.
Description
Technical Field
The present invention relates to the field of model construction, and in particular, to a method for constructing a user behavior prediction model, a method, a device, equipment, and a medium for predicting user behavior.
Background
With the rapid development of the internet, information data in the network grows exponentially, resulting in redundancy of information, thereby creating a problem of how users acquire information of interest themselves at effective times. At the moment, the recommendation system based on the user behavior prediction is generated in the moment, the recommendation system based on the user behavior prediction greatly improves the user experience, and the time consumption when the user searches for the information of interest by himself can be effectively reduced. .
The recommendation system mainly has two implementation modes: the method 1 comprises the steps of changing a plurality of training targets into one target according to weights, and fitting the model; the method 2 is to construct a plurality of network structures, so that different networks are responsible for different training targets, and finally, a plurality of training targets are fused together in a certain measurement mode, so that the benefits of the plurality of targets are maximized.
The inventors have found that the above prior art has the following problems in the process of implementing the present invention: the method 1 can lead each training target to be completely fractured, and damage the integrity of information, thereby influencing the recommended accuracy; in the method 2, the number of the components involved in the manual work is too large, so that the problem that the recommendation result is influenced due to too many human factors exists.
Disclosure of Invention
The invention provides a method, a device, equipment and a medium for constructing a user behavior prediction model, and aims to provide a new mode for constructing the user behavior prediction model and improve the accuracy of user behavior prediction.
In a first aspect, an embodiment of the present invention provides a method for constructing a user behavior prediction model, where the method includes;
generating an original sample set according to the historical behavior data of multiple users, wherein the original sample set comprises user characteristic information of a set user, article characteristic information of a set article and a behavior set executed by the set user on the set article, and progressive relations exist among behaviors in the behavior set;
generating a first behavior feature matrix, a second behavior feature matrix and a third behavior feature matrix which respectively correspond to the original samples according to the behavior sets in the original samples;
according to user characteristic information of a set user in an original sample, setting article characteristic information, a first behavior characteristic matrix, a second behavior characteristic matrix and a third behavior characteristic matrix of an article to form a training sample set, wherein the second behavior characteristic matrix and the third behavior characteristic matrix are used as labeling data in the training sample;
And training the depth recommendation model by using the training sample set to obtain a user behavior prediction model.
In a second aspect, an embodiment of the present invention provides a method for predicting user behavior, where the method includes:
acquiring user characteristic information of a user to be predicted and article characteristic information of an article to be predicted;
inputting user characteristic information of a user to be predicted and article characteristic information of an article to be predicted into a user behavior prediction model obtained through training by the construction method of the user behavior prediction model according to any embodiment of the invention, and obtaining a behavior prediction probability matrix of the user to be predicted to the article to be predicted;
and verifying whether the to-be-predicted object is recommended to the to-be-predicted user or not according to the behavior prediction probability matrix.
In a third aspect, an embodiment of the present invention provides a device for constructing a user behavior prediction model, where the device includes:
the original sample set generation module is used for generating an original sample set according to the historical behavior data of multiple users, wherein the original sample set comprises user characteristic information of a set user, article characteristic information of a set article and a behavior set executed by the set user on the set article, and progressive relations exist among behaviors in the behavior set;
The characteristic matrix generation module is used for generating a first behavior characteristic matrix, a second behavior characteristic matrix and a third behavior characteristic matrix which respectively correspond to the original samples according to the behavior set in the original samples;
the training sample set generation module is used for setting article characteristic information, a first behavior characteristic matrix, a second behavior characteristic matrix and a third behavior characteristic matrix of the article according to user characteristic information of a set user in an original sample to form a training sample set, wherein the second behavior characteristic matrix and the third behavior characteristic matrix are used as labeling data in the training sample;
and the model training module is used for training the depth recommendation model by using the training sample set to obtain a user behavior prediction model.
In a fourth aspect, an embodiment of the present invention provides a user behavior prediction apparatus, including:
the characteristic information acquisition module is used for acquiring user characteristic information of a user to be predicted and article characteristic information of an article to be predicted;
the probability matrix acquisition module is used for inputting the user characteristic information of the user to be predicted and the article characteristic information of the article to be predicted into the user behavior prediction model obtained through training by the construction method of the user behavior prediction model according to any embodiment of the invention, and acquiring a behavior prediction probability matrix of the article to be predicted of the user to be predicted;
And the recommendation verification module is used for verifying whether the article to be predicted is recommended to the user to be predicted according to the behavior prediction probability matrix.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor, so that the at least one processor can execute the method for constructing a user behavior prediction model according to any embodiment of the present invention, or execute the method for predicting user behavior according to any embodiment of the present invention.
In a sixth aspect, an embodiment of the present invention provides a computer readable storage medium, where computer instructions are stored, where the computer instructions are configured to cause a processor to implement a method for constructing a user behavior prediction model according to any one of the embodiments of the present invention, or implement a user behavior prediction method according to any one of the embodiments of the present invention.
According to the technical scheme, the original sample set is generated according to the historical behavior data of multiple users, the first behavior feature matrix, the second behavior feature matrix and the third behavior feature matrix which correspond to the original samples respectively are generated according to the behavior set in the original samples, then the item feature information, the first behavior feature matrix, the second behavior feature matrix and the third behavior feature matrix of the item are set according to the user feature information of the set user in the original samples, a training sample set and marking data are formed, finally the training sample set is used for training the deep recommendation model to obtain a user behavior prediction model, a new mode for constructing the user behavior prediction model is provided, the accuracy of user behavior prediction can be effectively improved based on the new user behavior prediction model, the hit rate of the recommended item to the actual requirement of the user can be improved, and the time consumption of the user when the user searches for the information by himself/herself is effectively reduced.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for constructing a user behavior prediction model according to a first embodiment of the present invention;
FIG. 2a is a flowchart of a method for constructing a user behavior prediction model according to a second embodiment of the present invention;
FIG. 2b is a block diagram of a user behavior prediction model obtained by a second method according to the second embodiment of the present invention;
FIG. 3 is a flowchart of a user behavior prediction method according to a third embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a device for constructing a user behavior prediction model according to a fourth embodiment of the present invention;
Fig. 5 is a schematic structural diagram of a user behavior prediction apparatus according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device implementing a method for constructing a user behavior prediction model and a method for predicting user behavior according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a method for constructing a user behavior prediction model according to an embodiment of the present invention, where the method may be performed by a device for constructing a user behavior prediction model, the device for constructing a user behavior prediction model may be implemented in hardware and/or software, and the device for constructing a user behavior prediction model may be configured in a terminal or a server having a data processing function. As shown in fig. 1, the method includes:
s110, generating an original sample set according to the historical behavior data of multiple users.
In this embodiment, the historical behavior data includes behavior data of corresponding operation behaviors of multiple users on a preset platform; by way of example, for example, a user may purchase item a by performing the purchase operation (e.g., entering a keyword, browsing a search result or clicking on an item link, etc.), item characteristic information of item a, user characteristic information of a user, etc.; further, the preset platform may be a shopping platform with a commodity recommendation function, and the like.
The original sample comprises user characteristic information of a set user, article characteristic information of a set article and a behavior set executed by the set user on the set article, wherein progressive relations exist among behaviors in the behavior set.
That is, one original sample records one specific user a, and one or more user operations conforming to behavior logic are performed on one specific object b.
Further, the user characteristic information includes at least one of the following: setting user age, user gender and click data and purchase data of the user within a certain time; the article characteristic information comprises at least one of the following items: setting the item category, the item brand and the click quantity and the exposure quantity of the item in a certain time; the behavior set comprises at least one of clicking, purchasing and purchasing ordered according to progressive relation.
In this embodiment, optionally, according to different functions of a preset platform or different prediction types of user behaviors, the behavior set may further include: browsing, searching, or collecting, among other actions.
In this embodiment, the progressive relationship between the behaviors may be: behavioral ranking with logical relationships; for example, if the behavior set a is { click, purchase }, the behavior set a is a behavior set ordered according to a progressive relationship; accordingly, if the behavior set b is { buy, click }, it is easy to understand that the behavior set b is not a behavior set ordered according to the progressive relationship because the buy and the purchase behavior cannot occur before the click behavior when purchasing the article under the condition of the prior art.
Optionally, generating the original sample set according to the historical behavior data of the multiple users includes:
acquiring at least one alternative behavior set of a target user aiming at a target object in the historical behavior data of multiple users; screening at least one target behavior set meeting the rationality of the data progressive relationship in each candidate behavior set through a logic processing module; and constructing at least one original sample matched with the target user according to the user characteristic information of the target user, the article characteristic information of the target article and the at least one target behavior set.
Wherein the target user is any user of the multiple users; further, in this embodiment, any user of the multiple users is selected as a target user first, after the above-mentioned construction behavior of the original samples is performed on the current target user, any user of the multiple users except the current target user is selected as a new target user, and new original sample construction is continued until all users of the multiple users construct one or more matched original samples or until original samples meeting a preset number of requirements are constructed.
In this embodiment, for example, if the behavior set a is { click, buy }, the behavior set a is a reasonable behavior set that satisfies a data progressive relationship; accordingly, if the behavior set b is { buy, click }, it is easy to understand that, under the condition of the prior art, the behavior set b is not a reasonable behavior set satisfying the data progressive relationship because the buy and the purchase behavior cannot occur before the click behavior when purchasing the article.
In this embodiment, when screening the candidate behavior sets by using the logic processing module, at least one preset target behavior set meeting the rationality of the data progressive relationship may be preset in the logic processing module, and then the at least one candidate behavior set is input into the logic processing module, where the logic processing module sequentially compares each candidate behavior set with the preset target behavior set; if the alternative behavior set is matched with at least one preset target behavior set, outputting the alternative behavior set as a target behavior set; and if the alternative behavior set is not matched with all the preset target behavior sets, deleting the alternative behavior set.
Further, user characteristic information matched with the user identifier can be spliced according to the user ID or other user identifiers with specificity, and the article characteristic information of the article corresponding to the user identifier and the at least one target behavior set are spliced to form an original sample matched with the user identifier; further, each user of the multiple users may construct at least one original sample that matches the user identification; illustratively, the original sample may contain information that is: { user a, female, item b, category c, click, buy with add }; among the above information, the user a is the target user, "female" is the user characteristic information of the user a, "category c" is the article characteristic information of the article b, "click, purchase" is the target behavior set.
S120, according to the behavior set in each original sample, generating a first behavior feature matrix, a second behavior feature matrix and a third behavior feature matrix which respectively correspond to each original sample.
The first behavior feature matrix may be a zero matrix, and the second behavior feature matrix and the third behavior feature matrix are non-zero matrices.
Optionally, generating a first behavior feature matrix, a second behavior feature matrix and a third behavior feature matrix corresponding to each original sample according to the behavior set in each original sample, including: acquiring a current behavior set in a current processing sample from each original sample, and forming a one-dimensional behavior matrix matched with the current behavior set, wherein the bit number L of the one-dimensional behavior matrix is fixed, and each matrix bit corresponds to a set behavior;
constructing a first basic feature matrix of L-1 order, sequentially acquiring front i-1 column data of ith column data in the one-dimensional behavior matrix, filling the front i-1 column data of the ith row in the first basic feature matrix, and carrying out zero padding on the rest position in the first basic feature matrix to obtain the first behavior feature matrix, wherein i is initialized to be 1;
constructing a second basic feature matrix of L-order, sequentially acquiring the ith data in the one-dimensional behavior matrix, filling the ith data into the ith row and the ith column in the second basic feature matrix, and carrying out zero padding on the rest positions in the second basic feature matrix to obtain a second behavior feature matrix;
and constructing an L-order identity matrix as a third behavior characteristic matrix.
In this embodiment, a one-dimensional behavior matrix may be generated according to a behavior set in each original sample, and then a first behavior feature matrix, a second behavior feature matrix, and a third behavior feature matrix may be generated according to the one-dimensional behavior matrix.
Specifically, when a one-dimensional behavior matrix is generated according to the behavior set in each original sample, the occurring behavior can be set to be 1, the non-occurring behavior is set to be 0, and a one-dimensional behavior matrix consisting of 0 and 1 is formed; for example, on the basis of S110, the target behavior set a satisfying the rationality of the data progressive relationship is { click, buy }, if, in a certain behavior of the target user, the user browses by clicking on the link of the item a, and directly performs the purchase behavior without going through the behavior of adding into the shopping cart after browsing, the set behavior of the click and purchase behavior is 1, and the set behavior of the buy is 0, that is, the one-dimensional behavior matrix corresponding to the behavior set is (1, 0, 1). It should be noted that, in step S110, at least one target behavior set satisfying the rationality of the data progressive relationship is screened from each of the candidate behavior sets by the logic processing module, that is, the target behavior sets are all reasonable sets with the rationality of behaviors, and further, in a certain behavior, the operation of purchasing without clicking is unreasonable, so that a one-dimensional behavior matrix which does not conform to the behavior logic, such as (0, 1) or (0, 1), does not appear in the above operation.
In a specific implementation manner of this embodiment, a target behavior set of the target user is { click, buy }, and there is a click and buy behavior in the historical behavior data of the target user, there is no buy behavior, after a one-dimensional behavior matrix d (1, 0, 1) matched with the current behavior set is formed by the behaviors, it may be determined that the size of the corresponding first basic feature matrix is a 3*2-order matrix, first, the first 0-bit data of the 1 st column data of the matrix d is acquired, and since the 0-bit data does not include any data information, that is, the 1 st row in the first basic feature matrix has no data information; correspondingly, the first 1 bit data 1 of the 2 nd column data of the matrix d is taken later, namely, the data contained in the 2 nd row in the first basic feature matrix is 1, and the data contained in the 3 rd row in the first basic feature matrix is 1,0; filling the data to the corresponding position of the first basic feature matrix, and zero filling the rest position in the first basic feature matrix to obtainThe first behavior feature matrix of (a) is:
when the one-dimensional behavior matrix d (1, 0, 1) is used for constructing a second feature matrix, the corresponding second basic feature matrix can be determined to be 3*3-order matrix, and first column data 1 in the matrix d is filled into the 1 st row and 1 st column in the second basic feature matrix; correspondingly, filling the second column data '0' in the matrix d into the 2 nd row and the 2 nd column of the second basic feature matrix, filling the third column data '1' in the matrix d into the 3 rd row and the 3 rd column of the second basic feature matrix, and carrying out zero filling on the rest positions in the second basic feature matrix to obtain a second behavior feature matrix, wherein the second behavior feature matrix comprises:
Further, when the one-dimensional behavior matrix d (1, 0, 1) is used to construct the third feature matrix, a 3*3-order identity matrix can be constructed as the third behavior feature matrix.
S130, according to user characteristic information of a set user in an original sample, setting article characteristic information, a first behavior characteristic matrix, a second behavior characteristic matrix and a third behavior characteristic matrix of an article to form a training sample set, wherein the second behavior characteristic matrix and the third behavior characteristic matrix are used as labeling data in the training sample.
The training sample set comprises training data and labeling data; specifically, the training data includes: setting user characteristic information of a user, setting article characteristic information and a first behavior characteristic matrix of an article, wherein the labeling data comprises a second behavior characteristic matrix and a third behavior characteristic matrix; further, the training data can be used to calculate the theoretical probability of user behavior prediction under the current model parameter conditions; the annotation data can be used to calculate the actual probability of the user behavior prediction, and it should be noted that the current model parameter condition can be any condition value set randomly.
And S140, training the depth recommendation model by using the training sample set to obtain a user behavior prediction model.
Wherein the training sample set comprises: and setting user characteristic information of the user, and setting article characteristic information, a first behavior characteristic matrix, a second behavior characteristic matrix and a third behavior characteristic matrix of the article.
Optionally, training the depth recommendation model by using a training sample set to obtain a user behavior prediction model, including:
acquiring a target training sample in a training sample set, and inputting the target training sample into a depth recommendation model; processing user characteristic information of a target user, article characteristic information of a target article and a target first behavior characteristic matrix in a target training sample through a sparse characteristic layer in a depth recommendation model to obtain an original sparse vector; processing the original sparse vector through a dense embedding layer in the depth recommendation model to obtain a dense vector; performing logistic regression calculation on the original sparse vector and the dense vector through an factorization layer in the depth recommendation model to obtain a behavior prediction probability matrix; calculating a loss function according to the prediction probability matrix, a target second behavior feature matrix and a target third behavior feature matrix in the target training sample through a loss function layer in the depth recommendation model, and carrying out parameter adjustment on the depth recommendation model according to the loss function; and returning to the operation of acquiring the target training sample in the training sample set until the user behavior prediction model is obtained through training.
According to the technical scheme, the original sample set is generated according to the historical behavior data of multiple users, the first behavior feature matrix, the second behavior feature matrix and the third behavior feature matrix which correspond to the original samples respectively are generated according to the behavior set in the original samples, then the item feature information, the first behavior feature matrix, the second behavior feature matrix and the third behavior feature matrix of the item are set according to the user feature information of the set user in the original samples, a training sample set and marking data are formed, finally the training sample set is used for training the deep recommendation model to obtain a user behavior prediction model, a new mode for constructing the user behavior prediction model is provided, the accuracy of user behavior prediction can be effectively improved based on the new user behavior prediction model, the hit rate of the recommended item to the actual requirement of the user can be improved, and the time consumption of the user when the user searches for the information by himself/herself is effectively reduced.
Example two
Fig. 2a is a flowchart of a user behavior prediction method according to a second embodiment of the present invention, where the user behavior prediction model is refined based on the foregoing embodiment, and specifically in this embodiment, training a deep recommendation model using a training sample set to obtain the user behavior prediction model is refined as follows: acquiring a target training sample in a training sample set, and inputting the target training sample into a depth recommendation model; processing user characteristic information of a target user, article characteristic information of a target article and a target first behavior characteristic matrix in a target training sample through a sparse characteristic layer in a depth recommendation model to obtain an original sparse vector; processing the original sparse vector through a dense embedding layer in the depth recommendation model to obtain a dense vector; performing logistic regression calculation on the original sparse vector and the dense vector through an factorization layer in the depth recommendation model to obtain a behavior prediction probability matrix; calculating a loss function according to the prediction probability matrix, a target second behavior feature matrix and a target third behavior feature matrix in the target training sample through a loss function layer in the depth recommendation model, and carrying out parameter adjustment on the depth recommendation model according to the loss function; and returning to the operation of acquiring the target training sample in the training sample set until the user behavior prediction model is obtained through training.
Accordingly, as shown in fig. 2a, the method comprises:
s210, generating an original sample set according to the historical behavior data of multiple users.
The original sample comprises user characteristic information of a set user, article characteristic information of a set article and a behavior set executed by the set user on the set article, wherein progressive relations exist among behaviors in the behavior set.
S220, according to the behavior set in each original sample, generating a first behavior feature matrix, a second behavior feature matrix and a third behavior feature matrix which correspond to each original sample respectively.
S230, according to user characteristic information of a set user in an original sample, setting article characteristic information, a first behavior characteristic matrix, a second behavior characteristic matrix and a third behavior characteristic matrix of an article to form a training sample set, wherein the second behavior characteristic matrix and the third behavior characteristic matrix are used as labeling data in the training sample.
S240, acquiring a target training sample in the training sample set, and inputting the target training sample into the depth recommendation model.
As shown in fig. 2b, it should be noted that the Sparse Features are Sparse feature layers in the following steps; correspondingly, desnes Embedding is a dense Embedding layer in the following steps, and a factorization layer in the following steps of the HM layer; the fig. 2b further includes a Hide layer that is not included in the following steps, and further, the Hide layer may be used to perform high-order intersection between feature matrices and extract deep information.
S250, processing the user characteristic information of the target user in the target training sample, the article characteristic information of the target article and the first behavior characteristic matrix of the target through a sparse characteristic layer in the depth recommendation model to obtain an original sparse vector.
S260, processing the original sparse vector through a dense embedding layer in the depth recommendation model to obtain a dense vector.
The dense vector can be converted into a dense vector by performing word2vec processing on the original sparse vector in the dense embedding layer.
S270, performing logistic regression calculation on the original sparse vector and the dense vector through a factorization layer in the depth recommendation model to obtain a behavior prediction probability matrix.
S280, calculating a loss function through a loss function layer in the depth recommendation model according to the prediction probability matrix, the target second behavior feature matrix and the target third behavior feature matrix in the target training sample, and carrying out parameter adjustment on the depth recommendation model according to the loss function.
The current model parameter condition can be any condition value set randomly, so that the current predicted prediction probability matrix is generally different from the actual probability of the user behavior prediction calculated by the labeling data, and then parameters are adjusted by using a loss function according to the difference between the current model parameter and the actual probability of the user behavior prediction calculated by the labeling data.
S290, returning to the operation of acquiring the target training sample in the training sample set until training is performed to obtain a user behavior prediction model.
As shown in fig. 2b, the spark Features input data includes Sparse Features and dense Features, the Features of the Desnes eimbedding can be mapped to k-dimensional vectors through an FM algorithm, and the feature vectors are added two by two to obtain first-order cross weights, and two-point multiplication is performed to obtain second-order cross weights; then the FM layer combines the first-order and second-order cross weights of the input data with the corresponding feature vectors, and performs data transformation on the prediction results of the FM layer and the Hide layer in the output layer to obtain the theoretical probability of the user behavior prediction under the current model parameter condition; it should be noted that, because the parameter condition of the current model may be any condition value set randomly, the prediction probability matrix of the current prediction is usually different from the actual probability of the user behavior prediction calculated by the labeling data, and then the parameter is adjusted by using the loss function according to the difference between the two, and the above operations are circulated until the final difference value of the two is within the allowable range of the error, that is, the user behavior prediction model is obtained by training.
According to the technical scheme of the embodiment of the invention, an original sample set is generated according to historical behavior data of multiple users, a first behavior feature matrix, a second behavior feature matrix and a third behavior feature matrix which correspond to the original samples are generated according to behavior sets in the original samples, then according to user feature information of set users in the original samples, article feature information, the first behavior feature matrix, the second behavior feature matrix and the third behavior feature matrix of articles are set, a training sample set and labeling data are formed, then a target training sample is acquired in the training sample set, the target training sample is input into a depth recommendation model, the article feature information of target users in the target training sample and the first behavior feature matrix of the target are processed through a sparse feature layer in the depth recommendation model, an original sparse vector is obtained, then the original sparse vector is processed through a dense vector, the original sparse vector and the vector are subjected to logic regression calculation through a factorization layer in the depth recommendation model, after the behavior prediction probability matrix is obtained, the target training sample is acquired in the training sample set, the target training sample is subjected to the new behavior prediction model is performed according to a depth recommendation model, the new behavior prediction model is obtained, the target feature loss is calculated, the new behavior prediction model is obtained, the target training model is based on the new behavior model is calculated, the target training model is finally, the target feature loss is obtained, the target training model is obtained is calculated, the target training model is obtained based on the new behavior model is based on the target feature model, and the target feature is calculated, the target feature model is obtained, the new user prediction model is obtained, and the target feature is predicted, the user loss is obtained, and the user loss is obtained, the accuracy of the user behavior prediction can be effectively improved, the hit rate of recommended articles to the actual demands of the user can be further improved, and the time consumption when the user searches for the information of interest by himself/herself is effectively reduced.
Example III
Fig. 3 is a flowchart of a method for predicting user behavior according to a third embodiment of the present invention, where the method may be performed by a user behavior prediction device, and the user behavior prediction device may be implemented in hardware and/or software, and the user behavior prediction device may be configured in a computer or a server having a user behavior prediction function. As shown in fig. 3, the method includes:
s310, acquiring user characteristic information of a user to be predicted and article characteristic information of an article to be predicted.
Wherein the user characteristic information of the user to be predicted comprises at least one of the following: the information such as the user age, the user gender, click data and purchase data of the user within a certain time of the user to be predicted is set; the article characteristic information of the article to be predicted comprises at least one of the following items: and the information such as the item category of the item to be predicted, the item brand, the click quantity and the exposure quantity of the item in a certain time and the like.
S320, inputting the user characteristic information of the user to be predicted and the article characteristic information of the article to be predicted into a user behavior prediction model trained by a construction method of the user behavior prediction model, and obtaining a behavior prediction probability matrix of the user to be predicted.
The specification of the behavior prediction probability matrix is determined by the number of behaviors to be predicted, that is, if the behaviors to be predicted are n, the specification of the behavior prediction probability matrix is n×n.
S330, verifying whether the to-be-predicted object is recommended to the to-be-predicted user according to the behavior prediction probability matrix.
In this embodiment, it is assumed that the behavior to be predicted is that the user to be predicted clicks on the article to be predicted, and the probabilities of purchasing and purchasing behavior are given that the behavior prediction probability matrix obtained by the model isAccording to the behavior prediction probability matrix, the probability of occurrence of the clicking behavior is 0.8 corresponding to the first row and the first column, and correspondingly, when the clicking behavior occurs, the probability of occurrence of the purchasing behavior is a value corresponding to the second example of the probability of the clicking behavior, namely 0.8×0.2=0.16; when the purchasing behavior occurs, the probability of the purchasing behavior is 0.16×0.3=0.048 of the value corresponding to the third example of the third row of the purchasing behavior probability.
In this embodiment, whether to recommend the item to be predicted to the user to be predicted may be verified by setting a probability threshold, that is, when the probability of occurrence of the prediction behavior reaches the threshold, recommending the item to be predicted to the user to be predicted, otherwise, not recommending.
In a specific implementation manner of this embodiment, when the target prediction behavior is set to be a click based on the above behavior, the threshold of the click probability is assumed to be 0.5, and since 0.8 is greater than 0.5, the to-be-predicted item may be recommended to the to-be-predicted user; further, if the target prediction behavior is set to be click and purchase, if the threshold of the click and purchase probability is set to be 0.2, the click and purchase probability obtained under the current condition is set to be 0.8+0.48, wherein the click weight and the purchase weight can be adjusted according to the actual application condition, and when the click and purchase probability is greater than the preset threshold, the article to be predicted can be recommended to the user to be predicted.
According to the technical scheme, the user characteristic information of the user to be predicted and the article characteristic information of the article to be predicted are obtained, then the user characteristic information of the user to be predicted and the article characteristic information of the article to be predicted are input into a user behavior prediction model trained by a construction method of the user behavior prediction model, and a behavior prediction probability matrix of the user to be predicted to the article to be predicted is obtained; and finally, verifying whether the article to be predicted is recommended to the user to be predicted according to the behavior prediction probability matrix, providing a new mode for constructing a user behavior prediction model, and effectively improving the accuracy of user behavior prediction based on the new user behavior prediction model, so that the hit rate of the recommended article to the actual requirement of the user can be improved, and the time consumption when the user searches for the information of interest by himself/herself can be effectively reduced.
Example IV
Fig. 4 is a schematic structural diagram of a device for constructing a user behavior prediction model according to a fourth embodiment of the present invention. As shown in fig. 4, the apparatus includes:
the original sample set generating module 410 is configured to generate an original sample set according to historical behavior data of multiple users, where the original sample set includes user characteristic information of a set user, article characteristic information of a set article, and a behavior set executed by the set user on the set article, and progressive relationships exist between behaviors in the behavior set;
the feature matrix generating module 420 is configured to generate a first behavior feature matrix, a second behavior feature matrix, and a third behavior feature matrix corresponding to each original sample according to the behavior set in each original sample;
the training sample set generating module 430 is configured to set, according to user feature information of a set user in an original sample, article feature information, a first behavior feature matrix, a second behavior feature matrix, and a third behavior feature matrix of an article to form a training sample set, where the second behavior feature matrix and the third behavior feature matrix are used as labeling data in the training sample;
the model training module 440 is configured to train the depth recommendation model by using the training sample set to obtain a user behavior prediction model.
According to the technical scheme, the original sample set is generated according to the historical behavior data of multiple users, the first behavior feature matrix, the second behavior feature matrix and the third behavior feature matrix which correspond to the original samples respectively are generated according to the behavior set in the original samples, then the item feature information, the first behavior feature matrix, the second behavior feature matrix and the third behavior feature matrix of the item are set according to the user feature information of the set user in the original samples, a training sample set and marking data are formed, finally the training sample set is used for training the deep recommendation model to obtain a user behavior prediction model, a new mode for constructing the user behavior prediction model is provided, the accuracy of user behavior prediction can be effectively improved based on the new user behavior prediction model, the hit rate of the recommended item to the actual requirement of the user can be improved, and the time consumption of the user when the user searches for the information by himself/herself is effectively reduced.
On the basis of the above embodiment, the original sample set generating module 410 may include:
the system comprises an alternative behavior set acquisition unit, a target object acquisition unit and a target object acquisition unit, wherein the alternative behavior set acquisition unit is used for acquiring at least one alternative behavior set of a target user aiming at the target object in the historical behavior data of multiple users;
The behavior set screening unit is used for screening at least one target behavior set meeting the rationality of the data progressive relationship in each candidate behavior set through the logic processing module;
the original sample construction unit is used for constructing at least one original sample matched with the target user according to the user characteristic information of the target user, the article characteristic information of the target article and the at least one target behavior set.
Based on the above embodiment, the feature matrix generating module 420 may include:
the system comprises a behavior matrix generation unit, a data processing unit and a data processing unit, wherein the behavior matrix generation unit is used for acquiring a current behavior set in a current processing sample from each original sample and forming a one-dimensional behavior matrix matched with the current behavior set, the bit number L of the one-dimensional behavior matrix is fixed, and each matrix bit corresponds to a set behavior;
a first behavior feature matrix construction unit, configured to construct a first basic feature matrix of an L-1 order, sequentially obtain front i-1 column data of ith column data in the one-dimensional behavior matrix, fill the front i-1 column data of an ith row in the first basic feature matrix, and zero padding a remaining position in the first basic feature matrix to obtain the first behavior feature matrix, where i is initialized to 1;
The second behavior feature matrix construction unit is used for constructing a second basic feature matrix of L-order, sequentially acquiring the ith row data in the one-dimensional behavior matrix, filling the ith row data in the second basic feature matrix into the ith column data in the ith basic feature matrix, and carrying out zero padding on the rest positions in the second basic feature matrix to obtain a second behavior feature matrix;
and the third behavior feature matrix construction unit is used for constructing an L-order identity matrix serving as a third behavior feature matrix.
Based on the above embodiments, the model training module 440 may include:
the target training sample acquisition unit is used for acquiring target training samples in the training sample set and inputting the target training samples into the depth recommendation model;
the original sparse vector generation unit is used for processing the user characteristic information of the target user, the article characteristic information of the target article and the first behavior characteristic matrix of the target in the target training sample through the sparse characteristic layer in the depth recommendation model to obtain an original sparse vector;
the dense vector generation unit is used for processing the original sparse vector through a dense embedding layer in the depth recommendation model to obtain a dense vector;
the behavior prediction probability matrix acquisition unit is used for carrying out logistic regression calculation on the original sparse vector and the dense vector through a factorization layer in the depth recommendation model to obtain a behavior prediction probability matrix;
The parameter adjustment unit is used for calculating a loss function according to the prediction probability matrix, the target second behavior feature matrix and the target third behavior feature matrix in the target training sample through a loss function layer in the depth recommendation model, and performing parameter adjustment on the depth recommendation model according to the loss function;
and the return execution unit is used for returning and executing the operation of acquiring the target training sample in the training sample set until the user behavior prediction model is obtained through training.
The construction device of the user behavior prediction model provided by the embodiment of the invention can execute the construction method of the user behavior prediction model provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 5 is a schematic structural diagram of a user behavior prediction apparatus according to a fifth embodiment of the present invention. As shown in fig. 5, the apparatus includes:
the feature information obtaining module 510 is configured to obtain user feature information of a user to be predicted and item feature information of an item to be predicted;
the probability matrix obtaining module 520 is configured to input user characteristic information of a user to be predicted and item characteristic information of an item to be predicted into a user behavior prediction model obtained by training a construction method of the user behavior prediction model, and obtain a behavior prediction probability matrix of the user to be predicted for the item to be predicted;
And the recommendation verification module 530 is configured to verify whether to recommend the item to be predicted to the user to be predicted according to the behavior prediction probability matrix.
According to the technical scheme, the user characteristic information of the user to be predicted and the article characteristic information of the article to be predicted are obtained, then the user characteristic information of the user to be predicted and the article characteristic information of the article to be predicted are input into a user behavior prediction model trained by a construction method of the user behavior prediction model, and a behavior prediction probability matrix of the user to be predicted to the article to be predicted is obtained; and finally, verifying whether the article to be predicted is recommended to the user to be predicted according to the behavior prediction probability matrix, providing a new mode for constructing a user behavior prediction model, and effectively improving the accuracy of user behavior prediction based on the new user behavior prediction model, so that the hit rate of the recommended article to the actual requirement of the user can be improved, and the time consumption when the user searches for the information of interest by himself/herself can be effectively reduced.
Example six
Fig. 6 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, for example, a construction method of a user behavior prediction model, or a user behavior prediction method.
Correspondingly, the construction method of the user behavior prediction model comprises the following steps: generating an original sample set according to the historical behavior data of multiple users, wherein the original sample set comprises user characteristic information of a set user, article characteristic information of a set article and a behavior set executed by the set user on the set article, and progressive relations exist among behaviors in the behavior set; generating a first behavior feature matrix, a second behavior feature matrix and a third behavior feature matrix which respectively correspond to the original samples according to the behavior sets in the original samples; according to user characteristic information of a set user in an original sample, setting article characteristic information, a first behavior characteristic matrix, a second behavior characteristic matrix and a third behavior characteristic matrix of an article to form a training sample set, wherein the second behavior characteristic matrix and the third behavior characteristic matrix are used as labeling data in the training sample; and training the depth recommendation model by using the training sample set to obtain a user behavior prediction model.
The user behavior prediction method comprises the following steps: acquiring user characteristic information of a user to be predicted and article characteristic information of an article to be predicted; inputting user characteristic information of a user to be predicted and article characteristic information of an article to be predicted into a user behavior prediction model obtained through training by a construction method of the user behavior prediction model, and obtaining a behavior prediction probability matrix of the user to be predicted; and verifying whether the to-be-predicted object is recommended to the to-be-predicted user or not according to the behavior prediction probability matrix.
In some embodiments, the method of constructing the user behavior prediction model and the method of predicting user behavior may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. One or more steps of the data reduction method in distributed training described above may be performed when the computer program is loaded into RAM 13 and executed by processor 11. Alternatively, in other embodiments, the processor 11 may be configured to perform the construction method of the user behavior prediction model and the user behavior prediction method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
Claims (10)
1. The method for constructing the user behavior prediction model is characterized by comprising the following steps of:
generating an original sample set according to the historical behavior data of multiple users, wherein the original sample set comprises user characteristic information of a set user, article characteristic information of a set article and a behavior set executed by the set user on the set article, and progressive relations exist among behaviors in the behavior set;
generating a first behavior feature matrix, a second behavior feature matrix and a third behavior feature matrix which respectively correspond to the original samples according to the behavior sets in the original samples;
according to user characteristic information of a set user in an original sample, setting article characteristic information, a first behavior characteristic matrix, a second behavior characteristic matrix and a third behavior characteristic matrix of an article to form a training sample set, wherein the second behavior characteristic matrix and the third behavior characteristic matrix are used as labeling data in the training sample;
And training the depth recommendation model by using the training sample set to obtain a user behavior prediction model.
2. The method of claim 1, wherein the user characteristic information includes at least one of:
setting user age, user gender and click data and purchase data of the user within a certain time;
the article characteristic information comprises at least one of the following items:
setting the item category, the item brand and the click quantity and the exposure quantity of the item in a certain time;
the behavior set comprises at least one of clicking, purchasing and purchasing ordered according to progressive relation.
3. The method of claim 1, wherein generating the original sample set from historical behavior data of the multiple users comprises:
acquiring at least one alternative behavior set of a target user aiming at a target object in the historical behavior data of multiple users;
screening at least one target behavior set meeting the rationality of the data progressive relationship in each candidate behavior set through a logic processing module;
and constructing at least one original sample matched with the target user according to the user characteristic information of the target user, the article characteristic information of the target article and the at least one target behavior set.
4. A method according to any one of claims 1-3, wherein generating a first behavior feature matrix, a second behavior feature matrix, and a third behavior feature matrix, respectively, corresponding to each original sample from the set of behaviors in each original sample, comprises:
acquiring a current behavior set in a current processing sample from each original sample, and forming a one-dimensional behavior matrix matched with the current behavior set, wherein the bit number L of the one-dimensional behavior matrix is fixed, and each matrix bit corresponds to a set behavior;
constructing a first basic feature matrix of L-1 order, sequentially acquiring front i-1 column data of ith column data in the one-dimensional behavior matrix, filling the front i-1 column data of the ith row in the first basic feature matrix, and carrying out zero padding on the rest position in the first basic feature matrix to obtain the first behavior feature matrix, wherein i is initialized to be 1;
constructing a second basic feature matrix of L-order, sequentially acquiring the ith data in the one-dimensional behavior matrix, filling the ith data into the ith row and the ith column in the second basic feature matrix, and carrying out zero padding on the rest positions in the second basic feature matrix to obtain a second behavior feature matrix;
And constructing an L-order identity matrix as a third behavior characteristic matrix.
5. The method of claim 1, wherein training the depth recommendation model using the training sample set to obtain the user behavior prediction model comprises:
acquiring a target training sample in a training sample set, and inputting the target training sample into a depth recommendation model;
processing user characteristic information of a target user, article characteristic information of a target article and a target first behavior characteristic matrix in a target training sample through a sparse characteristic layer in a depth recommendation model to obtain an original sparse vector;
processing the original sparse vector through a dense embedding layer in the depth recommendation model to obtain a dense vector;
performing logistic regression calculation on the original sparse vector and the dense vector through an factorization layer in the depth recommendation model to obtain a behavior prediction probability matrix;
calculating a loss function according to the prediction probability matrix, a target second behavior feature matrix and a target third behavior feature matrix in the target training sample through a loss function layer in the depth recommendation model, and carrying out parameter adjustment on the depth recommendation model according to the loss function;
And returning to the operation of acquiring the target training sample in the training sample set until the user behavior prediction model is obtained through training.
6. A method for predicting user behavior, comprising:
acquiring user characteristic information of a user to be predicted and article characteristic information of an article to be predicted;
inputting user characteristic information of a user to be predicted and article characteristic information of an article to be predicted into a user behavior prediction model trained by the method according to any one of claims 1-5, and obtaining a behavior prediction probability matrix of the user to be predicted and the article to be predicted;
and verifying whether the to-be-predicted object is recommended to the to-be-predicted user or not according to the behavior prediction probability matrix.
7. A device for constructing a user behavior prediction model, comprising:
the original sample set generation module is used for generating an original sample set according to the historical behavior data of multiple users, wherein the original sample set comprises user characteristic information of a set user, article characteristic information of a set article and a behavior set executed by the set user on the set article, and progressive relations exist among behaviors in the behavior set;
the characteristic matrix generation module is used for generating a first behavior characteristic matrix, a second behavior characteristic matrix and a third behavior characteristic matrix which respectively correspond to the original samples according to the behavior set in the original samples;
The training sample set generation module is used for setting article characteristic information, a first behavior characteristic matrix, a second behavior characteristic matrix and a third behavior characteristic matrix of the article according to user characteristic information of a set user in an original sample to form a training sample set, wherein the second behavior characteristic matrix and the third behavior characteristic matrix are used as labeling data in the training sample;
and the model training module is used for training the depth recommendation model by using the training sample set to obtain a user behavior prediction model.
8. A user behavior prediction apparatus, comprising:
the characteristic information acquisition module is used for acquiring user characteristic information of a user to be predicted and article characteristic information of an article to be predicted;
the probability matrix acquisition module is used for inputting the user characteristic information of the user to be predicted and the article characteristic information of the article to be predicted into the user behavior prediction model obtained through training according to the method of any one of claims 1-5, and acquiring a behavior prediction probability matrix of the user to be predicted;
and the recommendation verification module is used for verifying whether the article to be predicted is recommended to the user to be predicted according to the behavior prediction probability matrix.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of constructing a user behavior prediction model according to any one of claims 1-5 or to perform the method of predicting user behavior according to claim 6.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores computer instructions for causing a processor to implement a method for constructing a user behavior prediction model according to any one of claims 1-5 or to implement a user behavior prediction method according to claim 6 when executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310217236.XA CN116186411A (en) | 2023-03-08 | 2023-03-08 | Method and device for constructing user behavior prediction model based on depth recommendation model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310217236.XA CN116186411A (en) | 2023-03-08 | 2023-03-08 | Method and device for constructing user behavior prediction model based on depth recommendation model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116186411A true CN116186411A (en) | 2023-05-30 |
Family
ID=86446256
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310217236.XA Pending CN116186411A (en) | 2023-03-08 | 2023-03-08 | Method and device for constructing user behavior prediction model based on depth recommendation model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116186411A (en) |
-
2023
- 2023-03-08 CN CN202310217236.XA patent/CN116186411A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110909182B (en) | Multimedia resource searching method, device, computer equipment and storage medium | |
CN112434188B (en) | Data integration method, device and storage medium of heterogeneous database | |
CN113407851B (en) | Method, device, equipment and medium for determining recommended information based on double-tower model | |
CN114417739A (en) | Method and device for recommending process parameters under abnormal working conditions | |
CN111489196B (en) | Prediction method and device based on deep learning network, electronic equipment and medium | |
CN117573973A (en) | Resource recommendation method, device, electronic equipment and storage medium | |
CN116308634A (en) | Double-tower model recommendation method and device based on behavior sequence and weight sharing | |
CN116186411A (en) | Method and device for constructing user behavior prediction model based on depth recommendation model | |
CN113656689B (en) | Model generation method and network information pushing method | |
CN115758271A (en) | Data processing method, data processing device, computer equipment and storage medium | |
CN115146997A (en) | Evaluation method and device based on power data, electronic equipment and storage medium | |
CN112434527B (en) | Keyword determination method and device, electronic equipment and storage medium | |
CN113011490B (en) | Model training method and device and electronic equipment | |
CN118332194B (en) | Cross-domain cold start recommendation method, device, equipment and storage medium | |
CN116089722B (en) | Implementation method, device, computing equipment and storage medium based on graph yield label | |
CN114037058B (en) | Pre-training model generation method and device, electronic equipment and storage medium | |
CN114637921B (en) | Item recommendation method, device and equipment based on modeling accidental uncertainty | |
CN115964567A (en) | Resource recommendation method and device, electronic equipment and storage medium | |
CN118312663A (en) | Method and device for determining article information, electronic equipment and storage medium | |
CN114547417A (en) | Media resource ordering method and electronic equipment | |
CN117763218A (en) | Search ordering method and system, click rate pre-estimated neural network and training method | |
CN118035557A (en) | Resource pushing method, device, electronic equipment, storage medium and program product | |
CN117764679A (en) | Commodity and size recommending method, device, equipment and medium | |
CN114443988A (en) | Information display method and device, electronic equipment and storage medium | |
CN117493690A (en) | Data pushing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |