Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with drawings and Examples.
As shown in Figure 1, a kind of book recommendation method of the present invention includes:
Steps A, the author according to books, reclassify, level Four classification and universal tag, the book labels of every books vector in the design of graphics stack room;
Step B, according to all author, reclassify, level Four classification, universal tag and corresponding weighted values respectively thereof of degree of depth read books in user's the books reading record, set up each user's text label vector;
Step C, according to author in the book labels vector of books, reclassify, level Four classification, universal tag corresponding weighted value in user's text label vector respectively, all books are corresponding to every user's label score in the calculating chart stack room;
All books are corresponding to every user's label score in step D, the comparison diagram stack room, and according to user's books reading record filtering user read books, some the books that the label score is the highest are recommended to described user at last.
In Fig. 1 steps A, the book labels of every books vector:
=<
,
,
,
.Wherein,
The book labels vector of these books of i in the Library,
The author of these books of i,
The reclassify of these books of i,
Be the level Four classification of these books of i, because may there be a plurality of universal tags in every books, described a plurality of universal tags consisted of the universal tag vector representation,
It is the universal tag vector of these books of i.
Books have the essential informations such as author, reclassify, level Four classification, universal tag.Wherein, reclassify and level Four classification are to be specified according to classifying rules and the book content of books platform by editor, and universal tag is the keyword that can be represented the books content characteristic by editor according to every selected part of book content.Take books " clothes made of brocade is extremely bright " as example, its author is " Latin sea 13 youths ", reclassify is " history ", and level Four is categorized as sky, and universal tag is " play the part of pig and eat tiger ", " change ", " vengeance ", " refreshing literary composition ", " iron blood ", " the little text of an annotated book ", " conspiracy ", " unit is bright ".
Among Fig. 1 step B, each user's text label vector:
, wherein,
J position user's text label vector,
Be j position user all the author vector that consists of of the author of degree of depth read books (for example:
=<residence pig, vast stretch of wooded country listens great waves, heptan is new, Latin sea 11 youths 〉),
Be corresponding to
In author's weight vectors of consisting of of each author's weighted value;
Be j position user all the reclassify vector that consists of of the reclassify of degree of depth read books (for example:
=<history, celestial chivalrous, fantasy, officialdom, military affairs, sports 〉),
Be corresponding to
In the reclassify weight vectors that consists of of the weighted value of each reclassify;
Be j position user all the level Four class vector that consists of of the level Four classification of degree of depth read books (for example:
=<classic is celestial chivalrous, the The Romance of the Three Kingdoms, the illusion of celestial road 〉),
Be corresponding to
In the level Four classification weight vectors that consists of of the weighted value of each level Four classification;
Be j position user all the universal tag vector that consists of of the universal tag of degree of depth read books (for example:
=<old the text of an annotated book, upgrading stream is played the part of pig and is eaten tiger, non-human is made laughs, fat person, the stream of living again 〉),
Be corresponding to
In the universal tag weight vectors that consists of of the weighted value of each universal tag.
Among the described step B, parameter in each user's the text label vector can be carried out analytical calculation based on the books degree of depth browing record of user within recently a period of time (such as 6 months), namely at first pick out the books reading record in nearest a period of time of user, and according to the criterion that the books degree of depth is read, from the books reading record of picking out, further filter out user's books degree of depth browing record.Dissimilar according to books, the criterion that can adopt the different books degree of depth to read.For example, the degree of depth read books (wherein, reading the degree of depth=reading chapters and sections number/general rules joint number) that one of meets the following conditions and to be the user:
A. books general rules joint number<=10, (reading chapters and sections number-free chapters and sections number)〉0, nearly 6 month to dates read the degree of depth=70%;
B. books general rules joint number〉10, (reading chapters and sections number-free chapters and sections number) 0, nearly 6 month to dates read the degree of depth=40%;
C. publish in instalments books general rules joint number〉184, (reading chapters and sections number-free chapters and sections number) 0, nearly 6 month to dates read the chapters and sections number=74.
It is worth mentioning that,
In weighted value with
In the author be one to one, for example:
=<residence pig, vast stretch of wooded country listens great waves, and heptan is new, Latin sea 11 youths ...,
=<0.11,0.21,0.29,0.18 ..., represent that then weighted value corresponding to author " residence pig " is 0.11, weighted value corresponding to author's " vast stretch of wooded country listens great waves " is 0.21, and weighted value corresponding to author's " heptan is new " is 0.29, and weighted value corresponding to author " Latin sea 11 youths " is 0.18.Equally,
In weighted value with
In reclassify,
In weighted value with
In level Four classification,
In weighted value with
In universal tag homogeneous one correspondence.
Further,
,
,
Or
In weighted value can calculate according to the frequency that the corresponding author of this weighted value, reclassify, level Four classification or universal tag occur in j position user degree of depth read books, namely in j position user degree of depth read books, the author that this weighted value is corresponding, reclassify, level Four are classified or the frequency of universal tag appearance and the ratio of the total degree that all authors, reclassify, level Four classification or universal tag occur.
Among Fig. 1 step C, all books are corresponding to every user's label score in the Library:
, wherein,
Be these books of i for j position user's label score,
The weighted value of reclassify correspondence in j position user's text label vector of these books of i,
That the level Four of these books of i is sorted in corresponding weighted value in j position user's the text label vector,
The author of these books of i corresponding weighted value in j position user's text label vector, because that the universal tag of these books of i may have is a plurality of,
The weighted value sum of all universal tags correspondence in j position user's text label vector of these books of i,
Be respectively the recommendation weight of reclassify, level Four classification, author, universal tag vector, its value can be rule of thumb definite by the technician, for example:
As shown in Figure 2, calculate these books of i among Fig. 1 step C corresponding to j position user's label score, can further include:
Author in the book labels vector of step C1, these books of judgement i
Empty? if not, then extract the author
, continue next step; If so, then
=0, turn to step C3.
Step C2, judge all author's vectors of degree of depth read books of j position user
In whether have described author
If so, then
It is author's weight vectors
In with described author
Corresponding weighted value continues next step; If not, then
=0, continue next step.
Because
In the author with
In weighted value corresponding one by one, namely
The ordering of middle weighted value with
Middle author's ordering is identical, therefore can exist by the author
In ordering, find
In the weighted value corresponding with described author.
Reclassify in the book labels vector of step C3, these books of judgement i
Empty? if not, then extract reclassify
, continue next step; If so, then
=0, turn to step C5.
Step C4, judge all reclassify vectors of degree of depth read books of j position user
In whether have described reclassify
If so, then
It is the reclassify weight vectors
In with described reclassify
Corresponding weighted value continues next step; If not, then
=0, continue next step.
Level Four classification in the book labels vector of step C5, these books of judgement i
Empty? if not, then extract the level Four classification
, continue next step; If so, then
=0, turn to step C7.
Step C6, judge all level Four class vectors of degree of depth read books of j position user
In whether have the classification of described level Four
If so, then
It is level Four classification weight vectors
In with the classification of described level Four
Corresponding weighted value continues next step; If not, then
=0, continue next step.
Universal tag vector in the book labels vector of step C7, these books of judgement i
Empty? if not, then extract the universal tag vector
, continue next step; If so, then
=0, this flow process finishes.
Step C8, extract the universal tag vector one by one
In each universal tag, and judge successively all universal tag vectors of degree of depth read books of j position user
In whether have described universal tag, if exist, then from the universal tag weight vectors
In obtain the weighted value corresponding with described universal tag, last
It is the universal tag vector
In all universal tags at the universal tag weight vectors
In corresponding weighted value sum.For example, universal tag vector
=
,
...,
, wherein
,
...,
It is the universal tag vector
The universal tag that comprises, m are the universal tag vectors
Universal tag sum, then
,
It is the universal tag weight vectors
In with universal tag
Corresponding weighted value.
Can also adopt multiple allotment strategy among the present invention, to the recommendation weight of reclassify, level Four classification, author, universal tag vector
Value be optimized adjustment, described allotment strategy includes: according to the click effect of user to Recommended Books, distinguish the different time period (such as working day and weekend), or for different users or customer group different values is set.
Clearer for what set forth, the below is further explained in detail the present invention as an example of the label score computation process of books " clothes made of brocade kills the people " example:
1, makes up the book labels vector of books " clothes made of brocade kills the people "
=<
,
,
,
, author wherein
=Latin sea 11 youths, reclassify
=history, the level Four classification
Be sky, the universal tag vector
=<play the part of, pig ate tiger, and change is revenged, refreshing literary composition, and iron blood, the little text of an annotated book, conspiracy, unit is bright 〉;
2, according to certain user's books reading record, set up this user's text label vector
Wherein,
Table 1 shows this user all author, author's frequency of occurrence and frequencies of degree of depth read books:
Table 1
The author | Author's frequency of occurrence | Author's frequency of occurrences |
The residence pig | 2 | 2/48=0.041667 |
Vast stretch of wooded country listens great waves | 2 | 2/48=0.041667 |
Heptan is new | 2 | 2/48=0.041667 |
Latin sea 11 youths | 1 | 1/48=0.020833 |
… | … | … |
Draw all author vectors of degree of depth read books of this user from table 1
=<residence pig, vast stretch of wooded country listens great waves, and heptan is new, Latin sea 11 youths ..., author's weight vectors
=<0.041667,0.041667,0.041667,0.020833 ....
Table 2 shows this user all reclassify, reclassify frequency of occurrence and frequencies of degree of depth read books:
Table 2
Reclassify | The reclassify frequency of occurrence | The reclassify frequency of occurrences |
Historical | 22 | 22/48=0.458333 |
Celestial chivalrous | 21 | 21/48=0.4375 |
Fantasy | 2 | 2/48=0.041667 |
Officialdom | 1 | 1/48=0.020833 |
Military | 1 | 0.020833 |
Sports | 1 | 0.020833 |
Draw all reclassify vectors of degree of depth read books of this user from table 2
=<history, celestial chivalrous, fantasy, officialdom, military affairs, sports 〉, the reclassify weight vectors
=<0.458333,0.4375,0.041667,0.020833,0.020833,0.020833 〉.
Table 3 shows this user all universal tag and frequencies of occurrences thereof of degree of depth read books:
Table 3
Universal tag | The universal tag frequency of occurrences |
Play the part of pig and eat tiger | 0.0152284 |
Refreshing literary composition | 0.071066 |
The little text of an annotated book | 0.0761421 |
Unit is bright | 0.0050761 |
Draw all universal tag vectors of degree of depth read books of this user from table 3
=<play the part of, pig ate tiger, and change is revenged, refreshing literary composition, and iron blood, the little text of an annotated book, conspiracy, unit is bright 〉, the universal tag weight vectors
=<0.0152284,0,0,0.071066,0,0.0761421,0,0.0050761 〉.
3, calculate books " clothes made of brocade kills the people " for this user's label score: 1*0.458333+2*0+3*0.020833+4*(0.0152284+0.071066+0.076142 1+0.0050761)=1.1700494.Wherein
, the weighted value of the reclassify of these books " history " correspondence in user's text label vector
=0.458333, the level Four of these books is categorized as sky, the weighted value of correspondence in user's text label vector
=0, the author of these books " Latin sea 11 youths " weighted value of correspondence in user's text label vector
=0.020833, all universal tags of these books " are played the part of pig and are eaten tiger ", " change ", " vengeance ", " refreshing literary composition ", " iron blood ", " the little text of an annotated book ", " conspiracy ", " unit is bright " corresponding weighted value sum in j position user's text label vector
=0.0152284+0+0+0.071066+0+0.0761421+0+0.0050761.
Identical with the computation process of books " clothes made of brocade kills the people ", continue the label score of other books in the calculating chart stack room, at last user read books is filtered, and the books that filter out some by the label score are recommended to this user.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.