Disclosure of Invention
Therefore, according to the embodiments of the present disclosure, a method for generating a search keyword recommendation model, a method for recommending keywords, and a device for recommending keywords are provided, and search keywords are recommended by combining information of related actions such as user browsing and searching, so that user search requirements can be met more accurately, and search cost is reduced.
In a first aspect of the present disclosure, there is provided a search keyword recommendation model generation method, including:
acquiring first search behavior records and/or second search behavior records of a plurality of users, wherein the first search behavior records comprise browsed contents and keywords searched after browsing, and the second search behavior records comprise keywords searched continuously and search sequences among the keywords;
generating a first association relation between the content and the keywords according to the first search behavior record and/or generating a second association relation between the keywords according to the second search behavior record;
and generating a keyword recommendation model according to the first association relation and/or the second association relation.
Further, the generating the first association relationship between the content and the keyword according to the first search behavior record includes:
extracting browsed content and keywords searched after browsing the content from the first search behavior record;
calculating the relevance of the content and the keywords;
and generating the first association relation according to the content and the keywords of which the correlation is greater than or equal to a first threshold value.
Further, the generating the second association relationship between the keywords according to the second search behavior record includes:
extracting continuously searched keywords from the second search behavior record to form a plurality of keyword links;
calculating the score of each keyword link;
and generating the second association relation according to the keyword links with the scores greater than or equal to a second threshold value.
Further, the generating the keyword recommendation model according to the first association relationship and/or the second association relationship includes:
acquiring keyword recommendation ordering based on relevance and/or click rate (CTR) priori;
calculating posterior scores of the recommended keywords according to the first association relationship and/or the second association relationship;
and adjusting the keyword recommendation sequence according to the posterior score to obtain the keyword recommendation model.
Further, the first search behavior record and the second search behavior record further include viewing information of the search results.
In a second aspect of the present disclosure, there is provided a search keyword recommendation method, including:
acquiring content requested to browse by a user or keywords searched currently;
inputting the content or the keywords into a keyword recommendation model to obtain one or more recommended keywords, wherein the keyword recommendation model is generated according to the method of the first aspect;
and sending the recommended keywords to be presented on a terminal interface of the user.
In a third aspect of the present disclosure, there is provided a search keyword recommendation model generation apparatus including:
the system comprises an acquisition module, a search module and a search module, wherein the acquisition module is used for acquiring first search behavior records and/or second search behavior records of a plurality of users, the first search behavior records comprise browsed contents and keywords searched after browsing, and the second search behavior records comprise keywords searched continuously and search sequences among the keywords;
the incidence relation generating module is used for generating a first incidence relation between the content and the keywords according to the first search behavior record and/or generating a second incidence relation between the keywords according to the second search behavior record;
and the model generation module is used for generating a keyword recommendation model according to the first association relation and/or the second association relation.
In a fourth aspect of the present disclosure, there is provided a search keyword recommendation apparatus including:
the acquisition module is used for acquiring the content requested to browse by the user or the keywords searched currently;
a recommendation module, configured to input the content or the keyword into a keyword recommendation model, to obtain one or more recommended keywords, where the keyword recommendation model is generated according to the method of the first aspect;
and the sending module is used for sending the recommended keywords to be presented on a terminal interface of the user.
In a fifth aspect of the present disclosure, an electronic device is provided. The electronic device includes: a memory and a processor, the memory having stored thereon a computer program, the processor implementing the method according to the first or second aspect when executing the program.
In a sixth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the method according to the first or second aspect.
According to the embodiment of the disclosure, the search keyword recommendation model is generated by considering the information of 'search after search' (search keyword after browsing content) and 'search after search' (search keyword after searching other keywords) in the search and viewing process of the user so as to recommend the search keyword, so that the real search requirement of the user can be met more accurately, the search path is effectively shortened, the search cost is reduced, the user experience is improved, and the information flow and the use viscosity of the searching user are improved; by calculating the correlation between the content and the keywords and the score of the continuous search keyword link, the situation that the randomly generated search intention and the like do not reflect the real search requirement of the user can be eliminated, and the generated association relationship between the content and the search words and the association relationship between the search words are more accurate and more reliable; the association relation is used as a posterior target to optimize the original keyword recommendation ordering model, so that the original keyword recommendation ordering model can be well fused with other keyword recommendation targets.
It should be understood that what is described in this summary is not intended to limit the critical or essential features of the embodiments of the disclosure nor to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following description.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments in this disclosure without inventive faculty, are intended to be within the scope of this disclosure.
In addition, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
When using an application, the operations performed by a user to obtain desired information are typically processes that include a plurality of actions. The process may include multiple search activities, where a user may extend from searching for a keyword to multiple keywords, where the extended path reflects the search needs of a large number of users derived from a keyword, i.e., after searching for a keyword, the search needs are better supplemented by other keywords. The process may also include a viewing behavior and a searching behavior of the user, where the user may generate some searching requirements during browsing the content such as the recommended articles of the information stream, that is, see some content to generate associations, search keywords related to the content, and browse more related information. The behaviors of the two types of searching after watching (searching keywords after browsing the content) and searching after searching (searching other keywords after searching the keywords) can reflect the actual searching intention of the user, and if the searching keywords are recommended by combining the information of the behaviors, the searching requirement of the user can be better met.
To this end, a first embodiment of the present disclosure provides a search keyword recommendation model generation method, the flow of which is shown in fig. 1, including:
s101, acquiring first search behavior records and/or second search behavior records of a plurality of users, wherein the first search behavior records comprise browsed contents and keywords searched after browsing, and the second search behavior records comprise keywords searched continuously and search sequences among the keywords.
When the user using the application program performs browsing, searching and other actions, the action information of the user in the information flow is recorded in a background database to form a searching action record of a large number of users. The first search behavior record is a record of searching after watching, for example, a user browses a certain article and searches a certain keyword, and by recording a large number of behaviors of the user, the link relation between the browsed article and other contents and the searched keyword can be embodied.
The second search behavior record is a record of searching after searching, for example, after a user searches one keyword, the user searches another keyword, and through recording a large number of behaviors of the user, the link relation between the keywords can be reflected from the view of the real search requirement of the user.
Optionally, the keywords in the first search behavior record are keywords searched in a set first time window after the user finishes browsing, so that most search behaviors irrelevant to the browsed content are eliminated, and the relevance between the recorded browsed content and the keywords is ensured. Optionally, the time interval between the keywords of the continuous search in the second search behavior record is smaller than the set second time window, so that keywords of the twice search behaviors irrelevant to the search intention are eliminated, and the data volume of subsequent processing is reduced. The length of the time window is set according to an empirical value when the user operates, for example, the first time window is 1 minute, and the second time window is 2 minutes.
S102, generating a first association relation between the content and the keywords according to the first search behavior record and/or generating a second association relation between the keywords according to the second search behavior record.
Optionally, a large number of content browsed by the user and keywords searched after browsing are extracted from the first search behavior record, associated keywords are determined for each content, and a first association relationship is generated, wherein the first association relationship comprises a combination of each content and a corresponding keyword or keywords. And extracting a plurality of keywords continuously searched by the user and the search sequence between the keywords from the second search behavior record, establishing links between the keywords searched in the front and the keywords searched in the rear, and generating a second association relation between the keywords, wherein the second association relation comprises a combination of a plurality of associated keywords.
Optionally, in order to initiate a search due to an association that the user has not generated after browsing the content, the step includes calculating a correlation of the browsed content and the browsed search keyword; in order to attributing the continuous search of the user based on the same search requirement, the step comprises calculating the score of the keyword links composed of the keywords of the continuous search, thereby excluding the search intention randomly generated by some users and ensuring that the link relation between the content and the keywords and the link relation of a plurality of keywords are more accurate and reliable.
S103, generating a keyword recommendation model according to the first association relation and/or the second association relation.
Based on the original keyword ordering model, the posterior targets of 'search after looking' and 'search after searching' are merged, and the first association relation and/or the second association relation are combined for optimization on the basis of the ordering model purely depending on the relevance and CTR priori, so that a new keyword recommendation model is obtained, and the ordering targets are as follows: correlation CTR (1+user true posterior score), where the "user true posterior score" is obtained by posterior calculation of the correlation and the ranking result of CTR based on the first association and/or the second association.
According to the method and the device for searching the keyword recommendation, the keyword recommendation model is generated by considering the information of 'post search' and 'post search' in the searching and checking processes of the user, so that the real searching requirement of the user can be met more accurately, the searching path is effectively shortened, the searching cost is reduced, and the information flow and the using viscosity of the searching user are further improved.
A second embodiment of the present disclosure provides a search keyword recommendation model generation method, in which a keyword recommendation model is generated from a first search behavior record and a second search behavior record. The flow of the method is shown in fig. 2, and comprises the following steps:
s201, acquiring first search behavior records and second search behavior records of a plurality of users, wherein the first search behavior records comprise browsed contents and keywords searched after browsing, and the second search behavior records comprise keywords searched continuously and search sequences among the keywords.
S202, extracting browsed content and keywords searched after browsing the content from the first search behavior record.
S203, calculating the correlation between the content and the keywords.
Wherein, the relevance between the content and the keywords can be calculated by means of keyword matching, semantic analysis and the like and expressed in a numerical mode, so that the numerical value of the relevance is obtained for the link relation between each content and the keywords.
S204, generating a first association relation according to the content and the keywords of which the correlation is greater than or equal to a first threshold value.
And comparing the calculated correlation with a preset first threshold value, screening out keywords smaller than the first threshold value, reserving contents larger than or equal to the first threshold value and corresponding search keywords, and generating a first association relation according to the reserved contents and keywords. For example, according to the recorded data, after browsing a certain article about the Zhou Jielun new album, the user searches for "cry", "wont cry", "july-day awnings", "Zhou Jie", and after the correlation calculation, the article has low correlation with "Zhou Jie", and the keyword "Zhou Jie" is screened out, so that the generated first association relationship may be represented as "article identifier" > (cry, wont cry, july-day awnings) ".
S205, extracting keywords in continuous search from the second search behavior record to form a plurality of keyword links.
S206, calculating the score of each keyword link.
The score is calculated according to a preset standard after the data recorded by the search behavior are mined, cleaned and normalized, and the score can reflect the association degree between the keywords of continuous search in the keyword links, for example, the scores of different keyword links are determined according to the directions of the links and the frequency of search, and the higher the number of links with the same directions is, the higher the frequency of links to be searched is, and the higher the corresponding score is.
S207, generating the second association relation according to the keyword links with the scores greater than or equal to a second threshold value.
And comparing the calculated score with a preset second threshold value, screening out keyword links smaller than the second threshold value, reserving keyword links larger than or equal to the second threshold value, and generating a second association relation according to the reserved keyword links. For example, according to the recorded data, the user searches for "Zhou Jielun new album", searches for "cry", "wont cry", "jun day african", "Zhou Jie", and screens out the keyword links of "Zhou Jielun" and "Zhou Jie" based on the low score of the links, the generated first association relationship may be expressed as "Zhou Jielun new album", "cry", "Zhou Jielun new album", "wont cry" and "Zhou Jielun new album", "jun day african".
S208, keyword recommendation ordering based on relevance and/or click rate (CTR) priori is obtained.
Wherein the keyword recommendation ranking is generated by a ranking model based on relevance and/or click rate (CTR) priors.
S209, calculating posterior scores of the recommended keywords according to the first association relation and/or the second association relation.
And S210, adjusting the keyword recommendation sequence according to the posterior score to obtain the keyword recommendation model.
When the keyword recommendation model is applied, the recommended keywords will be output from high to low in the adjusted ranking. Optionally, the number of keywords recommended by the model is not greater than a preset threshold, so as to avoid affecting the search experience of the user.
In this embodiment, after step S201, the following steps S202 to S204 and S205 to S207 are executed in parallel. Alternatively, steps S202 to S204 and S205 to S207 may be sequentially performed, and the order of their execution may be interchanged. As an optional embodiment of the disclosure, the search keyword recommendation model may also be generated only according to the first search behavior record or only according to the second search behavior record, and the flow thereof is not described herein.
Optionally, the first search behavior record and the second search behavior record further include viewing information of search results after each search of the keywords. Further, in the step of generating the first association relationship and/or the second association relationship, keywords searched after browsing the content or keywords searched continuously are also screened based on the viewing information of the search result, for example, only keywords of the search behavior in which the search result is viewed are reserved.
According to the embodiment of the disclosure, through calculating the correlation between the content and the keywords and the score of the continuously searched keyword links, the situation that randomly generated search intention and the like do not reflect the real search requirement of the user can be eliminated, and the generated association relationship between the content and the search words and the association relationship between the search words are more accurate and more reliable; the association relation is used as a posterior target to optimize the original keyword recommendation ordering model, so that the original keyword recommendation ordering model can be well fused with other keyword recommendation targets.
A third embodiment of the present disclosure provides a search keyword recommendation method, as shown in fig. 3, including:
s301, acquiring content requested to browse by a user or keywords searched currently.
When a user clicks a link (such as an article title) of content on a terminal interface, the terminal sends a browsing request message to a server, and the server acquires the content requested to be browsed by the user from the browsing request message; when a user inputs a keyword in a search box of a terminal interface and triggers a search function, the terminal searches a request message from a server, and the server acquires the keyword currently searched from the search request message.
S302, inputting the content or the keywords into a keyword recommendation model to obtain one or more recommended keywords.
Wherein the keyword recommendation model is generated according to the method described in the first or second embodiment. The number of recommended keywords is not greater than a preset threshold.
And S303, sending the recommended keywords to be presented on a terminal interface of the user.
Optionally, the server acquires the content page requested to browse according to the browse request message, or generates a search result page according to the search request message, embeds the recommended keyword into the content page requested to browse or the search result page, and sends the content page or the search result page to the user terminal, so that the recommended keyword is presented on the terminal interface of the user. According to the keyword recommendation model generated by the method, keywords which meet the user requirements more accurately can be recommended when the user browses or searches, so that the search path is shortened, and the search cost is reduced.
The above embodiment is described below with reference to fig. 4. Fig. 4 (a) shows a scenario in which keywords are recommended when a user browses content, in which, when the user requests browsing of an article in a terminal application, a server acquires an article currently to be browsed, inputs an identification of the content into a keyword recommendation model previously generated according to the method of the above embodiment, obtains a plurality of recommended keywords, and transmits the recommended keywords to the user's terminal to be presented after the end of the article body. Fig. 4 (b) shows a scenario when a user performs a keyword search, in which the user inputs a keyword in a search box and performs a search, a server acquires the keyword and inputs it into a keyword recommendation model previously generated according to the method of the above embodiment, a plurality of recommended keywords are obtained, and the recommended keywords are transmitted to the user's terminal to be presented in a search result page.
A fourth embodiment of the present disclosure provides a search keyword recommendation model generating apparatus, the apparatus having a structure as shown in fig. 5, including:
an obtaining module 510, configured to obtain a first search behavior record and/or a second search behavior record of a plurality of users, where the first search behavior record includes browsed content and keywords searched after browsing; the second search behavior record includes keywords of a continuous search and a search order between the keywords.
The association generating module 520 is configured to generate a first association between the content and the keywords according to the first search behavior record and/or generate a second association between the keywords according to the second search behavior record.
The model generating module 530 is configured to generate a keyword recommendation model according to the first association relationship and/or the second association relationship.
According to the device disclosed by the embodiment of the disclosure, the search keywords are recommended by considering the information of 'post search' and 'post search' in the searching and checking processes of the user, so that the real searching requirement of the user can be met more accurately, the searching path is effectively shortened, the searching cost is reduced, and the use viscosity of the information flow and the searching user is further improved.
Optionally, the generating module 520 includes:
a first extracting unit 521, configured to extract browsed content and keywords searched after browsing the content from the first search behavior record;
a first calculating unit 522 for calculating a correlation between the content and the keyword;
a first generating unit 523, configured to generate the first association relationship according to the content and the keyword, where the relevance is greater than or equal to a first threshold;
a second extracting unit 524, configured to extract keyword groups that are searched continuously from the second search behavior record to form a plurality of keyword links;
a second calculation unit 525 for calculating a score of the keyword link;
and a second generating unit 526, configured to generate the second association relationship according to the keyword link whose score is greater than or equal to a second threshold.
Optionally, the recommendation module 530 includes:
a ranking obtaining unit 531, configured to obtain keyword recommendation rankings based on relevance and/or click rate (CTR) priors;
a calculating unit 532, configured to calculate a posterior score of the recommended keyword according to the first association relationship and/or the second association relationship;
a ranking adjustment unit 533 for adjusting the keyword recommendation ranking according to the posterior score.
A fifth embodiment of the present disclosure provides a search keyword recommendation apparatus, the apparatus having a structure as shown in fig. 6, including:
an obtaining module 601, configured to obtain content being browsed by a user or a keyword currently searched;
a recommendation module 602, configured to input the content or the keywords into a keyword recommendation model, to obtain one or more recommended keywords, where the keyword recommendation model is generated according to the method of the first aspect;
and the sending module 603 is configured to send the recommended keywords to be presented on a terminal interface of the user.
The device disclosed by the embodiment of the invention can recommend the keywords which meet the user requirements more accurately when the user browses or searches, so that the search path is shortened, and the search cost is reduced.
The embodiment of the disclosure also provides electronic equipment. The electronic device includes: a memory and a processor, the memory having stored thereon a computer program which when executed implements the method described with reference to any of figures 1 to 3. Further, there is also provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the method described with reference to any of figures 1 to 3. Fig. 7 shows a schematic block diagram of an electronic device 700 that may be used to implement embodiments of the present disclosure. As shown, the device 700 includes a Central Processing Unit (CPU) 701 that can perform various suitable actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM) 702 or loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 may also be stored. The CPU 701, ROM702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in device 700 are connected to I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processing unit 701 performs the respective methods and processes described above. For example, in some embodiments, the method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 700 via ROM702 and/or communication unit 709. When the computer program is loaded into RAM 703 and executed by CPU 701, one or more steps of the method described above may be performed. Alternatively, in other embodiments, CPU 701 may be configured to perform the methods by any other suitable means (e.g., by means of firmware).
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), etc.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Moreover, although operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.