CN110413888A - A kind of books recommended method and device - Google Patents

A kind of books recommended method and device Download PDF

Info

Publication number
CN110413888A
CN110413888A CN201910672030.XA CN201910672030A CN110413888A CN 110413888 A CN110413888 A CN 110413888A CN 201910672030 A CN201910672030 A CN 201910672030A CN 110413888 A CN110413888 A CN 110413888A
Authority
CN
China
Prior art keywords
books
behavior
different
binary group
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910672030.XA
Other languages
Chinese (zh)
Inventor
王兴光
韩云
李鹏
李剑风
许阳寅
王斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910672030.XA priority Critical patent/CN110413888A/en
Publication of CN110413888A publication Critical patent/CN110413888A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Abstract

The embodiment of the invention discloses a kind of books recommended method and devices, comprising: obtains the different books of different user historical behavior and the corresponding different user historical behavior to obtain different books behavior binary groups;Multiple training samples are obtained, and the multiple training sample is separately input into preset model and is trained, to obtain different characterization vectors;The corresponding books behavior binary group of multiple and different characterization vectors or books that meet preset condition are stored respectively to similar database;The historical data for obtaining terminal, obtains target books behavior binary group or target books according to the historical data from the similar database, the target books behavior binary group or the corresponding books of target books is recommended to the terminal.It is constrained in training from multiple dimensions by obtaining a variety of behaviors and constituting different books behavior binary groups using the means, so that accuracy is higher when precisely being recommended, improves user experience.

Description

