Query keyword recommendation method and device, computer device, and storage medium

By using a pre-set model trained based on the collaborative filtering algorithm and enhancing prefix representation with historical interaction data, the problems of low click-through rate and insufficient long-tail prefix recommendation in the query recommendation system are solved, and more reasonable and diversified query keyword recommendations are achieved.

CN122153130APending Publication Date: 2026-06-05CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA PING AN PROPERTY INSURANCE CO LTD
Filing Date
2026-03-05
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing query recommendation systems have low click-through rates when generating query keywords, limited ability to recommend unseen or long-tail prefixes, and overly simplistic recommendation results, failing to meet users' diverse search needs.

Method used

We employ a pre-set model trained based on a collaborative filtering algorithm, mine high-quality historical pairing data using historical interaction data, enhance prefix representation through weighted calculation, and recommend query keywords that better meet user needs.

Benefits of technology

It improves the rationality of search keywords and click-through rate, compensates for the recommendation ability for uncommon prefixes and long-tail queries, reduces the information cocoon effect, and enhances the exploratory nature of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153130A_ABST
    Figure CN122153130A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent decision-making, and discloses a query keyword recommendation method and device, computer equipment and a storage medium. A preset model used in the method is trained by using historical pairing data of high-quality reaction business logic and complex user intentions which are mined from historical interaction data of a plurality of users by a collaborative filtering algorithm. Therefore, the preset model can compensate for the recommendation capability for uncommon prefixes and long-tail queries when outputting a first query keyword based on a prefix. In addition, the preset model incorporates more extensive group behaviors and thus breaks through the limitation of single user historical behaviors. Then, the prefix representation is weighted and processed based on the first representation and the second representation to obtain an enhanced prefix representation. The third query keyword which is more in line with actual needs can be obtained based on the enhanced prefix representation, the rationality of generating the third query keyword is improved, and the application can be applied to the fields of financial technology and medical health.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent decision-making technology, and in particular to a method, apparatus, computer device, and storage medium for recommending search keywords. Background Technology

[0002] Currently, query recommendation systems are applied in various fields. For example, in the medical field, if a user enters "head," the system can output search terms such as "headache" and "dizziness." Similarly, in the fintech field, if a user enters "car," the system can output search terms such as "car insurance" and "car damage." Query recommendation systems can help users supplement their input with prefixes (such as "head" and "car") to provide search keywords.

[0003] However, current query recommendation systems suffer from several problems, including low subsequent click-through rates for generated query keywords, limited ability to recommend unseen or long-tail prefixes, and overly simplistic recommendation results. These issues highlight the irrationality of generated query keywords. Therefore, improving the rationality of generated query recommendations has become a pressing technical challenge for those skilled in the art. Summary of the Invention

[0004] This invention provides a method, apparatus, computer device, and storage medium for recommending query keywords, in order to solve the technical problem of unreasonable query recommendations.

[0005] Firstly, it provides a method for recommending search keywords, including: Receive the prefix of the keyword input by the user; The prefix is ​​input into a preset model to recommend the first query keyword; the preset model is trained based on historical pairing data, and the historical pairing data is obtained by processing the historical interaction data of several users using a collaborative filtering algorithm. There are two types of historical pairing data, one of which includes historical prefixes and corresponding historical selected keywords, and the other of which includes historical selected keywords and corresponding historical related keywords. From the historical pairing data, find the historical selected keywords that are the same as the first query keyword; determine the historical related keywords in the historical pairing data where the historical selected keywords are located, and use them as the second query keyword; Determine the prefix representation corresponding to the prefix, the first representation corresponding to the first query keyword, and the second representation corresponding to the second query keyword; An enhanced prefix representation is obtained by weighted calculation using the prefix representation, the first representation, and the second representation; Based on the enhanced prefix representation, the third query keyword is determined.

[0006] Secondly, a recommendation device for query keywords is provided, including: The receiving unit is used to receive the prefix of the keyword input by the user; An input unit is used to input the prefix into a preset model to recommend a first query keyword; the preset model is trained based on historical pairing data, and the historical pairing data is obtained by processing the historical interaction data of several users using a collaborative filtering algorithm. The historical pairing data is of two types, one of which includes historical prefixes and corresponding historical selected keywords, and the other of which includes historical selected keywords and corresponding historical related keywords. The first search unit is used to search for historical selected keywords that are the same as the first query keyword from the historical pairing data; and to determine the historical related keywords in the historical pairing data where the historical selected keywords are located as the second query keyword. The first determining unit is used to determine the prefix representation corresponding to the prefix, the first representation corresponding to the first query keyword, and the second representation corresponding to the second query keyword; The first calculation unit is used to perform a weighted calculation using the prefix representation, the first representation, and the second representation to obtain an enhanced prefix representation; The first output unit is used to determine the third query keyword based on the enhanced prefix representation.

