CN113761378B - Content ordering method, computing device and computer-readable storage medium - Google Patents

Content ordering method, computing device and computer-readable storage medium Download PDF

Info

Publication number
CN113761378B
CN113761378B CN202111072158.6A CN202111072158A CN113761378B CN 113761378 B CN113761378 B CN 113761378B CN 202111072158 A CN202111072158 A CN 202111072158A CN 113761378 B CN113761378 B CN 113761378B
Authority
CN
China
Prior art keywords
content
vector
dense
user
neural network
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.)
Active
Application number
CN202111072158.6A
Other languages
Chinese (zh)
Other versions
CN113761378A (en
Inventor
黄清纬
彭飞
唐文斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Renyimen Technology Co ltd
Original Assignee
Shanghai Renyimen Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Renyimen Technology Co ltd filed Critical Shanghai Renyimen Technology Co ltd
Priority to CN202111072158.6A priority Critical patent/CN113761378B/en
Publication of CN113761378A publication Critical patent/CN113761378A/en
Application granted granted Critical
Publication of CN113761378B publication Critical patent/CN113761378B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9014Indexing; Data structures therefor; Storage structures hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/908Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9536Search customisation based on social or collaborative filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure provides a content ordering method, a computing device, and a computer-readable storage medium. The method comprises the following steps: determining a training sample of a user based on a streaming log of a social platform, wherein the streaming log records user behaviors of the user to a plurality of contents of the social platform, and the training sample comprises a first user dense vector, a first content dense vector and a first user behavior sequence vector; training the deep neural network model based on the training samples to generate a training target vector, the training target vector comprising a second user dense vector, a second content dense vector as an interest feature vector, and an index of a second user behavior sequence vector, and the training target vector indicating a result of at least one user behavior for each content; updating a weight function of the deep neural network model based on the training target vector; and respectively calculating scores of the candidate contents based on the trained deep neural network model so as to rank the candidate contents.

Description

Content ordering method, computing device and computer-readable storage medium
Technical Field
The present invention relates generally to the field of machine learning, and more particularly to a content ordering method, computing device, and computer-readable storage medium.
Background
With the continuous development of various social platforms, more and more users acquire various information through the social platforms. Generally, when a user logs in a social platform, a server of the social platform recommends some content to the user and displays the content on a user terminal. However, a social platform generates a huge amount of content all the time, and the amount of content that can be presented by a user terminal is limited, and if several items of content of the head cannot arouse the user's interest, the user is likely to turn to other editions or other platforms. Therefore, how to display the content that best matches the user's interest in a limited head position is an important means for improving the content recommendation effect.
Since Youtube uses a neural network model for content recommendation, the neural network model based on Deep learning is more and more widely applied to content recommendation, and in a model ordering stage, the model has Deep & Wide, Deep FM and the like compared with a classical model, and the Deep & Wide, Deep FM and the like, which well combine the traditional collaborative filtering and neural network technology.
At present, information flow recommendation scenes such as information flows of trembling, fast hands and the like, and commercial products such as Taobao, Jingdong and the like which are frequently seen have the centralized characteristic, namely, a few candidate contents are exposed to most users, so that user behaviors are easily accumulated on a single candidate item. In this case, clustering is easier to achieve using traditional personalization methods — collaborative filtering.
In order to solve the problem, on the basis of collaborative filtering, a user behavior sequence is further introduced to correct the user interest distribution, such as a Din model, a Dien model, a Mind model and the like, and the sum (or average or neural network mapping) of the user feature vectors obtained through collaborative filtering and the feature vectors of the user behavior sequence is crossed, so that stronger personalized learning capability is obtained.
However, in some high-traffic social platforms, a huge amount of new content is generated within a short time interval, and the life cycle of each piece of new content is very short, for example, at least millions of pieces of new content may be generated and released each day, and the life cycle of each piece of content is usually not more than two days. In this case, the user behavior is shared by a large number of candidate contents, so that it is difficult for a single candidate content to accumulate enough data, and the traditional method is also more difficult to generate collaborative filtering, and cannot acquire effective feature vectors through collaborative filtering, so that the difficulty in learning the user interest is greatly increased. For example, the inventor of the present invention performs a simulation experiment to perform content ranking and recommendation by combining the conventional collaborative filtering with user behavior sequence correction, and finds that this method can only learn weak personalization, and cannot actually improve the recommendation effect at all.
Disclosure of Invention
In order to solve the above problems, the present invention provides a content ranking scheme, which generates interest feature vectors of users by splicing dense vectors of users and dense vectors of contents and training through a neural network model, and ranks candidate contents by using the trained neural network model to rank the candidate contents. In addition, a unique storage structure is designed to store and search the interest feature vectors, and the outdated interest feature vectors are automatically deleted. Through the modes, the scheme of the invention solves the problem that the interest of the user is difficult to learn on a large-flow social platform in a decentralized scene, thereby providing more accurate content recommendation for the user.
According to one aspect of the invention, a method of content ordering is provided. The method comprises the following steps: determining a training sample of a user based on a streaming log of a social platform, wherein the streaming log records user behaviors of the user on a plurality of contents of the social platform, and the training sample comprises a first user dense vector, a first content dense vector and a first user behavior sequence vector; training a deep neural network model based on the training samples to generate a training target vector, the training target vector comprising a second user dense vector, a second content dense vector as an interest feature vector, and an index of a second user behavior sequence vector, and the training target vector indicating a result of at least one user behavior for each content; updating a weight function of the deep neural network model based on the training target vector; and respectively calculating scores of a plurality of candidate contents based on the trained deep neural network model so as to rank the candidate contents.
According to another aspect of the invention, a computing device is provided. The computing device includes: at least one processor; and at least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions when executed by the at least one processor causing the computing device to perform steps according to the above-described method.
According to yet another aspect of the present invention, a computer-readable storage medium is provided, having stored thereon computer program code, which when executed performs the method as described above.
In some embodiments, determining a training sample for a user based on a streaming log of a social platform comprises: obtaining a streaming log of the social platform; extracting a log feature set of the user from the streaming log, the log feature set comprising a user feature set of the user and a content feature set of a plurality of contents for which the user behavior is directed; determining the first dense user vector based on the set of user features; determining the first content dense vector based on the set of content features; obtaining a user behavior sequence, and determining a first user behavior sequence vector based on a first content dense vector of content for which each user behavior is directed; and splicing the first user dense vector, the first content dense vector and the first user behavior sequence vector into the training sample.
In some embodiments, training the deep neural network model based on the training samples to generate training target vectors comprises: inputting the training samples into a first dense layer of the deep neural network model to obtain a first dense output; non-linearly mapping the first dense output through a first activation layer to obtain a first activated output, wherein the first activated output has the same dimension as the first dense output; inputting the first activation output into a second dense layer of the deep neural network model to obtain a second dense output, wherein dimensions of the second dense output are less than the first dense output; non-linearly mapping the second dense output through a second activation layer to obtain a second activated output, wherein the second activated output has the same dimension as the second dense output; and inputting the second activation output into a third denseness layer to obtain the training target vector, wherein the third denseness layer has the same dimension as that of the desired training target vector.
In some embodiments, updating the weight function of the deep neural network model based on the training target vectors comprises: determining a score for each dimension of the training target vector using an activation function of the deep neural network model; determining a gradient of the training target vector at a last layer of the deep neural network model based on the score of each dimension of the training target vector, the sample label of the training sample, and a loss function of the deep neural network model; and updating the weight function of each layer of the deep neural network model based on the gradient of the training target vector at the last layer of the deep neural network model.
In some embodiments, separately calculating scores for a plurality of candidate contents based on the trained deep neural network model to rank the plurality of candidate contents comprises: for each candidate content in the plurality of candidate contents, determining a score for each dimension of a target vector of the candidate content using an activation function of the trained deep neural network model; determining a score for the candidate content based on the score for each dimension of the target vector for the candidate content; and ranking the plurality of candidate content based on the score for each of the plurality of candidate content.
In some embodiments, the method further comprises: and putting the second content dense vector into an interest feature vector pool as the interest feature vector of the user, wherein the interest feature vector pool comprises a first-in first-out queue and a closed hash table, the first-in first-out queue comprises a list of a plurality of content IDs, the closed hash table comprises a plurality of entries, and each entry comprises a content ID as a key field and a content as a value field.
In some embodiments, placing the second content dense vector as the user's interest feature vector into an interest feature vector pool comprises: determining whether the first-in first-out queue is full; deleting a first content ID in the first-in-first-out queue and deleting an entry corresponding to the first content ID from the closed hash table if the first-in-first-out queue is full; adding the content ID corresponding to the second content dense vector at the end of the first-in first-out queue and adding the content ID and the content corresponding to the second content dense vector to the closed hash table; and if the first-in first-out queue is not full, directly adding the content ID corresponding to the second content dense vector at the end of the first-in first-out queue and adding the content ID and the content corresponding to the second content dense vector to the closed hash table.
Drawings
The invention will be better understood and other objects, details, features and advantages thereof will become more apparent from the following description of specific embodiments of the invention given with reference to the accompanying drawings.
Fig. 1 shows a schematic diagram of a system for implementing a content ordering method according to an embodiment of the invention.
FIG. 2 illustrates a flow diagram of a content ordering method according to some embodiments of the invention.
FIG. 3 shows a flowchart of steps for determining training samples for a user, according to an embodiment of the invention.
FIG. 4 shows a flowchart of the steps of training a deep neural network model, according to an embodiment of the present invention.
Fig. 5 shows a schematic structural diagram of a deep neural network model according to an embodiment of the present invention.
FIG. 6 shows a flowchart of the steps of updating the weight function of the deep neural network model, according to an embodiment of the present invention.
FIG. 7 shows a flowchart of steps for ranking candidate content according to some embodiments of the invention.
FIG. 8 shows a flowchart of the steps of placing a second content dense vector into the interest feature vector pool, according to an embodiment of the present invention.
FIG. 9 illustrates a block diagram of a computing device suitable for implementing embodiments of the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In the following description, for the purposes of illustrating various inventive embodiments, certain specific details are set forth in order to provide a thorough understanding of the various inventive embodiments. One skilled in the relevant art will recognize, however, that the embodiments may be practiced without one or more of the specific details. In other instances, well-known devices, structures and techniques associated with this application may not be shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.
Throughout the specification and claims, the word "comprise" and variations thereof, such as "comprises" and "comprising," are to be understood as an open, inclusive meaning, i.e., as being interpreted to mean "including, but not limited to," unless the context requires otherwise.
Reference throughout this specification to "one embodiment" or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least one embodiment. Thus, the appearances of the phrases "in one embodiment" or "in some embodiments" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the terms first, second and the like used in the description and the claims are used for distinguishing objects for clarity, and do not limit the size, other order and the like of the described objects.
Fig. 1 shows a schematic diagram of a system 1 for implementing a content ordering method according to an embodiment of the invention. As shown in fig. 1, the system 1 includes a user terminal 10, a computing device 20, a server 30, and a network 40. User terminal 10, computing device 20, and server 30 may interact with data via network 40. Here, each user terminal 10 may be a mobile or fixed terminal of an end user, such as a mobile phone, a tablet computer, a desktop computer, or the like. The user terminal 10 may communicate with a server 30 of the social platform, for example, through a social platform application installed thereon, to send information to the server 30 and/or receive information from the server 30. The computing device 20 performs corresponding operations based on data from the user terminal 10 and/or the server 30. The computing device 20 may include at least one processor 210 and at least one memory 220 coupled to the at least one processor 210, the memory 220 having stored therein instructions 230 executable by the at least one processor 210, the instructions 230, when executed by the at least one processor 210, performing at least a portion of the method 100 as described below. Note that herein, computing device 20 may be part of server 30 or may be separate from server 30. The specific structure of computing device 20 or server 30 may be described, for example, in connection with FIG. 9, below.
FIG. 2 illustrates a flow diagram of a content ordering method 100 according to some embodiments of the invention. The method 100 may be performed, for example, by the computing device 20 or the server 30 in the system 1 shown in fig. 1. The method 100 is described below in conjunction with fig. 1-9, with an example being performed in the computing device 20.
As shown in fig. 2, method 100 includes step 110, where computing device 20 may determine a training sample for a user based on a streaming log of a social platform. As previously described, the social platform may be a social platform with high traffic and short life cycle content, and thus, the streaming log may be a minute-level streaming log of the social platform in which user behavior of a plurality of users on a large amount of dispersed content is recorded. For a particular user, the streaming log records the user's behavior of the user with respect to a plurality of content on the social platform. Here, the content may refer to pictures, videos, texts, or a combination thereof uploaded by users of the social platform, and may also be referred to as "posts". The user behavior may include at least one of a click, a like, a comment, a favorite, a forward, and the like, for example. Further, the user behavior may also include not performing any user operation on the content.
FIG. 3 shows a flowchart of step 110 for determining training samples for a user, according to an embodiment of the invention.
As shown in fig. 3, step 110 may include sub-step 111, where computing device 20 may obtain a streaming log of the social platform. The streaming log may be stored, for example, in the server 30 of the system 1 shown in fig. 1 or in a database (not shown in the figure) associated with the server 30.
Next, at sub-step 112, computing device 20 may extract the user's log feature set from the streaming log obtained in sub-step 111. Here, the log feature set of the user includes a user feature set of the user and content feature sets of a plurality of contents for which the user behavior of the user is directed. The user feature set may include attribute information of the user, such as age, gender, city of the user, and the like. The content feature set may include attribute information of each content, such as pictures, videos, texts, word numbers, languages, authors, etc. contained in the content.
In sub-step 113, computing device 20 may determine a user dense vector (also referred to herein as a first user dense vector for purposes of differentiation from a trained user dense vector) based on the set of user features. The dense user vector may be obtained, for example, by performing a stitching and dense vectorization (dense) operation on the user features in the user feature set, and is used to indicate user features (such as user name, gender, age, and the like) with higher occurrence probability (e.g., in one batch). Wherein, dense operation refers to the operation of obtaining the fully connected vector of the input vector by using the dense function in Tensorflow.
In one embodiment, the user dense vector may be determined by equation (1) as follows:
eu=dense(concat({ef|f∈Fu})) (1)
wherein e isuRepresenting dense vectors of users, efRepresenting a user feature vector, FuRepresenting a user feature set, a concat () function for concatenating multiple input data (i.e., user features in the user feature set), and a dense () function for adjusting the input data x (i.e., concat ({ e))f|f∈Fu})) dimension.
Wherein the dense () function can be generically represented as:
dense(x)=ReLu(W·x+b) (2)
where W, b are trainable parameters and Relu () is a nonlinear activation function that is typically used for the output of the hidden layer of the deep neural network. Relu () can be simply expressed as:
Relu(x)=max(0,x)|
at sub-step 114, computing device 20 may determine a content dense vector (also referred to herein as a first content dense vector for purposes of differentiation from a trained content dense vector) based on the set of content features.
Similar to the dense vector of the user, the dense vector of the content may also be obtained by performing a splicing and dense vectorization (dense) operation on the content features in the content feature set, so as to indicate the content features with higher occurrence probability (such as content length, content praise number, author gender, etc.). Generally, content features having a higher probability of having the same feature value within one training Batch (Batch) are referred to as content dense features. For example, in a training batch, the content feature with female gender as author appears in a very high probability in the whole training batch, so the content feature can be regarded as a content-dense feature.
In one embodiment, the content dense vector may be determined by equation (3) as follows:
ep=dense(concat({eg|g∈Fp})) (3)
wherein e ispRepresenting content dense vectors, egRepresenting a content feature, FpRepresenting a content feature set, a concat () function for concatenating multiple input data (i.e., content features in the content feature set), and a dense () function for adjusting the input data x (i.e., concat ({ e))g|g∈Fp})) dimension.
In sub-step 115, computing device 20 may obtain a sequence of user behaviors and determine a user behavior sequence vector (also referred to herein as a first user behavior sequence vector for the purpose of distinguishing from a trained user behavior sequence vector) based on a first content dense vector of content for which each user behavior is intended.
In one embodiment, the user behavior sequence vector may be determined by equation (4) as follows:
Figure BDA0003260800220000091
wherein e isrRepresenting a sequence of user actions, SuA set of contents representing the user on which the user performed the user behavior, eiA content dense vector representing a content on which the user performed a user action (i.e., the above-described first content dense vector e)p)。
In sub-step 116, computing device 20 may density the first user to vector euFirst dense content vector epAnd a first user behavior sequence vector erStitching as training sample xin
Here, the first user dense vector e may be populated using the concat () function as described aboveuFirst dense content vector epAnd a first user behavior sequence vector erMake a splice, i.e.
xin=concat(eu,ep,er) (5)
Next, continuing with FIG. 2, at step 120, computing device 20 may base on training sample xinThe deep neural network model is trained to produce training target vectors.
FIG. 4 shows a flowchart of the step 120 of training the deep neural network model according to an embodiment of the present invention. Fig. 5 shows a schematic structural diagram of a deep neural network model 500 according to an embodiment of the present invention. As shown in fig. 5, the deep neural network model 500 may include a first dense layer 510, a first activation layer 520, a second dense layer 530, a second activation layer 540, and a third dense layer 550.
In the model training phase, the deep neural network model 500 may input the plurality of training samples x constructed as described abovein(including the first user dense vector euFirst dense content vector epAnd a first user behavior sequence vector er) And each training sample xinSample label (hereinafter, sample x will also be trained)inThe combination with the corresponding sample label is called training sample xinOr input vector xin) And outputs each training sample xinThe score of the corresponding content. Here, the sample label is used to indicate a user operation for the training sample, such as at least one of a click, a praise, a comment, a favorite, a forward, and the like, or no user operation.
In the model using stage, the deep neural network model 500 may input training samples x constructed for a plurality of candidate contentsinA vector is similarly input and a score for each candidate content is output. The deep neural network model 500 is described below mainly in terms of a model training phase.
As shown in fig. 4, step 120 may include substep 121, wherein computing device 20 may apply training sample xinThe first dense layer 510 of the deep neural network model 500 is input to obtain a first dense output.
In one embodiment, the first dense output may be determined by equation (6) as follows:
xden1=dense(xin) (6)
in other embodiments, training sample xinInput in Batch form (i.e., the training Batch Batch described above), and thus input X of the deep neural network model 500inCan be represented as a matrix of B x N:
Xin={xin} (7)
where B is a batch input of training samples xinN is a training sample xinLength of (i.e. first user dense vector e)uFirst dense content vector epAnd a first user behavior sequence vector erThe sum of the lengths of (a) and (b).
In this case, the first dense output may be expressed as:
Xden1=dense(Xin) (8)
in one embodiment, the first dense layer 510 may be a matrix of (N +1) × 512 (except for the training samples x)inIncludes a dimension for offset in addition to length N), input XinAfter matrix multiplication with the first dense layer 510, a matrix X of B512 is obtainedden1
In sub-step 122, computing device 20 may output the first dense output xden1/Xden1The non-linear mapping is performed by the first activation layer 520 to obtain a first activation output, wherein the first activation output is the same dimension as the first dense output.
In one embodiment, the first activation output may be determined by equation (9) as follows:
xrelu1=Relu(xden1) (9)
where Relu () is a nonlinear activation function, as described above, that is typically used for the output of the hidden layer of the deep neural network. Relu () can be simply expressed as:
Relu(x)=max(0,x)|。
in batch input of XinIn the case of (2), the first dense output is Xden1The first activation output may be expressed as:
Xrelu1=Relu(Xden1) (10)
in this case, the first activation layer 520 outputs x for the first dense outputden1/Xden1Non-linear mapping is performed, keeping the dimension unchanged, so that the first activation output xrelu1/Xrelu1And a first dense output xden1/Xden1The dimensions are the same.
In sub-step 123, computing device 20 may output a first activation output xrelu1/Xrelu1A second dense layer 530 of the deep neural network model 500 is input to obtain a second dense output, wherein the second dense output is smaller in dimensionality than the first dense output.
In one embodiment, the second dense output may be determined by equation (11) as follows:
xden2=dense(xrelu1) (11)
in batch input of XinIn the case of (1), the first activation output is Xrelu1The second dense output may be expressed as:
Xden2=dense(Xrelu1) (12)
in one embodiment, the second dense layer 530 may be a (512+1) × 256 matrix, so that the first activation output Xrelu1Second dense output X produced after passing through second dense layer 530den2Is a matrix of B256, i.e. the first activation output is reduced in dimension.
Next, in sub-step 124, computing device 20 may output the second dense output xden2/Xden2The non-linear mapping is performed by the second activation layer 540 to obtain a second activation output, wherein the second activation output has the same dimension as the second dense output.
In one embodiment, the second activation output may be determined by equation (13) as follows:
xrelu2=Relu(xden2) (13)
where Relu () is a nonlinear activation function, as described above.
In batch input of XinIn the case of (2), the second dense output is Xden2The second activation output may be expressed as:
Xrelu2=Relu(Xden2) (14)
in this case, the second active layer 540 outputs x for the second dense outputden2/Xden2Non-linear mapping is performed, keeping the dimension unchanged, so that the second activation output xrelu2/Xrelu2And a second dense output xden2/Xden2The dimensions are the same.
Next, in sub-step 125, computing device 20 may output a second activation xrelu2/Xrelu2The third denseness layer 550 is input to get the training target vector. Here, training the target vector refers to using each training sample xinTarget vector obtained by performing training, whichAnd indicating at least one user behavior (at least one of user operations such as clicking, praise, commenting, collecting, forwarding and the like, or no user operation) of the content corresponding to the training sample, wherein the dimension of the result is consistent with that of the sample label.
In order to make the second activation output xrelu2/Xrelu2Should the dimensions of the third denseness layer 550 be the same as the dimensions of the desired training target vector.
In one embodiment, the training target vector may be determined by equation (15) as follows:
xout=dense(xrelu2) (15)
training target vector xoutIncluding indices of the trained dense user vector (referred to as the second dense user vector for distinction from the first dense user vector), the trained dense content vector (referred to as the second dense content vector for distinction from the first dense content vector), and the trained sequence of user behavior vector (referred to as the second sequence of user behavior vector for distinction from the first sequence of user behavior vector). Wherein the second content dense vector may be used as the interest feature vector for the user, as described in detail below.
In batch input of XinIn the case of (2), the second activation output is Xrelu2The training target vector may be expressed as:
Xout=dense(Xrelu2) (16)
in one embodiment, the third densification layer 550 may be a matrix of (256+1) × L, where L represents the dimensions of the desired training target vector. For example, if the user behavior of clicking, praise, commenting, favoriting, forwarding these 5 user actions, and no user action is to be trained, then L may be set to 6, with the value of each dimension used to indicate whether there is a corresponding user action.
Thus, the deep neural network model 500 is trained once, which is equivalent to a whole model
Xout=W*Xin+b (17)
Where W is the weight function of the deep neural network model 500, b is the bias function of the deep neural network model 500, and the purpose of training the deep neural network model 500 is to continuously update the weight function W and the bias function b to a convergence value. Here, the initial value of the weight function W may be arbitrarily set, or may be empirically set.
Next, continuing with fig. 2, at step 130, computing device 20 may update the weight function W of deep neural network model 500 based on the training target vectors.
FIG. 6 shows a flowchart of the step 130 of updating the weight function W of the deep neural network model 500, according to an embodiment of the present invention.
As shown in FIG. 6, step 130 may include sub-step 132 in which computing device 20 determines training target vector x using an activation function of deep neural network model 500outThe score of each dimension of (a).
In one embodiment, the activation function of the deep neural network model 500 may be a Sigmoid function. The Sigmoid function can be expressed as:
Figure BDA0003260800220000131
as previously described, the target vector x is trainedoutIs an L-dimensional vector, the value of each dimension indicating whether there is a corresponding user action. Thus, the training target vector x may be pairedoutRespectively, calculate a score.
In one embodiment, the target vector x is trainedoutThe score for each dimension of (a) can be determined by the following equation (19):
Sj=Sigmoid(xout_j) (19)
wherein S isjRepresenting a training target vector xoutX is the score of the dimension j (j 1, 2,.. L)out_jRepresenting a training target vector xoutThe value of dimension j.
In sub-step 134Computing device 20 may be based on a training target vector xoutS score for each dimension jjTraining sample xinDetermining a training target vector x for the sample label and loss function of the deep neural network model 500outThe gradient at the last layer of the deep neural network model 500.
Here, the loss function of the deep neural network model 500 may be a mean square error loss function or a cross entropy loss function. The sub-step 134 is described below by taking a cross entropy loss function as an example, the effect of combining the cross entropy loss function and the Sigmoid activation function is better, and the defect caused by the dispersion of the Sigmoid activation function can be avoided. It will be appreciated by those skilled in the art that the same inventive concept is equally applicable to the mean square error loss function.
In one embodiment, the cross-entropy Loss function Loss may be expressed as:
Figure BDA0003260800220000141
wherein
Figure BDA0003260800220000142
Representing a training target vector xoutIs the probability of the sample label of 1 for each dimension j.
In some embodiments of the invention, a back propagation algorithm is used to weight the W function for each layer of the deep neural network model 500mAnd a bias function bm(M ═ 1, 2,.. M) is updated, where M is the number of layers of the deep neural network model 500. In the deep neural network model 500 shown in fig. 5, M is 5.
Thus, in sub-step 134, the cross-entropy Loss function Loss and the weighting function W of the Mth layer may be basedMAnd a bias function bMTo determine the gradient of the last layer (mth layer) of the deep neural network model 500
Figure BDA0003260800220000151
And
Figure BDA0003260800220000152
next, in sub-step 136, computing device 20 may base training target vector x onoutThe gradient at the last layer of the deep neural network model 500 updates the weighting function for each of the plurality of layers of the deep neural network model 500.
Specifically, the gradient of the mth layer of the deep neural network model 500 may be based on any one of a Batch (Batch), mini-Batch (mini-Batch), or stochastic gradient descent method
Figure BDA0003260800220000153
And
Figure BDA0003260800220000154
the gradient of the (M-1) th layer, the (M-2) th layer and the (1) th layer is determined in sequence, and the weight function W of each layer to the layer is utilizedm(and bias function bm) And (6) updating.
The operation of step 130 is repeated based on the preset iteration step size until the maximum number of iterations is reached or the threshold for stopping the iterations is reached. To this end, the weight function W (and the bias function b) of the deep neural network model 500 is trained to a converged value, which can be used to score new content.
Continuing with FIG. 2, at step 140, computing device 20 may calculate scores for a plurality of candidate content, respectively, based on trained deep neural network model 500 to rank the candidate content.
FIG. 7 shows a flowchart of step 140 for ranking candidate content according to some embodiments of the invention.
As shown in fig. 7, step 140 may include sub-step 142 in which computing device 20 may, for each candidate content of the plurality of candidate contents, determine a score for each dimension of a target vector for the candidate content using an activation function of trained deep neural network model 500. Here, the candidate content is delivered from upstream through preliminary screening, and may be new content continuously generated on the social platform over time, or content after preliminary screening by using other recall methods.
The process of determining the target vector of the candidate content is similar to the process of determining the training target vector x described above in step 120outThe process is basically the same and will not be described herein.
The process of determining the score for each dimension of the target vector of the candidate content is similar to the process of determining the training target vector x described above in step 130outScore S of each dimension ofjThe process is basically the same and therefore will not be described in detail.
Next, at sub-step 144, computing device 20 may determine a score for each candidate content based on the score for each dimension of the target vector for that candidate content.
In one embodiment, the scores for each dimension of the target vector for the candidate content may be directly summed to determine the score for the candidate content.
In another embodiment, the scores for each dimension of the target vector for the candidate content may be weighted and summed to determine the score for the candidate content. In this case, the weight of each dimension of the target vector may be different. That is, the degree of importance of the interest level of the candidate content by the user operations such as clicking, like, commenting, collecting, forwarding, etc. is different.
In sub-step 146, computing device 20 may rank each of the plurality of candidate content based on the score of the candidate content.
For example, the computing device 20 may rank the scores of the plurality of candidate contents in order from high to low, and present several contents with the highest scores on the display screen of the user terminal 10, which are the contents with the highest user interest level.
As previously mentioned, in social platforms with high-traffic and short-life-cycle content, the content updates too quickly to effectively train out features of interest. In this case, some embodiments of the present invention also design a specific interest feature vector pool to store and update the obtained interest feature vectors.
Specifically, in step (ii)120, obtaining a training target vector xoutThereafter, method 100 may further include step 150, wherein computing device 20 places the second content dense vector as the user's interest feature vector into the interest feature vector pool. Wherein the interest feature vector pool comprises a first-in-first-out queue and a closed hash table. The first-in-first-out queue includes a list of a plurality of content IDs, and the closed hash table includes a plurality of entries, each entry including a content ID as a key field and a content as a value field.
FIG. 8 shows a flowchart of the step 150 of placing the second content dense vector into the interest feature vector pool, according to an embodiment of the present invention.
As shown in fig. 8, step 150 may include sub-step 152, where computing device 20 may determine whether the fifo queue is full.
If it is determined that the fifo queue is full (yes determination of sub-step 152), then, in sub-step 154, computing device 20 may delete the first content ID in the fifo queue and delete the entry corresponding to the first content ID from the closed hash table.
Then, in sub-step 156, computing device 20 may add the content ID corresponding to the second content dense vector generated in step 120 at the end of the fifo queue and add the content ID and content corresponding to the second content dense vector to the closed hash table.
On the other hand, if it is determined that the fifo queue is not full (determination of sub-step 152 is "no"), then computing device 20 may proceed directly to sub-step 156, adding the content ID corresponding to the second content dense vector at the end of the fifo queue and adding the content ID and content corresponding to the second content dense vector to the closed hash table.
In this case, in the updating process of step 130, at each iteration, the latest interest feature vector may be taken from the interest feature vector pool as the first content dense vector to generate a new training sample.
By the method, the outdated interest feature vectors can be automatically eliminated, and the interest feature vectors can be quickly searched and calculated under the high flow of millions of live users, so that the model has high-precision personalized learning capability.
FIG. 9 illustrates a block diagram of a computing device 900 suitable for implementing embodiments of the present invention. Computing device 900 may be, for example, computing device 20 or server 30 as described above.
As shown in fig. 9, computing device 900 may include one or more Central Processing Units (CPUs) 910 (only one shown schematically) that may perform various suitable actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM)920 or loaded from a storage unit 980 into a Random Access Memory (RAM) 930. In the RAM 930, various programs and data required for operation of the computing device 900 may also be stored. The CPU 910, ROM 920, and RAM 930 are connected to each other via a bus 940. An input/output (I/O) interface 950 is also connected to bus 940.
A number of components in computing device 900 are connected to I/O interface 950, including: an input unit 960 such as a keyboard, a mouse, etc.; an output unit 970 such as various types of displays, speakers, and the like; a storage unit 980 such as a magnetic disk, optical disk, or the like; and a communication unit 990 such as a network card, a modem, a wireless communication transceiver, or the like. The communication unit 990 allows the computing device 900 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks.
The method 100 described above may be performed, for example, by the CPU 910 of the computing device 900 (e.g., computing device 20 or server 30). For example, in some embodiments, the method 100 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 980. In some embodiments, some or all of the computer program can be loaded and/or installed onto computing device 900 via ROM 920 and/or communications unit 990. When loaded into RAM 930 and executed by CPU 910, may perform one or more of the operations of method 100 described above. Further, the communication unit 990 may support wired or wireless communication functions.
Those skilled in the art will appreciate that the computing device 900 shown in FIG. 9 is merely illustrative. In some embodiments, computing device 20 or server 30 may contain more or fewer components than computing device 900.
The content ordering method 100 and the computing device 900 operable as the computing device 20 or the server 30 in accordance with the present invention are described above in connection with the figures. However, it will be appreciated by those skilled in the art that the performance of the steps of the method 100 is not limited to the order shown in the figures and described above, but may be performed in any other reasonable order. Further, the computing device 900 need not include all of the components shown in FIG. 9, it may include only some of the components necessary to perform the functions described in the present invention, and the manner in which these components are connected is not limited to the form shown in the figures.
The present invention may be methods, apparatus, systems and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therein for carrying out aspects of the present invention.
In one or more exemplary designs, the functions described herein may be implemented in hardware, software, firmware, or any combination thereof. For example, if implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The units of the apparatus disclosed herein may be implemented using discrete hardware components, or may be integrally implemented on a single hardware component, such as a processor. For example, the various illustrative logical blocks, modules, and circuits described in connection with the invention may be implemented or performed with a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both.
The previous description of the invention is provided to enable any person skilled in the art to make or use the invention. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the present invention is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method of content ranking, comprising:
determining a training sample of a user based on a streaming log of a social platform, wherein the streaming log records user behaviors of the user on a plurality of contents of the social platform, and the training sample comprises a first user dense vector, a first content dense vector and a first user behavior sequence vector;
training a deep neural network model based on the training samples to generate a training target vector, the training target vector comprising a second user dense vector, a second content dense vector as an interest feature vector, and an index of a second user behavior sequence vector, and the training target vector indicating a result of at least one user behavior for each content;
updating a weight function of the deep neural network model based on the training target vector; and
respectively calculating scores of a plurality of candidate contents based on the trained deep neural network model to rank the plurality of candidate contents,
wherein training a deep neural network model based on the training samples to generate training target vectors comprises:
inputting the training samples into a first dense layer of the deep neural network model to obtain a first dense output;
non-linearly mapping the first dense output through a first activation layer to obtain a first activated output, wherein the first activated output has the same dimension as the first dense output;
inputting the first activation output into a second dense layer of the deep neural network model to obtain a second dense output, wherein dimensions of the second dense output are less than the first dense output;
non-linearly mapping the second dense output through a second activation layer to obtain a second activated output, wherein the second activated output has the same dimension as the second dense output; and
inputting the second activation output into a third denseness layer to obtain the training target vector, wherein dimensions of the third denseness layer are the same as dimensions of a desired training target vector.
2. The method of claim 1, wherein determining a training sample for a user based on a streaming log of a social platform comprises:
obtaining a streaming log of the social platform;
extracting a log feature set of the user from the streaming log, the log feature set comprising a user feature set of the user and a content feature set of a plurality of contents for which the user behavior is directed;
determining the first dense user vector based on the set of user features;
determining the first content dense vector based on the set of content features;
obtaining a user behavior sequence, and determining a first user behavior sequence vector based on a first content dense vector of content for which each user behavior is directed; and
and splicing the first user dense vector, the first content dense vector and the first user behavior sequence vector into the training sample.
3. The method of claim 1, wherein updating the weight function of the deep neural network model based on the training target vectors comprises:
determining a score for each dimension of the training target vector using an activation function of the deep neural network model;
determining a gradient of the training target vector at a last layer of the deep neural network model based on the score of each dimension of the training target vector, the sample label of the training sample, and a loss function of the deep neural network model; and
updating the weight function of each layer of the deep neural network model based on the gradient of the training target vector at the last layer of the deep neural network model.
4. The method of claim 1, wherein separately calculating scores for a plurality of candidate content based on the trained deep neural network model to rank the plurality of candidate content comprises:
for each candidate content in the plurality of candidate contents, determining a score for each dimension of a target vector of the candidate content using an activation function of the trained deep neural network model;
determining a score for the candidate content based on the score for each dimension of the target vector for the candidate content; and
ranking the plurality of candidate content based on the score for each of the plurality of candidate content.
5. The method of claim 1, further comprising:
and putting the second content dense vector into an interest feature vector pool as the interest feature vector of the user, wherein the interest feature vector pool comprises a first-in first-out queue and a closed hash table, the first-in first-out queue comprises a list of a plurality of content IDs, the closed hash table comprises a plurality of entries, and each entry comprises a content ID as a key field and a content as a value field.
6. The method of claim 5, wherein placing the second content dense vector as the user's interest feature vector into an interest feature vector pool comprises:
determining whether the first-in first-out queue is full;
deleting a first content ID in the first-in-first-out queue and deleting an entry corresponding to the first content ID from the closed hash table if the first-in-first-out queue is full;
adding the content ID corresponding to the second content dense vector at the end of the first-in first-out queue and adding the content ID and the content corresponding to the second content dense vector to the closed hash table; and
and if the first-in first-out queue is not full, directly adding the content ID corresponding to the second content dense vector at the end of the first-in first-out queue and adding the content ID and the content corresponding to the second content dense vector to the closed hash table.
7. A computing device, comprising:
at least one processor; and
at least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions when executed by the at least one processor causing the computing device to perform the steps of the method of any of claims 1-6.
8. A computer readable storage medium having stored thereon computer program code which, when executed, performs the method of any of claims 1 to 6.
CN202111072158.6A 2021-09-14 2021-09-14 Content ordering method, computing device and computer-readable storage medium Active CN113761378B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111072158.6A CN113761378B (en) 2021-09-14 2021-09-14 Content ordering method, computing device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111072158.6A CN113761378B (en) 2021-09-14 2021-09-14 Content ordering method, computing device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN113761378A CN113761378A (en) 2021-12-07
CN113761378B true CN113761378B (en) 2022-04-08