A kind of books recommended method and device
Technical field
The present invention relates to field of computer technology more particularly to a kind of books recommended method and devices.
Background technique
Embedding strategy, i.e., describe the thought of an entity, this thought describes reality with vector with a vector Body information not only contains the attribute information of entity itself, while further comprising the related information between entity and entity Related information between final goal task.
The prior art was clicked when with the flush type learning method of Listing-Embedding using user is obtained A tuple<Listing>sequence, then be each tuple<Listing>study vector indicate.Due to the behavior of acquisition One kind is only clicked, the vector that can only finally learn<Listing>out indicates, is not appropriate for that there are the scenes of a variety of behaviors, such as In similar reading scene, the behavior of user not only includes clicking (checking details), further includes collection, bookshelf (shopping is added Vehicle), comment on, run through the behaviors such as (purchase) books, reading, when being recommended using the prior art, due to only considering single row To recommend accuracy lower.
Summary of the invention
The embodiment of the present application provides a kind of books recommended method and device, can be realized the higher books of precision and recommends.
The first aspect of the embodiment of the present application provides a kind of books recommended method, comprising:
The different books of different user historical behavior and the corresponding different user historical behavior are obtained to obtain difference Books behavior binary group;
Multiple training samples are obtained from the different books behavior binary groups, and the multiple training sample difference is defeated Enter to preset model and be trained, to obtain different characterization vectors;
The similarity between the different characterization vectors is obtained, the multiple and different characterization vectors for meeting preset condition are distinguished Corresponding books behavior binary group or books are stored respectively to similar database;
The historical data for obtaining terminal, obtains target books behavior according to the historical data from the similar database Binary group or target books recommend the target books behavior binary group or the corresponding books of target books to the terminal.
It is optionally, described to obtain multiple training samples from the different books behavior binary groups, comprising:
The corresponding first books behavior binary group of the default behavior of acquisition first from the different books behavior binary groups, with And the corresponding second books behavior binary group of the default behavior of acquisition second;
It obtains corresponding first books of the first books behavior binary group and the second books behavior binary group is corresponding The second books, and using first books as global positive sample, will second books as overall situation negative sample;
Third books behavior binary group is obtained from the different books behavior binary groups, and obtains third book described in neighbour At least two books behavior binary groups of nationality behavior binary group;
By the third books behavior binary group, at least two books behavior binary group, the global positive sample, institute It states global negative sample and the corresponding third books of the third books behavior binary group is used as training sample.
Optionally, the different characterization vectors include the corresponding binary group characterization of the different books behavior binary groups Vector, the similar database include first database, and the similarity obtained between the different characterization vectors will meet The corresponding books behavior binary group of multiple and different characterization vectors or books of preset condition are stored respectively to similar database, Include:
The similarity between the different binary group characterization vectors is obtained, similarity is greater than to the binary of the first preset threshold The corresponding books behavior binary group of group characterization vector is stored to first database.
Optionally, the historical data of the terminal includes the historical behavior and the corresponding book of the historical behavior of terminal Nationality, it is described to obtain target books behavior binary group or target books from the similar database according to the historical data, it will The target books behavior binary group or the corresponding books of target books are recommended to the terminal, comprising:
The books row of the terminal is obtained according to the historical behavior of the terminal and the corresponding books of the historical behavior For binary group;
Target books behavior binary group is obtained from the first database, the target books behavior binary group is corresponding Books recommend to the terminal.
Optionally, the different characterization vectors include the corresponding books characterization vector of the different books, the phase Likelihood data library includes the second database, and the similarity obtained between the different characterization vectors will meet preset condition The corresponding books behavior binary group of multiple and different characterization vectors or books are stored respectively to similar database, comprising:
The similarity between the different books characterization vectors is obtained, similarity is greater than to the books table of the second preset threshold The corresponding books of sign vector are stored to the second database.
Optionally, the historical data of the terminal includes the history books of terminal, it is described according to the historical data from institute It states and obtains target books behavior binary group or target books in similar database, by the target books behavior binary group or target The corresponding books of books are recommended to the terminal, comprising:
Target books are obtained from second database, and the target books are recommended to the terminal.
Further, the different books for obtaining different user historical behavior and the corresponding different user historical behavior After obtaining different books behavior binary groups, it is described obtained from the different books behavior binary groups multiple training samples it Before, the loss function including determining training, wherein the loss function indicates are as follows:
Wherein, < ai, bi> indicate binary group;<a, b>in 2k indicate binary group<a, other 2k binary in b>window Group;Bp in gp indicates global positive sample;Bn in gn indicates global negative sample;<an, bn> in ns indicates stochastical sampling binary Group negative sample;θ indicates independent variable parameter.
The second aspect of the embodiment of the present application provides a kind of books recommendation apparatus, comprising:
Module is obtained, for obtaining different user historical behavior and corresponding to not ibideming for the different user historical behavior Nationality is to obtain different books behavior binary groups;
Training module, for obtaining multiple training samples from the different books behavior binary groups, and will be the multiple Training sample is separately input into preset model and is trained, to obtain different characterization vectors;
Computing module, for obtaining the similarity between the different characterization vector, by meet preset condition it is multiple not With characterization vector, corresponding books behavior binary group or books are stored respectively to similar database;
Recommending module is obtained from the similar database for obtaining the historical data of terminal according to the historical data Target books behavior binary group or target books are taken, the target books behavior binary group or the corresponding books of target books are pushed away It recommends to the terminal.
The third aspect of the embodiment of the present application provides a kind of books recommendation server, including processor, input equipment, defeated Equipment and memory out, the processor, input equipment, output equipment and memory are connected with each other, wherein the memory is used In storage computer program, the computer program includes program instruction, and the processor is configured for calling described program Instruction executes the method.
The fourth aspect of the embodiment of the present application provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the computer program is executed by processor to realize the method.
Implement the embodiment of the present application, at least has the following beneficial effects:
By the embodiment of the present application, by obtaining different user historical behavior and corresponding different user historical behavior not With books to obtain different books behavior binary groups, carried out by obtaining training sample from the different books behavior binary groups Training obtains the corresponding binary group characterization vector sum of different books behavior binary groups books characterization corresponding with books Vector;By calculating the similarity between different characterization vectors, and then in the historical behavior and the history row for obtaining terminal For intelligent recommendation can be carried out when corresponding books.Using the means, compared with the single behavior and a tuple of the prior art, by obtaining It takes a variety of behaviors and constitutes different books behavior binary groups, constrained in training from multiple dimensions, so that carrying out precisely Accuracy is higher when recommendation, improves user experience.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Wherein:
Fig. 1 is a kind of network architecture schematic diagram provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of a scenario of books recommended method provided in an embodiment of the present invention;
Fig. 3 is a kind of interaction schematic diagram of books recommended method provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of model provided in an embodiment of the present invention;
Fig. 5 is a kind of flow diagram of books recommended method provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of books recommendation server provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of books recommendation apparatus provided in an embodiment of the present invention;
Fig. 8 a provides a kind of schematic diagram of similar binary group for the embodiment of the present application;
Fig. 8 b provides a kind of schematic diagram of similar books for the embodiment of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing Different objects, are not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also wrap Include other step or units intrinsic for these process, methods, product or equipment.
" embodiment " mentioned in this application is it is meant that a particular feature, structure, or characteristic described can be in conjunction with the embodiments Included at least one embodiment of the application.The phrase, which occurs, in each position in the description might not each mean phase Same embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art are explicitly Implicitly understand, embodiments described herein can be combined with other embodiments.
Referring to Fig. 1, Fig. 1 provides a kind of network architecture schematic diagram for the embodiment of the present application.The network architecture can wrap Multiple servers and multiple terminal devices are included, as shown in Figure 1, specifically including terminal device 100a, terminal device 100b, terminal Equipment 100c, server 200a, server 200b, server 200a can carry out data biography by network and each terminal device Defeated, each terminal device can install read books class and apply (such as wechat reading), and server 200a can be read books Class applies corresponding background server, and therefore, each terminal device can apply corresponding client by the read books class End carries out data transmission with server 200a, as server 200a can send recommended book information, clothes to each terminal device Business device 200b can be data processing server, be referred to as books recommendation server, it can true for each terminal device Fixed different books recommending data, server 200b can be carried out data transmission by server 200a with multiple terminal devices. Terminal device may include mobile phone, tablet computer, laptop, palm PC, mobile internet device (mobile Internet device, MID), wearable device (such as smartwatch, Intelligent bracelet etc.).Each terminal device can be The read books class is applied in corresponding client and shows recommendation information stream i.e. recommended book.
Wherein, the information that the recommendation information stream shown in each terminal device is included can be different, recommendation information Flowing included specifying information can be determined that user's history behavior can be indicated by the corresponding user's history behavior of terminal device It is user before current time, when applying the click each time in corresponding client, reading in read books class, reading Between, the operation such as download, buy, running through, bookshelf is added.It is a kind of book provided in an embodiment of the present invention specifically please also refer to Fig. 2 The schematic diagram of a scenario of nationality recommended method.As shown in Fig. 2, for terminal device 100a of the scene in the embodiment corresponding to Fig. 1, Server 200 may include server 200a and server 200b in embodiment corresponding to Fig. 1, and terminal device 100a is read in opening It reads after nationality class application interface, the default homepage of read books class application can be shown first in terminal display interface, at this In homepage, can show several function choosing-items, be such as expressed as " ranking list " option, " recommendation " option, " classification " option, " audio " option can jump to the corresponding displayed page of " recommendation " option 400 when user selects " recommendation " option 400, this When displayed page in display area 300a in recommendation information has not yet been displayed, therefore terminal device 100a can respond user and be directed to It is somebody's turn to do the selection operation of " recommendation " option 400, sends information flow access request to server 200, with the recommendation of request books.Clothes Being engaged in device 100 can be according to the determining corresponding device number of terminal device 100a for issuing request of information flow access request or user's mark The user that knowledge information etc., i.e. determination will request, server 200 further obtain the corresponding historical behavior data of the user, and The corresponding a variety of historical behavior-books of the user are determined respectively according to historical behavior data, and then server 200 can be calculated Similar books corresponding with historical behavior-books of the user recommend terminal in obtained similar database, wherein may include The similar books of gained, which are generated, recommends column to show in display area 300a, wherein recommends to include corresponding books title 301a in column And author information 302a.
Referring to Fig. 3, Fig. 3 provides a kind of interaction schematic diagram of books recommended method for the embodiment of the present application.Such as Fig. 3 institute Show, may include step 301-304, specific as follows:
301, the different books of different user historical behavior and the corresponding different user historical behavior are obtained to obtain Different books behavior binary groups;
Optionally, server obtains a large amount of user's history user behaviors log, which includes the history of user Behavior-book information, specifically may include corresponding user download the first books, the second books of purchase, third books be added to bookshelf, Check information such as the details of the 4th books etc..
Wherein server can obtain user's history user behaviors log from following data source, such as check various books detail informations Baidu library historical data or from the search log in QQ browser, the search log in TT browser or any other Search log in browser or search engine, or from social platform may include that microblogging, discussion bar, discussion group etc. get concern Books, with specific reference to practical application scene determine, herein with no restrictions.
Specifically, behavior-book data that different user is obtained in server subordinate act-book databases, can be pre- If behavior-book data in the time, such as behavior-books of a large number of users in the periods such as nearest three months or 1 year Data, to obtain historical behavior-book data of different user, then according to historical behavior-book data of the different user Books behavior binary group is obtained, multiple books behavior binary groups of different user are such as constructed according to time order and function, by above-mentioned multiple Books behavior binary group forms binary group sequence.The behavior-book databases contain historical behavior-books number of a large number of users According to, such as include the download information of corresponding books, perhaps checks that detail information perhaps buys information or browsing duration information, it is clear Look at number information and device number etc..
302, multiple training samples are obtained from the different books behavior binary groups, and the multiple training sample is divided It is not input to preset model to be trained, to obtain different characterization vectors;
Above-mentioned different characterization vectors can be the corresponding binary group characterization vector of the different books behavior binary groups, It can also obtain the corresponding books characterization vector of the different books simultaneously;
Wherein, above-mentioned preset model can be Skip-Gram model, and Skip-Gram model refers to for a feature sequence Column, initializing a vector to each feature at random indicates, vector v c corresponding for the feature fc of position c uses vector v c Each i.e. Set of k feature of fc or so window size should be able to be accurately predicted as far as possibleF, k={ fc-k, fc-k+1, fc-k+2..., fc-1, fc+1, fc+2..., fc+k}.It is indicated with mathematical form as maximization likelihood probability:
Wherein, pf=softmax (vc × W+b), W and b do spatial alternation, vc are mapped to full dose feature space, and lead to Cross the probability that softmax provides each word.The Skip-Gram model that the embodiment of the present application uses is as shown in figure 4, above-mentioned trained sample This includes following books behavior binary group: < ac, bc>,<ac-k, bc-k>…<ac-2, bc-2><ac-1, bc-1><ac+1, bc+1><ac+2, bc+2>…<ac+k, bc+k>;Above-mentioned training sample further includes global positive sample, global negative sample and identical books, wherein identical Books are the corresponding books of target books behavior binary group.Wherein, < ac, bc>it is target books behavior binary group,<ac-k, bc-k >…<ac-2, bc-2><ac-1, bc-1><ac+1, bc+1><ac+2, bc+2>…<ac+k, bc+k> it is that the target binary group or so window is big The small 2k books behavior binary group for K.Global positive sample is to meet first in above-mentioned resulting all books behavior binary groups The books of preset condition, it is to run through or buy which, which can be behavior, such as can be all books behaviors two It is to buy or run through books corresponding to the books behavior binary group of equal behaviors that behavior is corresponded in tuple;If user is at some Buy or run through certain this book in behavior sequence, the behavior of any one of this behavior sequence, no matter global positive sample whether In the window that size is 2k, the probability of occurrence of global positive sample will be maximized.Global negative sample is all books behaviors two Meet each user of the books of the second preset condition in tuple, when the second preset condition can be reading duration less than presetting Long, the statistics of such as one book reads duration if it is less than 60s, just as global negative sample, and minimizes its probability of occurrence.
Wherein, the above-mentioned continuous variation based on target binary group obtains a large amount of training samples, a large amount of training that will be obtained Sample sequentially inputs training pattern and is trained, obtain the corresponding binary group of the different books behavior binary group characterize to Amount.
It is described to obtain multiple trained samples from the different books behavior binary groups as a kind of preferred implementation This, it may include:
The corresponding first books behavior binary group of the default behavior of acquisition first from the different books behavior binary groups, with And the corresponding second books behavior binary group of the default behavior of acquisition second;
Wherein, the described first default behavior includes buying or reading progress to reach default progress, the second default row Being includes reading duration to be less than preset duration.
It obtains corresponding first books of the first books behavior binary group and the second books behavior binary group is corresponding The second books, and using first books as global positive sample, will second books as overall situation negative sample;
Third books behavior binary group is obtained from the different books behavior binary groups, and obtains third book described in neighbour At least two books behavior binary groups of nationality behavior binary group;
It can be by setting window size, and then obtain the total 2k in left and right centered on the 4th books behavior binary group closely Adjacent books behavior binary group, k is positive integer.
By the third books behavior binary group, at least two books behavior binary group, the global positive sample, institute It states global negative sample and the corresponding third books of the third books behavior binary group is used as training sample.
The embodiment of the present application has not only learnt relationship between books behavior binary group and books behavior binary group and book The constraint of relationship between nationality<Book>tuple, books behavior binary group and books guarantees that the binary group comprising same book is all enclosed It is wound on around identical books;Books behavior two is then constructed between books behavior binary group and global positive sample or global negative sample The association of tuple and global positive example.By setting above-mentioned model, by constructing books behavior binary group, compared with the unitary of the prior art Group indicates, more abundant on behavior representation, more specific, so that the foundation of recommended book is based on multidimensional data, improves and pushes away Recommend precision.
303, the similarity between the different characterization vectors is obtained, multiple and different characterization vectors of preset condition will be met Corresponding books behavior binary group or books are stored respectively to similar database;
It is specific can include:
The different characterization vectors include the corresponding binary group characterization vector of the different books behavior binary groups, institute Stating similar database includes first database, and the similarity obtained between the different characterization vectors will meet default item The corresponding books behavior binary group of multiple and different characterization vectors or books of part are stored respectively to similar database, comprising:
The similarity between the different binary group characterization vectors is obtained, similarity is greater than to the binary of the first preset threshold The corresponding books behavior binary group of group characterization vector is stored to first database.
Further, the different characterization vectors include the corresponding books characterization vector of the different books, the phase Likelihood data library includes the second database, and the similarity obtained between the different characterization vectors will meet preset condition The corresponding books behavior binary group of multiple and different characterization vectors or books are stored respectively to similar database, comprising:
The similarity between the different books characterization vectors is obtained, similarity is greater than to the books table of the second preset threshold The corresponding books of sign vector are stored to the second database.
Wherein, which, which can be, uses cosine similarity to calculate to obtain similarity, can be default by setting For threshold value to obtain the higher similar books of similarity, such as settable preset threshold is 70%, 80% etc..
Further, it stores in the corresponding books behavior binary group of similarity that will exceed the first preset threshold to the first data When library, it can be ranked up storage according to sequence from big to small based on similarity height, can such as be carried out based on storage location difference It distinguishes, such as is successively stored since first area, second area, wherein the similarity of first area is higher than second area.
Alternatively, obtaining the corresponding books behavior binary group of similarity for exceeding the first preset threshold, and confirm the books Whether the number of behavior binary group exceeds predetermined number;If exceeding, such as 5 are chosen from high to low according to similarity height size Books behavior binary group is simultaneously stored to similar binary group library etc..Certainly it is not intended to limit above-mentioned form herein.
304, the historical data for obtaining terminal, obtains target books according to the historical data from the similar database Behavior binary group or target books recommend the target books behavior binary group or the corresponding books of target books to the end End.
The historical data of the terminal includes the historical behavior and the corresponding books of the historical behavior of terminal, and described Target books behavior binary group or target books are obtained from the similar database according to the historical data, by the target book Nationality behavior binary group or the corresponding books of target books are recommended to the terminal, comprising:
The books row of the terminal is obtained according to the historical behavior of the terminal and the corresponding books of the historical behavior For binary group;
Target books behavior binary group is obtained from the first database, the target books behavior binary group is corresponding Books recommend to the terminal.
Further, the historical data of the terminal includes the history books of terminal, it is described according to the historical data from institute It states and obtains target books behavior binary group or target books in similar database, by the target books behavior binary group or target The corresponding books of books are recommended to the terminal, comprising:
Target books are obtained from second database, and the target books are recommended to the terminal.
Wherein, the historical behavior for obtaining the terminal and the corresponding books of the historical behavior obtain the first books Behavior binary group, for when the corresponding historical behavior of the terminal has at least two, such as can include:
The terminal is obtained in the first historical behavior and the corresponding book of first historical behavior of the first preset time Nationality obtains the first initial books behavior binary group, and obtains the second historical behavior and the corresponding books of second historical behavior Obtain the second initial books behavior binary group;
Confirm first historical behavior whether prior to second historical behavior from default behavior table of grading;
If satisfied, then using the corresponding first initial books behavior binary group of first historical behavior as the terminal First books behavior binary group.
I.e. by determining that behavior grade chooses the corresponding books behavior binary group of higher ranked behavior.
For when similar books behavior binary group has multiple, then including:
P books behavior binary group similar with the books behavior binary group of terminal is obtained from the similar binary group library And corresponding this books of P of the P books behavior binary group, wherein P is the integer greater than 1;
The terminal is obtained in the historical behavior and the corresponding books of the historical behavior of the second preset time;Confirmation institute It states in this books of P with the presence or absence of books corresponding to second preset time;
If so, recommending the books as the first books to the terminal.
By obtain terminal other times historical behavior, it is optional take frequency of reading beyond 5 times and read progress do not reach To the books of half, then it is confirmed as the more interested book of user, there are the books in similar books by confirming, then recommend the book It is very intelligent to terminal.
Wherein, in the recommendation request for receiving terminal, the historical behavior of terminal can be pre-processed, can be such as filtered Fall to browse the shorter behavior of duration, or obtains the behavior etc. in preset time.
By the embodiment of the present application, by obtaining different user historical behavior and corresponding different user historical behavior not With books to obtain different books behavior binary groups, carried out by obtaining training sample from the different books behavior binary groups Training obtains the corresponding binary group characterization vector sum of different books behavior binary groups books characterization corresponding with books Vector;By calculating the similarity between different characterization vectors, and then in the historical behavior and the history row for obtaining terminal For intelligent recommendation can be carried out when corresponding books.Using the means, compared with the single behavior and a tuple of the prior art, by obtaining It takes a variety of behaviors and constitutes different books behavior binary groups, constrained in training from multiple dimensions, so that carrying out precisely Accuracy is higher when recommendation, improves user experience.
Referring to Fig. 5, Fig. 5 provides a kind of flow diagram of books recommended method for the embodiment of the present application.As schemed Show, may include step 501-508, specific as follows:
501, the different books of different user historical behavior and the corresponding different user historical behavior are obtained to obtain Different books behavior binary groups;
Specifically, behavior-book data that different user is obtained in server subordinate act-book databases, can be pre- If behavior-book data in the time, such as behavior-books of a large number of users in the periods such as nearest three months or 1 year Data, to obtain historical behavior-book data of different user, then according to historical behavior-book data of the different user Books behavior binary group is obtained, multiple books behavior binary groups of different user are such as constructed according to time order and function, by above-mentioned multiple Books behavior binary group forms binary group sequence.The behavior-book databases contain historical behavior-books number of a large number of users According to, such as include the download information of corresponding books, perhaps checks that detail information perhaps buys information or browsing duration information, it is clear Look at number information and device number etc..
502, the corresponding first books behavior binary of the default behavior of acquisition first from the different books behavior binary groups Group, and the corresponding second books behavior binary group of the default behavior of acquisition second;
503, corresponding first books of the first books behavior binary group and the second books behavior binary group are obtained Corresponding second books, and using first books as global positive sample, using second books as global negative sample;
Above-mentioned overall situation positive sample, which such as can be, to be corresponded to behavior as purchase or runs through row in all books behavior binary groups For books behavior binary group corresponding to books;Above-mentioned overall situation negative sample, which can be in all books behavior binary groups, corresponds to row To read books corresponding to the books behavior binary group of behavior of the duration less than 60s for the statistics of a book.
504, third books behavior binary group is obtained from the different books behavior binary groups, and obtains described in neighbour the At least two books behavior binary groups of three books behavior binary groups;
505, by the third books behavior binary group, at least two books behavior binary group, the positive sample of the overall situation Originally, the global negative sample and the corresponding third books of the third books behavior binary group are used as training sample;
506, the multiple training sample is separately input into preset model to be trained, to obtain the different books point Not corresponding books characterize vector;
It wherein, further include the loss function for determining training before training, the loss function may be expressed as:
Wherein, < ai, bi> indicate binary group;<a, b>in 2k indicate binary group<a, other 2k binary in b>window Group;Bp in gp indicates global positive sample;Bn in gn indicates global negative sample;<an, bn> in ns indicates stochastical sampling binary Group negative sample;θ indicates independent variable parameter.
It can be obtained most by gradient descent method come iterative solution step by step when solving the minimum value of above-mentioned loss function The loss function and model parameter value of smallization.
The constraint relationship indicates that model has not only learnt books behavior binary group<Action, Book>between relationship, with And the relationship between books behavior binary group and books<Book>tuple, the constraint of books behavior binary group and books guarantee packet Binary group containing same book is all centered around around identical books;Books behavior binary group and global positive sample or global negative sample it Between then construct the association of books behavior binary group and global positive example.
507, the similarity between the different books characterization vectors is calculated separately, and will exceed the phase of the second preset threshold It stores like corresponding books are spent to the second database;
508, when receiving the recommendation request that terminal is sent, the history books of the terminal are obtained, and will be from described second The books similar with the history books obtained in database are recommended to the terminal.
By the embodiment of the present application, by obtaining different user historical behavior and corresponding different user historical behavior not With books to obtain different books behavior binary groups, carried out by obtaining training sample from the different books behavior binary groups Training obtains the corresponding binary group characterization vector sum of different books behavior binary groups books characterization corresponding with books Vector;By calculating the similarity between different characterization vectors, and then in the historical behavior and the history row for obtaining terminal For intelligent recommendation can be carried out when corresponding books.The embodiment of the present application has not only learnt the relationship between books behavior binary group, And the relationship between books behavior binary group and books<Book>tuple, the constraint of books behavior binary group and books guarantee Binary group comprising same book is all centered around around identical books;Books behavior binary group and global positive sample or global negative sample Between then construct the association of books behavior binary group and global positive example.By setting above-mentioned model, by constructing books behavior Binary group, it is more abundant on behavior representation compared with an element group representation of the prior art, it is more specific so that recommended book according to According to multidimensional data is based on, recommendation precision is improved.
It is consistent with above-described embodiment, referring to Fig. 6, Fig. 6 is a kind of books recommendation service provided by the embodiments of the present application The structural schematic diagram of device, as shown, including processor, input equipment, output equipment and memory, the processor, input Equipment, output equipment and memory are connected with each other, wherein the memory is for storing computer program, the computer journey Sequence includes program instruction, and the processor is configured for calling described program instruction, and above procedure includes following for executing The instruction of step;
The different books of different user historical behavior and the corresponding different user historical behavior are obtained to obtain difference Books behavior binary group;
Multiple training samples are obtained from the different books behavior binary groups, and the multiple training sample difference is defeated Enter to preset model and be trained, to obtain different characterization vectors;
The similarity between the different characterization vectors is obtained, the multiple and different characterization vectors for meeting preset condition are distinguished Corresponding books behavior binary group or books are stored respectively to similar database;
The historical data for obtaining terminal, obtains target books behavior according to the historical data from the similar database Binary group or target books recommend the target books behavior binary group or the corresponding books of target books to the terminal.
By the embodiment of the present application, by obtaining different user historical behavior and corresponding different user historical behavior not With books to obtain different books behavior binary groups, carried out by obtaining training sample from the different books behavior binary groups Training obtains the corresponding binary group characterization vector sum of different books behavior binary groups books characterization corresponding with books Vector;By calculating the similarity between different characterization vectors, and then in the historical behavior and the history row for obtaining terminal For intelligent recommendation can be carried out when corresponding books.Using the means, compared with the single behavior and a tuple of the prior art, by obtaining It takes a variety of behaviors and constitutes different books behavior binary groups, constrained in training from multiple dimensions, so that carrying out precisely Accuracy is higher when recommendation, improves user experience.
It is above-mentioned that mainly the scheme of the embodiment of the present application is described from the angle of method side implementation procedure.It is understood that , in order to realize the above functions, it comprises execute the corresponding hardware configuration of each function and/or software module for terminal.This Field technical staff should be readily appreciated that, in conjunction with each exemplary unit and algorithm of embodiment description presented herein Step, the application can be realized with the combining form of hardware or hardware and computer software.Some function actually with hardware also It is the mode of computer software driving hardware to execute, the specific application and design constraint depending on technical solution.Profession Technical staff can specifically realize described function to each using distinct methods, but this realization should not be recognized For beyond scope of the present application.
The embodiment of the present application can carry out the division of functional unit according to above method example to terminal, for example, can be right The each functional unit of each function division is answered, two or more functions can also be integrated in a processing unit. Above-mentioned integrated unit both can take the form of hardware realization, can also realize in the form of software functional units.It needs Illustrate, is schematical, only a kind of logical function partition to the division of unit in the embodiment of the present application, it is practical to realize When there may be another division manner.
Consistent with the above, referring to Fig. 7, Fig. 7 provides a kind of structure of books recommendation apparatus for the embodiment of the present application Schematic diagram.It includes obtaining module 701, training module 702, computing module 703 and recommending module 704, specific as follows:
Module 701 is obtained, for obtaining different user historical behavior and the corresponding different user historical behavior not With books to obtain different books behavior binary groups;
Training module 702, for obtaining multiple training samples from the different books behavior binary groups, and will be described more A training sample is separately input into preset model and is trained, to obtain different characterization vectors;
Computing module 703 will meet the multiple of preset condition for obtaining the similarity between the different characterization vectors The corresponding books behavior binary group of difference characterization vector or books are stored respectively to similar database;
Recommending module 704, for obtaining the historical data of terminal, according to the historical data from the similar database Target books behavior binary group or target books are obtained, by the target books behavior binary group or the corresponding books of target books Recommend to the terminal.
As can be seen that being gone through by the embodiment of the present application by obtaining different user historical behavior and corresponding different user The different books of history behavior are instructed with obtaining different books behavior binary groups by obtaining from the different books behavior binary groups Practicing sample, to be trained to obtain the corresponding binary group characterization vector sum of the different books behavior binary groups corresponding with books Books characterize vector;By calculate it is different characterization vectors between similarities, and then obtain terminal historical behavior and Intelligent recommendation can be carried out when the corresponding books of the historical behavior.Using the means, the single behavior compared with the prior art and one Tuple by a variety of behaviors of acquisition and constitutes different books behavior binary groups, is constrained in training from multiple dimensions, so that When precisely being recommended, accuracy is higher, improves user experience.
Referring to shown in Fig. 8 a- Fig. 8 b, using books recommended method provided by the embodiments of the present application and books recommendation apparatus, It is trained and cultivate oneself to attain immortality biography by inputting books behavior binary group READINGTIME- ordinary person, the high books behavior two of multiple similarities can be obtained Tuple is as shown in Figure 8 a.When input books wandering terrestrial time, it is as shown in Figure 8 b to be similarly obtained the high books of multiple similarities.
The embodiment of the present application also provides a kind of computer storage medium, wherein computer storage medium storage is for electricity The computer program of subdata exchange, it is as any in recorded in above method embodiment which execute computer A kind of some or all of books recommended method step.
The embodiment of the present application also provides a kind of computer program product, and the computer program product includes storing calculating The non-transient computer readable storage medium of machine program, the computer program make computer execute such as above method embodiment Some or all of any books recommended method of middle record step.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, related actions and modules not necessarily the application It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only a kind of Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit, It can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, applying for that each functional unit in bright each embodiment can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also be realized in the form of software program module.
If the integrated unit is realized in the form of software program module and sells or use as independent product When, it can store in a computer-readable access to memory.Based on this understanding, the technical solution of the application substantially or Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products Reveal and, which is stored in a memory, including some instructions are used so that a computer equipment (can be personal computer, server or network equipment etc.) executes all or part of each embodiment the method for the application Step.And memory above-mentioned includes: USB flash disk, read-only memory (read-only memory, ROM), random access memory The various media that can store program code such as (random access memory, RAM), mobile hard disk, magnetic or disk.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can store in a computer-readable memory, memory It may include: flash disk, read-only memory, random access device, disk or CD etc..
The embodiment of the present application is described in detail above, specific case used herein to the principle of the application and Embodiment is expounded, the description of the example is only used to help understand the method for the present application and its core ideas; At the same time, for those skilled in the art can in specific embodiments and applications according to the thought of the application There is change place, in conclusion the contents of this specification should not be construed as limiting the present application.