[0007] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for recommending query keywords as described above.

[0008] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for recommending query keywords as described above.

[0009] In the above-mentioned scheme implemented by the method, apparatus, device, and medium for recommending query keywords, a prefix of a keyword input by a user can be received; the prefix is ​​input into a preset model to recommend a first query keyword; the preset model is trained based on historical pairing data, and the historical pairing data is obtained by processing the historical interaction data of several users using a collaborative filtering algorithm. There are two types of historical pairing data: one type includes historical prefixes and corresponding historical selected keywords, and the other type includes historical selected keywords and corresponding historical related keywords; from the historical pairing data, historical selected keywords identical to the first query keyword are searched; historical related keywords in the historical pairing data containing the historical selected keywords are determined as the second query keyword; a prefix representation corresponding to the prefix, a first representation corresponding to the first query keyword, and a second representation corresponding to the second query keyword are determined; an enhanced prefix representation is obtained by weighted calculation using the prefix representation, the first representation, and the second representation; and a third query keyword is determined based on the enhanced prefix representation. In this invention, the pre-defined model is trained using high-quality historical pairing data reflecting business logic and complex user intent, mined from the historical interaction data of several users through a collaborative filtering algorithm. Therefore, the pre-defined model can compensate for its limitations in recommending uncommon prefixes and long-tail queries when recommending the first query keyword based on prefixes. Furthermore, because the pre-defined model incorporates broader group behavior, it overcomes the limitations of a single user's historical behavior. Then, based on the first and second representations, the prefix representation is weighted to obtain an enhanced prefix representation. This enhanced prefix representation yields a third query keyword that better meets actual needs, improving the rationality of the generated third query keyword and making it applicable to fintech and healthcare scenarios. Attached Figure Description

