Keyword association method and device, electronic equipment and storage medium

文档序号:1921696 发布日期:2021-12-03 浏览:18次 中文

阅读说明:本技术 关键词联想方法、装置、电子设备及存储介质 (Keyword association method and device, electronic equipment and storage medium ) 是由 宗宇 李婷 丁锐 于 2021-09-18 设计创作,主要内容包括:本发明提供一种关键词联想方法、装置、电子设备及存储介质,可应用于人工智能领域或金融领域,对于一个用户,可以根据其对知识库的搜索记录来计算表征其对不同主题偏好程度的主题特征,进而获取表征知识库中不同关键词热门程度的关键词特征,再以主题特征和关键词特征来向该用户推荐相关的目标关键词。基于本发明,能够实现对用户的个性化联想词推荐,从而更加符合用户的期望,提升搜索体验和效率。(The invention provides a keyword association method, a keyword association device, electronic equipment and a storage medium, which can be applied to the field of artificial intelligence or the field of finance. Based on the invention, the personalized suggested word recommendation for the user can be realized, so that the expectation of the user is better met, and the search experience and efficiency are improved.)

1. A keyword association method, the method comprising:

calculating the theme characteristics of a target user according to the search records of the target user on a knowledge base, wherein the theme characteristics can represent the preference degrees of the target user on different themes;

acquiring keyword features of the knowledge base, wherein the keyword features can represent the popularity of different keywords in the knowledge base;

and pushing target keywords related to the topic characteristics to the target user according to the topic characteristics and the keyword characteristics.

2. The method of claim 1, wherein the calculating the subject matter characteristics of the target user according to the search records of the target user to the knowledge base comprises:

calling a target search record of the target user on the knowledge base in a target time period, and extracting a search index from the target search record, wherein the search index at least comprises the click rate of the target user on knowledge under different topics;

for each topic, calculating the number of times of searching for the topic according to the click rate of the target user in the knowledge of the topic;

and determining the theme characteristics according to the searching times of different themes.

3. The method of claim 2, wherein the search criteria further comprises: the browsing duration of the target user for knowledge under different topics;

the method for calculating the theme characteristics of the target user according to the search records of the target user to the knowledge base further comprises the following steps:

for each topic, calculating the search time of the topic according to the browsing time of the target user knowledge under the topic;

correspondingly, the determining the theme characteristics according to the number of searches of different themes includes:

and determining the theme characteristics according to the search times and the search duration of different themes.

4. The method of claim 1, wherein the pushing of the target keywords related thereto to the target user according to the topic features and the keyword features comprises:

acquiring a first weight coefficient of the theme characteristic and a second weight coefficient of the keyword characteristic;

for each keyword in the knowledge base, calculating the association degree of the keyword and the target user according to the first feature of the topic to which the keyword belongs in the topic features, the first weight coefficient, the second feature of the keyword in the keyword features and the second weight coefficient;

and sorting and outputting different keywords in the knowledge base in the order of high relevance degree to low relevance degree.

5. The method according to claim 4, wherein the obtaining the first weight coefficient of the topic feature and the second weight coefficient of the keyword feature comprises:

and acquiring the first weight coefficient and the second weight coefficient through a logistic regression model.

6. A keyword association apparatus, characterized in that the apparatus comprises:

the topic feature calculation module is used for calculating topic features of a target user according to search records of the target user on a knowledge base, wherein the topic features can represent preference degrees of the target user on different topics;

the keyword feature acquisition module is used for acquiring keyword features of the knowledge base, and the keyword features can represent the popularity of different keywords in the knowledge base;

and the keyword pushing module is used for pushing the target keywords related to the theme characteristics and the keyword characteristics to the target user according to the theme characteristics and the keyword characteristics.

7. The apparatus of claim 6, wherein the subject feature calculation module is specifically configured to:

calling a target search record of the target user on the knowledge base in a target time period, and extracting a search index from the target search record, wherein the search index at least comprises the click rate of the target user on knowledge under different topics; for each topic, calculating the number of times of searching for the topic according to the click rate of the target user in the knowledge of the topic; and determining the theme characteristics according to the searching times of different themes.