Claims (10)

1. a kind of books recommended method characterized by comprising
The different books of different user historical behavior and the corresponding different user historical behavior are obtained to obtain different books Behavior binary group;
Multiple training samples are obtained from the different books behavior binary groups, and the multiple training sample is separately input into Preset model is trained, to obtain different characterization vectors;
The similarity between the different characterization vectors is obtained, the multiple and different characterization vectors for meeting preset condition are respectively corresponded Books behavior binary group or books stored respectively to similar database;
The historical data for obtaining terminal, target books behavior binary is obtained according to the historical data from the similar database Group or target books recommend the target books behavior binary group or the corresponding books of target books to the terminal.
2. the method according to claim 1, wherein the acquisition from the different books behavior binary groups is more A training sample, comprising:
The corresponding first books behavior binary group of the default behavior of acquisition first from the different books behavior binary groups, and obtain Take the corresponding second books behavior binary group of the second default behavior;
Obtain corresponding first books of the first books behavior binary group and the second books behavior binary group corresponding Two books, and using first books as global positive sample, using second books as global negative sample;
Third books behavior binary group is obtained from the different books behavior binary groups, and obtains third books row described in neighbour For at least two books behavior binary groups of binary group;
By the third books behavior binary group, at least two books behavior binary group, the global positive sample, described complete Office's negative sample and the corresponding third books of the third books behavior binary group are used as training sample.
3. according to the method described in claim 2, it is characterized in that, the different characterization vectors include the different books behaviors The corresponding binary group of binary group characterizes vector, and the similar database includes first database, described to obtain the difference The similarity between vector is characterized, the corresponding books behavior binary group of multiple and different characterization vectors of preset condition will be met Or books are stored respectively to similar database, comprising:
The similarity between the different binary group characterization vectors is obtained, similarity is greater than to the binary group table of the first preset threshold The corresponding books behavior binary group of sign vector is stored to first database.
4. according to the method described in claim 3, it is characterized in that, the historical data of the terminal includes the historical behavior of terminal And the corresponding books of the historical behavior, it is described to obtain target books from the similar database according to the historical data Behavior binary group or target books recommend the target books behavior binary group or the corresponding books of target books to the end End, comprising:
The books behavior two of the terminal is obtained according to the historical behavior of the terminal and the corresponding books of the historical behavior Tuple;
Target books behavior binary group is obtained from the first database, by the corresponding book of the target books behavior binary group Nationality is recommended to the terminal.
5. according to the method described in claim 2, it is characterized in that, the different characterization vectors include the different books difference Corresponding books characterize vector, and the similar database includes the second database, described to obtain between the different characterization vectors Similarity, the corresponding books behavior binary group of multiple and different characterization vectors or books that meet preset condition are deposited respectively It stores up to similar database, comprising:
Obtain the similarity between the different books characterization vector, by the books that similarity is greater than the second preset threshold characterize to Corresponding books are measured to store to the second database.
6. according to the method described in claim 5, it is characterized in that, the historical data of the terminal includes the book of time of terminal Nationality, it is described to obtain target books behavior binary group or target books from the similar database according to the historical data, it will The target books behavior binary group or the corresponding books of target books are recommended to the terminal, comprising:
Target books are obtained from second database, and the target books are recommended to the terminal.
7. method according to any one of claims 1 to 6, which is characterized in that the acquisition different user historical behavior with And after the different books of the corresponding different user historical behavior are to obtain different books behavior binary groups, it is described from it is described not With before obtaining multiple training samples in books behavior binary group, the loss function including determining training, wherein the loss letter Number indicates are as follows:
Wherein, < ai,bi> indicate binary group;<a, b>in 2k indicate binary group<a, other 2k binary group in b>window;bp In gp indicates global positive sample;Bn in gn indicates global negative sample;<an,bn> in ns indicates the negative sample of stochastical sampling binary group This;θ indicates independent variable parameter.
8. a kind of books recommendation apparatus characterized by comprising
Obtain module, for obtain the different books of different user historical behavior and the corresponding different user historical behavior with Obtain different books behavior binary groups;
Training module, for obtaining multiple training samples from the different books behavior binary groups, and by the multiple training Sample is separately input into preset model and is trained, to obtain different characterization vectors;
Computing module will meet multiple and different tables of preset condition for obtaining the similarity between the different characterization vectors The corresponding books behavior binary group of sign vector or books are stored respectively to similar database;
Recommending module obtains mesh from the similar database according to the historical data for obtaining the historical data of terminal Bidding documents nationality behavior binary group or target books, by the target books behavior binary group or the corresponding books of target books recommend to The terminal.
9. a kind of terminal, which is characterized in that the processor, defeated including processor, input equipment, output equipment and memory Enter equipment, output equipment and memory to be connected with each other, wherein the memory is for storing computer program, the computer Program includes program instruction, and the processor is configured for calling described program instruction, is executed as claim 1 to 7 is any Method described in.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence, the computer program are executed by processor to realize method described in claim 1 to 7 any one.
CN201910672030.XA 2019-07-24 2019-07-24 A kind of books recommended method and device Pending CN110413888A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910672030.XA CN110413888A (en) 2019-07-24 2019-07-24 A kind of books recommended method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910672030.XA CN110413888A (en) 2019-07-24 2019-07-24 A kind of books recommended method and device

