Information recommendation method, device, server and computer-readable storage medium
Technical field
The application is related to data analysis technique field, more particularly to information recommendation method, device, server and computer are deposited
Storage media.
Background technology
At present, commending system is widely used in multiple fields.For example, in shopping area, has history by analyzing user
Behavior, such as click on, collect or buy, analyze preference of the user to different commodity, and then precisely recommend to meet to user
One or more commodity of user preferences.
Proposed algorithm employed in commending system includes matrix disassembling method, and this method is broadly divided into two steps:(1)
Off-line model is trained:Historical data (as bought, is clicked on, the behavior such as scoring) according to behavior of the existing user to article, used
Matrix disassembling method, obtain representing real number vector of each user to the preference of article, and the real number vector of each article;
(2) on-line prediction:When user, which reaches the standard grade, needs to recommend article, the real number for calculating the user is vectorial vectorial with the real number of each article
Product, as scoring of the user to the article, article is sorted then according to scoring, finally scoring highest one or more
Individual article recommends user.
In practical application scene, the data volume of article to be recommended may be very huge, due to needing that real number vector is entered
Row product calculation is scored, it is also necessary to scoring is ranked up, on-line prediction process is very time-consuming, recommends less efficient.
The content of the invention
To overcome problem present in correlation technique, this application provides information recommendation method, device, server and calculating
Machine storage medium.
A kind of information recommendation method, K kind dimensions are preset, for the K aspect features of description information, methods described includes:
The preference coding for recommending targeted customer is obtained, the preference coding includes K preference value, n-th of preference value instruction
Whether the targeted customer has preference to the n-th aspect feature;Wherein, K is integer more than or equal to 1,0≤n≤K;
The feature coding of information to be recommended is obtained, the feature coding includes K characteristic value, and n-th of characteristic value indicates institute
State whether information to be recommended includes the n-th aspect feature;
Contrast whether n-th of preference value matches with n-th of characteristic value, according to the number to match, really
Whether the fixed information to be recommended recommends the targeted customer;Wherein, between the information to be recommended and the targeted customer
Matching degree be proportionate with the number to match.
Optionally, using preference value described in two kinds of character representations, described two characters are respectively used to indicate that the target is used
Whether family has preference to the n-th aspect feature;
Using characteristic value described in described two character representations, described two characters are respectively used to whether indicate information to be recommended
Include the n-th aspect feature.
Optionally, the preference coding of multiple users and the feature coding of information are predefined in the following way:
The sample data of scoring of multiple users to much information is obtained, user is built to information using the sample data
Rating matrix;
According to default object function, the rating matrix is decomposed into the preference vector of user and the characteristic vector of information
Product;
The preference for determining user using the preference vector encodes, and determines described information using the characteristic vector
Feature coding.
Optionally, the fit object of the object function includes:Preference value and the feature coding in the preference coding
The number that middle characteristic value matches is proportionate with scoring of the user to information.
Optionally, the object function is additionally operable to constrain the uniformity coefficient of each preference value in each preference coding,
And/or constrain the uniformity coefficient of each characteristic value in each feature coding.
Optionally, the object function includes:
Wherein, the L is object function, the RijFor user uiTo information vjScoring, the λ for it is default constraint join
Number, the K are the quantity of the dimension.
Optionally, whether contrast n-th of preference value matches with n-th of encoded radio, including:
Contrast n-th of preference value and whether n-th of encoded radio be identical.
Optionally, whether contrast n-th of preference value matches with n-th of characteristic value, according to the phase
The number matched somebody with somebody, determines whether the information to be recommended recommends the targeted customer, including:
It is whether identical with the feature coding to contrast the preference coding, if identical, the information recommendation to be recommended is given
The targeted customer.
A kind of information recommending apparatus, K kind dimensions are preset, for the K aspect features of description information, described device includes:
Preference encodes acquisition module, is used for:The preference coding for recommending targeted customer is obtained, the preference coding includes K
Preference value, n-th of preference value indicate whether the targeted customer has preference to the n-th aspect feature;Wherein, K is to be more than or wait
In 1 integer, 0≤n≤K;
Feature coding module, is used for:The feature coding of information to be recommended is obtained, the feature coding includes K characteristic value,
N-th of characteristic value indicates whether the information to be recommended includes the n-th aspect feature;
Recommending module, it is used for:Contrast whether n-th of preference value matches with n-th of characteristic value, according to the phase
The number of matching, determines whether the information to be recommended recommends the targeted customer;Wherein, the information to be recommended and described
Matching degree between targeted customer is proportionate with the number to match.
Optionally, using preference value described in two kinds of character representations, described two characters are respectively used to indicate that the target is used
Whether family has preference to the n-th aspect feature;
Using characteristic value described in described two character representations, described two characters are respectively used to whether indicate information to be recommended
Include the n-th aspect feature.
Optionally, in addition to determining module is encoded, be used for:
The sample data of scoring of multiple users to much information is obtained, user is built to information using the sample data
Rating matrix;
According to default object function, the rating matrix is decomposed into the preference vector of user and the characteristic vector of information
Product;
The preference for determining user using the preference vector encodes, and determines described information using the characteristic vector
Feature coding.
Optionally, the fit object of the object function includes:Preference value and the feature coding in the preference coding
The number that middle characteristic value matches is proportionate with scoring of the user to information.
Optionally, the object function is additionally operable to constrain the uniformity coefficient of each preference value in each preference coding,
And/or constrain the uniformity coefficient of each characteristic value in each feature coding.
Optionally, the object function includes:
Wherein, the L is object function, the RijFor user uiTo information vjScoring, the λ for it is default constraint join
Number, the K are the quantity of the dimension.
Optionally, the recommending module, is additionally operable to:
Contrast n-th of preference value and whether n-th of encoded radio be identical.
Optionally, the recommending module, is additionally operable to:
It is whether identical with the feature coding to contrast the preference coding, if identical, the information recommendation to be recommended is given
The targeted customer.
A kind of server, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Default K kind dimensions, the K aspect features for description information;
The preference coding for recommending targeted customer is obtained, the preference coding includes K preference value, n-th of preference value instruction
Whether the targeted customer has preference to the n-th aspect feature;Wherein, K is integer more than or equal to 1,0≤n≤K;
The feature coding of information to be recommended is obtained, the feature coding includes K characteristic value, and n-th of characteristic value indicates institute
State whether information to be recommended includes the n-th aspect feature;
Contrast whether n-th of preference value matches with n-th of characteristic value, according to the number to match, really
Whether the fixed information to be recommended recommends the targeted customer;Wherein, between the information to be recommended and the targeted customer
Matching degree be proportionate with the number to match.
A kind of computer-readable storage medium, have program stored therein in the storage medium instruction, and described program instruction includes:
Default K kind dimensions, the K aspect features for description information;
The preference coding for recommending targeted customer is obtained, the preference coding includes K preference value, n-th of preference value instruction
Whether the targeted customer has preference to the n-th aspect feature;Wherein, K is integer more than or equal to 1,0≤n≤K;
The feature coding of information to be recommended is obtained, the feature coding includes K characteristic value, and n-th of characteristic value indicates institute
State whether information to be recommended includes the n-th aspect feature;
Contrast whether n-th of preference value matches with n-th of characteristic value, according to the number to match, really
Whether the fixed information to be recommended recommends the targeted customer;Wherein, between the information to be recommended and the targeted customer
Matching degree be proportionate with the number to match.
The technical scheme that embodiments herein provides can include the following benefits:
The embodiment of the present application need not carry out real number vector product computing, it is only necessary to carry out the encoded radio and feature of each dimension
The matching of value, the number to be matched with preference value and characteristic value weigh the matching degree between information to be recommended and targeted customer,
Because the present embodiment only needs to carry out the contrast of encoded radio and characteristic value, therefore operand is relatively low, and information recommendation efficiency is higher.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not
The application can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the application
Example, and be used to together with specification to explain the principle of the application.
Figure 1A is a kind of schematic diagram of matrix decomposition of the application according to an exemplary embodiment.
Figure 1B is a kind of application scenario diagram of information recommendation method of the application according to an exemplary embodiment.
Fig. 1 C are a kind of flow charts of information recommendation method of the application according to an exemplary embodiment.
Fig. 1 D are the flow charts of another information recommendation method of the application according to an exemplary embodiment.
Fig. 2 is a kind of hardware structure diagram of server where the application information recommending apparatus.
Fig. 3 is a kind of block diagram of information recommending apparatus of the application according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended
The example of the consistent apparatus and method of some aspects be described in detail in claims, the application.
It is only merely for the purpose of description specific embodiment in term used in this application, and is not intended to be limiting the application.
" one kind " of singulative used in the application and appended claims, " described " and "the" are also intended to including majority
Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wrapped
Containing the associated list items purpose of one or more, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application
A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, do not departing from
In the case of the application scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as
One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determining ".
Commending system is now widely used for most e-commerce system, social networks, advertisement recommends or search is drawn
To hold up etc., the commending system, which is used to entering row information (Item, in some instances alternatively referred to as article) to user (User), to be recommended,
Information herein can include physical item, clothes, knapsack or mobile phone under such as ecommerce scene, can also include it
His non-physical article, such as user, the video entry under video website scene or the money under Domestic News scene under social scene
Interrogate information etc..For example, user such as clicks on, evaluates, buys or downloaded, can represent to the historical behavior of article
For user to the preference of the article, the preference can map the scoring to the article as user, and scoring scope can be with
Including [0,1], [0,5], [- 1,1] etc..
Assuming that in commending system, user's set has 6 users, i.e. U={ u1, u2, u3, u4, u5, u6 }, and article set has 7
Individual article, i.e. V={ v1, v2, v3, v4, v5, v6, v7 }, scoring collection of the user to article are combined into matrix R, and user is commented article
Point scope is [0,5].Shown in R tables 1 specific as follows:
Table 1
In table 1, R represents scorings of user's set U to article set V, each element R wherein in matrixijRepresent user
uiTo article vjScoring.Meanwhile use UiAnd VjRepresent user uiWith article vjPreference.Only have sub-fraction to comment in rating matrix
Point it is known, the target of commending system is exactly to predict unknown scoring therein, i.e., symbol in table 1 "" correspondence position score value.
Commending system is based on such a hypothesis:Marking of the user to article is higher, shows that user more likes.Therefore, user is predicted
After scoring to the article that do not score, sorted according to score value size, the high article of score value is recommended user.
Specifically, the scoring for how to predict the article that do not score, matrix disassembling method is used in some correlation techniques
It is predicted.Matrix decomposition learns the potential preference of user and article by being fitted existing user to the scoring of article.
The mathematical theory basis of matrix decomposition algorithm is the row-column transform of matrix.It is appreciated that matrix A carries out line translation phase
When in one matrix of A premultiplications, matrix A, which enters row-column transform and is equivalent to the matrix A right side, multiplies a matrix, therefore matrix A can be expressed as A
=PEQ=PQ (E is canonical matrix).Matrix decomposition target be exactly the rating matrix R of user-article resolve into user vector and
The form of article multiplication of vectors, i.e. R=UV, R is n × m here, and n=6 in table 1, m=7, U are n × K, and V is K × m, and K refers to set
Fixed k dimension for being used to evaluate article.
It is appreciated that user vector and article vector that rating matrix R is decomposited can have a variety of possibility.Such as Figure 1A institutes
Show, be a kind of schematic diagram of matrix decomposition of the application according to an example embodiment, 4 user U1 are included in Figure 1A extremely
Scorings of the U4 to 5 article S1 to S5, some of which scoring is unknown, and the score data can record with a matrix type,
In Figure 1A by taking 2 dimensions as an example, two matrixes have been decomposited, have obtained the user vector and article vector of each user.
For example, the user vector of user 1 is:The user vector of u1=(0.8,0.6) user 2 be u2=(0.9,
0.1)
The article vector of article 1 is:The article vector of s1=(1.0,1.0) article 2 is s2=(0.2,1.0)
It is appreciated that scoring 1.4 of the known user 1 to article 1, has resolved into u1 and s1 product.And unknown use
Scoring of the family 1 to article 2, obtained by u1 and s2 product.
, can essentially by a user decomposites the user vector come and article vector to the rating matrix of article
There are a variety of possibilities, how to decomposite suitable vector, it is necessary to set suitable object function, tied using object function to decomposing
Fruit optimizes (the methods of least square method or gradient decline), it is hereby achieved that suitable user vector and article vector.
In matrix decomposition method, Gauss point can be obeyed based on the difference between true scoring of the user to article and prediction scoring
This fit object of cloth, sets target function:
Wherein, L is object function, and Section 1 represents fit object in object function:True scoring of the user to article and
Difference between prediction scoring;Section 2 is the regularization term in order to prevent over-fitting and introduce.
After object function is determined, least square method or stochastic gradient descent method scheduling algorithm can be used to carry out result
Optimization, the user vector of all users and the article vector of all items are obtained, and then predict and obtain unknown user to article
Scoring.Using matrix disassembling method, can obtain representing real number vector of each user to the preference of article, and each thing
The real number vector of product.For example, it is assumed that K is 3, the obtained real number vector U of some user is decomposediFor [- 0.23,0.89,0.22],
The real number vector V of articlejFor [- 0.03,0.56, -0.12].
The data obtained for above-mentioned solution, in correlation technique user reach the standard grade need to recommend article when, calculating first should
The real number of user is vectorial with the real number vector product of each article, as scoring of the user to the article, then according to scoring
Article is sorted, scoring highest one or more article is finally recommended user.
In practical application scene, the data volume of article to be recommended may be very huge, due to needing that real number vector is entered
Row product calculation is scored, it is also necessary to scoring is ranked up, on-line prediction process is very time-consuming, recommends less efficient.And
Real number vector product computing need not be carried out in the embodiment of the present application, it is only necessary to carry out the encoded radio of each dimension and of characteristic value
Match somebody with somebody, the number to be matched with preference value and characteristic value weighs the matching degree between information to be recommended and targeted customer, due to this
Embodiment only needs to carry out the contrast of encoded radio and characteristic value, therefore operand is relatively low, and information recommendation efficiency is higher.Next it is right
The embodiment of the present application is described in detail.
As shown in Figure 1B, Figure 1B is a kind of application of item recommendation method of the application according to an exemplary embodiment
Scene graph, Figure 1B include:One be used for carry out learning training server, one be used for recommended online server, several
User, and the electronic equipment of each user (can include smart mobile phone, tablet personal computer, personal computer or individual digital to help
Reason etc.).
It is appreciated that the number of the electronic equipment and server in Figure 1B is only schematical., can according to needs are realized
With with any number of electronic equipment, and with the server cluster or cloud service platform being made up of multiple servers.Separately
Outside, Figure 1B learnings are trained and the process recommended online is performed by different servers respectively, according to realizing needs, learning training
The process recommended online can also be performed by same server.
As shown in Figure 1 C, Fig. 1 C are a kind of flows of item recommendation method of the application according to an exemplary embodiment
Figure, this method can be performed by service end, carry out information recommendation to user when needed.Information described in the present embodiment can include
Polytype information, for example, in net purchase scene, information can include as clothes, digital product, travelling products, books or
Household electrical appliances etc.;In music portal's scene, information can refer to music, song list or singer etc.;In social scene, information can be with
Refer to some user, some tissue etc.;In cuisines service platform, information can refer to dining room.
In the present embodiment, for information, K kind dimensions are preset, for the K aspect features of description information, methods described includes
Following steps:
In a step 101, the preference coding for recommending targeted customer is obtained, the preference, which encodes, includes K preference value, and n-th
Individual preference value indicates whether the targeted customer has preference to the n-th aspect feature;Wherein, K is integer more than or equal to 1,0
≤n≤K。
In step 103, the feature coding of information to be recommended is obtained, the feature coding includes K characteristic value, n-th
Characteristic value indicates whether the information to be recommended includes the n-th aspect feature.
In step 105, contrast whether n-th of preference value matches with n-th of characteristic value, according to the phase
The number matched somebody with somebody, determines whether the information to be recommended recommends the targeted customer;Wherein, the information to be recommended and the mesh
Matching degree between mark user is proportionate with the number to match.
According to existing user preference data in correlation technique, user is obtained in each dimension using matrix disassembling method
Preference, and the correlation degree of each information and the dimension.For example, the real number vector U of some useriFor [- 0.23,
0.89,0.22], represent in 3 dimensions of setting, the preference of user is respectively -0.23,0.89 and 0.22.Information
Real number vector VjFor [- 0.03,0.56, -0.12], represent in 3 dimensions of setting, the information and each dimension associate point
Wei -0.03,0.56 and -0.12.Correlation technique is got over the product of multiplication of vectors as scoring of the user to the article, scoring
Height, represent that the article more meets user preference.
In view of the computation complexity of multiplication of vectors, the present embodiment is from the angle scaling information of the dimension number to match
It is no to meet user preference.Specifically, for the code of points set, such as in [- 1,1], 1 expression preference highest, -1
Represent that preference is minimum, it is assumed that in some dimension, the preference of user more matches with the correlation degree of article, then it represents that
The information meets user preference in the dimension.For example, the real number vector U of useriFor [- 0.03,0.18,0.32], information
Real number vector VjFor [- 0.04,0.19, -0.12], it will be understood that in 3 dimensions, first dimension, -0.03 and -0.04
Difference is smaller, and the information more meets user preference in the dimension;Similarly, second dimension is also such.In the 3rd dimension
Degree, 0.32 is larger with -0.12 difference, and the information does not meet user preference in the dimension.
Therefore, when the dimension of description information different characteristic is more, it is assumed that the preference value and information of user in each dimension
Characteristic value it is more similar, i.e., the information has matches compared with various dimensions and user preference, and the information meets the possibility of the preference of user
Property is bigger.Assuming that information has many dimensions to be mismatched with user preference, the information may not meet the preference of user.
Based on above-mentioned analysis, in the present embodiment when finding the recommendation information of user, not by the way of multiplication of vectors, and
It is by the way of whether the encoded radio and characteristic value for determining each dimension match.Wherein, preference is carried out using encoded radio
Represent, correlation degree is indicated using characteristic value, and specific representation can use numeral or character etc. to be indicated, and it takes
Value or span can also determine according to being actually needed.
Wherein, the encoded radio of each dimension is used for whether instruction user to have preference, Mei Gewei to information in the dimension
The characteristic value of degree is used to indicate that the information associates with whether the dimension has, and in some examples, is required according to the calculating of reality,
Encoded radio and characteristic value more can subtly portray specific preference and correlation degree, for example, [0,1], [0,3] or [-
1,1].In other examples, preference encoded radio and article code value can also be two kinds of values, and a kind of value represents user
Preference or article have association, and another value represents that preference or article do not have association to user.Can root in practical application
According to flexible configuration is needed, the present embodiment is not construed as limiting to this.
In the embodiment of the present application, service end can obtain the preference coding of multiple users, and the spy of multiple information in advance
Assemble-publish code.When needing to recommend some information to targeted customer, from the preference coding of the multiple users obtained in advance, find
The preference coding of the targeted customer, then, from the feature coding of the multiple information obtained in advance, the mesh can be recommended by finding out
Mark the information of user.
Because matrix decomposition target is that the rating matrix R of user-article is resolved into user vector U and information vector V phases
The form multiplied, i.e. R=UV, specifically, the U and V dimension number K that are decomposited, can according to the needs in practical application and
Flexible configuration, and each dimension can be with a kind of implicit, without physical meaning feature in corresponding informance.
The preference of user encodes and the feature coding of information, can be obtained in several ways in practical application.One
Plant in optional implementation, can determine user using the user vector and information vector that commending system is stored
Preference encodes and the feature coding of information, under such a mode, in some instances, can be by user vector directly as with
The preference at family encodes, and each element is as preference value in user vector;By information vector directly as feature coding, characteristic vector
In each element as characteristic value.When whether n-th of preference value of subsequent contrast matches with n-th of characteristic value, Ke Yishe
Some fixed matching standards, such as both preference value and encoded radio difference are less than some threshold value, then it is assumed that both match.At other
,, can in order to improve matching speed because the numerical value of each element in user vector and information vector may be more fine in example
After the numerical value of each element in user vector and information vector is converted into other characters (can be letter or number etc.)
As preference value and characteristic value, so as to which when contrasting preference value and characteristic value, contrast difficulty can be reduced, improve and recommend efficiency.
In practical application, preference value described in two kinds of character representations can also be used, is encoded for the preference of user, described two
Kind character is respectively used to indicate whether the targeted customer has preference to the n-th aspect feature;Using described two characters
The characteristic value is represented, for the feature coding of information, described two characters are respectively used to indicate whether information to be recommended includes
The n-th aspect feature.The concrete form of above two character can flexible configuration as needed, for example with 0 and 1, A and
B, -1 and 1 etc..It is ageing higher when searching recommendation information using such a mode.For example, two kinds of characters of use point
Not Wei 1 and -1, dimension K be 30, article has 10,000, and the preference of user is encoded to [- 1,1,1,1, -1,1, -1 ... ...], is looking into
When looking for recommendation article, the article that first dimension is -1 can be filtered out first, then in the article code of 10,000 articles
The article that second dimension is 1 is further filtered out in the article searched, by that analogy.
In practical application, in some examples, it is all identical to set encoded radio and the characteristic value of all dimensions, that is, thinks this
Article is the recommendation article of user;In other examples, the number that can also set identical dimensional reaches certain proportion, you can should
Article is the recommendation article of user.
As can be seen here, using aforesaid way, when judging whether encoded radio matches with characteristic value, it is only necessary to encoded radio with
Characteristic value is contrasted, therefore it is very high to significantly improve article advisory speed, article recommendation efficiency.
As an example it is assumed that representing scoring using [- 1,1] in matrix disassembling method, less than 0 scoring represents user at this
Dimension represents that user has preference, letter in the dimension in the dimension without preference, information without association, more than 0 scoring
Breath has association in the dimension.It is indicated using -1 and 1 two kind of character, if user vector UiFor [- 0.23,0.89,0.22],
Information vector VjFor [- 0.03,0.56, -0.12], subscriber-coded U can be correspondingly converted intoi[- 1,1,1], information coding Vj[-
1,1, -1], then it can quickly determine whether both match subsequently when contrasting preference value and characteristic value.
In other optional implementations, it can also be and prepare sample data in advance, use is trained using sample data
The preference coding at family and the feature coding of information.Next the process is described in detail, in the present embodiment, can passed through
Following manner predefines the preference coding of multiple users and the feature coding of information:
The sample data of scoring of multiple users to much information is obtained, user is built to information using the sample data
Rating matrix;
According to default object function, the rating matrix is decomposed into the preference vector of user and the characteristic vector of information
Product;
The preference for determining user using the preference vector encodes, and determines described information using the characteristic vector
Feature coding.
From Such analysis, in the present embodiment, it is contemplated that encoded radio is more similar to characteristic value in each dimension, i.e. information
There are a greater number of dimensions to match with user preference, then user gets over preference to information, and scoring of the user to the information is then higher.
Based on this, the fit object of the object function in the present embodiment includes:Preference value and the feature coding in the preference coding
The number that middle characteristic value matches is proportionate with scoring of the user to information.
After acquisition has sample data, and determination object function, the present embodiment can use stochastic gradient descent algorithm
Deng optimization method, so as to which the feature coding of the preference of each user coding and each described information be calculated.
When encoded radio and characteristic value use two kinds of character representations, in order to prevent over-fitting, the object function is additionally operable to about
The uniformity coefficient of each preference value in each preference coding of beam, and/or each feature in each feature coding of constraint
The uniformity coefficient of value.
In an optional implementation, the object function includes:
Wherein, the L is object function, the RijFor user uiTo information vjScoring, the λ for it is default constraint join
Number, the K are the quantity of the dimension.
Next scheme provided herein is illustrated by an embodiment again.
As shown in figure iD, be the schematic diagram of another information recommendation method, can be prepared in advance in the present embodiment including with
Scoring sample data of the family to information, because data volume is larger, data fragmentation technology can be used, by existing sample data point
Into several pieces, burst rule is determined by the machine quantity of reality.
The scheme of the present embodiment, the preference coding of user and the feature coding of information, encoded radio setting can be obtained first
For -1 and 1, i.e. Ui,Vj∈{-1,1}K.In training, user is caused also should the higher information that score, both codings
It is more similar, i.e.,
Wherein, Section 1 constrains scoring and the relation of coding similarity, that is, scores higher, and encoded radio should with characteristic value
It is more similar.Section 2 controls the uniformity coefficient of coding, that is, -1 and 1 ratio should be identical as far as possible in encoding.Parameter lambda control
The degree of restraint is made, λ is bigger, and the constraint is stronger.Two-step method can be used by solving the object function:The first step, solution is loosened
To real number field [- 1,1], reuse the distributed random gradient descent method based on parameter server and solve to obtain the real number of user
The real number vector of vector sum information;Second step, real number DUAL PROBLEMS OF VECTOR MAPPING is gone back into { -1,1 }, that is to say, when certain number is more than 0 by it
1 is set to, otherwise is set to -1.
After obtaining the preference coding of user and the feature coding of information, it will be understood that each user is corresponding with preference coding,
Each information is corresponding with feature coding, and therefore, the preference coding of user and the feature coding of information can also use Hash to store
Mode.When needing to user's recommendation information, the method that Hash table search can be used, from being stored with multiple letters to be recommended
The information of matching user preference is directly found out in Hash table.Assuming that dimension is 3, the preference of certain user is encoded to [- 1,1,1],
There are 3 information, information A feature coding is [- 1,1,1], and information B feature coding is [- 1, -1,1], and information C feature is compiled
Code is [1,1, -1].During on-line prediction, the information (i.e. A) most like with the user can be searched from the Hash table of information and recommended
He.Because the present embodiment need not use real number vector to calculate scoring, it is not required that sequence, but the lookup encoded, because
This time complexity is relatively low, and search efficiency is very high.In addition, coding greatly reduces data space, also, can also make
For the additional features of the models such as PSLR (peak side lobe ratio, peak sidelobe ratio).
It is corresponding with the embodiment that aforementioned information recommends method, present invention also provides information recommending apparatus and its applied
Server embodiment.
The embodiment of the application information recommending apparatus can be applied in server.Device embodiment can be real by software
It is existing, it can also be realized by way of hardware or software and hardware combining.Exemplified by implemented in software, as on a logical meaning
Device, it is to be read corresponding computer program instructions in nonvolatile memory by the processor of information recommending apparatus where it
Get what operation in internal memory was formed.For hardware view, as shown in Fig. 2 the server where the application information recommending apparatus
A kind of hardware structure diagram, except the processor 210 shown in Fig. 2, internal memory 230, network interface 220 and non-volatile memories
Outside device 240, the server in embodiment where device 231, generally according to the actual functional capability of the server, it can also be included
His hardware, is repeated no more to this.
As shown in figure 3, Fig. 3 is a kind of block diagram of information recommending apparatus of the application according to an exemplary embodiment,
Default K kind dimensions, for the K aspect features of description information, described device includes:
Preference encodes acquisition module 31, is used for:The preference coding for recommending targeted customer is obtained, the preference coding includes K
Individual preference value, n-th of preference value indicate whether the targeted customer has preference to the n-th aspect feature;Wherein, K to be more than or
Integer equal to 1,0≤n≤K;
Feature coding module 32, is used for:The feature coding of information to be recommended is obtained, the feature coding includes K feature
Value, n-th of characteristic value indicate whether the information to be recommended includes the n-th aspect feature;
Recommending module 33, is used for:Contrast whether n-th of preference value matches with n-th of characteristic value, according to described
The number to match, determines whether the information to be recommended recommends the targeted customer;Wherein, the information to be recommended and institute
The matching degree stated between targeted customer is proportionate with the number to match.
Optionally, using preference value described in two kinds of character representations, described two characters are respectively used to indicate that the target is used
Whether family has preference to the n-th aspect feature;
Using encoded radio described in described two character representations, described two characters are respectively used to whether indicate information to be recommended
Include the n-th aspect feature.
Optionally, in addition to determining module is encoded, be used for:
The sample data of scoring of multiple users to much information is obtained, user is built to information using the sample data
Rating matrix;
According to default object function, the rating matrix is decomposed into the preference vector of user and the characteristic vector of information
Product;
The preference for determining user using the preference vector encodes, and determines described information using the characteristic vector
Feature coding.
Optionally, the fit object of the object function includes:Preference value and the feature coding in the preference coding
The number that middle characteristic value matches is proportionate with scoring of the user to information.
Optionally, the object function is additionally operable to constrain the uniformity coefficient of each preference value in each preference coding,
And/or constrain the uniformity coefficient of each characteristic value in each feature coding.
Optionally, the object function includes:
Wherein, the L is object function, the RijFor user uiTo information vjScoring, the λ for it is default constraint join
Number, the K are the quantity of the dimension.
Optionally, the recommending module, is additionally operable to:
Contrast n-th of preference value and whether n-th of encoded radio be identical.
Optionally, the recommending module, is additionally operable to:
It is whether identical with the feature coding to contrast the preference coding, if identical, the information recommendation to be recommended is given
The targeted customer.
The function of modules and the implementation process of effect specifically refer to and step are corresponded in the above method in said apparatus
Implementation process, it will not be repeated here.
A kind of server, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Default K kind dimensions, the K aspect features for description information;
The preference coding for recommending targeted customer is obtained, the preference coding includes K preference value, n-th of preference value instruction
Whether the targeted customer has preference to the n-th aspect feature;Wherein, K is integer more than or equal to 1,0≤n≤K;
The feature coding of information to be recommended is obtained, the feature coding includes K characteristic value, and n-th of characteristic value indicates institute
State whether information to be recommended includes the n-th aspect feature;
Contrast whether n-th of preference value matches with n-th of characteristic value, according to the number to match, really
Whether the fixed information to be recommended recommends the targeted customer;Wherein, between the information to be recommended and the targeted customer
Matching degree be proportionate with the number to match.
A kind of computer-readable storage medium, have program stored therein in the storage medium instruction, and described program instruction includes:
Default K kind dimensions, the K aspect features for description information;
The preference coding for recommending targeted customer is obtained, the preference coding includes K preference value, n-th of preference value instruction
Whether the targeted customer has preference to the n-th aspect feature;Wherein, K is integer more than or equal to 1,0≤n≤K;
The feature coding of information to be recommended is obtained, the feature coding includes K characteristic value, and n-th of characteristic value indicates institute
State whether information to be recommended includes the n-th aspect feature;
Contrast whether n-th of preference value matches with n-th of characteristic value, according to the number to match, really
Whether the fixed information to be recommended recommends the targeted customer;Wherein, between the information to be recommended and the targeted customer
Matching degree be proportionate with the number to match.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is real referring to method
Apply the part explanation of example.Device embodiment described above is only schematical, wherein described be used as separating component
The module of explanation can be or may not be physically separate, can be as the part that module is shown or can also
It is not physical module, you can with positioned at a place, or can also be distributed on multiple mixed-media network modules mixed-medias.Can be according to reality
Need to select some or all of module therein to realize the purpose of application scheme.Those of ordinary skill in the art are not paying
In the case of going out creative work, you can to understand and implement.
The embodiment of the present application can use the storage medium for wherein including program code in one or more (including but unlimited
In magnetic disk storage, CD-ROM, optical memory etc.) on the form of computer program product implemented.Computer can use storage
Medium includes permanent and non-permanent, removable and non-removable media, can realize information by any method or technique
Storage.Information can be computer-readable instruction, data structure, the module of program or other data.The storage medium of computer
Example include but is not limited to:Phase transition internal memory (PRAM), static RAM (SRAM), dynamic random access memory
(DRAM), other kinds of random access memory (RAM), read-only storage (ROM), Electrically Erasable Read Only Memory
(EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), digital versatile disc
(DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus or any other non-biography
Defeated medium, the information that can be accessed by a computing device available for storage.
Those skilled in the art will readily occur to the application its after considering specification and putting into practice the invention applied here
Its embodiment.The application is intended to any modification, purposes or the adaptations of the application, these modifications, purposes or
Person's adaptations follow the general principle of the application and the common knowledge in the art do not applied including the application
Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the application and spirit are by following
Claim is pointed out.
It should be appreciated that the precision architecture that the application is not limited to be described above and is shown in the drawings, and
And various modifications and changes can be being carried out without departing from the scope.Scope of the present application is only limited by appended claim.
The preferred embodiment of the application is the foregoing is only, not limiting the application, all essences in the application
God any modification, equivalent substitution and improvements done etc., should be included within the scope of the application protection with principle.