8. The apparatus of claim 6, wherein the keyword pushing module is specifically configured to:

acquiring a first weight coefficient of the theme characteristic and a second weight coefficient of the keyword characteristic; for each keyword in the knowledge base, calculating the association degree of the keyword and the target user according to the first feature of the topic to which the keyword belongs in the topic features, the first weight coefficient, the second feature of the keyword in the keyword features and the second weight coefficient; and sorting and outputting different keywords in the knowledge base in the order of high relevance degree to low relevance degree.

9. An electronic device, characterized in that the electronic device comprises: at least one memory and at least one processor; the memory stores a program, and the processor calls the program stored in the memory, and the program is used for realizing the keyword association method of any one of claims 1 to 5.

10. A storage medium having stored thereon computer-executable instructions for performing the keyword association method of any one of claims 1 to 5.

Technical Field

The present invention relates to the field of artificial intelligence technologies, and in particular, to a keyword association method and apparatus, an electronic device, and a storage medium.

Background

The intelligent prompt of the search is a sharp tool for applying the search, and mainly has the functions of avoiding the user from inputting wrong search terms, guiding the user to corresponding keywords and improving the user experience.

However, the conventional method of recommending keywords according to popularity often fails to meet the expectations of users.

Disclosure of Invention

In view of the above, to solve the above problems, the present invention provides a keyword association method, apparatus, electronic device and storage medium, and the technical solution is as follows:

a keyword association method, the method comprising:

calculating the theme characteristics of a target user according to the search records of the target user on a knowledge base, wherein the theme characteristics can represent the preference degrees of the target user on different themes;

acquiring keyword features of the knowledge base, wherein the keyword features can represent the popularity of different keywords in the knowledge base;

and pushing target keywords related to the topic characteristics to the target user according to the topic characteristics and the keyword characteristics.

Preferably, the calculating the topic characteristics of the target user according to the search records of the target user to the knowledge base includes:

calling a target search record of the target user on the knowledge base in a target time period, and extracting a search index from the target search record, wherein the search index at least comprises the click rate of the target user on knowledge under different topics;

for each topic, calculating the number of times of searching for the topic according to the click rate of the target user in the knowledge of the topic;

and determining the theme characteristics according to the searching times of different themes.

Preferably, the search index further includes: the browsing duration of the target user for knowledge under different topics;

the method for calculating the theme characteristics of the target user according to the search records of the target user to the knowledge base further comprises the following steps:

for each topic, calculating the search time of the topic according to the browsing time of the target user knowledge under the topic;

correspondingly, the determining the theme characteristics according to the number of searches of different themes includes:

and determining the theme characteristics according to the search times and the search duration of different themes.

Preferably, the pushing of the target keyword related to the target user according to the topic feature and the keyword feature includes:

acquiring a first weight coefficient of the theme characteristic and a second weight coefficient of the keyword characteristic;

for each keyword in the knowledge base, calculating the association degree of the keyword and the target user according to the first feature of the topic to which the keyword belongs in the topic features, the first weight coefficient, the second feature of the keyword in the keyword features and the second weight coefficient;

and sorting and outputting different keywords in the knowledge base in the order of high relevance degree to low relevance degree.

Preferably, the obtaining the first weight coefficient of the topic feature and the second weight coefficient of the keyword feature includes:

and acquiring the first weight coefficient and the second weight coefficient through a logistic regression model.

A keyword association apparatus, the apparatus comprising:

the topic feature calculation module is used for calculating topic features of a target user according to search records of the target user on a knowledge base, wherein the topic features can represent preference degrees of the target user on different topics;

the keyword feature acquisition module is used for acquiring keyword features of the knowledge base, and the keyword features can represent the popularity of different keywords in the knowledge base;

and the keyword pushing module is used for pushing the target keywords related to the theme characteristics and the keyword characteristics to the target user according to the theme characteristics and the keyword characteristics.

Preferably, the theme feature calculation module is specifically configured to:

calling a target search record of the target user on the knowledge base in a target time period, and extracting a search index from the target search record, wherein the search index at least comprises the click rate of the target user on knowledge under different topics; for each topic, calculating the number of times of searching for the topic according to the click rate of the target user in the knowledge of the topic; and determining the theme characteristics according to the searching times of different themes.

Preferably, the keyword pushing module is specifically configured to:

acquiring a first weight coefficient of the theme characteristic and a second weight coefficient of the keyword characteristic; for each keyword in the knowledge base, calculating the association degree of the keyword and the target user according to the first feature of the topic to which the keyword belongs in the topic features, the first weight coefficient, the second feature of the keyword in the keyword features and the second weight coefficient; and sorting and outputting different keywords in the knowledge base in the order of high relevance degree to low relevance degree.

An electronic device, the electronic device comprising: at least one memory and at least one processor; the memory stores a program, and the processor calls the program stored in the memory, wherein the program is used for realizing the keyword association method.

A storage medium having stored therein computer-executable instructions for performing the keyword association method.

Compared with the prior art, the invention has the following beneficial effects:

the invention provides a keyword association method, a keyword association device, electronic equipment and a storage medium, which can be used for calculating topic characteristics representing the preference degrees of a user to different topics according to the search records of the user to a knowledge base, further acquiring keyword characteristics representing the popularity degrees of different keywords in the knowledge base, and recommending related target keywords to the user by using the topic characteristics and the keyword characteristics. Based on the invention, the personalized suggested word recommendation for the user can be realized, so that the expectation of the user is better met, and the search experience and efficiency are improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.

Fig. 1 is a flowchart of a keyword association method according to an embodiment of the present invention;

FIG. 2 is a flowchart of a portion of a keyword association method according to an embodiment of the present invention;

FIG. 3 is a flowchart of another part of a keyword association method according to an embodiment of the present invention;

FIG. 4 is a flowchart of a keyword association method according to another embodiment of the present invention

Fig. 5 is a schematic structural diagram of a keyword association apparatus according to an embodiment of the present invention.

Detailed Description

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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.

In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.

The embodiment of the invention provides a keyword association method, which can improve the ranking of keyword association and provide more satisfactory keyword recommendation for users, and the method is shown in a method flow chart shown in figure 1 and comprises the following steps:

and S10, calculating the theme characteristics of the target user according to the search records of the target user on the knowledge base, wherein the theme characteristics can represent the preference degrees of the target user on different themes.

In the embodiment of the invention, after the target user is detected to log in the search interface, the search record in the knowledge base is called, and the search record contains information generated by each search of the target user, such as search time, search keywords, searched knowledge, browsed knowledge and the like.

In addition, in order to enable the user to search the knowledge needed by the user in the knowledge base, keywords can be extracted from the knowledge according to the content of the knowledge, and the user can match the knowledge in the knowledge base by using the keywords. In addition, considering that different knowledge has corresponding topics, a plurality of topics can be set for the knowledge base, and each topic contains the keywords of the corresponding knowledge.

Therefore, by calling the search record of the target user, the user preference degrees of different subjects can be determined according to the past browsing knowledge.

In a specific implementation process, in step S10, "calculating the topic feature of the target user according to the search record of the target user on the knowledge base" may adopt the following steps, and a flowchart of the method is shown in fig. 2:

s101, retrieving target search records of a target user on the knowledge base in a target time period, and extracting search indexes from the target search records, wherein the search indexes at least comprise click rate of the target user on knowledge under different subjects.

In the embodiment of the present invention, a time period for retrieving the search record may be set, for example, a week closest to the current time period is used as a target time period, so as to invoke the search record of the target user on the knowledge base in the target time period, that is, the target search record.