Publications (1)

Publication Number Publication Date
CN110413888A true CN110413888A (en) 2019-11-05

Family

ID=68362891

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910672030.XA Pending CN110413888A (en) 2019-07-24 2019-07-24 A kind of books recommended method and device

Country Status (1)

Country Link
CN (1) CN110413888A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008349A (en) * 2020-03-09 2020-04-14 深圳博士创新技术转移有限公司 Big data information pushing processing method and system
CN111079039A (en) * 2019-11-20 2020-04-28 上海连尚网络科技有限公司 Method and equipment for collecting books
CN111143682A (en) * 2019-12-27 2020-05-12 联想(北京)有限公司 Data processing method, device and storage medium
CN113239282A (en) * 2021-06-22 2021-08-10 平安国际智慧城市科技股份有限公司 Recommendation method, device, medium and equipment based on sequence similarity calculation
CN114595384A (en) * 2022-02-25 2022-06-07 北京字节跳动网络技术有限公司 Book recommendation method and device, electronic equipment and storage medium
CN114625876A (en) * 2022-03-17 2022-06-14 北京字节跳动网络技术有限公司 Method for generating author characteristic model, method and device for processing author information

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943871A (en) * 2017-11-10 2018-04-20 深圳市华阅文化传媒有限公司 Recommended user reads the method and device of the books of hobby
CN108509573A (en) * 2018-03-27 2018-09-07 陕西科技大学 Book recommendation method based on matrix decomposition collaborative filtering and system
CN108520076A (en) * 2018-04-19 2018-09-11 掌阅科技股份有限公司 E-book recommends method, electronic equipment and computer storage media
CN109190044A (en) * 2018-09-10 2019-01-11 北京百度网讯科技有限公司 Personalized recommendation method, device, server and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943871A (en) * 2017-11-10 2018-04-20 深圳市华阅文化传媒有限公司 Recommended user reads the method and device of the books of hobby
CN108509573A (en) * 2018-03-27 2018-09-07 陕西科技大学 Book recommendation method based on matrix decomposition collaborative filtering and system
CN108520076A (en) * 2018-04-19 2018-09-11 掌阅科技股份有限公司 E-book recommends method, electronic equipment and computer storage media
CN109190044A (en) * 2018-09-10 2019-01-11 北京百度网讯科技有限公司 Personalized recommendation method, device, server and medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111079039A (en) * 2019-11-20 2020-04-28 上海连尚网络科技有限公司 Method and equipment for collecting books
CN111079039B (en) * 2019-11-20 2024-02-09 上海连尚网络科技有限公司 Method and equipment for collecting books
CN111143682A (en) * 2019-12-27 2020-05-12 联想(北京)有限公司 Data processing method, device and storage medium
CN111008349A (en) * 2020-03-09 2020-04-14 深圳博士创新技术转移有限公司 Big data information pushing processing method and system
CN113239282A (en) * 2021-06-22 2021-08-10 平安国际智慧城市科技股份有限公司 Recommendation method, device, medium and equipment based on sequence similarity calculation
CN114595384A (en) * 2022-02-25 2022-06-07 北京字节跳动网络技术有限公司 Book recommendation method and device, electronic equipment and storage medium
CN114625876A (en) * 2022-03-17 2022-06-14 北京字节跳动网络技术有限公司 Method for generating author characteristic model, method and device for processing author information
CN114625876B (en) * 2022-03-17 2024-04-16 北京字节跳动网络技术有限公司 Method for generating author characteristic model, method and device for processing author information