[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a schematic diagram of an application environment for a keyword recommendation method according to an embodiment of the present invention; Figure 2 A flowchart illustrating a keyword recommendation method provided in an embodiment of the present invention; Figure 3 An exemplary schematic diagram illustrates the structure of a keyword recommendation device according to some embodiments; Figure 4 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation

[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0013] Currently, query recommendation systems are applied in various fields. For example, in the medical field, if a user enters "head," the system can output search suggestions such as "headache" and "dizziness." Similarly, in the fintech field, if a user enters "car," the system can output search suggestions such as "car insurance" and "car damage." Query recommendation systems can help users supplement their input with prefixes (such as "head" and "car") to provide more search suggestions.

[0014] However, current query recommendation systems suffer from several problems, including low subsequent click-through rates for generated query keywords, limited ability to recommend unseen or long-tail prefixes, and overly simplistic recommendation results. These issues are explained in detail below: 1. The model focuses on retrieving potentially relevant suggestions from a massive pool of candidate queries, but it does not fully incorporate key signals (such as user click-through rate, conversion rate, etc.) during training. This causes the model to focus more on generating "relevant" queries rather than directly optimizing "which query is most likely to be selected by the user", which may affect the final effectiveness of the recommendation results.

[0015] 2. Limited recommendation capability for unseen or long-tail prefixes. Traditional methods based on co-occurrence statistics (such as the MPC model) heavily rely on frequency information from historical query logs. For uncommon prefixes or entirely new search trends (i.e., long-tail queries), the lack of sufficient historical data makes it difficult to generate effective recommendations and fails to adequately meet niche or emerging search needs.

[0016] 3. While user-information-based models aim to provide personalized recommendations, this carries certain risks. The model may overly rely on the user's historical behavior, leading to overly simplistic recommendations that expose the user to similar content, trapping them in an information cocoon or search loop. This limits the user's opportunities to discover new interests and may make the model ill-suited to adapting to sudden shifts in user interests.

[0017] Therefore, how to improve the rationality of generated query keywords has become a technical problem that urgently needs to be solved by those skilled in the art.

[0018] The keyword recommendation method provided in this embodiment of the invention can be applied to, for example... Figure 1 In this application environment, the client inputs a prefix on the client side. The server receives the prefix of the keyword input by the user; inputs the prefix into a preset model to recommend a first query keyword; the preset model is trained based on historical pairing data, which is obtained by processing the historical interaction data of several users using a collaborative filtering algorithm. There are two types of historical pairing data: one type includes historical prefixes and corresponding historical selected keywords, and the other type includes historical selected keywords and corresponding historical related keywords; from the historical pairing data, historical selected keywords that are the same as the first query keyword are searched; historical related keywords in the historical pairing data where the historical selected keywords are located are determined as the second query keyword; a prefix representation corresponding to the prefix, a first representation corresponding to the first query keyword, and a second representation corresponding to the second query keyword are determined; using the prefix representation, the first representation, and the second representation, a weighted calculation is performed to obtain an enhanced prefix representation; based on the enhanced prefix representation, a third query keyword is determined. In this invention, the pre-defined model is trained using high-quality historical pairing data reflecting business logic and complex user intent, mined from the historical interaction data of several users through a collaborative filtering algorithm. Therefore, the pre-defined model can compensate for its limitations in recommending uncommon prefixes and long-tail queries when recommending the first query keyword based on prefixes. Furthermore, because the pre-defined model incorporates broader group behavior, it overcomes the limitations of a single user's historical behavior. Then, based on the first and second representations, the prefix representation is weighted to obtain an enhanced prefix representation. This enhanced prefix representation yields a third query keyword that better meets actual needs, improving the rationality of the generated third query keyword and making it applicable to fintech and healthcare scenarios.

[0019] The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will now be described in detail through specific embodiments.

[0020] Please see Figure 2 As shown, Figure 2 A flowchart illustrating a keyword recommendation method provided in an embodiment of the present invention includes the following steps S100-S600.

[0021] S100, Receive the prefix of the keyword input by the user.

[0022] In this embodiment, the prefix refers to the incomplete query keywords entered when using the query recommendation system. In one example, the prefix of the keyword entered by the user is "apple," and the query recommendation system recommends "Apple mobile phone" as the query keyword.

[0023] S200. Input the prefix into a preset model to recommend the first query keyword; the preset model is trained based on historical pairing data, and the historical pairing data is obtained by processing the historical interaction data of several users using a collaborative filtering algorithm. There are two types of historical pairing data, one of which includes historical prefixes and corresponding historical selected keywords, and the other of which includes historical selected keywords and corresponding historical related keywords.

[0024] In one example, the prefix is ​​"Apple" and the first query keyword is "Apple mobile phone".

[0025] In this embodiment, during the process of generating the final query recommendation (i.e., the third query keyword mentioned later) using the query recommendation system, the prefix is ​​first input into a preset model to output the first query keyword. In some embodiments, after the user inputs the prefix of the keyword, the query recommendation system will recommend one or more query keywords based on the prefix. The user can select a query keyword and submit it as a question to the conversational AI model, which will output the corresponding answer. The user and the conversational AI model can engage in one or more rounds of question-and-answer sessions within a single conversation. The historical interaction data in this embodiment includes data generated in the historical conversations of the conversational AI model and historical conversion data. Data generated in historical conversations includes historical conversation identifiers, historical user identifiers, historical prefixes input by the user, historical selected keywords, and the historical selection time of historical selected keywords. Historical conversion data includes purchases and / or favorites. Conversation identifiers can be represented using conversation IDs, with each conversation having a corresponding conversation ID. User identifiers can be identified using user IDs, with each user having a corresponding user ID.

[0026] The historical interaction data in this application embodiment covers who (user identifier) ​​entered what historical prefix in which conversation (conversation ID), at what time (historical selection time), and what query (historical selected keyword) they clicked, as well as what subsequent actions the user performed based on the received answer (purchase and / or favorite).

[0027] In this embodiment, the collaborative filtering algorithm includes ItemCF (Item-based Collaborative Filtering) or Swing. The collaborative filtering algorithm can mine high-quality historical pairing data reflecting business logic and complex user intent from the historical interaction data of several users. A preset model is trained using this historical pairing data, and subsequently, the preset model is used to output the first query keyword. This can compensate for the recommendation capability for uncommon prefixes and long-tail queries, alleviating the cold start problem. The preset model improves the practicality and effectiveness of the recommendation results by learning from the actual clicks, conversions, and other behavioral signals of users in the historical interaction data. Since the historical pairing data is determined based on the historical interaction data of several users, the preset model can incorporate a wider range of group behaviors, overcoming the limitations of a single user's historical behavior.

[0028] The basic idea behind ItemCF is that if a large number of users like both item A and item B, then these two items are considered similar. When making recommendations to users, it identifies and recommends similar items to those they have historically been interested in. Furthermore, it considers factors such as time and direction to correct for biases.

[0029] As an enhanced version of ItemCF, Swing takes into account the nature of user overlap. If the overlapping users of two items come from the same "small circle" (e.g., the same WeChat group), Swing will reduce the contribution of this overlap through specific weight design, thereby more accurately measuring the true, non-accidental similarity between items. This helps to avoid bias caused by local popularity and better discover the associations of long-tail items.

[0030] In this embodiment, there are two types of historical pairing data. One type includes historical prefixes and corresponding historical selected keywords. Historical selected keywords are the query keywords selected by the user from multiple query keywords recommended by the recommendation system when entering a historical prefix. The other type includes historical selected keywords and historical related keywords. Historical related keywords are historical selected keywords related to the currently selected query keyword and other historical prefixes found in the historical interaction data.

[0031] In one example, the historical prefix is ​​"apple," the historical selected keyword is "Apple phone," and the historical related keyword corresponding to this historical selected keyword is "Apple phone price." The two pairings are "Apple-Apple phone" and "Apple phone-Apple phone price." It should be noted that "Apple phone price" refers to the query keyword selected by the user from the query keywords obtained by inputting other prefixes into the query recommendation system.

[0032] In some embodiments, the method further includes a step of generating a preset model. Specifically, this includes: Obtain historical interaction data from several users.

[0033] It should be noted that obtaining users' historical interaction data is done with the user's consent.

[0034] The historical interaction data is processed using a collaborative filtering algorithm to obtain two types of historical pairing data, and the historical pairing data is stored. In this embodiment of the application, by processing the historical interaction data of several users through a collaborative filtering algorithm, semantic relevance filtering can be achieved to obtain historical selected keywords and historical related keywords.

[0035] In this embodiment, a collaborative filtering algorithm is used to generate high-quality "prefix -> query" (first type of historical pairing data) and "query -> related query" (second type of historical pairing data). In the historical pairing data, the prefix is ​​a historical prefix, the query is a historical selected keyword, and the related query is a historical related keyword.

[0036] Based on the historical pairing data, training samples are determined.

[0037] In this embodiment of the application, the step of determining training samples based on historical pairing data includes taking the historical selected keywords and their corresponding historical prefixes as a set of training samples; determining the historical selected keywords corresponding to the historical related keywords; and taking the historical prefixes corresponding to the historical selected keywords and the historical related keywords corresponding to the historical selected keywords as a set of training samples.

[0038] In one example, the historical prefix is ​​A, the corresponding historical selected keywords are B and C, and the historical related keywords corresponding to the historical selected keywords B and C are D and E. The training samples then include A and B, A and C, A and D, and A and E.

[0039] Using the training samples, a BGE model is trained to minimize the loss function of the BGE model, thus obtaining a preset model. During the training of the BGE model, historical prefix representations corresponding to the historical prefixes, representations corresponding to the historical selected keywords, and representations corresponding to the historical related keywords are generated and stored.

[0040] In this embodiment, the training samples perform representation alignment fine-tuning on the BGE model to narrow the semantic gap between prefix and query, and inject potential retrieval knowledge learned from business data into the BGE model, so that the first query keyword generated by the preset model is both semantically relevant and conforms to the real business scenario and user preferences.

[0041] When training a BGE model using training samples, it is necessary to convert the text form into vector form. It is understood that the representation mentioned in this application is a vector.

[0042] In this embodiment of the application, in order to build an efficient and accurate query recommendation system, the BGE model is selected as the base model for semantic representation. The BGE model has shown excellent generalization ability in Chinese and English semantic retrieval tasks.

[0043] The specific training is as follows:

[0044]

[0045]

[0046] in and The text descriptions represent the historical prefix and the complete query text, respectively. The selected historical keywords or related historical keywords are all complete query text. and These represent the learnable representation vectors generated by the BGE model after the historical prefix and the complete query text are processed, respectively. As a historical prefix, To fully query the representation corresponding to the text, you can provide the representation corresponding to the selected historical keywords, or the representation corresponding to related historical keywords. This refers to the contrastive loss. In this embodiment, since the prefix input by the user and the query recommendation that the system ultimately expects to recommend have inherent differences in semantics and distribution, this difference will cause misalignment of the representation space, thereby hindering the end-to-end optimization of the model. Therefore, by optimizing the contrastive loss function, the semantic representation of BGE is aligned with the downstream business features, aligning the distance between the prefix and the representation of the potential query recommendation.

[0047] S300. From the historical pairing data, find the historical selected keyword that is the same as the first query keyword; determine the historical related keyword in the historical pairing data where the historical selected keyword is located as the second query keyword.

[0048] In this embodiment of the application, historical pairing data is also stored after it is generated.

[0049] For example, if the historical prefix is ​​"Apple" and the historical selected keyword is "Apple phone", then the historical related keyword corresponding to this historical selected keyword is "Apple phone price". If the first query keyword is "Apple phone", then the second query keyword determined from the historical matching data is "Apple phone price".

[0050] S400. Determine the prefix representation corresponding to the prefix, the first representation corresponding to the first query keyword, and the second representation corresponding to the second query keyword; In some embodiments, during the training of a preset model, historical prefixes, historical selected keywords, and historical related keywords are processed to obtain and store historical prefix representations, representations corresponding to historical selected keywords, and representations corresponding to historical related keywords. Therefore, the step of determining the prefix representation corresponding to the prefix, the first representation corresponding to the first query keyword, and the second representation corresponding to the second query keyword may include: finding a historical prefix that is identical to the prefix from the stored historical prefix representations, representations corresponding to the historical selected keywords, and representations corresponding to the historical related keywords, and determining the historical prefix representation corresponding to that historical prefix as the prefix representation; finding a historical selected keyword that is identical to the first query keyword, and determining the representation corresponding to that historical selected keyword as the representation corresponding to the first query keyword; finding a historical related keyword that is identical to the second query keyword, and determining the representation corresponding to that historical related keyword as the representation corresponding to the second query keyword.

[0051] In other embodiments, the prefix, the first query keyword, and the second query keyword can be input into the BGE model, and the prefix representation, the first representation, and the second representation can be obtained accordingly during the processing of the BGE model.

[0052] S500. Using the prefix representation, the first representation, and the second representation, a weighted calculation is performed to obtain an enhanced prefix representation.

[0053] In this embodiment of the application, since short prefixes (e.g., those containing only one word) have semantic uncertainty, a prefix representation enhancement mechanism is introduced to solve this problem. The core idea is to use the user's historical interaction data to mine queries that are related to the prefix in terms of meaning and interaction behavior, so as to enrich and refine the semantic representation of the prefix.

[0054] In some embodiments, the step of performing a weighted calculation using the prefix representation, the first representation, and the second representation to obtain an enhanced prefix representation includes: Based on the first and second characterizations, the average pooling result is calculated.

[0055] In some embodiments, the average pooling result is calculated based on the first characterization and the second characterization according to the following formula: ; in, This is the result of average pooling; Let k be the representation of the i-th target query keyword, where both the first and second query keywords are target query keywords; k is the total number of the first and second query keywords.

[0056] Based on the average pooling result and the prefix representation, the enhanced prefix representation is calculated.

[0057] In some embodiments, the enhanced prefix representation is calculated based on the average pooling result and the prefix representation according to the following formula: ; in, For enhanced prefix representation; The prefix is ​​characterized by; This is the result of average pooling; For weights.

[0058] In this embodiment of the application, since the prefix representation, the first representation, and the second representation are all obtained through the BGE model, the dimensions of the above three representations are the same, so the prefix representation and the average pooling result can be summed.

[0059] In this embodiment, w can be set according to the actual situation. If it is desired that the enhanced prefix representation is more inclined to the prefix, w is set to be less than 0.5. If it is desired that the enhanced prefix representation is more inclined to the average pooling result, w is set to be greater than 0.5.

[0060] If w is less than 0.5, then based on the enhanced prefix representation, the subsequent recommendations for the third query keyword will take into account the prefix of the current input more. If w is greater than 0.5, then based on the enhanced prefix representation, the subsequent recommendations for the point query keyword will take into account the previously selected keywords and related keywords more.

[0061] This enhanced prefix representation not only aligns with the representation distance between the prefix and the potential query, but also incorporates users' query habits, significantly improving the recall capability of query recommendations.

[0062] S600. Based on the enhanced prefix representation, determine the third query keyword.

[0063] In some embodiments, the step of determining the third query keyword based on the enhanced prefix representation includes: From the stored historical prefix representations, find the representations related to the enhanced prefix representations; Based on the enhanced prefix representation related to the representation, the third query keyword is output.

[0064] In some embodiments, the step of searching for a representation related to the enhanced prefix representation from the stored historical prefix representations includes: From the stored historical prefix representations, find the historical prefix representation that is the same as the enhanced prefix representation, and use it as the target historical prefix representation; From the stored representations corresponding to the historical selected keywords and the stored representations corresponding to the historical related keywords, find the representation corresponding to the historical selected keyword that is the same as the target historical prefix representation, and use it as the representation corresponding to the target historical selected keyword; and, the representation corresponding to the historical related keywords that is the same as the target historical selected keyword, use it as the representation corresponding to the target historical related keyword. The representations corresponding to the selected keywords of the target history and the representations corresponding to the related keywords of the target history are sorted from high to low semantic relevance with the prefix representations of the target history. The top N ranked representations are identified as the representations associated with the enhanced prefix representation.

[0065] In this embodiment, the semantic relevance between historical prefixes and historical selected keywords, as well as the semantic relevance between historical prefixes and historically related keywords, are also determined. In one example, semantic relevance can be represented numerically, such as cosine similarity, where a higher value indicates higher semantic relevance. Furthermore, in this embodiment, the semantic relevance between the target historical prefix and the target historical selected keywords can be determined, and this can be used as the semantic relevance between the representation corresponding to the target historical selected keywords and the representation corresponding to the target historical prefix. Additionally, the semantic relevance between the target historical prefix and the target historically related keywords can be determined, and this can be used as the semantic relevance between the representation corresponding to the target historical selected keywords and the representation corresponding to the target historical prefix.

[0066] In one example, N can be 5. In this case, the representations corresponding to the top 5 semantically relevant target history keywords and / or the representations corresponding to target history related keywords are used as representations related to the enhanced prefix representation. Based on the representations related to the enhanced prefix representation, a third query keyword is output, and 5 third query keywords are displayed in the dialog for the user to choose from. Each representation related to the enhanced prefix representation can be converted into a corresponding third query keyword.

[0067] In this embodiment of the application, the number of representations found that are related to the enhanced prefix representation can be multiple. The number of third query keywords generated in the end is also multiple.

[0068] The method in this application deeply integrates ranking signals, i.e., historical interaction data, into the model training stage. The preset model no longer merely learns to generate "semantically relevant" queries, but directly optimizes the "queries most likely to be selected by users" by learning real user clicks, conversions, and other behavioral signals, thereby improving the practicality and effectiveness of the recommendation results.

[0069] This method enhances semantic representation by leveraging prefix-query co-occurrence relationships and user behavior data. It combines general semantic models (such as BGE) with business knowledge from real-time interactions (such as associations mined via ItemCF / Swing), effectively compensating for recommendation capabilities for uncommon prefixes and long-tail queries and mitigating the cold start problem.

[0070] By incorporating broader group behavior data or designing corresponding loss functions, pre-defined models can overcome the limitations of a single user's historical behavior, help users discover potential new points of interest, thereby mitigating the "information cocoon" effect and making the system more exploratory.

[0071] As can be seen, the preset model used in the above scheme is trained using high-quality historical pairing data reflecting business logic and complex user intents, mined from the historical interaction data of several users through collaborative filtering algorithms. Therefore, the preset model can compensate for the recommendation capability of uncommon prefixes and long-tail queries when recommending the first query keyword based on prefixes. In addition, because the preset model incorporates a wider range of group behaviors, it breaks through the limitations of the historical behavior of a single user. Then, based on the first and second representations, the prefix representation is weighted to obtain an enhanced prefix representation. Based on this enhanced prefix representation, a third query keyword that is more in line with actual needs can be obtained, improving the rationality of generating the third query keyword, which can be applied to fintech and healthcare scenarios.

[0072] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0073] In one embodiment, a keyword recommendation device is provided, which corresponds one-to-one with the keyword recommendation method described in the above embodiments. For example... Figure 3 As shown, the keyword recommendation device includes a receiving unit 301, an input unit 302, a first search unit 303, a first determination unit 304, a first calculation unit 305, and a first output unit 306. Detailed descriptions of each functional module are as follows: The receiving unit 301 is used to receive the prefix of the keyword input by the user; Input unit 302 is used to input the prefix into a preset model to recommend a first query keyword; the preset model is trained based on historical pairing data, and the historical pairing data is obtained by processing the historical interaction data of several users using a collaborative filtering algorithm. The historical pairing data is of two types, one of which includes historical prefixes and corresponding historical selected keywords, and the other of which includes historical selected keywords and corresponding historical related keywords. The first search unit 303 is used to search for historical selected keywords that are the same as the first query keyword from the historical pairing data; and to determine the historical related keywords in the historical pairing data where the historical selected keywords are located as the second query keyword; The first determining unit 304 is used to determine the prefix representation corresponding to the prefix, the first representation corresponding to the first query keyword, and the second representation corresponding to the second query keyword; The first calculation unit 305 is used to perform weighted calculation using the prefix representation, the first representation, and the second representation to obtain an enhanced prefix representation; The first output unit 306 is used to determine the third query keyword based on the enhanced prefix representation.

[0074] In some embodiments, the apparatus further includes: The acquisition unit is used to acquire historical interaction data from several users. The processing unit is used to process the historical interaction data using a collaborative filtering algorithm to obtain two types of historical pairing data, and to store the historical pairing data; The second determining unit is used to determine training samples based on the historical pairing data; The training unit is used to train the BGE model using the training samples to minimize the loss function of the BGE model and obtain a preset model; during the training of the BGE model, it generates and stores the historical prefix representation corresponding to the historical prefix, the representation corresponding to the historical selected keyword, and the representation corresponding to the historical related keyword.

[0075] In some embodiments, the first computing unit includes: The second computing unit is used to calculate the average pooling result based on the first representation and the second representation; The third calculation unit is used to calculate the enhanced prefix representation based on the average pooling result and the prefix representation.

[0076] In some embodiments, the second computing unit specifically performs: ; in, This is the result of average pooling; Let k be the representation of the i-th target query keyword, where both the first and second query keywords are target query keywords; k is the total number of the first and second query keywords.

[0077] In some embodiments, the third computing unit specifically performs: ; in, For enhanced prefix representation; The prefix is ​​characterized by; This is the result of average pooling; For weights.

[0078] In some embodiments, the first output unit includes: The second lookup unit is used to look up a representation related to the enhanced prefix representation from the stored historical prefix representations; The second output unit is used to output the third query keyword based on the enhanced prefix representation related to the representation.

[0079] In some embodiments, the second output unit specifically performs: From the stored historical prefix representations, find the historical prefix representation that is the same as the enhanced prefix representation, and use it as the target historical prefix representation; From the stored representations corresponding to the historical selected keywords and the stored representations corresponding to the historical related keywords, find the representation corresponding to the historical selected keyword that is the same as the target historical prefix representation, and use it as the representation corresponding to the target historical selected keyword; and, the representation corresponding to the historical related keywords that is the same as the target historical selected keyword, use it as the representation corresponding to the target historical related keyword. The representations corresponding to the selected keywords of the target history and the representations corresponding to the related keywords of the target history are sorted from high to low semantic relevance with the prefix representations of the target history. The top N ranked representations are identified as the representations associated with the enhanced prefix representation.

[0080] This invention provides a keyword recommendation device. The preset model used is trained using a collaborative filtering algorithm to extract high-quality historical pairing data reflecting business logic and complex user intent from the historical interaction data of several users. Therefore, when recommending the first query keyword based on prefixes, the preset model can compensate for the recommendation capability of uncommon prefixes and long-tail queries. In addition, because the preset model incorporates a wider range of group behaviors, it overcomes the limitations of the historical behavior of a single user. Then, based on the first and second representations, the prefix representation is weighted to obtain an enhanced prefix representation. Based on this enhanced prefix representation, a third query keyword that is more in line with actual needs can be obtained, improving the rationality of the generated third query keyword. This device can be applied to fintech and healthcare scenarios.

[0081] Specific limitations regarding the keyword recommendation device can be found in the limitations of the keyword recommendation method described above, and will not be repeated here. Each module in the aforementioned keyword recommendation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0082] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements a server-side function or procedure for a keyword recommendation method.

[0083] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements client-side functions or steps for a keyword recommendation method.

[0084] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Receive the prefix of the keyword input by the user; The prefix is ​​input into a preset model to recommend the first query keyword; the preset model is trained based on historical pairing data, and the historical pairing data is obtained by processing the historical interaction data of several users using a collaborative filtering algorithm. There are two types of historical pairing data, one of which includes historical prefixes and corresponding historical selected keywords, and the other of which includes historical selected keywords and corresponding historical related keywords. From the historical pairing data, find the historical selected keywords that are the same as the first query keyword; determine the historical related keywords in the historical pairing data where the historical selected keywords are located, and use them as the second query keyword; Determine the prefix representation corresponding to the prefix, the first representation corresponding to the first query keyword, and the second representation corresponding to the second query keyword; An enhanced prefix representation is obtained by weighted calculation using the prefix representation, the first representation, and the second representation; Based on the enhanced prefix representation, the third query keyword is determined.

[0085] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Receive the prefix of the keyword input by the user; The prefix is ​​input into a preset model to recommend the first query keyword; the preset model is trained based on historical pairing data, and the historical pairing data is obtained by processing the historical interaction data of several users using a collaborative filtering algorithm. There are two types of historical pairing data, one of which includes historical prefixes and corresponding historical selected keywords, and the other of which includes historical selected keywords and corresponding historical related keywords. From the historical pairing data, find the historical selected keywords that are the same as the first query keyword; determine the historical related keywords in the historical pairing data where the historical selected keywords are located, and use them as the second query keyword; Determine the prefix representation corresponding to the prefix, the first representation corresponding to the first query keyword, and the second representation corresponding to the second query keyword; An enhanced prefix representation is obtained by weighted calculation using the prefix representation, the first representation, and the second representation; Based on the enhanced prefix representation, the third query keyword is determined.

[0086] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0087] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0088] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0089] The software tools or components not belonging to our company that appear in the embodiments of this application are merely examples and do not represent actual use.

[0090] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for recommending search keywords, characterized in that, include: Receive the prefix of the keyword input by the user; The prefix is ​​input into a preset model to recommend the first query keyword; The preset model is trained based on historical pairing data. The historical pairing data is obtained by processing the historical interaction data of several users using a collaborative filtering algorithm. There are two types of historical pairing data. One type of historical pairing data includes historical prefixes and corresponding historical selected keywords. The other type of historical pairing data includes historical selected keywords and corresponding historical related keywords. From the historical pairing data, find the historical selected keywords that are the same as the first query keyword; determine the historical related keywords in the historical pairing data where the historical selected keywords are located, and use them as the second query keyword; Determine the prefix representation corresponding to the prefix, the first representation corresponding to the first query keyword, and the second representation corresponding to the second query keyword; An enhanced prefix representation is obtained by weighted calculation using the prefix representation, the first representation, and the second representation; Based on the enhanced prefix representation, the third query keyword is determined.

2. The method according to claim 1, characterized in that, Also includes: Obtain historical interaction data from several users; The historical interaction data is processed using a collaborative filtering algorithm to obtain two types of historical pairing data, and the historical pairing data is stored. Based on the historical pairing data, training samples are determined; Using the training samples, a BGE model is trained to minimize the loss function of the BGE model, thus obtaining a preset model. During the training of the BGE model, historical prefix representations corresponding to the historical prefixes, representations corresponding to the historical selected keywords, and representations corresponding to the historical related keywords are generated and stored.