Family

ID=78795432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111072158.6A Active CN113761378B (en) 2021-09-14 2021-09-14 Content ordering method, computing device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN113761378B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831234A (en) * 2012-08-31 2012-12-19 北京邮电大学 Personalized news recommendation device and method based on news content and theme feature
CN103678422A (en) * 2012-09-25 2014-03-26 北京亿赞普网络技术有限公司 Web page classification method and device and training method and device of web page classifier
CN107092681A (en) * 2017-04-21 2017-08-25 安徽富驰信息技术有限公司 A kind of judicial retrieval result based on user behavior feature learns sort method automatically
CN109874053A (en) * 2019-02-21 2019-06-11 南京航空航天大学 The short video recommendation method with user's dynamic interest is understood based on video content

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8145677B2 (en) * 2007-03-27 2012-03-27 Faleh Jassem Al-Shameri Automated generation of metadata for mining image and text data
CN106920147B (en) * 2017-02-28 2020-12-29 华中科技大学 Intelligent commodity recommendation method based on word vector data driving
CN110245301A (en) * 2018-11-29 2019-09-17 腾讯科技(深圳)有限公司 A kind of recommended method, device and storage medium
CN109635204A (en) * 2018-12-21 2019-04-16 上海交通大学 Online recommender system based on collaborative filtering and length memory network
CN109960759B (en) * 2019-03-22 2022-07-12 中山大学 Recommendation system click rate prediction method based on deep neural network
CN110930219B (en) * 2019-11-14 2022-10-18 电子科技大学 Personalized merchant recommendation method based on multi-feature fusion
CN111209475B (en) * 2019-12-27 2022-03-15 武汉大学 Interest point recommendation method and device based on space-time sequence and social embedded ranking
CN111523976B (en) * 2020-04-23 2023-12-08 京东科技控股股份有限公司 Commodity recommendation method and device, electronic equipment and storage medium
CN112150238A (en) * 2020-09-07 2020-12-29 湖北工业大学 Deep neural network-based commodity recommendation method and system
CN112884551B (en) * 2021-02-19 2023-08-18 武汉大学 Commodity recommendation method based on neighbor users and comment information
CN112836081A (en) * 2021-03-01 2021-05-25 腾讯音乐娱乐科技(深圳)有限公司 Neural network model training method, information recommendation method and storage medium
CN113139850A (en) * 2021-04-26 2021-07-20 西安电子科技大学 Commodity recommendation model for relieving data sparsity and commodity cold start
CN113204655B (en) * 2021-07-02 2021-11-23 北京搜狐新媒体信息技术有限公司 Multimedia information recommendation method, related device and computer storage medium
CN113570416B (en) * 2021-07-30 2022-04-01 北京达佳互联信息技术有限公司 Method and device for determining delivered content, electronic equipment and storage medium
CN113761392B (en) * 2021-09-14 2022-04-12 上海任意门科技有限公司 Content recall method, computing device, and computer-readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831234A (en) * 2012-08-31 2012-12-19 北京邮电大学 Personalized news recommendation device and method based on news content and theme feature
CN103678422A (en) * 2012-09-25 2014-03-26 北京亿赞普网络技术有限公司 Web page classification method and device and training method and device of web page classifier
CN107092681A (en) * 2017-04-21 2017-08-25 安徽富驰信息技术有限公司 A kind of judicial retrieval result based on user behavior feature learns sort method automatically
CN109874053A (en) * 2019-02-21 2019-06-11 南京航空航天大学 The short video recommendation method with user's dynamic interest is understood based on video content