Similar Documents

Publication Publication Date Title
CN110941740B (en) Video recommendation method and computer-readable storage medium
US11513998B2 (en) Narrowing information search results for presentation to a user
Anandhan et al. Social media recommender systems: review and open research issues
CN110413888A (en) A kind of books recommended method and device
US8010536B2 (en) Combination of collaborative filtering and cliprank for personalized media content recommendation
US8296291B1 (en) Surfacing related user-provided content
CN109993583B (en) Information pushing method and device, storage medium and electronic device
CN111061946A (en) Scenario content recommendation method and device, electronic equipment and storage medium
CN110008397B (en) Recommendation model training method and device
US9767417B1 (en) Category predictions for user behavior
CN107704485A (en) A kind of position recommends method and computing device
CN111159341B (en) Information recommendation method and device based on user investment and financial management preference
US9767204B1 (en) Category predictions identifying a search frequency
WO2014100605A1 (en) Interest graph-powered search
CN108228844A (en) A kind of picture screening technique and device, storage medium, computer equipment
CN110390052B (en) Search recommendation method, training method, device and equipment of CTR (China train redundancy report) estimation model
CN109359247A (en) Content delivery method and storage medium, computer equipment
CN108170731A (en) Data processing method, device, computer storage media and server
CN110175895A (en) A kind of item recommendation method and device
CN108765052A (en) Electric business recommendation/method for pushing and device, storage medium and computing device
US10474670B1 (en) Category predictions with browse node probabilities
CN111522886B (en) Information recommendation method, terminal and storage medium
CN110111167A (en) A kind of method and apparatus of determining recommended
EP3616082A1 (en) Named entity-based category tagging of documents
CN110191183A (en) Accurate intelligent method for pushing, system, device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination