Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with this specification.On the contrary, they are only and such as institute
The example of the consistent device and method of some aspects be described in detail in attached claims, this specification.
It is only to be not intended to be limiting this explanation merely for for the purpose of describing particular embodiments in the term that this specification uses
Book.The "an" of used singular, " described " and "the" are also intended to packet in this specification and in the appended claims
Most forms are included, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein is
Refer to and includes that one or more associated any or all of project listed may combine.
It will be appreciated that though various information may be described using term first, second, third, etc. in this specification, but
These information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not taking off
In the case where this specification range, the first information can also be referred to as the second information, and similarly, the second information can also be claimed
For the first information.Depending on context, word as used in this " if " can be construed to " ... when " or
" when ... " or " in response to determination ".
This specification provides a kind of object recommendation scheme.
It on the one hand, can be based on there are the unique characteristics of the affiliated partner of direct correlation relationship to be expressed as user life with user
It indicates at local feature, is generated based on the object is expressed as there are the unique characteristics of the association user of direct correlation relationship with object
Local feature indicates.
On the other hand, the use for carrying global information can be generated according to the indirect association relationship between user and object
Relationship characteristic between family and the object indicates.
Then, can calculate user partial character representation and above-mentioned relation character representation and value, and should and be worth and object
The difference that local feature indicates, and the object recommendation can be given to the user when difference meets scheduled recommendation condition.
Relationship characteristic expression in above-mentioned object recommendation scheme carries the global information between user and object, can be one
Determine to avoid cold start-up problem in degree.Also, above-mentioned object recommendation scheme is to the local message and global information of user and object
Merged, be effectively utilized various auxiliary informations, be greatly improved object recommendation hit rate and recommendation list it is accurate
Degree.
Above-mentioned object can include: commodity or service.For example, electric business platform can recommend the commodity sold or service to user.
Above-mentioned object may also include that information.For example, portal website can recommend information to user.
Above-mentioned object may also include that video.For example, video APP (Application, application program) can recommend to user
The videos such as TV play, film.
Certainly, in other examples, above-mentioned object can also be other entities or data, and above-mentioned object recommendation can also be applied
In other application scenarios, this specification is not particularly limited this.
The realization process of this specification is described below with reference to specific embodiment.
Fig. 1 and Fig. 2 are please referred to, the object recommendation method that this specification provides can comprise the following steps that
Step 102, for any user, according to there are itself spies of the affiliated partner of direct correlation relationship with the user
Sign is expressed as the user and generates local feature expression.
Step 104, for any object, according to there are itself spies of the association user of direct correlation relationship with the object
Sign is expressed as the object and generates local feature expression.
In the present embodiment, the direct correlation relationship can include: purchase, browsing, comment etc..
By taking object is commodity as an example, there are the commodity of direct correlation relationship with user can include: commodity that user bought,
The commodity etc. that commodity that commodity that user browsed, user comment are crossed, user paid close attention to.In general, existing with same user
The commodity of direct correlation relationship usually have multiple.
There are the users of direct correlation relationship with commodity can include: bought the user of the commodity, browsed the commodity
User, the user for commenting on the commodity, the user for paying close attention to the commodity etc..Similar, exist to be directly linked with same commodity and close
The user of system generally also has multiple.
By taking object is film as an example, there are the films of direct correlation relationship with user can include: film that user watched,
The film etc. that film that user's evaluation is crossed, user collected.
There are the users of direct correlation relationship with film can include: watched the user of the film, commented on the film
User, the user for collecting the film etc..
Referring to FIG. 3, the generating process that the local feature of above-mentioned user and object indicates may include following steps:
Step 302, it is indicated to generate affiliated partner character representation matrix according to the unique characteristics of each affiliated partner.
Step 304, it is indicated to generate association user character representation matrix according to the unique characteristics of each association user.
In the present embodiment, the unique characteristics that can first generate each object indicate, for example, corresponding 0/ can be generated for each object
Then 1 vector carries out insertion processing to 0/1 vector, the unique characteristics for obtaining each object indicate.
Above-mentioned 0/1 vector is to indicate object using a very long vector, and the dimension of the vector is the total quantity of object,
The element value of dimension is 1 where the object, and the element value of other dimensions is all 0.
It is assumed that one shares 10,000,000 objects, then 0/1 vector of each object is 10,000,000 dimensions, the 1st of object 1
The element value of dimension is 1, other dimension element values are 0, then 0/1 vector of object 1 is represented by [1,0,0,0,0 ...];Object 2
The element value of the 3rd dimension be 1, other dimension element values are 0, then 0/1 vector of object 2 be represented by [0,0,1,0,
0…]。
In the present embodiment, insertion processing (Embedding) can be carried out to 0/1 vector of each object, by the 0/1 of higher-dimension
DUAL PROBLEMS OF VECTOR MAPPING obtains the low-dimensional character representation of each object to lower dimensional space.Since the low-dimensional character representation does not include object
The Heterogeneous Informations such as the relationship between attribute, object, therefore the unique characteristics that the low-dimensional character representation can be known as to object indicate.
In the present embodiment, the unique characteristics that can pre-generate all objects indicate, then in the association for determining certain user
After object, the unique characteristics for obtaining each affiliated partner are indicated.
Similar, the unique characteristics that can also pre-generate all users indicate, then in the association user for determining certain object
Afterwards, the unique characteristics for obtaining each association user indicate.Wherein, the generating process that the unique characteristics of user indicate can refer to object certainly
The generating process of body character representation, this is no longer going to repeat them for this specification.
In the present embodiment, the unique characteristics of all affiliated partners of each user indicate to constitute an affiliated partner
Character representation matrix.
For example, it is assumed that the unique characteristics expression of affiliated partner is D dimensional vector, certain user has M affiliated partner, then constitutes
The affiliated partner character representation matrix of M × D.
The unique characteristics of all association users of each object indicate also to constitute an association user character representation square
Battle array.
For example, it is assumed that the unique characteristics of association user indicate to be also D dimensional vector, certain object has N number of association user, then can group
At the association user character representation matrix of N × D.
Step 306, institute is generated according to the affiliated partner character representation matrix and the association user character representation matrix
State the Harmonious Matrix of affiliated partner and the association user.
In the present embodiment, still with the association user character representation square of the affiliated partner character representation matrix of M × D and N × D
For battle array, the product of affiliated partner character representation matrix Yu association user character representation matrix can be calculated, the collaboration of M × N is obtained
Matrix.The Harmonious Matrix combines affiliated partner and the unique characteristics of association user and indicates.
It in other examples, can also be first using the neural network model trained to affiliated partner character representation matrix and pass
It is combined family character representation matrix and carries out nonlinear transformation, then calculate the product of transformed matrix again, obtain Harmonious Matrix.
Specifically, the first nerves network model that the affiliated partner character representation Input matrix of M × D can have been trained,
Such as the matrix of exportable M × D ', for ease of description, the matrix of M × D ' can be known as to convert affiliated partner matrix.Described first
Neural network model can be not particularly limited this for models, this specification such as multi-layer perception (MLP)s.
Similar, the nervus opticus network model that the association user character representation Input matrix of N × D can have been trained, example
Such as matrix of exportable N × D ', for ease of description, the matrix of N × D ' can be known as to convert association user matrix.
Then, the product that can calculate the transformation affiliated partner matrix of M × D ' and the transformation association user matrix of N × D ', obtains
To the Harmonious Matrix of M × N.
Affiliated partner character representation matrix and association user character representation matrix are converted using neural network model,
The capability of fitting of model can be enhanced.
Certainly, in other examples, the Harmonious Matrix that other modes generate affiliated partner and association user also can be used, this
Specification is not particularly limited this.
Step 308, it carries out the processing of row pondization respectively to the Harmonious Matrix and column pond handles to obtain the affiliated partner
With the attention force vector of the association user.
In the present embodiment, the pondization processing can include: maximum pondization processing, average pondization processing, minimum pond Hua Chu
Reason etc., this specification is not particularly limited this.
Example is turned to maximum pond, maximum pondization processing on the one hand can be carried out to every row of the Harmonious Matrix of M × N, that is, is directed to
Every a line of the Harmonious Matrix chooses greatest member value as the pond of the row as a result, to obtain the attention of affiliated partner
Vector, the affiliated partner notice that force vector includes M element.
On the other hand, maximum pondization processing can be carried out to each column of the Harmonious Matrix of M × N, that is, is directed to the Harmonious Matrix
Each column, choose greatest member value as the pond of the column as a result, to obtain the attention force vector of association user, association use
Family notices that force vector includes N number of element.
In the present embodiment, after carrying out pond processing, softmax function also can be used, normalizing is carried out to attention force vector
Change processing, so that each element value of attention force vector is between zero and one, and each element value is 1 with value.
Step 310, the attention force vector based on the affiliated partner character representation matrix and the affiliated partner is described
User generates local feature and indicates.
In the present embodiment, the affiliated partner can be paid attention to each element value in force vector as weighted value, difference
Be weighted summation to different affiliated partners but the identical element of dimension is come from the affiliated partner character representation matrix, with for
The user generates character representation, due to this feature indicate to be based only upon with the user there are the object of direct correlation relationship from
Body character representation generates, with reference to there are the information of the user of indirect association relationship and object with the user, therefore can should
Character representation is known as local feature expression.
It is assumed that the affiliated partner character representation matrix of M × D is as follows:
Affiliated partner pays attention to force vector are as follows: (w1, w2..., wM), then according to M × D affiliated partner character representation matrix and
The affiliated partner pays attention to first element value of the user partial character representation that force vector generates are as follows:
w1×a11+w2×a12+w3×a13+…+wM×a1M,
Second element value are as follows: w1×a21+w2×a22+w3×a23+…+wM×a2M,
Similar, the D element value are as follows:
w1×aD1+w2×aD2+w3×aD3+…+wM×aDM。
Step 312, the attention force vector based on the association user character representation matrix and the association user is described
Object generates local feature and indicates.
It is similar with the expression of the local feature of aforementioned user, the association user can be paid attention to each element value in force vector
As weighted value, respectively to come from the association user character representation matrix different association users but the identical element of dimension into
Row weighted sum is indicated with generating local feature for the object.
In the present embodiment, handle to obtain by the pond to Harmonious Matrix the attention of affiliated partner and association user to
Amount is then based on and pays attention to force vector to generate the local feature of user and object and indicate, can be associated with to different affiliated partners, difference
User recommends generated influence degree to distinguish this, and then improves the accuracy that subsequent object is recommended.
Step 106, the user and described right is generated according to the indirect association relationship between the user and the object
Relationship characteristic as between indicates.
In the present embodiment, the indirect association relationship can refer to be not present between the user and the object and be directly linked
Relationship, but can be associated by other users, object.
For example, user Zhang San does not watch flash back past events " hornet ", also there is no close between user Zhang San and " hornet "
Other are directly linked relationship for note, comment etc., but the friend Li four of user Zhang San watched " hornet ", in this case user
There are indirect association relationships between Zhang San and " hornet ".
For another example user little Bai did not buy iPhone XS, and also there is no close between little Bai and iPhone XS
Note, comment, browsing etc. are directly linked relationship, but the friend of little Bai it is small it is black bought iPhone8, little Bai is logical in this case
Too small black, iPhone 8, apple brand quotient and iPhone XS are associated, and there is also indirect between little Bai and iPhone XS
Incidence relation.
In the present embodiment, referring to FIG. 4, the generating process that the relationship characteristic between user and object indicates may include with
Lower step:
Step 402, several indirect reachable paths between the user and the object are obtained, it is described indirectly up to road
Diameter passes through one or more nodes and connects the user and the object, and the Lian Bian on the indirect reachable path, which is represented, to be connected
Node between have direct correlation relationship, the type of the node include: user class node, object class node and non-user and
Non-object class node.
In the present embodiment, the heterogeneous network for carrying various information can first be constructed.
The heterogeneous network may include having user class node, object class node and non-user and non-object class node.For example,
It can be believed according to the incidence relation etc. between incidence relation, user and the user between user property, object properties, user and object
Breath constructs heterogeneous network, and the non-user and non-object class node in the heterogeneous network can represent user property, object properties etc..
When company's side connecting object of the heterogeneous network and user, which is represented between connected object and user
In the presence of the relationship of direct correlation.
When the company side of the heterogeneous network connects user and when user property, which, which represents the user and have, is connected
User property.
When the company side of the heterogeneous network connects user and user, which represents has between connected user
Friend, the incidence relations such as transfer accounts.
Certainly, the company side in heterogeneous network can also connect user and object properties etc., and this specification is no longer gone to live in the household of one's in-laws on getting married one by one herein
It states.
After constructing heterogeneous network, can from the heterogeneous network at random select specified quantity node, then respectively from
Selected node sets out, and path extraction is carried out by the way of random walk.
By taking the specified quantity is 1000 as an example, 1000 nodes can be first randomly selected from the heterogeneous network.For
The each node chosen, can extract the path of specified hop count, such as 100 from the node by the way of random walk
Jump etc..
In the present embodiment, 1000 paths can be extracted from the heterogeneous network, the item number of each path is all
100。
Certainly, in other examples, the item number of each paths can also be not exactly the same, and it is special that this specification does not make this
Limitation.
In the present embodiment, pass through the setting to number of nodes and route jumping figure, it is believed that the path extracted carries
The most information of heterogeneous network.
In the present embodiment, can judge respectively extract path in whether include between the user and the object between
Reachable path is connect, if including, the extraction of indirect reachable path can be carried out.
As an example it is assumed that user node is u2, Object node is m5, and 4 paths are extracted from heterogeneous network, respectively
Are as follows:
Path 1:u1-m1-u2-m3-t1-m4-u3-m5-d1-m8;
Path 2:u8-m1-u2-m3-a7-m5;
Path 3:u5-m1-u2-m3-t1-m4-m5;
Path 4:u2-m3-t1-m4.
Wherein, including user u2 to the indirect reachable path between object m5: u2-m3-t1-m4-u3-m5 in path 1;
Also including user u2 to the indirect reachable path between object m5: u2-m3-a7-m5 in path 2;
Also including user u2 to the indirect reachable path between object m5: u2-m3-t1-m4-m5 in path 3;
It does not include user u2 in path 4 to the indirect reachable path between object m5.
In this example, it can extract 3 user u2 to the indirect reachable path between object m5.
Certainly, in other examples, the extraction that other modes carry out indirect reachable path can also be used, this specification is to this
It is not particularly limited.
Step 404, it for every indirect reachable path, is indicated according to the unique characteristics of each node on the indirect reachable path
Generate the character representation of the indirect reachable path.
By taking aforementioned indirect reachable path u2-m3-t1-m4-u3-m5 as an example, in the present embodiment, it can first obtain this and indirectly may be used
Unique characteristics up to node each in path (node u2, m3, t1, m4, u3 and m5) indicate, then integrate the unique characteristics of each node
Indicate the character representation of the generation indirect reachable path.
For example, the unique characteristics of each node on the indirect reachable path can be indicated as input, what use had been trained
LSTM (Long Short-Term Memory, shot and long term memory network) model exports the character representation of the indirect reachable path.
In the present embodiment, the generation side that the unique characteristics of non-user and non-object class node indicate in indirect reachable path
The unique characteristics that method can refer to aforementioned user class node and object class node indicate generation method, and this specification is herein no longer one by one
It repeats.
Step 406, the character representation for merging every indirect reachable path, obtains the pass between the user and the object
It is character representation.
It can be between user and object after generating character representation for every indirect reachable path based on abovementioned steps 404
The character representations of all indirect reachable paths merged, obtain the relationship characteristic table between the user and the object
Show.
In one example, the modes such as summation, averaging can be used to carry out the character representation of the indirect reachable path of each item
Fusion.For example, the fortune such as being summed, being averaging to the element value of identical dimensional in the character representation of the indirect reachable path of each item
It calculates, obtaining the relationship characteristic indicates.
In another example, the weight of the indirect reachable path can be first determined according to the hop count of every indirect reachable path
Then value merges the character representation of the indirect reachable path of each item using weighted sum or average weighted mode.
In general, the hop count of reachable path is fewer indirectly, illustrate that this paths recommends generated influence to get over this
Greatly, therefore weight is higher;Conversely, the hop count of reachable path is more indirectly, illustrate that this paths recommends generated shadow to this
Sound is smaller, therefore weight is lower.
Indirect reachable path |
Hop count |
Weighted value |
u2-m3-t1-m4-u3-m5 |
5 |
3/12 |
u2-m3-a7-m5 |
3 |
5/12 |
u2-m3-t1-m4-m5 |
4 |
4/12 |
Table 1
Table 1 is please referred to, still by taking 3 of aforementioned user u2 to object m5 indirect reachable paths as an example, each indirect reachable path
Hop count and weighted value can refer to the example of table 1.Wherein, hop count maximum indirect reachable path u2-m3-t1-m4-u3-m5
Weighted value is minimum, and the weighted value of the least indirect reachable path u2-m3-a7-m5 of hop count is maximum.
In this example, each element value in the character representation of the indirect reachable path of each item indirectly can may be used multiplied by place respectively
Up to the weighted value in path, then being summed, be averaging etc. for the element value of identical dimensional is calculated, and obtains the user and institute
The relationship characteristic stated between object indicates.
Certainly, in other examples, can also be carried out using character representation of the other modes to the indirect reachable path of each item
Fusion, this specification are not particularly limited this.
Step 108, the local feature for calculating the user indicates with relationship characteristic expression and value, and described in calculating
The difference indicated with the local feature of value and the object.
In the present embodiment, when the local feature indicates and relationship characteristic expression is vector, the office of user can be calculated
Then the vector sum of portion's vector and relation vector calculates the vector difference of the vector sum and object partial vector as the difference again
It is different.
When the local feature indicates and relationship characteristic expression is matrix, the local matrix and relationship square of user can be calculated
The matrix of battle array and, then calculate the matrix again and with the matrix difference of object part matrix as the difference.
Similar, when character representation is other forms, corresponding mode can be used and calculate described and value and difference, this theory
This is no longer going to repeat them for bright book.
Step 110, if the difference meets scheduled recommendation condition, the object recommendation is given to the user.
In the present embodiment, the recommendation condition can be determined in the training stage, for example, the recommendation condition can be described
Difference is less than discrepancy threshold.
In one example, when the difference is vector, vector field homoemorphism can be calculated, then judges whether vector field homoemorphism is small
In discrepancy threshold.
In the present embodiment, when the difference meets the recommendation condition, can illustrate user local feature indicate with
The local feature expression of relationship characteristic between user and object indicates and value and object relatively, and then can will be described right
As recommending the user.
Relationship characteristic expression carries user in the object recommendation scheme that this specification it can be seen from above description provides
Global information between object can avoid cold start-up problem to a certain extent.Also, above-mentioned object recommendation scheme is to user
It is merged with the local message and global information of object, is effectively utilized various auxiliary informations, be greatly improved object and push away
The accuracy of the hit rate and recommendation list recommended.
In aforementioned embodiment shown in FIG. 1, the first nerves network model, is used the nervus opticus network model
It can be determined in training in the parameter and recommendation condition of the models such as the LSTM model for generating indirect reachable path character representation.
It in the present embodiment, can be based on the direct correlation relationship between the user and object occurred in history as positive sample
This, is trained above-mentioned model, recommendation condition using method shown in FIG. 1.For example, user little Hua viewing is flashed back past events " in dish
Spy 6 ", then user little Hua and film " mission spy 6 " can be trained as a positive sample.
Optionally, to accelerate training, also negative sample can be added during training.For example, user little Hua and film " dish
Middle spy 5 " without any direct correlation relationship, then user little Hua and " mission spy 5 " can be trained as a negative sample.
When being trained, loss function can be constructed based on the difference being calculated in abovementioned steps 108, for example, can structure
Make hinge loss function loss=max (sJust-sIt is negative+ m, 0), wherein sJustIndicate the difference of positive sample, sIt is negativeIndicate the difference of negative sample
Different, m can represent the discrepancy threshold in recommendation condition.
Certainly, in other examples, other modes also can be used to be trained, this specification is not particularly limited this.
Corresponding with the embodiment of aforementioned object recommended method, this specification additionally provides the implementation of object recommendation device
Example.
The embodiment of this specification object recommendation device can be using on the server.Installation practice can pass through software
It realizes, can also be realized by way of hardware or software and hardware combining.Taking software implementation as an example, as on a logical meaning
Device, be to be read computer program instructions corresponding in nonvolatile memory by the processor of server where it
Operation is formed in memory.For hardware view, as shown in figure 5, the server where this specification object recommendation device
A kind of hardware structure diagram is implemented other than processor shown in fig. 5, memory, network interface and nonvolatile memory
Server in example where device can also include other hardware generally according to the actual functional capability of the server, no longer superfluous to this
It states.
Fig. 6 is a kind of block diagram of object recommendation device shown in one exemplary embodiment of this specification.
Referring to FIG. 6, the object recommendation device 500 can be applied in aforementioned server shown in fig. 5, include:
User characteristics generation unit 501, characteristics of objects generation unit 502, relationship characteristic generation unit 503, feature difference computing unit
504 and object recommendation unit 505.
Wherein, user characteristics generation unit 501, for any user, according to there are direct correlation relationships with the user
The unique characteristics of affiliated partner be expressed as the user and generate local feature indicating;
Characteristics of objects generation unit 502, for any object, according to being associated with there are direct correlation relationship with the object
The unique characteristics of user are expressed as the object and generate local feature expression;
Relationship characteristic generation unit 503, according to the indirect association relationship generation between the user and the object
Relationship characteristic between user and the object indicates;
Feature difference computing unit 504, the local feature for calculating the user indicate the sum indicated with the relationship characteristic
Value, and calculating is described and is worth the difference indicated with the local feature of the object;
Object recommendation unit 505 gives the object recommendation to the use if the difference meets scheduled recommendation condition
Family.
Optionally, the generating process that the local feature of the user and the object indicates, comprising:
It is indicated to generate affiliated partner character representation matrix according to the unique characteristics of each affiliated partner;
It is indicated to generate association user character representation matrix according to the unique characteristics of each association user;
Described be associated with pair is generated according to the affiliated partner character representation matrix and the association user character representation matrix
As the Harmonious Matrix with the association user;
It carries out the processing of row pondization respectively to the Harmonious Matrix and column pond handles to obtain the affiliated partner and the pass
It is combined the attention force vector at family;
It is user generation based on the attention force vector of the affiliated partner character representation matrix and the affiliated partner
Local feature indicates;
It is object generation based on the attention force vector of the association user character representation matrix and the association user
Local feature indicates.
Optionally, described to be generated according to the affiliated partner character representation matrix and the association user character representation matrix
The Harmonious Matrix of the affiliated partner and the association user, comprising:
Using the affiliated partner character representation matrix as input, the first nerves network model that use has been trained, which exports, to be become
Change affiliated partner matrix;
Using the association user character representation matrix as input, the nervus opticus network model that use has been trained, which exports, to be become
Change association user matrix;
The product for calculating the transformation affiliated partner matrix and the transformation association user matrix, obtains the collaboration square
Battle array.
Optionally, the attention force vector based on the affiliated partner character representation matrix and the affiliated partner is institute
It states user and generates local feature expression, comprising:
The affiliated partner is paid attention into each element value in force vector as weighted value, respectively to the affiliated partner spy
Different affiliated partners are come from sign representing matrix but the identical element of dimension is weighted summation, to generate part for the user
Character representation;
The attention force vector based on the association user character representation matrix and the association user is the object
Generating local feature indicates, comprising:
The association user is paid attention into each element value in force vector as weighted value, respectively to the association user spy
Different association users are come from sign representing matrix but the identical element of dimension is weighted summation, to generate part for the object
Character representation.
Optionally, the relationship characteristic generation unit 503:
Several indirect reachable paths between the user and the object are obtained, the indirect reachable path passes through one
A or multiple nodes connect the user and the object, the Lian Bian on the indirect reachable path represent connected node it
Between have direct correlation relationship, the type of the node includes: user class node, object class node and non-user and non-object class
Node;
For every indirect reachable path, between indicating that generation is somebody's turn to do according to the unique characteristics of each node on the indirect reachable path
Connect the character representation of reachable path;
The character representation for merging every indirect reachable path, obtains the relationship characteristic table between the user and the object
Show.
Optionally, several indirect reachable paths obtained between the user and the object, comprising:
Building includes the heterogeneous network of user class node, object class node and non-user and non-object class node, described
Lian Bian in heterogeneous network, which is represented, has direct correlation relationship between connected node;
Select the node of specified quantity at random from the heterogeneous network, and respectively from selected node, using with
The mode of machine migration carries out path extraction;
From the indirect reachable path obtained in the path extracted between the user and the object.
Optionally, the unique characteristics according to each node on the indirect reachable path indicate to generate the indirect reachable path
Character representation, comprising:
The unique characteristics of each node on the indirect reachable path are indicated as input, between being somebody's turn to do using the output of LSTM model
Connect the character representation of reachable path.
Optionally, the character representation of every indirect reachable path of the fusion, obtains between the user and the object
Relationship characteristic indicate, comprising:
The weighted value of the indirect reachable path is determined according to the hop count of the indirect reachable path;
According to the weighted value, the character representation of every indirect reachable path is merged using average weighted mode, is obtained
Relationship characteristic between the user and the object indicates.
Optionally, the scheduled recommendation condition includes: that the difference is less than or equal to discrepancy threshold.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize this specification scheme.Those of ordinary skill in the art are not
In the case where making the creative labor, it can understand and implement.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
Corresponding with the embodiment of aforementioned object recommended method, this specification also provides a kind of object recommendation device, the dress
Set includes: processor and the memory for storing machine-executable instruction.Wherein, processor and memory are usually by interior
Portion's bus is connected with each other.In other possible implementations, the equipment is also possible that external interface, with can be with other
Equipment or component are communicated.
It in the present embodiment, can by reading and executing the machine corresponding with object recommendation logic of the memory storage
It executes instruction, the processor is prompted to:
For any user, according to there are the unique characteristics of the affiliated partner of direct correlation relationship to be expressed as with the user
The user generates local feature and indicates;
For any object, according to there are the unique characteristics of the association user of direct correlation relationship to be expressed as with the object
The object generates local feature and indicates;
It is generated between the user and the object according to the indirect association relationship between the user and the object
Relationship characteristic indicates;
The local feature for calculating the user indicates with relationship characteristic expression and value, and calculates described and value and institute
State the difference that the local feature of object indicates;
If the difference meets scheduled recommendation condition, the object recommendation is given to the user.
Optionally, in the generation that the local feature of user and the object indicates, the processor is prompted to:
It is indicated to generate affiliated partner character representation matrix according to the unique characteristics of each affiliated partner;
It is indicated to generate association user character representation matrix according to the unique characteristics of each association user;
Described be associated with pair is generated according to the affiliated partner character representation matrix and the association user character representation matrix
As the Harmonious Matrix with the association user;
It carries out the processing of row pondization respectively to the Harmonious Matrix and column pond handles to obtain the affiliated partner and the pass
It is combined the attention force vector at family;
It is user generation based on the attention force vector of the affiliated partner character representation matrix and the affiliated partner
Local feature indicates;
It is object generation based on the attention force vector of the association user character representation matrix and the association user
Local feature indicates.
Optionally, institute is being generated according to the affiliated partner character representation matrix and the association user character representation matrix
When stating the Harmonious Matrix of affiliated partner and the association user, the processor is prompted to:
Using the affiliated partner character representation matrix as input, the first nerves network model that use has been trained, which exports, to be become
Change affiliated partner matrix;
Using the association user character representation matrix as input, the nervus opticus network model that use has been trained, which exports, to be become
Change association user matrix;
The product for calculating the transformation affiliated partner matrix and the transformation association user matrix, obtains the collaboration square
Battle array.
It optionally, is described in the attention force vector based on the affiliated partner character representation matrix and the affiliated partner
When user generates local feature expression, the processor is prompted to:
The affiliated partner is paid attention into each element value in force vector as weighted value, respectively to the affiliated partner spy
Different affiliated partners are come from sign representing matrix but the identical element of dimension is weighted summation, to generate part for the user
Character representation;
The attention force vector based on the association user character representation matrix and the association user is the object
Generating local feature indicates, comprising:
The association user is paid attention into each element value in force vector as weighted value, respectively to the association user spy
Different association users are come from sign representing matrix but the identical element of dimension is weighted summation, to generate part for the object
Character representation.
Optionally, the user and described right is being generated according to the indirect association relationship between the user and the object
When relationship characteristic as between indicates, the processor is prompted to:
Several indirect reachable paths between the user and the object are obtained, the indirect reachable path passes through one
A or multiple nodes connect the user and the object, the Lian Bian on the indirect reachable path represent connected node it
Between have direct correlation relationship, the type of the node includes: user class node, object class node and non-user and non-object class
Node;
For every indirect reachable path, between indicating that generation is somebody's turn to do according to the unique characteristics of each node on the indirect reachable path
Connect the character representation of reachable path;
The character representation for merging every indirect reachable path, obtains the relationship characteristic table between the user and the object
Show.
Optionally, when obtaining several indirect reachable paths between the user and the object, the processor
It is prompted to:
Building includes the heterogeneous network of user class node, object class node and non-user and non-object class node, described
Lian Bian in heterogeneous network, which is represented, has direct correlation relationship between connected node;
Select the node of specified quantity at random from the heterogeneous network, and respectively from selected node, using with
The mode of machine migration carries out path extraction;
From the indirect reachable path obtained in the path extracted between the user and the object.
Optionally, it indicates to generate the indirect reachable path in the unique characteristics according to each node on the indirect reachable path
When character representation, the processor is prompted to:
The unique characteristics of each node on the indirect reachable path are indicated as input, between being somebody's turn to do using the output of LSTM model
Connect the character representation of reachable path.
Optionally, it in the character representation for merging every indirect reachable path, obtains between the user and the object
When relationship characteristic indicates, the processor is prompted to:
The weighted value of the indirect reachable path is determined according to the hop count of the indirect reachable path;
According to the weighted value, the character representation of every indirect reachable path is merged using average weighted mode, is obtained
Relationship characteristic between the user and the object indicates.
Optionally, the scheduled recommendation condition includes: that the difference is less than or equal to discrepancy threshold.
Corresponding with the embodiment of aforementioned object recommended method, this specification also provides a kind of computer-readable storage medium
Matter is stored with computer program on the computer readable storage medium, which performs the steps of when being executed by processor
For any user, according to there are the unique characteristics of the affiliated partner of direct correlation relationship to be expressed as with the user
The user generates local feature and indicates;
For any object, according to there are the unique characteristics of the association user of direct correlation relationship to be expressed as with the object
The object generates local feature and indicates;
It is generated between the user and the object according to the indirect association relationship between the user and the object
Relationship characteristic indicates;
The local feature for calculating the user indicates with relationship characteristic expression and value, and calculates described and value and institute
State the difference that the local feature of object indicates;
If the difference meets scheduled recommendation condition, the object recommendation is given to the user.
Optionally, the generating process that the local feature of the user and the object indicates, comprising:
It is indicated to generate affiliated partner character representation matrix according to the unique characteristics of each affiliated partner;
It is indicated to generate association user character representation matrix according to the unique characteristics of each association user;
Described be associated with pair is generated according to the affiliated partner character representation matrix and the association user character representation matrix
As the Harmonious Matrix with the association user;
It carries out the processing of row pondization respectively to the Harmonious Matrix and column pond handles to obtain the affiliated partner and the pass
It is combined the attention force vector at family;
It is user generation based on the attention force vector of the affiliated partner character representation matrix and the affiliated partner
Local feature indicates;
It is object generation based on the attention force vector of the association user character representation matrix and the association user
Local feature indicates.
Optionally, described to be generated according to the affiliated partner character representation matrix and the association user character representation matrix
The Harmonious Matrix of the affiliated partner and the association user, comprising:
Using the affiliated partner character representation matrix as input, the first nerves network model that use has been trained, which exports, to be become
Change affiliated partner matrix;
Using the association user character representation matrix as input, the nervus opticus network model that use has been trained, which exports, to be become
Change association user matrix;
The product for calculating the transformation affiliated partner matrix and the transformation association user matrix, obtains the collaboration square
Battle array.
Optionally, the attention force vector based on the affiliated partner character representation matrix and the affiliated partner is institute
It states user and generates local feature expression, comprising:
The affiliated partner is paid attention into each element value in force vector as weighted value, respectively to the affiliated partner spy
Different affiliated partners are come from sign representing matrix but the identical element of dimension is weighted summation, to generate part for the user
Character representation;
The attention force vector based on the association user character representation matrix and the association user is the object
Generating local feature indicates, comprising:
The association user is paid attention into each element value in force vector as weighted value, respectively to the association user spy
Different association users are come from sign representing matrix but the identical element of dimension is weighted summation, to generate part for the object
Character representation.
Optionally, the indirect association relationship according between the user and the object generates the user and described
Relationship characteristic between object indicates, comprising:
Several indirect reachable paths between the user and the object are obtained, the indirect reachable path passes through one
A or multiple nodes connect the user and the object, the Lian Bian on the indirect reachable path represent connected node it
Between have direct correlation relationship, the type of the node includes: user class node, object class node and non-user and non-object class
Node;
For every indirect reachable path, between indicating that generation is somebody's turn to do according to the unique characteristics of each node on the indirect reachable path
Connect the character representation of reachable path;
The character representation for merging every indirect reachable path, obtains the relationship characteristic table between the user and the object
Show.
Optionally, several indirect reachable paths obtained between the user and the object, comprising:
Building includes the heterogeneous network of user class node, object class node and non-user and non-object class node, described
Lian Bian in heterogeneous network, which is represented, has direct correlation relationship between connected node;
Select the node of specified quantity at random from the heterogeneous network, and respectively from selected node, using with
The mode of machine migration carries out path extraction;
From the indirect reachable path obtained in the path extracted between the user and the object.
Optionally, the unique characteristics according to each node on the indirect reachable path indicate to generate the indirect reachable path
Character representation, comprising:
The unique characteristics of each node on the indirect reachable path are indicated as input, between being somebody's turn to do using the output of LSTM model
Connect the character representation of reachable path.
Optionally, the character representation of every indirect reachable path of the fusion, obtains between the user and the object
Relationship characteristic indicate, comprising:
The weighted value of the indirect reachable path is determined according to the hop count of the indirect reachable path;
According to the weighted value, the character representation of every indirect reachable path is merged using average weighted mode, is obtained
Relationship characteristic between the user and the object indicates.
Optionally, the scheduled recommendation condition includes: that the difference is less than or equal to discrepancy threshold.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment
It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.
The foregoing is merely the preferred embodiments of this specification, all in this explanation not to limit this specification
Within the spirit and principle of book, any modification, equivalent substitution, improvement and etc. done should be included in the model of this specification protection
Within enclosing.