Also Published As

Publication number Publication date
CN113761378A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN107193792B (en) Method and device for generating article based on artificial intelligence
CN109101620B (en) Similarity calculation method, clustering method, device, storage medium and electronic equipment
CN110309427B (en) Object recommendation method and device and storage medium
US10592607B2 (en) Iterative alternating neural attention for machine reading
JP5744228B2 (en) Method and apparatus for blocking harmful information on the Internet
CN107220386A (en) Information-pushing method and device
CN109086439A (en) Information recommendation method and device
CN111581926B (en) Document generation method, device, equipment and computer readable storage medium
CN111753551B (en) Information generation method and device based on word vector generation model
US20230076387A1 (en) Systems and methods for providing a comment-centered news reader
CN109992676B (en) Cross-media resource retrieval method and retrieval system
CN112506864B (en) File retrieval method, device, electronic equipment and readable storage medium
CN113688310A (en) Content recommendation method, device, equipment and storage medium
CN111557000A (en) Accuracy determination for media
CN113761392B (en) Content recall method, computing device, and computer-readable storage medium
US20180150450A1 (en) Comment-centered news reader
CN111259245A (en) Work pushing method and device and storage medium
CN113761378B (en) Content ordering method, computing device and computer-readable storage medium
CN112307738A (en) Method and device for processing text
CN111460177A (en) Method and device for searching film and television expression, storage medium and computer equipment
CN109189824B (en) Method and device for retrieving similar articles
CN113657116B (en) Social media popularity prediction method and device based on visual semantic relationship
CN115878761A (en) Event context generation method, apparatus, and medium
CN115860009A (en) Sentence embedding method and system for introducing auxiliary samples for comparison learning
US20150170035A1 (en) Real time personalization and categorization of entities

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
GR01 Patent grant
GR01 Patent grant