For the target search record, the information generated by the target user searching the knowledge base each time is contained, so that the specified search index, such as the click rate of the target user on the knowledge under different topics, can be extracted from the target search record. Specifically, a plurality of pieces of knowledge browsed by the target user in the target time period are determined from the target search record, and the target user needs to click the knowledge before each piece of knowledge is browsed, so that the click rate of the target user in the target time period is counted, and each piece of knowledge has a corresponding theme, so that the click rate of the knowledge can be divided into different themes, and the sum of the click rates of all the knowledge in the different themes is obtained to serve as the click rate of the theme.

S102, aiming at each topic, calculating the number of times of searching the topic according to the click rate of the target user in the knowledge of the topic.

In the embodiment of the invention, each piece of knowledge browsed by the target user in the target time period has a corresponding theme, and for this reason, after the click rate of the knowledge is divided into different themes, the search frequency of the theme can be determined according to the click rate of the knowledge under each theme, for example, the click rate of the knowledge can be directly used as the search frequency of the theme.

S103, determining the theme characteristics according to the searching times of different themes.

In the embodiment of the invention, the topics can be sorted by the number of times of search, and the higher the number of times of search indicates that the preference degree of the target user to the topics is higher. Of course, the ratio of the number of searches of each topic may also be calculated according to the number of searches of different topics, and a higher ratio of the number of searches indicates a higher preference degree of the target user for the topic.

In some other embodiments, to optimize the topic characteristics, the search index further includes a browsing duration of the target user's knowledge on different topics. Correspondingly, on the basis of the method flow chart shown in fig. 2, the method further includes the following steps, and the method flow is shown in fig. 3:

and S104, for each topic, calculating the search time of the topic according to the browsing time of the target user knowledge under the topic.

In the embodiment of the invention, for each topic, on one hand, the search times and on the other hand, the search duration are counted. Specifically, the sum of the browsing duration of knowledge under each topic may be used as the search duration of the topic.

Correspondingly, the step S103 "determining the topic features according to the number of searches for different topics" may adopt the following steps:

and determining the theme characteristics according to the searching times and the searching duration of different themes.

In the embodiment of the invention, the preference degree of a target user for a certain theme is influenced by two aspects, wherein the first aspect is the searching times of the theme, and the second aspect is the searching duration of the theme. The influence of the number of searches and the search duration on the preference degree can be set according to actual scenes. Specifically, an algorithm model may be used for prediction, the search times and the search duration of a topic are input into the algorithm model, and the preference degree corresponding to the topic is output by the algorithm model.

And S20, acquiring the keyword characteristics of the knowledge base, wherein the keyword characteristics can represent the popularity of different keywords in the knowledge base.

In the embodiment of the invention, for all the knowledge keywords in the knowledge base, the popularity degree of the keywords can be determined according to the search times of the keywords by the full amount of users, and the keywords are shown to be popular when the search times are higher.

And S30, pushing the target keywords related to the topic characteristics and the keyword characteristics to the target user.

In the embodiment of the invention, the association degrees of different keywords in the knowledge base and the target user are calculated according to the theme characteristics and the keyword characteristics, and the keywords with the association degrees higher than the corresponding threshold values are used as the target keywords pushed to the target user.

In a specific implementation process, in step S30, "push a target keyword related to the target user according to the topic feature and the keyword feature" may adopt the following steps, and a flowchart of the method is shown in fig. 3:

s301, a first weight coefficient of the theme characteristic and a second weight coefficient of the keyword characteristic are obtained.

In the embodiment of the invention, a weight parameter is set for both the theme characteristics and the keyword characteristics, and the weight parameter can be configured by a manager and can be obtained by calculation according to a logistic regression model.

S302, for each keyword in the knowledge base, calculating the association degree of the keyword and the target user according to the first feature, the first weight coefficient, the second feature and the second weight coefficient of the keyword in the keyword features, wherein the keyword belongs to the topic in the topic features.

In the embodiment of the invention, for each keyword in the knowledge base, the preference degree of the target user corresponding to the topic to which the keyword belongs can be found in the topic characteristics, so that the first characteristic is obtained. Of course, if the topic to which the keyword belongs has never been searched by the target user, the first feature is null. In addition, for each keyword in the knowledge base, it can find the corresponding hot degree in the keyword features, so as to obtain the second feature.

