Disclosure of Invention
The invention provides an application recommendation method and device based on application vectors, which are used for realizing automatic matching of applications and carrying out personalized recommendation.
The invention provides an application recommendation method based on an application vector, which comprises the following steps: acquiring all application vectors applied to a vector space; calculating a user vector of the user in the vector space, wherein the user vector is the sum of vectors of first applications installed by the user in the vector space; calculating the distance from the vector of the second application which is not installed by the user to the vector of the user; recommending the second application with the distance within a preset range to the user.
In an implementation manner, the obtaining of the application vectors of all applications in the vector space includes: define all users as
Define all applications as
Aiming at the ith user, sequencing the applications installed by the user according to the installation sequence of the applications to obtain an installed application list of the ith user
Wherein k is
ijA serial number of an application installed for the user in W; defining m as a dimension of a vector space and defining the context of the jth application of the ith user as a function
The context of the jth application of the ith user is c applications installed before and after the jth application of the ith user is installed, and a vector applied to the vector space is defined as a vector
Training all user-installed applications using a neural network model to maximize a likelihood function L, and obtaining each vector applied in the vector space when the neural network model converges
Wherein the likelihood function
Wherein the content of the first and second substances,
j application k installed for i user
ijOf the context of (1) is the sum of the corresponding vectorsIs defined as
In an implementable manner, the calculating a user vector of the user in the vector space includes: calculating the user vector of the user in the vector space by using a first formula
Wherein s is
i∈UIs a user vector.
In an implementable manner, the calculating a distance from a vector of the second application not installed by the user to the user vector in the vector space comprises: calculating said distance by substituting said second applied vector in said vector space and said user vector into a second formula
Where d (a, b) is the distance between vector a and vector b.
In an implementable manner, the recommending the second application with the distance within a preset range to the user includes: sequencing the second applications according to the sequence of the distances from small to large; recommending the second application with the top N bits to the user, wherein N is a preset value.
Another aspect of the present invention is to provide an application recommendation apparatus based on an application vector, including: the acquisition module is used for acquiring all application vectors applied to the vector space; the calculation module is used for calculating a user vector of the user in the vector space, wherein the user vector is the sum of vectors of first applications installed by the user in the vector space; the calculation module is further used for calculating the distance from the vector of the second application which is not installed by the user to the user vector in the vector space; and the pushing module is used for recommending the second application with the distance within a preset range to the user.
In an implementable manner, the obtaining module includes: initial unit ofIn defining all users as
Define all applications as
Aiming at the ith user, sequencing the applications installed by the user according to the installation sequence of the applications to obtain an installed application list of the ith user
Wherein k is
ijA serial number of an application installed for the user in W; the initial unit is further configured to define m as a dimension of a vector space, and define a context of a jth application of an ith user as a function
The context of the jth application of the ith user is c applications installed before and after the jth application of the ith user is installed, and a vector applied to the vector space is defined as a vector
A training unit for training all the applications installed by the user by using a neural network model to make the likelihood function L maximum, and when the neural network model is converged, obtaining each vector applied to the vector space
Wherein the likelihood function
Wherein, the first and the second end of the pipe are connected with each other,
jth application k installed for ith user
ijIs defined as the sum of the corresponding vectors of the context of
In an implementable manner, the calculating module is specifically configured to calculate the user vector of the user in the vector space by using a first formula, where the first formula is
Wherein s is
i∈UIs a user vector.
In an implementable manner, the calculating module is further specifically configured to calculate the distance by substituting the second application vector in the vector space and the user vector into a second formula, the second formula being
Where d (a, b) is the distance between vector a and vector b.
In an implementable manner, the push module comprises: the sorting unit is used for sorting the second application according to the sequence of the distances from small to large; and the pushing unit is used for recommending the second application with the top N bits to the user, wherein N is a preset value.
Yet another aspect of the present invention is to provide an application recommendation apparatus based on an application vector, including at least one processor, a memory, and a communication interface; the at least one processor, the memory and the communication interface are all connected through a bus; the memory stores a computer program; the at least one processor executes the computer program stored in the memory to cause the application vector based application recommendation device to perform the method of any of the preceding embodiments.
Yet another aspect of the present invention is to provide a computer-readable storage medium storing a computer program which, when executed by at least one processor of an application vector based application recommendation apparatus, performs the method of any of the previous embodiments.
Yet another aspect of the present invention is to provide a computer product, which includes a computer program stored in a computer-readable storage medium, the computer program being readable by at least one processor of an application vector based application recommendation device from the computer-readable storage medium, the execution of the instructions by the at least one processor by the computer causing the application vector based application recommendation device to perform the method of any of the previous embodiments.
The application vector-based application recommendation method and device provided by the invention can be used for calculating the mapping from the application and the user to the vector space, analyzing the user characteristics based on the installed application of the user, and analyzing the interest degree of the user in the application based on the distance between the application and the user in the vector space, thereby realizing the automatic matching and personalized application recommendation of the application, effectively improving the download conversion rate and the user experience of the user, and improving the working efficiency of operators without manually maintaining a recommended application list.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of an application vector-based application recommendation method according to an embodiment of the present invention, where the method may be applied to an application vector-based application recommendation device, as shown in fig. 1, and the method includes:
101. acquiring all application vectors applied to a vector space;
102. calculating a user vector of the user in the vector space, wherein the user vector is the sum of vectors of first applications installed by the user in the vector space;
103. calculating the distance from the vector of the second application which is not installed by the user to the vector of the user;
104. recommending the second application with the distance within a preset range to the user.
Specifically, the installed application of the user may be determined by detecting the application currently installed in the user terminal. In practical application, some applications installed in the user terminal are pre-installed applications carried by an installation system of the terminal, and because the applications are carried by the installation system of the user terminal, the interest degree of the user in the applications cannot be effectively reflected. Therefore, in order to further make the personalized application recommendation more accurate and reliable, it is necessary to filter out these applications in the calculation process of the user vector, and accordingly, on the basis of the first embodiment, before 102, the method may further include:
105. removing the system pre-installed application from the user-installed applications.
Optionally, in addition to judging the user's interest level in an application based on whether the user installs the application, the user's demand level and interest level in the application may be further evaluated according to the use frequency of the user, and the application commonly used by the user may reflect user preference characteristics to some extent, and accordingly, on the basis of the first embodiment, before 102, the method may further include:
106. and removing the applications which are not frequently used by the user from the applications which are installed by the user, and reserving the applications which are frequently used by the user.
There are various specific methods for determining the applications frequently used by the user, for example, the applications less frequently used by the user may be determined by the least recently used algorithm, and the applications may be removed from the installed application list.
Taking an actual scene as an example: when application personalized recommendation needs to be performed, firstly, application vectors of all applications in a vector space are obtained, all applications can be applications in an application store, the dimension of the vector space can be preset, then, a user vector of a user in the vector space is obtained by calculating the sum of vectors corresponding to first applications installed by the user, the first applications do not comprise system pre-installed applications, the user vector can reflect the interest and hobby characteristics of the user, then, the distance between a vector corresponding to a second application not installed by the user and the user vector is calculated, the distance between the vectors can reflect the interest degree of the user to the applications, the applications with the closer distance between the vectors can be applications with the greater interest of the user, and therefore, the second applications with the distance in a certain range are recommended to the user.
Optionally, there are various ways to determine the second application with the distance within the preset range, for example, directly setting a threshold, and determining the second application with the distance smaller than the threshold as the application interested by the user and recommending the application to the user, and accordingly, on the basis of the first embodiment, the method 104 may specifically include:
1041. recommending the second application with the distance smaller than a preset threshold value to the user.
Or, the second application may also be ranked and an application before a certain rank is selected as the application in which the user is interested, and accordingly, on the basis of the first embodiment, the 104 specifically may include:
1042. sequencing the second applications according to the sequence of the distances from small to large;
1043. recommending the second application with the top N bits to the user, wherein N is a preset value.
The value of N may be determined as needed, for example, may be determined according to the size of the push interface, or the upper display limit supported by the page. In the embodiment, the applications needing to be recommended to the user are determined based on the sequence, the applications most interested by the user can be selected more accurately, the workload is small, and the processing flow is simple and convenient.
The application vector-based application recommendation method provided by the embodiment calculates mapping from an application and a user to a vector space, analyzes user characteristics based on an installed application of the user, and analyzes the user interest degree of the user in the application based on the distance between the application and the user in the vector space, so that automatic matching and personalized application recommendation of the application are realized, the download conversion rate and the user experience of the user can be effectively improved, a recommended application list does not need to be manually maintained, and the working efficiency of operators can be improved.
An embodiment of the present invention provides an application recommendation method based on an application vector, where on the basis of the embodiment one, 101 specifically includes:
201. define all users as
Define all applications as
For the ith user, sequencing the applications installed by the user according to the installation sequence of the applications to obtain an installed application list of the ith user
Wherein k is
ijA serial number in W for the application installed by the user;
202. defining m as a dimension of a vector space and defining the context of the jth application of the ith user as a function
The context of the jth application of the ith user is c applications installed before and after the jth application of the ith user is installed, and a vector applied to the vector space is defined as a vector
203. Training all user-installed applications using a neural network model to maximize a likelihood function L, and obtaining each vector applied in the vector space when the neural network model converges
Wherein the likelihood function
Wherein the content of the first and second substances,
jth application k installed for ith user
ijIs defined as the sum of the corresponding vectors of the context of
In this embodiment, a vector applied to a vector space is obtained by training using a neural network model based on some predefined function vectors and the vector space. The influence of the installation sequence of the application on the user vector is considered by combining the algorithm of the application context, and the user vector obtained based on the application vector can reflect the hobbies and the requirements of the user more truly and accurately. In the embodiment, through the calculation, the representation of the application in the vector space in the application list installed by the user is obtained and used for calculating the representation of the user in the vector space, so that the application closest to the user is searched in the whole vector space to serve as the recommendation of the user, and the application personalized matching and recommendation of the user are realized.
Based on the vectors of the applications obtained in the second embodiment, the user vector corresponding to the user may be obtained by calculating a sum of vectors corresponding to the installed applications, and specifically, on the basis of the second embodiment, 102 may specifically include:
204. calculating the user vector of the user in the vector space by using a first formula
Wherein s is
i∈UIs a user vector.
Through the formula, the user vector of the user in the vector space can be quickly and accurately calculated based on the vector corresponding to the installed application acquired before, and therefore personalized application recommendation is finally carried out based on the distance between the user vector and the application vector.
Specifically, the distance between the user vector and the application vector may reflect the interest level of the user in the application, and accordingly, on the basis of the second embodiment, 103 may include:
205. calculating said distance by substituting said second applied vector in said vector space and said user vector into a second formula
Where d (a, b) is the distance between vector a and vector b.
Wherein the second formula is used to calculate the distance between the two vectors. The distance between the two vectors can be found by substituting the applied corresponding vector and the user vector into the second formula.
The application recommendation method based on the application vector provided in this embodiment obtains the vector applied in the vector space by training using the neural network model based on some predefined function vectors and vector space. Through the calculation, the representation of the application in the vector space in the application list installed by the user is obtained and used for calculating the representation of the user in the vector space, so that the application closest to the user is searched in the whole vector space to serve as the recommendation of the user, and the application personalized matching and recommendation of the user are realized.
Fig. 2 is a schematic structural diagram of an application recommendation device based on application vectors according to a third embodiment of the present invention, as shown in fig. 2, the device includes:
an obtaining module 31, configured to obtain all application vectors applied in a vector space;
a calculating module 32, configured to calculate a user vector of the user in the vector space, where the user vector is a sum of vectors of the first application installed by the user in the vector space;
the calculation module 32 is further configured to calculate a distance from a vector of the second application, which is not installed by the user, in the vector space to the user vector;
a pushing module 33, configured to recommend the second application with the distance within a preset range to the user.
In order to further make the personalized application recommendation more accurate and reliable, it is necessary to filter out the applications pre-installed in the system during the calculation of the user vector, and accordingly, on the basis of the third embodiment, the apparatus further includes:
the first filtering module is used for removing the pre-installed applications of the system from the applications installed by the user.
Optionally, in addition to judging the user's interest level in an application based on whether the user installs the application, the user's demand level and interest level in the application may be further evaluated according to the use frequency of the user, and the user's commonly used applications may reflect user preference characteristics to some extent, and accordingly, on the basis of the first embodiment, the apparatus may further include:
and the second filtering module is used for removing the applications which are not frequently used by the user from the applications which are installed by the user and reserving the applications which are frequently used by the user.
There are various specific methods for determining the applications frequently used by the user, for example, the applications less frequently used by the user may be determined by the least recently used algorithm, and the applications may be removed from the installed application list.
Taking an actual scene as an example: when application personalized recommendation needs to be performed, the obtaining module 31 first obtains all application vectors applied to a vector space, the calculating module 32 calculates a sum of vectors corresponding to a first application installed by a user to obtain a user vector of the user in the vector space, then the calculating module 32 calculates a distance from a vector corresponding to a second application not installed by the user to the user vector, and the pushing module 33 recommends the second application with the distance within a certain range to the user.
Optionally, there are multiple ways to determine the second application with the distance within the preset range, for example, a threshold is directly set, the second application with the distance smaller than the threshold is determined as the application that the user is interested in and recommended to the user, and correspondingly, on the basis of the third embodiment, the pushing module 33 is specifically configured to recommend the second application with the distance smaller than the preset threshold to the user.
Or, by sorting the second application and selecting an application before a certain rank as the application in which the user is interested, correspondingly, on the basis of the third embodiment, the pushing module 33 may include:
the sorting unit is used for sorting the second application according to the sequence of the distances from small to large;
and the pushing unit is used for recommending the second application with the top N bits to the user, wherein N is a preset value.
Wherein the value of N can be determined as desired. In the embodiment, the applications needing to be recommended to the user are determined based on the sequence, the applications in most interest to the user can be selected more accurately, the workload is small, and the processing flow is simple and convenient.
The application recommendation device based on the application vector calculates mapping from the application and the user to a vector space, analyzes user characteristics based on the installed application of the user, and analyzes the interest degree of the user in the application based on the distance between the application and the user in the vector space, so that automatic matching and personalized application recommendation of the application are realized, the download conversion rate and the user experience of the user can be effectively improved, a recommended application list does not need to be manually maintained, and the working efficiency of operators can be improved.
An embodiment of the present invention provides an application recommendation device based on an application vector, where on the basis of the third embodiment, the obtaining module 31 includes:
an initial unit for defining all users as
Define all applications as
For the ith user, sequencing the applications installed by the user according to the installation sequence of the applications to obtain an installed application list of the ith user
Wherein k is
ijA serial number of an application installed for the user in W;
the initial unit is further configured to define m as a dimension of a vector space, and define a context of a jth application of an ith user as a function
The context of the jth application of the ith user is c applications installed before and after the jth application of the ith user is installed, and a vector applied to the vector space is defined as a vector
A training unit for training all the applications installed by the user by using a neural network model to maximize a likelihood function L, and acquiring each vector applied in the vector space when the neural network model converges
Wherein the likelihood function
Wherein the content of the first and second substances,
jth application k installed for ith user
ijIs defined as the sum of the corresponding vectors of the context of
In this embodiment, the obtaining module 31 obtains a vector applied to the vector space by training using a neural network model based on some predefined function vectors and vector spaces. The influence of the installation sequence of the application on the user vector is considered by combining the algorithm of the application context, and the user vector obtained based on the application vector can reflect the hobbies and the requirements of the user more truly and accurately. In the embodiment, through the calculation, the representation of the application in the vector space in the application list installed by the user is obtained and used for calculating the representation of the user in the vector space, so that the application closest to the user is searched in the whole vector space to serve as the recommendation of the user, and the application personalized matching and recommendation of the user are realized.
Based on the vectors of the four applications obtained in the embodiment, the calculating
module 32 may obtain the user vector corresponding to the user by calculating the sum of the vectors corresponding to the installed applications, specifically, based on the fourth embodiment, the calculating
module 32 is specifically configured to calculate the user vector of the user in the vector space by using a first formula, where the first formula is
Wherein s is
i∈UIs a user vector.
Through the formula, the user vector of the user in the vector space can be quickly and accurately calculated based on the vector corresponding to the installed application acquired before, and therefore personalized application recommendation is finally carried out based on the distance between the user vector and the application vector.
Specifically, the distance between the user vector and the application vector may reflect the interest level of the user in the application, and accordingly, based on the fourth embodiment, the user is countedA calculation module, further specifically configured to calculate the distance by substituting the second application vector in the vector space and the user vector into a second formula
Where d (a, b) is the distance between vector a and vector b.
Wherein the second formula is used to calculate the distance between the two vectors. The distance between the two vectors can be found by substituting the application-corresponding vector and the user vector into the second formula.
The application recommendation device based on the application vector provided by this embodiment obtains the vector applied in the vector space by training using the neural network model based on some predefined function vectors and vector space. Through the calculation, the representation of the application in the vector space in the application list installed by the user is obtained and used for calculating the representation of the user in the vector space, so that the application closest to the user is searched in the whole vector space to serve as the recommendation of the user, and the application personalized matching and recommendation of the user are realized.
In a specific implementation of the application vector-based application recommendation apparatus in the foregoing embodiments, the obtaining module, the calculating module and the pushing module may be implemented as a processor, and data and program codes may be stored in a memory and controlled by the controller to be executed according to corresponding program instructions.
In the above Specific implementation of the Application recommendation device based on Application vector, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
Fig. 3 is a schematic structural diagram of an application vector-based application recommendation apparatus according to a fifth embodiment of the present invention, and as shown in fig. 3, the application vector-based application recommendation apparatus 300 includes at least one processor 301, a memory 302, and a communication interface 303 all connected via a bus 304; the memory 302 stores computer programs; the at least one processor 301 executes the computer program stored in the memory 302 to cause the application vector based application recommendation device to perform the method of any of the preceding embodiments by data interaction with an external server through the communication interface 303.
The processors 301 of the application vector-based application recommendation device 300 may include processors of different types, or include processors of the same type; the processor may be any of the following: a Central Processing Unit (CPU), an ARM processor, a Field Programmable Gate Array (FPGA), a special processor, and other devices with computing and Processing capabilities. In an alternative embodiment, at least one of the processors may also be integrated as a many-core processor.
The memory 302 in the application vector based application recommendation device 300 may be any one or any combination of the following: random Access Memory (RAM), Read Only Memory (ROM), non-volatile Memory (NVM), Solid State Drive (SSD), mechanical hard disk, magnetic disk, and magnetic disk array.
The communication interface 303 is used for data interaction between the application vector-based application recommendation apparatus 300 and other devices. The communication interface may be any one or any combination of the following: a network interface (e.g., an ethernet interface), a wireless network card, etc. having a network access function.
The bus 304 may include an address bus, a data bus, a control bus, etc., and for ease of illustration, the bus 304 is represented by a thick line in fig. 3. The bus may be any one or any combination of the following: an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended EISA (EISA) bus, and other wired data transmission devices.
The application recommendation device based on the application vector calculates mapping from the application and the user to a vector space, analyzes user characteristics based on the installed application of the user, and analyzes the interest degree of the user in the application based on the distance between the application and the user in the vector space, so that automatic matching and personalized application recommendation of the application are realized, the download conversion rate and the user experience of the user can be effectively improved, a recommended application list does not need to be manually maintained, and the working efficiency of operators can be improved.
The present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method of any of the above embodiments.
The present invention also provides a computer product comprising a computer program stored on a computer-readable storage medium, the computer program being readable from the computer-readable storage medium by at least one processor of an application vector based application recommendation apparatus, the at least one processor executing the computer to perform the method of any of the above embodiments.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.