CN113836439B - User matching method, computing device, and computer-readable storage medium - Google Patents

User matching method, computing device, and computer-readable storage medium Download PDF

Info

Publication number
CN113836439B
CN113836439B CN202111073755.0A CN202111073755A CN113836439B CN 113836439 B CN113836439 B CN 113836439B CN 202111073755 A CN202111073755 A CN 202111073755A CN 113836439 B CN113836439 B CN 113836439B
Authority
CN
China
Prior art keywords
user
neural network
network model
deep neural
determining
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
CN202111073755.0A
Other languages
Chinese (zh)
Other versions
CN113836439A (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 CN202111073755.0A priority Critical patent/CN113836439B/en
Publication of CN113836439A publication Critical patent/CN113836439A/en
Application granted granted Critical
Publication of CN113836439B publication Critical patent/CN113836439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/9536Search customisation based on social or collaborative filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • 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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Software Systems (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Strategic Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present disclosure provides a user matching method, a computing device, and a computer-readable storage medium. The method comprises the following steps: determining a training sample based on a streaming log of the social platform; training a deep neural network model based on the training samples to determine a first match score between the first user and the second user; determining a second match score between the first user and the second user based on a first user sparse vector of the first user and a second user sparse vector of the second user, and determining a match score between the first user and the second user based on the first match score and the second match score; updating a weight function of the deep neural network model based on the matching score; and determining a matching user for one user of the social platform based on the trained deep neural network model.

Description

User matching 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 user matching method, computing device, and computer readable storage medium.
Background
With the continuous development of various social platforms and electronic commerce platforms, more and more users acquire various information and/or commodities or interact through the social platforms or the electronic commerce platforms. In some scenarios, when a user logs into a social platform or e-commerce platform, a server of the social platform or e-commerce platform recommends some content or merchandise to the user and is presented on a user terminal.
In other scenarios, a user may wish to interact by the social platform looking for other users that match it. Such a user-matched scene is very different from a conventional scene of content recommendation or commodity recommendation. Specifically, in the traditional content recommendation or commodity recommendation scene based on information flow, the positive feedback of the user to the content or commodity generally uses extremely sparse behaviors such as click rate, volume of success and the like, while in the user matching scene, if the positive feedback condition is simply defined as "the interaction between two matched persons", the problem of insufficient negative samples is encountered instead. Therefore, the positive feedback condition in the user matching scenario needs to have a new definition so that it meets both the necessary data amount and is not so negative as to be present.
In addition, in the conventional content recommendation or commodity recommendation scenario based on information flow, after the user obtains exposure, it is only necessary to wait for a short time to obtain positive feedback. For example, if a user swipes a video, he leaves the video, if there is positive feedback, it will immediately transmit to the backend, and it will not take more time than the video length to determine if the video is a positive sample with positive feedback. In the user matching scenario, if the positive feedback condition is improved, the time for determining the positive sample becomes longer and longer. For example, if the positive feedback condition is defined as that more than 5 times of dialogs of two matched users are positive samples, on a social platform with sparse user behaviors, even on a social platform with millions of users living daily, it takes tens of minutes, even an hour, for the dialogs between two users to reach 5 times, which means that it takes to wait at least 1 hour to determine whether positive feedback exists, thereby determining a sample. In this case, the conventional sample determination based on the information flow scenario will not work.
Disclosure of Invention
In view of the above problems, the present invention provides a user matching scheme, in which real-time flow logs and delayed flow logs of a social platform are used to obtain interaction conditions between users to determine corresponding training samples, and such training samples are used to train a deep neural network model designed for matching. By means of the method, the scheme solves the problem of user matching under the situation of sparse user data caused by too small candidate user pool and less user matching data.
According to one aspect of the present invention, a user matching method is provided. The method comprises the following steps: determining a training sample based on a streaming log of a social platform, the training sample indicating an interaction condition between a first user and a second user of the social platform within a predetermined period of time; training a deep neural network model based on the training samples to determine a first match score between the first user and the second user; determining a second match score between the first user and the second user based on a first user sparse vector of the first user and a second user sparse vector of the second user, and determining a match score between the first user and the second user based on the first match score and the second match score; updating a weight function of the deep neural network model based on the matching score; and determining a matching user for one user of the social platform based on the trained deep neural network model.
According to another aspect of the present 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, cause the computing device to perform steps according to the method described above.
According to yet another aspect of the present invention, there is provided a computer readable storage medium having stored thereon computer program code which, when executed, performs a method as described above.
In some embodiments, determining the training samples based on the streaming log of the social platform includes: acquiring a stream log of the social platform; determining a first set of user features for the first user and a second set of user features for the second user based on the streaming log and user representation; determining a first user dense vector for the first user based on the first set of user features; determining a second user dense vector for the second user based on the second set of user features; randomly setting the first user sparse vector and the second user sparse vector; and stitching the first user dense vector, the first user sparse vector, the second user dense vector, and the second user sparse vector into the training samples.
In some embodiments, training a deep neural network model based on the training samples to determine a first match score between the first user and the second user comprises: inputting the training sample into a first densified layer of the deep neural network model to obtain a first densified output; nonlinear mapping is carried out on the first dense output through a first activation layer to obtain a first activation output, wherein the first activation output and the first dense output have the same dimension; inputting the first activation output into a second densified layer of the deep neural network model to obtain a second densified output, wherein the second densified output has a smaller dimension than the first densified output; non-linear mapping is carried out on the second dense output through a second activation layer to obtain a second activation output, wherein the second activation output and the second dense output have the same dimension; and inputting the second activation output into a third densified layer to obtain the first matching score.
In some embodiments, determining a match score between the first user and the second user comprises: a point multiplication operation is performed on the first user sparse vector and the second user sparse vector to determine a second match score between the first user and the second user, and the first match score and the second match score are summed to determine a match score between the first user and the second user.
In some embodiments, updating the weight function of the deep neural network model based on the matching score comprises: determining a degree of match between the first user and the second user using an activation function of the deep neural network model and the match score; determining a gradient value of the matching degree at the last layer of the deep neural network model based on the matching degree between the first user and the second user, the sample label of the training sample and the 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 value of the matching degree at the last layer of the deep neural network model.
In some embodiments, determining a matching user for one user of the social platform based on the trained deep neural network model includes: determining the matching degree between the user and a plurality of candidate users of the social platform by using the trained deep neural network model; ranking the plurality of candidate users based on a degree of match between the user and the plurality of candidate users; and selecting a candidate user with highest matching degree with the user from the plurality of candidate users as a matching user of the user.
In some embodiments, updating the weight function of the deep neural network model based on the matching score further comprises: intercepting a real-time flow log from the flow log, and delaying the real-time flow log for a predetermined period of time to intercept a delayed flow log from the flow log; determining whether the first user and the second user satisfy a positive feedback condition within the predetermined period of time based on the real-time flow log and the delayed flow log; in response to determining that the first user and the second user meet the positive feedback condition within the predetermined period of time, setting a sample tag of the training sample to indicate a positive sample; and in response to determining that the first user and the second user do not satisfy the positive feedback condition within the predetermined period of time, setting a sample tag of the training sample to indicate a negative sample.
In some embodiments, the positive feedback condition includes the first user and the second user interacting at least a predetermined number of times within the predetermined period of time.
Drawings
The invention will be better understood and other objects, details, features and advantages of the invention will become more apparent by reference to the following description of specific embodiments thereof, which is given in the accompanying drawings.
Fig. 1 shows a schematic diagram of a system for implementing a user matching method according to an embodiment of the invention.
Fig. 2 illustrates a flow chart of a user matching method according to some embodiments of the invention.
FIG. 3 shows a flowchart of steps for determining training samples, according to an embodiment of the present invention.
FIG. 4 shows a flowchart of the steps for 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 for updating the weight function of a deep neural network model, according to an embodiment of the present invention.
FIG. 7 illustrates a flowchart of steps for determining matching users according to some embodiments of the invention.
FIG. 8 shows a flowchart of the steps for determining a sample label for each training sample, 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 explanation of 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 an embodiment 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, unless the context requires otherwise, the word "comprise" and variations such as "comprises" and "comprising" will be understood to be open-ended, meaning of inclusion, i.e. to be interpreted to mean "including, but not limited to.
Reference throughout this specification to "one embodiment" or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, 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 in the description and in the claims, are used for descriptive purposes only and not for limiting the size or other order of the objects described.
Fig. 1 shows a schematic diagram of a system 1 for implementing a user matching method according to an embodiment of the invention. As shown in fig. 1, the system 1 includes a plurality of user terminals 10, 12, 14, … …, a computing device 20, a server 30, and a network 40. A plurality of user terminals, computing devices 20, and servers 30 may interact with data via network 40. Here, each user terminal may be a mobile or fixed terminal of an end user, such as a mobile phone, a tablet computer, a desktop computer, etc. The user terminal may communicate with the 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. Computing device 20 performs corresponding operations based on data from user terminals and/or 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 user matching method 100 as described below. Note that herein, the computing device 20 may be part of the server 30 or may be independent of the server 30. The specific structure of computing device 20 or server 30 may be as described below in connection with fig. 9, for example.
Fig. 2 illustrates a flow chart of a user matching method 100 according to some embodiments of the invention. The user matching 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 user matching method 100 is described below in connection with fig. 1-9, as an example executing in the computing device 20.
As shown in fig. 2, the user matching method 100 includes step 110, wherein the computing device 20 may determine training samples based on the streaming log of the social platform. The training sample may indicate an interaction condition between a first user and a second user of the social platform within a predetermined period of time. For example, the training sample may indicate whether a conversation has been performed between the first user and the second user and the number of conversations within the predetermined period of time.
FIG. 3 shows a flowchart of step 110 for determining training samples, according to an embodiment of the present invention.
As shown in fig. 3, step 110 may include a substep 111 in which 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. For a social platform with high traffic and short lifecycle content, the streaming log may be a minute-level streaming log of the social platform in which user behavior of a plurality of users for a large amount of scattered content and interactions of the plurality of users with each other are recorded. For a particular user, the streaming log may have recorded therein user behavior of the user with respect to a plurality of content on the social platform or interaction behavior of the user with other users on the social platform. Here, the content may refer to a picture, a video, a text, or a combination thereof uploaded by a user of the social platform, and the user behavior may include, for example, at least one of clicking, praying, commenting, collecting, forwarding, etc. the content, or not performing any user operation on the content. In this context, the interaction behavior between two users may comprise at least one interactive session between two users.
In sub-step 112, computing device 20 may determine a first set of user features for the first user and a second set of user features for the second user based on the streaming log and the user representation. Here, the user terminal 10 is assumed to be a user terminal of a first user, and the user terminal 12 is a user terminal of a second user, hereinafter also referred to as the first user 10, and the second user as the second user 12. As previously described, the streaming log includes user behavior of a user with respect to content and interaction behavior with other users, and a set of user characteristics may be obtained based on the behavior and user profile (e.g., user name, gender, age, etc.). The user portraits may be stored separately in server 30 so that computing device 20 may determine a set of user characteristics for each user based on the user portraits and the streaming log.
Here, the user feature set may include attribute features of the user, such as age, gender, city to which the user belongs, and may also include interaction features of the user with other users (such as whether there is an interaction, interaction form, and interaction times, etc.).
In sub-step 113, computing device 20 may determine a first user dense vector based on the first set of user features, and in sub-step 114, computing device 20 may determine a second user dense vector based on the second set of user features.
The user dense vector may be obtained, for example, by performing a stitching operation on the user features in the user feature set, and is used to indicate user features with a high occurrence probability (for example, in a batch), such as user attribute features including user gender and age, and user statistics including number of fans, praise, comment, and the like.
In one embodiment, the first user dense vector may be determined as follows:
wherein,representing a first user dense vector, e f1 Representing a first user feature vector, F u1 Representing a first set of user features, a concat () function is used to splice a plurality of input data (i.e., user features in the first set of user features).
Similarly, the second user dense vector may be determined as follows:
wherein,representing a second user dense vector e f2 Representing a second user feature vector, F u2 Representing a second set of user features, the concat () function is used to splice the plurality of input data (i.e., user features in the second set of user features).
In sub-step 115, computing device 20 may randomly set a first user sparse vectorAnd a second user sparsity vector->
In contrast to the user dense vector, the user sparse vector is used to indicate user features (e.g., user name (ID), city of interest, custom tags, etc.) that have a low probability of occurrence. In general, user features having a low probability of having the same feature value within one training Batch (Batch) are referred to as user sparse features. For example, within a training batch, the probability of occurrence of the same user name throughout the training batch is relatively low, so the user feature may be considered as a user sparse feature.
Note that the division of the user sparse features and the user dense features is not absolute, but may be different from application scenario to application scenario. For example, for a user feature of "city of interest," a city of interest "may be a user dense feature if a social platform is primarily directed to a particular region and its user's city of interest is concentrated in one or a few cities.
Next, in sub-step 116, computing device 20 may compare the first user dense vector to the second user dense vectorFirst user sparse vector->Second user Density vector->And a second user sparsity vector->Spliced into a training sample.
Here, the first user may be dense with a concat () function as described aboveFirst user sparse vector->Second user Density vector->And a second user sparsity vector->Splicing, i.e.
Next, continuing with fig. 2, at step 120, computing device 20 may train the deep neural network model based on the training samples to determine a first match score S1 between first user 10 and second user 12.
FIG. 4 shows a flowchart of step 120 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 500 according to an embodiment of the present invention. Herein, the deep neural network model 500 may be, for example, a deep fm model. As shown in fig. 5, the deep neural network model 500 may include a first densified layer 510, a first activated layer 520, a second densified layer 530, a second activated layer 540, and a third densified layer 550.
During the model training phase, the deep neural network model 500 may input a plurality of training samples x constructed as described above in (including the first user dense vectorFirst user sparse vector->Second user Density vector->And a second user sparsity vector->) And outputs each training sample x in The corresponding first match score S1.
During the model use phase, the deep neural network model 500 may target multiple candidates in a candidate user pool for a particular userThe user respectively builds and trains the sample x in Similar input vectors, and outputs a match score S1 for each candidate user with that user. The deep neural network model 500 is described below mainly by way of example of a model training phase.
As shown in fig. 4, step 120 may include a substep 121 in which computing device 20 may compare training sample x in The first densified layer 510 of the deep neural network model 500 is input to obtain a first densified output.
In one embodiment, the first dense output may be determined as follows:
x den1 =dense(x in ) (4)
in other embodiments, training sample x in Input in Batch form (i.e., training Batch as described above), thus input X of deep neural network model 500 in Can be expressed as a matrix of B x N:
X in ={x in } (5)
Wherein B is training sample x input in batch in N is the number of training samples x in Length (i.e. first user dense vectorFirst user sparse vector->Second user Density vector->And a second user sparsity vector->Sum of lengths of (c).
In this case, the first dense output may be expressed as:
X den1 =dense(X in ) (6)
where dense operation refers to an operation of obtaining a fully connected vector of an input vector using dense functions in Tensorflow.
In one embodiment, the first densified layer 510 can be a matrix of (n+1) x 512 (except for training samples x in Including a dimension for biasing in addition to the length N) of the input X in After matrix multiplication with the first densified layer 510, a matrix X of B X512 is obtained den1
In sub-step 122, computing device 20 may output a first dense output x den1 /X den1 Nonlinear 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 as follows:
x relu1 =Relu(x den1 ) ( 7 )
wherein Relu () is a nonlinear activation function that is typically used for the output of hidden layers of deep neural networks. Relu () can be expressed simply as:
Relu(x)=max(0,x)|。 (8)
input X in batches in In the case of (1), the first dense output is X den1 The first activation output may be expressed as:
X relu1 =Relu(X den1 ) (9)
in this case, the first activation layer 520 outputs x for the first dense den1 /X den1 Non-linear mapping is performed, keeping the dimension unchanged, so that the first active output x relu1 /X relu1 With a first dense output x den1 /X den1 The dimensions are the same.
In sub-step 123, computing device 20 may output a first activation output x relu1 /X relu1 The second densified layer 530 of the deep neural network model 500 is input to obtain a second densified output, wherein the second densified output has a smaller dimension than the first densified output.
In one embodiment, the second dense output may be determined as follows:
x den2 =dense(x relu1 ) ( 1 0)
input X in batches in In the case of (1), the first activation output is X relu1 The second dense output may be represented as:
X den2 =dcnse(X relu1 ) ( 11 )
in one embodiment, the second densified layer 530 may be a matrix of (512+1) X256, and thus the first activated output X relu1 A second dense output X generated after passing through the second dense layer 530 den2 Is a matrix of B x 256, i.e. the first active output is reduced in dimension.
Next, in sub-step 124, computing device 20 may output a second dense output x den2 /X den2 Nonlinear mapping is performed by the second active layer 540 to obtain a second active output, wherein the second active output is the same dimension as the second dense output.
In one embodiment, the second activation output may be determined as follows:
x relu2 =Relu(x den2 ) (12)
wherein Relu () is a nonlinear activation function, as described above.
Input X in batches in In the case of (2), the second dense output is X den2 The second activation output may be expressed as:
X relu2 =Relu(X den2 ) (13)
in this case, the second activation layer 540 outputs x for a second dense den2 /X den2 Non-linear mapping is performed, keeping the dimensions unchanged, so that the second activation output x relu2 /X relu2 And a second dense output x den2 /X den2 The dimensions are the same.
Next, in sub-step 125, computing device 20 may output a second activation output x relu2 /X relu2 The third densified layer 550 is input to obtain a first matching score S1. Here, the first matching score S1 refers to the use of each training sample x in A target score obtained by training, which is partially indicative of the first user 10 to whom the training sample relatesAnd the degree of matching between the second users 12. To this end, the dimensions of the third densified layer 550 may be set to be the same as the dimensions of the desired first matching score S1.
In one embodiment, the first match score may be determined as follows:
x out =dense(x relu2 ) (14)
input X in batches in In the case of (2), the second activation output is X relu2 The first match score may be expressed as:
X out =dense(X relu2 ) (15)
in one embodiment, the third densified layer 550 is arranged in a matrix of (256+1) x 1 such that the third densified layer 550 outputs a vector of B1, each element of the vector representing a training sample x in Is a first match score S1 of (c).
The deep neural network model 500 is trained once, and from the viewpoint of the whole model, the training is equivalent to
X out =W*X in +b (16)
Where W is the weight function of the deep neural network model 500 and b is the bias function of the deep neural network model 500, the deep neural network model 500 is trained so that its weight function W and bias function b are continuously updated to a converged value. Here, the initial value of the weight function W may be arbitrarily set, or may be empirically set.
However, due to the nature of the user sparse vector, after the above-described processing of the deep neural network model 500, its contribution in the first match score S1 may become very small, which may be detrimental to finding the best matching user from the user sparse features.
To this end, the user matching method 100 of fig. 2 further comprises a step 130, wherein the computing device 20 may determine a second matching score S2 between the first user 10 and the second user 12 based on the above-mentioned first user sparse vector and second user sparse vector, and determine a matching score S between the first user 10 and the second user 12 based on the first matching score S1 and the second matching score S2 obtained in step 120.
Specifically, in one embodiment, computing device 20 may sparse vector for the first userAnd said second user sparsity vector +.>Performing a dot product operation to determine a second match score S2 between the first user 10 and the second user 12, i.e./>
Computing device 20 may then sum first and second match scores S1 and S2 to determine a match score S between first user 10 and second user 12, i.e., s=s1+s2.
Next, at step 140, computing device 20 may update the weight function of deep neural network model 500 based on the matching score S determined at step 130.
Fig. 6 shows a flowchart of step 140 of updating the weight function W of the deep neural network model 500, according to an embodiment of the invention.
As shown in fig. 6, step 140 may include a substep 142 in which computing device 20 may determine a degree of match between first user 10 and second user 12 using an activation function of deep neural network model 500 and match score S.
In one embodiment, the activation function of the deep neural network model 500 may be an Sigmoid function. The Sigmoid function can be expressed as:
as described above, the matching score S is a numerical value, and may represent the score of the corresponding training sample, and the result (matching degree M) obtained by processing the matching score S using the activation function is more suitable for the two-class classification.
For example, the degree of matching M may be determined as follows:
M=Sigmoid(S) (18)
in sub-step 144, computing device 20 may determine a gradient value for the degree of matching M at a last layer of deep neural network model 500 based on the degree of matching M between first user 10 and second user 12, the sample labels of the training samples, and a loss function of 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. In the following, the cross entropy loss function is taken as an example to describe the sub-step 144, so that 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 can be equally applied to the mean square error loss function.
In one embodiment, the cross entropy Loss function Loss may be expressed as:
wherein the method comprises the steps ofRepresenting training samples x in Is 1.
In some embodiments of the invention, a back propagation algorithm is used to weight function W for each layer of the deep neural network model 500 k And bias function b k (k=1, 2.. The number of layers of the deep neural network model 500 is updated. In the deep neural network model 500 shown in fig. 5, k=5.
Thus, in sub-step 144, the cross entropy Loss function Loss and the weight function W of the K-th layer may be based on K And bias function b K To determine gradient values for the last layer (layer K) of the deep neural network model 500And->
Next, at sub-step 146, computing device 20 may update the weight function for each of the plurality of layers of deep neural network model 500 based on the gradient values of matching degree M at the last layer of deep neural network model 500.
Specifically, the gradient value of the K-th layer of the deep neural network model 500 may be based on any one of Batch (Batch), small Batch (mini-Batch), or random gradient descent methodAnd->Sequentially determining gradient values of the K-1 layer, the K-2 layer, the first layer, and the second layer, and using a weight function W of the gradient value of each layer to the layer k (bias function b) k ) And updating.
Repeating the operation of the step 140 based on a preset iteration step length until the maximum iteration number is reached or the stop iteration threshold 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 convergence value, which can be used to calculate the degree of matching between two users.
Continuing with FIG. 2, at step 150, computing device 20 may determine a matching user for a user of the social platform based on trained deep neural network model 500.
Fig. 7 illustrates a flowchart of steps 150 for determining matching users according to some embodiments of the present invention.
As shown in fig. 7, step 150 may include a substep 152 in which computing device 20 may determine a degree of matching M between a user and a plurality of candidate users using trained deep neural network model 500. Here, the plurality of candidate users may be, for example, candidate users in a candidate user pool of the user. In one embodiment, users of the social platform may be equally divided into active and passive users, for example, by age or gender, a matching operation may be initiated by the active user, and a degree of matching between the active user and each passive user in the candidate user pool is calculated to select the best matching passive user therefrom.
The process of determining the degree of matching between a user and a candidate user is substantially the same as the process of determining the degree of matching described in the above steps 120 to 140, and will not be described again.
Next, in sub-step 154, computing device 20 may rank the candidate users based on the degree of match between the user and its plurality of candidate users, and in sub-step 156, computing device 20 may select one of the candidate users having the highest degree of match with the user as the matching user for the user.
For example, computing device 20 may order the matching degrees of multiple candidate users in a top-to-bottom order and display one candidate user with the highest matching degree on the display of the user's user terminal for the user to confirm or select.
It can be seen that updating the weight function of the deep neural network model 500 in step 140 is based on the degree of matching M between the first user 10 and the second user 12, the sample labels of the training samples and the loss function of the deep neural network model 500. Here, the sample tag of the training sample is used to indicate whether the first user 10 and the second user 12 to which the training sample relates satisfy a predetermined positive feedback condition.
As previously described, in the user matching scenario of the present invention, the positive feedback condition needs to be redefined so that a sufficient number of positive samples are obtained, without the negative samples. To this end, in the present invention, a positive feedback condition may be defined as the first user 10 and the second user 12 interacting at least a predetermined number of times within a predetermined period of time. For example, the predetermined period of time may be set to 1 hour, and the predetermined number of times may be set to one value of 3 to 5. To this end, the user matching method 100 may further include: a sample label is determined for each training sample, i.e. whether the training sample is a positive sample or a negative sample, prior to step 140 (e.g. at the same time as the training sample is determined in step 110 or at any time between steps 140 and 110).
FIG. 8 shows a flowchart of step 160 of determining a sample label for each training sample, in accordance with an embodiment of the present invention.
As shown in fig. 8, step 160 may include a substep 162 in which computing device 20 may intercept the real-time flow log from the flow log obtained in step 110 and delay the real-time flow log for the predetermined period of time to intercept the delayed flow log from the flow log.
As described above, on a social platform with sparse user behavior, if the positive feedback condition is improved, the time for determining a training sample will be very long, and the conventional sample determination method based on the information flow scene will not work. To this end, in this context, when determining the training samples, a dual stream structure may be provided, where the user log at the current time (e.g., 12:00 pm) is intercepted as a real-time stream log, and the user log at a time delayed by a predetermined period of time (e.g., 11:00 am) is intercepted as a delayed stream log, so that the interaction situation between the two users may be determined based on the real-time stream log and the delayed stream log to further determine the training samples.
In sub-step 164, computing device 20 may determine whether the positive feedback condition is satisfied by first user 10 and second user 12 within the predetermined time period based on the real-time flow log and the delayed flow log. For example, it may be determined whether the first user 10 and the second user 12 have had 5 conversations occurring within the predetermined period of time.
If it is determined that the first user 10 and the second user 12 satisfy the positive feedback condition within the predetermined period of time ("yes" to the decision of sub-step 164), then in sub-step 166, the computing device 20 may set the sample tag of the training sample to indicate a positive sample. For example, the sample tag for the training sample may be set to 1.
On the other hand, if it is determined that the first user 10 and the second user 12 do not satisfy the positive feedback condition within the predetermined period of time (the determination of sub-step 164 is "no"), then in sub-step 168, the computing device 20 may set the sample tag of the training sample to indicate a negative sample. For example, the sample tag for the training sample may be set to 0. Here, the first user 10 and the second user 12 not satisfying the positive feedback condition for the predetermined period of time may include the first user 10 and the second user 12 not interacting for the predetermined period of time or the number of interactions not reaching the predetermined number of times (for example, 5 times).
In addition, in order to control the number of negative samples, the complete training samples obtained in step 110 may be filtered based on the sample labels of the training samples in step 160, so as to filter out the training samples without interaction, and control the number of negative samples for each user. In this way, it can be ensured that the training samples are not concentrated on a large number of training samples generated by a small number of users when training the deep neural network model 500, so that the model generated by training has no universality.
Fig. 9 illustrates a block diagram of a computing device 900 suitable for implementing embodiments of the 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 schematically shown) that may perform various suitable actions and processes according to 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 RAM 930, various programs and data may also be stored as needed for operation of computing device 900. CPU 910, ROM 920 and RAM 930 are connected to each other via bus 940. An input/output (I/O) interface 950 is also connected to bus 940.
Various components in computing device 900 are connected to I/O interface 950, including: an input unit 960, such as a keyboard, 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, etc.; and a communication unit 990 such as a network card, modem, wireless communication transceiver, etc. 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 user matching method 100 described above may be performed, for example, by the CPU 910 of a computing device 900 (e.g., computing device 20 or server 30). For example, in some embodiments, the user matching method 100 may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 980. In some embodiments, some or all of the computer programs may be loaded and/or installed onto computing device 900 via ROM 920 and/or communication unit 990. When the computer program is loaded into RAM 930 and executed by CPU 910, one or more of the operations of user matching method 100 described above may be performed. In addition, 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 user matching method 100 and the computing device 900 that may be used as the computing device 20 or the server 30 according to the present invention are described above with reference to the accompanying drawings. It will be appreciated by those skilled in the art that the execution of the steps of the user matching method 100 is not limited to the order shown in the figures and described above, but may be performed in any other reasonable order. Furthermore, computing device 900 need not include all of the components shown in FIG. 9, but may include only some of the components necessary to perform the functions described herein, and the manner in which these components are connected is not limited to the form shown in the figures.
The present invention may be a method, apparatus, system, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for performing various 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 various units of the apparatus disclosed herein may be implemented using discrete hardware components or may be integrally implemented on one 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 ordinary skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments of the invention 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 present 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 (9)

1. A user matching method, comprising:
determining a training sample based on a streaming log of a social platform, the training sample indicating an interaction condition between a first user and a second user of the social platform within a predetermined period of time;
training a deep neural network model based on the training samples to determine a first match score between the first user and the second user;
determining a second match score between the first user and the second user based on a first user sparse vector of the first user and a second user sparse vector of the second user, and determining a match score between the first user and the second user based on the first match score and the second match score;
Updating a weight function of the deep neural network model based on the matching score; and
determining a matching user for a user of the social platform based on the trained deep neural network model,
wherein training a deep neural network model based on the training samples to determine a first match score between the first user and the second user comprises:
inputting the training sample into a first densified layer of the deep neural network model to obtain a first densified output;
nonlinear mapping is carried out on the first dense output through a first activation layer to obtain a first activation output, wherein the first activation output and the first dense output have the same dimension;
inputting the first activation output into a second densified layer of the deep neural network model to obtain a second densified output, wherein the second densified output has a smaller dimension than the first densified output;
non-linear mapping is carried out on the second dense output through a second activation layer to obtain a second activation output, wherein the second activation output and the second dense output have the same dimension; and
the second activation output is input to a third densified layer to obtain the first match score.
2. The method of claim 1, wherein determining training samples based on the streaming log of the social platform comprises:
acquiring a stream log of the social platform;
determining a first set of user features for the first user and a second set of user features for the second user based on the streaming log and user representation;
determining a first user dense vector for the first user based on the first set of user features;
determining a second user dense vector for the second user based on the second set of user features;
randomly setting the first user sparse vector and the second user sparse vector; and
and splicing the first user dense vector, the first user sparse vector, the second user dense vector and the second user sparse vector into the training sample.
3. The method of claim 1, wherein determining a match score between the first user and the second user comprises:
performing a point multiplication operation on the first user sparse vector and the second user sparse vector to determine a second match score between the first user and the second user, and
the first and second match scores are summed to determine a match score between the first and second users.
4. The method of claim 1, wherein updating the weight function of the deep neural network model based on the match score comprises:
determining a degree of match between the first user and the second user using an activation function of the deep neural network model and the match score;
determining a gradient value of the matching degree at the last layer of the deep neural network model based on the matching degree between the first user and the second user, the sample label of the training sample and the loss function of the deep neural network model; and
and updating the weight function of each layer of the deep neural network model based on the gradient value of the matching degree in the last layer of the deep neural network model.
5. The method of claim 1, wherein determining a matching user for one user of the social platform based on the trained deep neural network model comprises:
determining the matching degree between the user and a plurality of candidate users of the social platform by using the trained deep neural network model;
ranking the plurality of candidate users based on a degree of match between the user and the plurality of candidate users; and
And selecting the candidate user with the highest matching degree with the user from the plurality of candidate users as the matching user of the user.
6. The method of claim 1, wherein updating the weight function of the deep neural network model based on the matching score further comprises:
intercepting a real-time flow log from the flow log, and delaying the real-time flow log for a predetermined period of time to intercept a delayed flow log from the flow log;
determining whether the first user and the second user satisfy a positive feedback condition within the predetermined period of time based on the real-time flow log and the delayed flow log;
in response to determining that the first user and the second user meet the positive feedback condition within the predetermined period of time, setting a sample tag of the training sample to indicate a positive sample; and
in response to determining that the first user and the second user do not satisfy the positive feedback condition within the predetermined period of time, a sample tag of the training sample is set to indicate a negative sample.
7. The method of claim 6, wherein the positive feedback condition includes the first user and the second user interacting at least a predetermined number of times within the predetermined period of time.
8. 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, which when executed by the at least one processor, cause the computing device to perform the steps of the method according to any one of claims 1 to 7.
9. A computer readable storage medium having stored thereon computer program code which, when executed, performs the method of any of claims 1 to 7.
CN202111073755.0A 2021-09-14 2021-09-14 User matching method, computing device, and computer-readable storage medium Active CN113836439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111073755.0A CN113836439B (en) 2021-09-14 2021-09-14 User matching method, computing device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111073755.0A CN113836439B (en) 2021-09-14 2021-09-14 User matching method, computing device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN113836439A CN113836439A (en) 2021-12-24
CN113836439B true CN113836439B (en) 2024-01-30

Family

ID=78959206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111073755.0A Active CN113836439B (en) 2021-09-14 2021-09-14 User matching method, computing device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN113836439B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110162700A (en) * 2019-04-23 2019-08-23 腾讯科技(深圳)有限公司 The training method of information recommendation and model, device, equipment and storage medium
CN110162706A (en) * 2019-05-22 2019-08-23 南京邮电大学 A kind of personalized recommendation method and system based on interaction data cluster
CN110297970A (en) * 2019-05-28 2019-10-01 北京达佳互联信息技术有限公司 Information recommendation model training method and device
CN110362753A (en) * 2019-04-10 2019-10-22 深思考人工智能机器人科技(北京)有限公司 A kind of personalized neural network recommendation method and system based on user concealed feedback
CN111191092A (en) * 2019-12-31 2020-05-22 腾讯科技(深圳)有限公司 Portrait data processing method and portrait model training method
CN111310038A (en) * 2020-02-06 2020-06-19 腾讯科技(深圳)有限公司 Information recommendation method and device, electronic equipment and computer-readable storage medium
CN111666498A (en) * 2020-06-30 2020-09-15 腾讯科技(深圳)有限公司 Friend recommendation method based on interactive information, related device and storage medium
CN112667714A (en) * 2021-03-17 2021-04-16 腾讯科技(深圳)有限公司 User portrait optimization method and device based on deep learning and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9535897B2 (en) * 2013-12-20 2017-01-03 Google Inc. Content recommendation system using a neural network language model
EP4073763A4 (en) * 2019-12-09 2023-12-27 Magic Leap, Inc. Cross reality system with simplified programming of virtual content

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362753A (en) * 2019-04-10 2019-10-22 深思考人工智能机器人科技(北京)有限公司 A kind of personalized neural network recommendation method and system based on user concealed feedback
CN110162700A (en) * 2019-04-23 2019-08-23 腾讯科技(深圳)有限公司 The training method of information recommendation and model, device, equipment and storage medium
CN110162706A (en) * 2019-05-22 2019-08-23 南京邮电大学 A kind of personalized recommendation method and system based on interaction data cluster
CN110297970A (en) * 2019-05-28 2019-10-01 北京达佳互联信息技术有限公司 Information recommendation model training method and device
CN111191092A (en) * 2019-12-31 2020-05-22 腾讯科技(深圳)有限公司 Portrait data processing method and portrait model training method
CN111310038A (en) * 2020-02-06 2020-06-19 腾讯科技(深圳)有限公司 Information recommendation method and device, electronic equipment and computer-readable storage medium
CN111666498A (en) * 2020-06-30 2020-09-15 腾讯科技(深圳)有限公司 Friend recommendation method based on interactive information, related device and storage medium
CN112667714A (en) * 2021-03-17 2021-04-16 腾讯科技(深圳)有限公司 User portrait optimization method and device based on deep learning and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Friend Recommendation Method of Weighted Networks Based on Value and Match;Wu, SM等;《3rd Annual International Conference on Information System and Artificial Intelligence (ISAI)》;1-9 *
基于注意力机制与改进TF-IDF的推荐算法;李昆仑等;《计算机工程 》;第47卷(第8期);69-77 *

Also Published As

Publication number Publication date
CN113836439A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
US10958748B2 (en) Resource push method and apparatus
US20210256403A1 (en) Recommendation method and apparatus
US10474827B2 (en) Application recommendation method and application recommendation apparatus
CN109582956B (en) Text representation method and device applied to sentence embedding
CN110377740B (en) Emotion polarity analysis method and device, electronic equipment and storage medium
CN112085172B (en) Method and device for training graph neural network
CN107330715B (en) Method and device for selecting picture advertisement material
WO2021204269A1 (en) Classification model training, and object classification
WO2019114423A1 (en) Method and apparatus for merging model prediction values, and device
CN110555714A (en) method and apparatus for outputting information
CN106250464B (en) Training method and device of ranking model
US11748389B1 (en) Delegated decision tree evaluation
US11694681B2 (en) Artificial assistant system notifications
CN112085615A (en) Method and device for training graph neural network
WO2022052744A1 (en) Conversation information processing method and apparatus, computer-readable storage medium, and device
CN113034168A (en) Content item delivery method and device, computer equipment and storage medium
CN112995414B (en) Behavior quality inspection method, device, equipment and storage medium based on voice call
CN114119123A (en) Information pushing method and device
CN113836439B (en) User matching method, computing device, and computer-readable storage medium
CN116204624A (en) Response method, response device, electronic equipment and storage medium
AU2018214157A1 (en) A novel multiclass architecture for experience targeting using bayesian approach
CN108848152A (en) A kind of method and server of object recommendation
CN114493674A (en) Advertisement click rate prediction model and method
CN113806541A (en) Emotion classification method and emotion classification model training method and device
CN115374254A (en) Method, apparatus, server and medium for generating service evaluation information

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