3. The method according to claim 1, characterized in that, The step of obtaining the enhanced prefix representation by weighted calculation using the prefix representation, the first representation, and the second representation includes: Based on the first and second characterizations, the average pooling result is calculated; Based on the average pooling result and the prefix representation, the enhanced prefix representation is calculated.

4. The method according to claim 3, characterized in that, Based on the first and second characteristics, the average pooling result is calculated according to the following formula: ; in, This is the result of average pooling; Let k be the representation of the i-th target query keyword, where both the first and second query keywords are target query keywords; k is the total number of the first and second query keywords.

5. The method according to claim 3, characterized in that, The enhanced prefix representation, calculated based on the average pooling result and the prefix representation, is calculated according to the following formula: ; in, For enhanced prefix representation; The prefix is ​​characterized by; This is the result of average pooling; For weights.

6. The method according to claim 2, characterized in that, The step of determining the third query keyword based on the enhanced prefix representation includes: From the stored historical prefix representations, find the representations related to the enhanced prefix representations; Based on the enhanced prefix representation related to the representation, the third query keyword is output.

7. The method according to claim 6, characterized in that, The step of searching for a representation related to the enhanced prefix representation from the stored historical prefix representations includes: From the stored historical prefix representations, find the historical prefix representation that is the same as the enhanced prefix representation, and use it as the target historical prefix representation; From the stored representations corresponding to the historical selected keywords and the stored representations corresponding to the historical related keywords, find the representation corresponding to the historical selected keyword that is the same as the target historical prefix representation, and use it as the representation corresponding to the target historical selected keyword; and, the representation corresponding to the historical related keywords that is the same as the target historical selected keyword, use it as the representation corresponding to the target historical related keyword. The representations corresponding to the selected keywords of the target history and the representations corresponding to the related keywords of the target history are sorted from high to low semantic relevance with the prefix representations of the target history. The top N ranked representations are identified as the representations associated with the enhanced prefix representation.

8. A recommendation device for querying keywords, characterized in that, include: The receiving unit is used to receive the prefix of the keyword input by the user; An input unit is used to input the prefix into a preset model to recommend a first query keyword; The preset model is trained based on historical pairing data. The historical pairing data is obtained by processing the historical interaction data of several users using a collaborative filtering algorithm. There are two types of historical pairing data. One type of historical pairing data includes historical prefixes and corresponding historical selected keywords. The other type of historical pairing data includes historical selected keywords and corresponding historical related keywords. The first search unit is used to search for historical selected keywords that are the same as the first query keyword from the historical pairing data; and to determine the historical related keywords in the historical pairing data where the historical selected keywords are located as the second query keyword. The first determining unit is used to determine the prefix representation corresponding to the prefix, the first representation corresponding to the first query keyword, and the second representation corresponding to the second query keyword; The first calculation unit is used to perform a weighted calculation using the prefix representation, the first representation, and the second representation to obtain an enhanced prefix representation; The first output unit is used to determine the third query keyword based on the enhanced prefix representation.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for recommending query keywords as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the query keyword recommendation method as described in any one of claims 1 to 7.