Further, the degree of association between the key and the target user is calculated in a weighted calculation manner, specifically, the calculation result of the first feature, the first weight coefficient + the second feature, the second weight coefficient is used as the degree of association.

S303, sorting and outputting different keywords in the knowledge base in the order of high relevance degree to low relevance degree.

In the embodiment of the present invention, different keywords are ranked according to the order of the relevance degrees from high to low, and K relevant words with the highest relevance degree are output, where K may be configured by a manager or a target user, and this is not limited in the embodiment of the present invention.

According to the keyword association method provided by the embodiment of the invention, for a user, the topic characteristics representing the preference degrees of the user to different topics can be calculated according to the search records of the user to the knowledge base, so that the keyword characteristics representing the popularity degrees of different keywords in the knowledge base are obtained, and then the related target keywords are recommended to the user according to the topic characteristics and the keyword characteristics. Based on the invention, the personalized suggested word recommendation for the user can be realized, so that the expectation of the user is better met, and the search experience and efficiency are improved.

Based on the keyword association method provided in the foregoing embodiment, an embodiment of the present invention correspondingly provides an apparatus for executing the keyword association method, where a schematic structural diagram of the apparatus is shown in fig. 4, and the apparatus includes:

the topic feature calculation module 10 is configured to calculate topic features of the target user according to search records of the target user on the knowledge base, where the topic features can represent preference degrees of the target user on different topics;

the keyword feature acquisition module 20 is configured to acquire keyword features of the knowledge base, where the keyword features can represent the popularity of different keywords in the knowledge base;

and the keyword pushing module 30 is used for pushing the related target keywords to the target user according to the theme characteristics and the keyword characteristics.

Optionally, the theme feature calculation module 10 is specifically configured to:

calling a target search record of a target user on the knowledge base in a target time period, and extracting a search index from the target search record, wherein the search index at least comprises the click rate of the target user on knowledge under different topics; for each topic, calculating the number of times of searching the topic according to the click rate of the target user in the knowledge of the topic; and determining the theme characteristics according to the searching times of different themes.

Optionally, the search index further includes: the browsing time of the target user on the knowledge under different topics;

the theme feature calculation module 10 is further configured to:

for each topic, calculating the search time of the topic according to the browsing time of the target user knowledge under the topic;

correspondingly, the topic feature calculation module 10 for determining topic features according to the number of searches for different topics is specifically configured to:

and determining the theme characteristics according to the searching times and the searching duration of different themes.

Optionally, the keyword pushing module 30 is specifically configured to:

acquiring a first weight coefficient of the theme characteristic and a second weight coefficient of the keyword characteristic; for each keyword in the knowledge base, calculating the association degree of the keyword and a target user according to a first feature, a first weight coefficient, a second feature and a second weight coefficient of the keyword in the keyword features of the topic features to which the keyword belongs; and sorting and outputting different keywords in the knowledge base in the order of high relevance degree to low relevance degree.

Optionally, the keyword pushing module 30 is further configured to:

and obtaining the first weight coefficient and the second weight coefficient through a logistic regression model.

It should be noted that, for the detailed functions of each module in the embodiment of the present invention, reference may be made to the corresponding disclosure part of the embodiment of the keyword association method, and details are not described herein again.

Based on the keyword association method provided by the above embodiment, an embodiment of the present invention correspondingly provides an electronic device, where the electronic device includes: at least one memory and at least one processor; the memory stores a program, the processor calls the program stored in the memory, and the program is used for realizing the keyword association method.

Based on the keyword association method provided in the above embodiment, an embodiment of the present invention correspondingly provides a storage medium, where the storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the keyword association method.

It should be noted that the keyword association method, apparatus, electronic device and storage medium provided by the present invention may be used in the field of artificial intelligence or the field of finance. The foregoing is merely an example, and does not limit the application fields of the keyword association method, apparatus, electronic device and storage medium provided by the present invention.

The keyword association method, apparatus, electronic device and storage medium provided by the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.

It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include or include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频推荐方法、装置、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!