Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the embodiment of the application can be executed in a mobile terminal or a similar operation device. Taking an example of the method running on a mobile terminal, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a content recommendation method according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more processors 102 (only one is shown in fig. 1), wherein the processors 102 may include, but are not limited to, a Microprocessor (MPU) or a Programmable Logic Device (PLD), and a memory 104 for storing data, and in an exemplary embodiment, the mobile terminal may further include a transmission device 106 for communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the content recommendation method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It should be noted that the intelligent recommendation algorithm is a key technology in the content push application field, and is a mainstream scheme for predicting consumer buying intention and consumer preferences at present. The intelligent recommendation technology of the shopping website is relatively well developed at the present stage, but the recommendation of the preferred content of the target object is greatly different from the intelligent recommendation of the shopping website, and the technology is not completely suitable for the application. Therefore, solving the push of the content of interest of the target object requires algorithm design from multiple angles.
Conventional commodity recommendation practices perform portrayal of target objects according to browsing records and historical purchasing situations of target objects on shopping website commodities. Similar products are recommended as per the browsing history of the target object: when the historical purchase record of the target object often shows beauty products such as skin care products and cosmetics, and when the historical purchase record of the target object contains female clothes and the unit price exceeds ten thousand yuan, or the purchased product of the target object is often a high-end brand, the target object can be presumed to be a high-consumption target object. Therefore, commodities of relatively high-end brands suitable for female application can be recommended for the target object according to the current browsing requirement. Such as recommending complementary products based on the browsing history of the target object. For example, the purchasing spectacle frame of the target object, the store or the product of the optometric prescription can be recommended to the target object according to the complementary association of the commodities, and the like.
Based on a content recommendation method, the complex attribute is not well processed, enough data is required to construct a classifier, a portrait of a target object is established, and behavior data based on a large number of target objects is required; the collaborative filtering recommendation method has the problems of expandability, the quality depends on a historical data set, and the recommendation quality is poor when the system starts; based on a rule recommendation method, the rule extraction is difficult and time-consuming, the product name synonymity problem is solved, and the individuation degree is low; based on a utility recommendation method, a utility function must be input into a target object, and the recommendation is static, poor in flexibility and has the problem of attribute overlapping; based on the knowledge recommendation method, knowledge is difficult to obtain, and recommendation is static.
In order to solve the above technical problems, the following embodiments of the present invention study a recommendation method to perform content recommendation by integrating multiple factors such as the number of times of behavior of a target object, the behavior type, the behavior time attenuation of the target object, and IF-IDF.
In order to solve the above technical problem, in this embodiment, a content recommendation method is provided, which is applied to the above mobile terminal, and fig. 2 is a schematic flowchart of a flow of the content recommendation method according to an embodiment of the present invention, where the flow includes the following steps:
step S202: acquiring at least one of the following parameter information stored in a target client: the browsed content data of the target object, the behavior data of the target object and the label data of the target object;
step S204: calling a preference algorithm of the target object to calculate the parameter information to obtain a current preference result of the target object;
step S206: obtaining a historical preference result of the target object, and determining a content recommendation list according to the current preference result and the historical preference result;
step S208: recommending contents for the target object according to the content recommendation list.
Through the technical scheme of the embodiment of the invention, at least one of the following parameter information stored in the target client is obtained: the content data browsed by the target object, the behavior data of the target object and the label data of the target object; calling a preference algorithm of the target object to calculate the parameter information to obtain a current preference result of the target object; obtaining a historical preference result of the target object, and determining a content recommendation list according to the current preference result and the historical preference result; recommending contents for the target object according to the content recommendation list. That is to say, in the embodiment of the present invention, the current preference result of the target object may be determined according to one or more of content data browsed by the target object, behavior data of the target object, and tag data of the target object, so as to determine a content recommendation list, and recommend content for the target object according to the content recommendation list. By adopting the technical scheme, the problem that the accuracy of recommending and reading content for the target object based on the interested content of the target object is low in the related technology is solved, and the accuracy of recommending the content for the user is improved.
In an optional embodiment, in order to improve the accuracy of the recommended content, the following technical scheme may be further performed: acquiring historical recommendation data of a target object, wherein the historical recommendation data of the target object is saved in a recommendation log of the target client; filtering the content recommendation list according to the historical recommendation data of the target object; and sequencing the filtered content recommendation list to obtain a target recommendation list, and recommending the content for the target object according to the target recommendation list.
It should be noted that, the embodiment of the present invention may filter the historical recommendation data in the content recommendation list, for example, if the content appears in the historical recommendation data for many times, the historical recommendation data may continue to appear in the content recommendation list, and the more the historical recommendation data appears, the more the sequence appears in the target recommendation list, the more the historical recommendation data appears, and the more the historical recommendation data appears in the target recommendation list, and the user is recommended to the user.
In practical operation, the parameter information may refer to one or more calculation processes for determining the current preference result of the target object, specifically:
1) under the condition that the parameter information is the behavior data of the target object, calling a preference algorithm of the target object to calculate the behavior data of the target object to obtain a current preference result of the target object, wherein the preference result comprises the following steps: acquiring behavior weights of a plurality of target objects and behavior times of the target object corresponding to the behavior weight of each target object in the behavior weights of the plurality of target objects from the behavior data of the target objects; and calculating the behavior weight of each target object and the behavior times of the target objects through a behavior calculation algorithm to obtain the behavior scores of the target objects, and taking the behavior scores of the target objects as the current preference result of the target objects, wherein the preference algorithm of the target objects comprises the behavior calculation algorithm.
2) In an optional embodiment of the present invention, in a case that the parameter information is tag data of the target object, invoking a preference algorithm of the target object to calculate the tag data of the target object includes: calculating the tag data of the target object through a tag calculation algorithm to obtain a tag importance score and a tag scarcity score, wherein the preference algorithm of the target object comprises the tag calculation algorithm; and obtaining the label score of the target object according to the label importance score and the label scarcity score, and taking the label score of the target object as the current preference result of the target object.
3) In an optional embodiment of the present invention, when the parameter information is content data browsed by the target object, the content data browsed by the target object may be directly acquired from a log record stored in a target client, and a manner of acquiring the content data browsed by the target object is not limited in the embodiment of the present invention.
In the process of determining the current preference result of the user, a time factor needs to be considered, that is, as time increases, if the user has not performed any operation on the recommended content of interest, it is likely that the user loses interest in the recommended content, so the process of determining the preference result of the target object according to the preference decay score is very important, in the embodiment of the present invention, after the parameter information is calculated by invoking the preference algorithm of the target object to obtain the current preference result of the target object, the method further includes:
determining a preference decay score based on the original heat value of the preference content, the creation time of the preference content, the current time, and the cooling coefficient; determining whether to update a current preference result of the target object according to the preference decay score.
Specifically, the preference decay score h (t) is calculated according to the following formula: h (t) ═ Ha exp [ - γ (t-tpost)/86400 ]; where Ha is the original heat value of the preference content, tpost is the creation time of the preference content, t is the current time, γ is the cooling coefficient, and exp is an exponential function with e as the base. Determining to update the current preference result of the target object under the condition that the preference decay fraction is larger than a preset threshold value; determining not to update the current preference result of the target object when the preference decay score is less than a preset threshold.
In order to better understand the above technical solution, the following alternative flow chart is used to explain the whole flow of the content recommendation method.
The main inventive idea of the embodiment of the invention is as follows: and (4) recommending the content by integrating multiple factors such as the behavior times, the behavior types, the behavior time attenuation of the target object, the IF-IDF and the like.
An algorithm flow for recommending content based on a behavior of a target object and a content tag is shown in fig. 2, and specifically, the algorithm execution process is as follows:
firstly, the behaviors of the target object need to be classified, and a 'life family' page of the smart APP is a block providing personalized reading contents for the target object, and comprises related contents of multiple topics of selection, intelligence, activities, food, fashion, life, health and the like. Since the content of interest is different for each target object, the behavior for different content will vary. And according to the differences of the different target objects in the content operation, the requirements of the target objects on the content reading subject are further known, and the reading contents of different subjects are provided for the target objects.
1) The embodiment of the present invention further introduces a concept of time decay (equivalent to the preference decay fraction of the above embodiment), specifically:
the time attenuation refers to the attenuation of a preference value according to a certain attenuation coefficient along with time, and the calculation formula of the time attenuation is as follows:
H(t)=Ha*exp[-γ*(t-tpost)/86400];
where Ha is the original heat value of the content, i.e. the heat value calculated by the amount of interaction; with an exponential function with e as base, tpost is the creation time of the content.
The attenuation is measured in days, so if the time unit used by the system is seconds, it is divided by 86400 seconds of a day.
γ is the so-called "gravity factor", i.e. the cooling coefficient, the greater the value, the more rapidly the heat of the post falls.
After the target object has paid attention to the contents of the related tags, there is no operation on the contents related to the tags for a long time, and the target object may lose interest in the contents and then does not push the contents.
2) The embodiment of the invention also provides a value of a commonly used weighting Technology (TFIDF) for information retrieval data mining, and the TFIDF value is used for measuring the key degree of a label to a target object. TF-IDF is actually: TF IDF, for evaluating the importance of a word to one of a set of documents or a corpus. The TF value (corresponding to the label score of the target object in the above embodiment) is calculated as the importance degree (appearance frequency) of a certain label among all labels of the target object, and is specifically realized by the following formula:
the IDF value reflects the scarcity degree of one label, if all target objects of one label are present, the IDF value is smaller, and conversely, if only a few target objects of one label are present, the IDF value is larger.
3) The embodiment of the invention also introduces a concept of behavior weight value of the target object, which is specifically as follows:
the different behaviors of the target object operating on different contents (corresponding to the behavior data of the target object of the above-described embodiment) affect the likeness of the target object to the contents. The behaviors of the target object mainly comprise click-in, praise, collection, forwarding, comment and the like. "click through" indicates that the target object has a weak degree of attention to the content; "like" and "favorite" illustrate that the target object has a certain degree of attention to the content; "forward" and "comment" illustrate that the target object has a great interest in the content. The weight value of the behavior type is set according to the service requirement, as shown in table 1 below:
as shown in table 1 above, the statistics of behavior times of different behaviors (such as click-through, like, favorite, forward, and comment) of different target objects to the same tag are obtained, and the behavior times are derived from a buried event at the front end of the page.
The embodiment of the invention has the following optional implementation scheme:
if the interest tag is selected for the login target object, an initial interest value (a) is set for the interest tag of the target object.
1) If the history of the target object ever sees the content containing the label, and the interest value exists;
wherein H (t) the score of the target object is calculated once a day, and H (t) represents the decay value of the score value of the tag of the target object with time. If the history of the target object ever sees the content containing the label, the value of H (t) exists, and if the target object has operation behavior on the content containing the label for the first time, the value of H (t) does not exist.
2) Manually selecting a tagged interest tag of a target object, and if selected, setting an initial interest value (a) for the interest tag of the target object;
u represents the target object;
i represents the label;
j represents different behavior types, such as comment, forwarding and the like;
wij, which represents the specific gravity set for different behavior types of the label;
nij, representing the number of occurrences of different behavior types for the tag;
TFij, the importance degree (frequency of occurrence) of a certain label in all content labels representing all behavior types of the target object;
IDFi: reflecting the scarcity of a label;
3) if the history of the target object has seen content containing this tag and no interesting tag has been selected:
4) if the target object has operation behavior on the content containing the label for the first time and the interest value exists;
5) if the target object has an operation behavior on the content containing the tag for the first time and the interested tag is not selected;
it can be seen that, according to the technical scheme of the embodiment of the present invention, the target object-based proposal for recommending the APP content is based on different contributions to different behavior operations of the APP content recommending plate; the preference degrees of different degrees of the target object reflected by different operations can be utilized to more highlight the preference of the target object to different subject contents so as to carry out accurate message content push; then, the embodiment of the present invention further refers to a scheme that can recommend article content based on the operation of the target object on the content including the tag attribute, because related tags are marked on articles with different topics, and because one content can correspond to a plurality of tags, the amount of basic data for analysis of the target object can be increased, so that the recommendation deviation rate is lower.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, but may also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solution of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g. a mobile phone, a computer, a mobile terminal, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a content recommendation apparatus is further provided, which is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a configuration of a content recommendation apparatus according to an embodiment of the present invention; the content recommendation apparatus shown in fig. 4 includes:
an obtaining module 40, configured to obtain at least one of the following parameter information stored in the target client: the browsed content data of the target object, the behavior data of the target object and the label data of the target object;
the calling module 42 is configured to call a preference algorithm of the target object to calculate the parameter information, so as to obtain a current preference result of the target object;
a first processing module 44, configured to obtain a historical preference result of the target object, and determine a content recommendation list according to the current preference result and the historical preference result;
and a second processing module 46, configured to recommend content for the target object according to the content recommendation list.
Through the technical scheme of the embodiment of the invention, at least one of the following parameter information stored in the target client is obtained: the browsed content data of the target object, the behavior data of the target object and the label data of the target object; calling a preference algorithm of the target object to calculate the parameter information to obtain a current preference result of the target object; obtaining a historical preference result of the target object, and determining a content recommendation list according to the current preference result and the historical preference result; recommending contents for the target object according to the content recommendation list. That is to say, the embodiment of the present invention may determine the current preference result of the target object according to one or more of the browsed content data of the target object, the behavior data of the target object, and the tag data of the target object, further determine the content recommendation list, and recommend content for the target object according to the content recommendation list. By adopting the technical scheme, the problem that the accuracy of recommending and reading content for the target object based on the interested content of the target object is low in the related technology is solved, and the accuracy of recommending the content for the user is improved.
In an optional embodiment, in order to improve the accuracy of the recommended content, the second processing module is further configured to obtain historical recommendation data of a target object, where the historical recommendation data of the target object is stored in a recommendation log of the target client; filtering the content recommendation list according to the historical recommendation data of the target object; and sequencing the filtered content recommendation list to obtain a target recommendation list, and recommending the content for the target object according to the target recommendation list.
It should be noted that, the embodiment of the present invention may filter the historical recommendation data in the content recommendation list, for example, if the content appears in the historical recommendation data for many times, the historical recommendation data may continue to appear in the content recommendation list, and the more the historical recommendation data appears, the more the sequence appears in the target recommendation list, the more the historical recommendation data appears, and the more the historical recommendation data appears in the target recommendation list, and the user is recommended to the user.
In practical operation, the parameter information may refer to one or more calculation processes for determining the current preference result of the target object, specifically:
1) in a case that the parameter information is behavior data of the target object, the invoking module is further configured to: acquiring behavior weights of a plurality of target objects from the behavior data of the target objects and behavior times of the target object corresponding to the behavior weight of each target object in the behavior weights of the plurality of target objects; and calculating the behavior weight of each target object and the behavior times of the target object through a behavior calculation algorithm to obtain a behavior score of the target object, and taking the behavior score of the target object as a current preference result of the target object, wherein the preference algorithm of the target object comprises the behavior calculation algorithm.
2) In an optional embodiment of the present invention, in a case that the parameter information is tag data of the target object, the invoking module is further configured to: calculating the tag data of the target object through a tag calculation algorithm to obtain a tag importance score and a tag scarcity score, wherein the preference algorithm of the target object comprises the tag calculation algorithm; and obtaining the label score of the target object according to the label importance score and the label scarcity score, and taking the label score of the target object as the current preference result of the target object.
3) In an optional embodiment of the present invention, in a case that the parameter information is content data browsed by the target object, the obtaining module 40 is further configured to directly obtain the content data browsed by the target object from a log record stored in the target client, and a manner of obtaining the content data browsed by the target object is not limited in the embodiment of the present invention.
In the process of determining the current preference result of the user, a time factor needs to be considered, that is, as time increases, if the user has not performed any operation on the recommended content of interest, it is likely that the user loses interest in the recommended content, so the process of determining the preference result of the target object according to the preference decay score is very important, in the embodiment of the present invention, after the parameter information is calculated by invoking the preference algorithm of the target object to obtain the current preference result of the target object, the method further includes:
a first processing module 44, further configured to determine a calculated preference decay score based on the original heat value of the preference content, the creation time of the preference content, the current time, and the cooling coefficient; and determining whether to update the current preference result of the target object according to the preference decay score.
Specifically, the preference decay score h (t) is calculated according to the following formula: h (t) ═ Ha exp [ - γ (t-tpost)/86400 ]; where Ha is the original heat value of the preference content, tpost is the creation time of the preference content, t is the current time, γ is the cooling coefficient, and exp is an exponential function with e as the base.
Specifically, the first processing module 44 is further configured to determine to update the current preference result of the target object if the preference decay score is greater than a preset threshold; determining not to update the current preference result of the target object if the preference decay score is less than a preset threshold.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
In summary, the technical scheme of the embodiment of the invention achieves the following technical effects:
1) experience with better target objects: by utilizing a reasonable algorithm recommendation model and according to the behavior record of the target object, interested contents and preference labels of the target object can be accurately mastered, and the recommendation of different target objects is carried out according to the related contents positioned by the labels, so that thousands of people are realized, the reading interest habit of the target object is better met, and the target object has better use experience.
2) A more accurate algorithm pushes the result: based on historical behaviors, different specific gravity degrees brought by different behaviors, time attenuation coefficients, TFIDF and other comprehensive factors, algorithm design and calculation are carried out, and the pushing accuracy is improved.
3) More economic benefits are: the preference of the target object is grasped for pushing, the content which is interested by the client is improved, the buying desire of the target object is improved, the market acceptance is increased inevitably, and further the economic benefit can be improved.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the following steps:
s1, acquiring at least one of the following parameter information stored in the target client: browsed content data, behavior data and tag data of the target object;
s2, calling a preference algorithm to calculate the parameter information to obtain a current preference result;
s3, obtaining the historical preference result of the target object, and determining a content recommendation list according to the current preference result and the historical preference result;
and S4, recommending content for the target object according to the content recommendation list.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring at least one of the following parameter information stored in the target client: browsed content data, behavior data and tag data of the target object;
s2, calling a preference algorithm to calculate the parameter information to obtain a current preference result;
s3, obtaining the historical preference result of the target object, and determining a content recommendation list according to the current preference result and the historical preference result;
and S4, recommending content for the target object according to the content recommendation list.
Optionally, in this option, the specific examples in this embodiment may refer to the examples described in the foregoing embodiment and optional implementation, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and alternatively, they may be implemented in program code that is executable by a computing device, such that it may be stored in a memory device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that shown or described herein, or separately fabricated into individual integrated circuit modules, or multiple ones of them fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the principle of the present invention shall be included in the protection scope of the present invention.