Search recommendation method, device, and storage medium
By recalling candidate search terms and generating targeted recommendation text under the display command on the search page, the problem of users spending too much time on the search page is solved, achieving accurate and efficient search recommendations and enhancing the user experience.
Patent Information
- Application Number
- CN202311182611.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-03-31
AI Technical Summary
Users who lack a specific purpose when searching may spend too much time on the search page, negatively impacting the user experience.
By responding to the search page display instructions, candidate search terms are recalled, and a neural network model is used to convert different product names of the same product into the same representation vector to determine the target product terms, generate target recommendation copy, and display it on the search page for users to trigger a search.
It improves the accuracy and efficiency of search recommendations, reduces user operation steps, enhances the user's interaction with the search system, and increases user's search enthusiasm.
Smart Images

Figure CN117235359B_ABST
Abstract
Description
[0001] This application is a divisional application of CN2023103566532. The original application was filed on March 31, 2023, with the application number 2023103566532 and the invention title: Search Recommendation Method, Device and Storage Medium. Technical Field
[0002] This specification relates to one or more embodiments in the field of terminal technology, and more particularly to a search recommendation method, electronic device, computer-readable storage medium, and computer program product. Background Technology
[0003] In related technologies, the search function serves as the entry point for users to find information and is a crucial link connecting users and information. Users can enter search terms in the search bar, and electronic devices can then perform data searches based on these terms, obtaining at least one search result, which is then displayed to the user. However, for some users who lack a specific purpose when searching, they may spend too much time on the search page, negatively impacting the user experience.
[0004] Therefore, it is necessary to provide a search recommendation method that provides search recommendations before the user enters search terms. Summary of the Invention
[0005] In view of the above, this specification provides a search recommendation method, an electronic device, and a computer-readable storage medium through one or more embodiments.
[0006] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
[0007] According to a first aspect of one or more embodiments of this specification, a search recommendation method is proposed, comprising:
[0008] In response to the search page display instructions, recall several candidate search terms;
[0009] When the candidate search terms include candidate product terms, determine all target product terms corresponding to the product indicated by the candidate product terms;
[0010] If a product named after the target product term can be provided to the user within the user's delivery range, then a target recommendation copy is generated based on the candidate product term.
[0011] The target recommendation text is displayed on the search page so that a product search can be performed when the target recommendation text is triggered.
[0012] In this embodiment, several candidate search terms can be recalled before the user enters a search term, and search terms can be recommended to the user in a textual format even if the user has not entered a search term. To improve the accuracy of product recommendations, all product names with the same meaning but different names as candidate product terms are searched for supply judgment, which improves the accuracy of supply judgment and ensures that suitable and useful search terms can be recommended to the user, avoiding or reducing the occurrence of incorrect recommendations due to supply judgment errors caused by different names of the same product.
[0013] In one implementation, determining all target product terms corresponding to the product indicated by the candidate product term includes:
[0014] The candidate product terms are converted into target representation vectors using a pre-trained neural network model; the neural network model is used to convert different product names of the same product into the same representation vector.
[0015] The results of the transformation using the neural network model are all target product words of the target representation vector.
[0016] In this embodiment, a neural network model is implemented to find all product names corresponding to the product indicated by the candidate product words by converting different product names of the same product into the same representation vector.
[0017] In one implementation, determining that the result of the transformation using the neural network model is the target product word of the target representation vector includes:
[0018] Based on the pre-stored correspondence between different product names and representation vectors of the same product, determine all target product words corresponding to the target representation vector.
[0019] In this embodiment, a pre-trained neural network model is used to obtain the correspondence between different product names and representation vectors of the same product, so as to quickly find all target product words corresponding to the target representation vector in the future.
[0020] In one implementation, the neural network model includes an embedding layer and an encoder; the target representation vector is obtained by converting the candidate product words into embedding vectors through the embedding layer, and then mapping the embedding vectors from the character vector space to the numerical vector space by the encoder.
[0021] In one implementation, training the neural network model includes:
[0022] Obtain several binary sample pairs, wherein a portion of the binary sample pairs includes two positive samples, and another portion of the binary sample pairs includes one positive sample and one negative sample; the two positive samples include different product names of the same product, and the negative sample and the positive sample belong to product names of different products;
[0023] The binary sample is input into a neural network model to be trained with two branches. Each branch processes one of the binary samples to obtain two representation vectors corresponding to the binary sample output by the two branches. The neural network model to be trained is trained with the optimization objective of minimizing the distance between the representation vectors corresponding to different product names belonging to the same product and / or maximizing the distance between the representation vectors corresponding to product names belonging to different products.
[0024] The weights of the two branches are shared; the trained neural network model includes at least one of the branches.
[0025] In this embodiment, training the neural network model using both contrastive learning and representation learning methods is beneficial for improving the model's predictive performance.
[0026] In one implementation, determining all target product terms corresponding to the product indicated by the candidate product term includes:
[0027] Based on the candidate product terms, all target product terms are obtained from the product name table of the products indicated by the candidate product terms; wherein, the product name table includes different product names corresponding to the same product.
[0028] In this embodiment, a pre-stored product name table is used to quickly determine all product names corresponding to the products indicated by the candidate product terms.
[0029] In one implementation, before generating the target recommendation copy based on the candidate product terms, if a product named after the target product term can be provided to the user within the user's delivery range, the method further includes:
[0030] Identify stores that contain products named with the target product term and obtain the location information of those stores;
[0031] Based on the store's location information and the user's location information, determine whether it is possible to provide the user with a product named after the target product term within the user's delivery range.
[0032] In this embodiment, supply determination is achieved based on the difference between the location information of stores containing products named with the target product term and the location information of users.
[0033] One implementation also includes:
[0034] When the candidate search terms include candidate store terms, obtain the location information of the store indicated by the candidate store terms;
[0035] Based on the location information of the stores indicated by the candidate store keywords and the user's location information, determine whether the products of the stores indicated by the candidate store keywords can be provided to the user within the user's delivery range;
[0036] If so, generate target recommendation copy based on the candidate product terms.
[0037] In this embodiment, the supply judgment of the provided candidate store keywords is realized, so that stores can be recommended to users in the form of copy without the user entering a search term.
[0038] In one implementation, generating the target recommendation copy based on the candidate product terms includes:
[0039] If the candidate product term has been exposed and clicked in the historical display process, or if the candidate product term has not been exposed in the historical display process, a target recommendation copy is generated based on the candidate product term.
[0040] In this embodiment, the candidate search terms that have been exposed and clicked can meet the user's preferences; the candidate search terms that have not been exposed can help to explore and discover user interests.
[0041] In one implementation, generating the target recommendation copy based on the candidate product terms includes:
[0042] When there are multiple candidate product terms, divide the multiple candidate product terms into at least two parts;
[0043] For a subset of candidate product keywords, target recommendation copy is generated based on the candidate product keywords and the first candidate copy template; wherein, the first candidate copy template is generated based on historical recommendation copy that has been exposed and clicked during the historical display process;
[0044] For the other part of the candidate product words, a target recommendation copy is generated based on the candidate product words and the second candidate copy template; wherein, the second candidate copy template is matched from the copy template library according to the category to which the candidate product words belong and / or the current time period; and / or, at least one of the category to which the candidate product words belong and the current time period, as well as the candidate product words, are input into a pre-trained copy generation model for processing to obtain the target recommendation copy output by the copy generation model.
[0045] In this embodiment, recommended text is generated based on different schemes to avoid user fatigue caused by repeatedly displaying the same text style. Displaying recommended search terms in text form can enhance the interaction with users and increase their search enthusiasm.
[0046] In one implementation, the search page displays a virtual avatar; displaying the target recommendation text on the search page includes:
[0047] When there are at least two target recommendation texts, one of the target recommendation texts is displayed near the virtual avatar in a manner that simulates the virtual avatar speaking. After a preset time, the target recommendation text is displayed on the search page in the form of a bullet screen, and the other target recommendation text continues to be displayed near the virtual avatar.
[0048] In this embodiment, the target recommendation text is displayed by combining the simulated virtual avatar speaking method with bullet comments, thereby enhancing the interactive experience with users.
[0049] In one implementation, displaying the target recommendation text on the search page includes:
[0050] When there are at least two target recommendation texts, the display order of each target recommendation text is determined according to the category to which the candidate product words in the target recommendation texts belong, and the target recommendation texts are displayed on the search page according to the display order; wherein, the category to which the candidate product words in the target recommendation texts belong is used to ensure that at least two target recommendation texts containing candidate product words belonging to the same category are not displayed consecutively.
[0051] In this embodiment, at least two target recommendation texts containing candidate product terms belonging to the same category are not displayed consecutively, to avoid user fatigue caused by the continuous appearance of search terms of the same category, and to improve the diversity of recommendations.
[0052] According to a second aspect of one or more embodiments of this specification, an electronic device is provided, comprising:
[0053] processor;
[0054] Memory used to store processor-executable instructions;
[0055] The processor implements the method as described in any one of the first or second aspects by executing the executable instructions.
[0056] According to a third aspect of one or more embodiments of this specification, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in any one of the first or second aspects. Attached Figure Description
[0057] Figure 1 This is a schematic diagram of the structure of a search recommendation system provided in an exemplary embodiment.
[0058] Figure 2A This is a flowchart illustrating a search recommendation method provided in an exemplary embodiment.
[0059] Figure 2B This is a flowchart illustrating another search recommendation method provided in an exemplary embodiment.
[0060] Figure 3 This is a schematic diagram of a display page provided in an exemplary embodiment.
[0061] Figure 4 This is another flowchart illustrating a search recommendation method provided in an exemplary embodiment.
[0062] Figure 5 This is a schematic diagram of a search page provided in an exemplary embodiment.
[0063] Figure 6 This is a schematic diagram of a result display page provided in an exemplary embodiment.
[0064] Figure 7 This is another flowchart illustrating a search recommendation method provided in an exemplary embodiment.
[0065] Figure 8 This is a schematic diagram of the structure of a device provided in an exemplary embodiment. Detailed Implementation
[0066] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0067] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0068] To address the problems in related technologies, embodiments of this specification provide a search recommendation method. This method responds to search page display instructions by retrieving data based on historical search data to obtain several candidate search terms. This retrieves search terms that match the search requirements, improving recommendation accuracy. Furthermore, based on the exposure and click data of historical recommended texts, a first candidate text template is determined from the historical recommended texts, identifying a text style that aligns with user preferences and / or is popular with the public. Then, based on the several candidate search terms and the first candidate text template, at least one target recommended text is generated. Finally, the target recommended text is displayed on the search page, recommending search terms in a text style that aligns with user preferences and / or is popular with the public, enhancing user interaction and increasing user search engagement. Consequently, the electronic device can perform data searches when the target recommended text is triggered, eliminating the need for user input of search terms, reducing user steps, and improving search efficiency.
[0069] Please see Figure 1 , Figure 1 The present invention provides a search recommendation system comprising a server 100 and at least one client 200. For example, the client 200 may access the server 100 via a network to use services provided by the server 100, including but not limited to goods delivery services, goods purchase services, reading services, audio and video playback services, or search services, etc.
[0070] Server 100 can be a program installed in a background device to provide services to users. For example, such as... Figure 1 As shown, the backend device can be a server, which can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0071] Client 200 can be a program installed on a user's device to provide services to the user. Client 200 includes, but is not limited to, applications (APP), web pages, mini-programs, plugins, or components. Figure 1 As shown, user devices include, but are not limited to, smartphones, personal digital assistants, tablets, personal computers, laptops, virtual reality terminal devices, and augmented reality terminal devices.
[0072] The search recommendation method provided in this embodiment can be executed by either the server 100 or the client 200, and this embodiment does not impose any restrictions on this. Taking the server 100 executing the search recommendation method as an example, the client 200 can send a search page display instruction to the server 100 in response to a user's trigger operation for displaying the search page. The server 100 can then execute the search recommendation method provided in this embodiment in response to the search page display instruction received from the client 200, generate at least one target recommendation text, and then send the search page displaying the target recommendation text to the client 200 so that the client 200 can display the search page. Furthermore, when any target recommendation text in the search page is triggered, the client 200 can send a trigger instruction for the target recommendation text to the server 100, so that the server 100 can perform a data search in response to the triggering of the target recommendation text and return the search results to the client 200.
[0073] Please see Figure 2A , Figure 2A This is a flowchart illustrating a search recommendation method provided in an embodiment of this specification. The method can be executed by an electronic device, which can install... Figure 1 The server or client described in the embodiment; the method includes:
[0074] In S101, in response to the search page display instruction, several candidate search terms are recalled.
[0075] In S102, if the plurality of candidate search terms include candidate product terms, all target product terms corresponding to the product indicated by the candidate product terms are determined.
[0076] In S103, if a product named after the target product term can be provided to the user within the user's delivery range, then a target recommendation copy is generated based on the candidate product term.
[0077] In S104, the target recommendation text is displayed on the search page so that a product search can be performed when the target recommendation text is triggered.
[0078] In this embodiment, several candidate search terms can be recalled before the user enters a search term, and search terms can be recommended to the user in a textual format even if the user has not entered a search term. To improve the accuracy of product recommendations, all product names with the same meaning but different names as candidate product terms are searched for supply judgment, which improves the accuracy of supply judgment and ensures that suitable and useful search terms can be recommended to the user, avoiding or reducing the occurrence of incorrect recommendations due to supply judgment errors caused by different names of the same product.
[0079] Please see Figure 2B , Figure 2B This is a flowchart illustrating another search recommendation method provided in an embodiment of this specification. The method can be executed by an electronic device, which can be equipped with... Figure 1 The server or client described in the embodiment; the method includes:
[0080] In S201, in response to the search page display instruction, data retrieval is performed based on historical search data to obtain several candidate search terms.
[0081] In S202, based on the exposure and click data of historical recommended copy, a first candidate copy template is determined from the historical recommended copy.
[0082] In S203, at least one target recommendation text is generated based on the plurality of candidate search terms and the first candidate text template.
[0083] In S204, the target recommendation text is displayed on the search page so that a data search can be performed when the target recommendation text is triggered.
[0084] In this embodiment, data retrieval based on historical search data can recall several candidate search terms that meet the search requirements, which helps improve recommendation accuracy. Furthermore, based on the exposure and click data of historical recommended texts, a first candidate text template is determined from the historical recommended texts, which can identify a text style that matches user preferences and / or is popular with the public. Then, based on the several candidate search terms and the first candidate text template, at least one target recommended text is generated and displayed on the search page. This achieves the recommendation of search terms in a text style that matches user preferences and / or is popular with the public, enhancing the interaction with the user and increasing the user's search enthusiasm. Finally, the electronic device can perform data search when the target recommended text is triggered, without requiring the user to type search terms, reducing user operation steps and improving search efficiency.
[0085] It is understood that the data retrieval process in step S201 and the first candidate text template determination process in step S202 can be carried out in parallel or in a specific order. This embodiment does not impose any restrictions on this.
[0086] In some embodiments, please refer to Figure 3 The device can display a search bar on the screen, and then, in response to user actions on the search bar (such as clicking, long-pressing, or swiping, but not limited to these), generate a search page display instruction. The electronic device, in response to the search page display instruction, executes the search recommendation method provided in the embodiments of this specification, such as performing data retrieval based on historical search data to obtain several candidate search terms.
[0087] In some possible implementations, during data retrieval, electronic devices can determine search terms and at least one piece of reference information for the search terms based on historical search data from other users near the user's location over a recent period (e.g., within a week or 10 days). For example, the reference information includes, but is not limited to, at least one of the following: the search period corresponding to the search term, weather information, holiday information, and location information. Then, based on at least one piece of reference information for the search term, the search trend of the search term is determined, and search terms with an upward trend are identified as candidate search terms. This embodiment combines real-time information to identify search terms that may be popular or attract attention recently as candidate search terms, which is beneficial for recalling search terms that meet the user's search needs.
[0088] In another possible implementation, the server can group users based on the characteristics of different clients, thereby providing targeted services to different user groups and improving the user experience. For example, different users belonging to the same user group may have the same or similar preferences, and user preference information can be determined based on at least one parameter among a user's historical purchase behavior, historical search behavior, and historical browsing behavior; in other words, the same user group indicates that users in that group have similar search behavior, purchase behavior, or browsing behavior, or one or more other parameters. After obtaining one or more parameters such as search behavior, purchase behavior, or browsing behavior from multiple users, clustering algorithms can be used to cluster these parameters among multiple users, thereby determining the user group to which each user belongs.
[0089] When performing data retrieval, electronic devices can determine candidate search terms based on at least one of the user's historical behavior data and the historical behavior data of other users belonging to the same user group. The historical behavior data includes, but is not limited to, at least one of the following: historical purchase behavior data, historical search behavior data, and historical browsing behavior data. This embodiment retrieves search terms that match user preferences, thus fulfilling the user's search needs.
[0090] In one example, if a user's historical purchase data includes items such as milk tea, cake, and milk, then milk tea, cake, and milk can be recalled as candidate search terms for this search recommendation process.
[0091] In another possible implementation, the two recall methods described above can be combined to recall both search terms that may be popular or attract attention recently and search terms that match user preferences, making the recall results more complete.
[0092] Understandably, the search terms retrieved will differ in different search scenarios.
[0093] For example, in a product purchase scenario, the recalled candidate search terms can be at least one of product terms and store terms. For instance, in a food ordering scenario, product terms could be milk tea, coffee, crayfish, barbecue, or hot dry noodles, etc., but are not limited to these; store terms could be Zhang Mama Sichuan Restaurant, AA Milk Tea Shop, or BB Cantonese Restaurant, etc., but are not limited to these. Similarly, in a shopping scenario, product terms could be sweaters, down jackets, dresses, shirts, hair accessories, mobile phones, or necklaces, etc., but are not limited to these; store names could be CC Clothing, DD Clothing, EE Jewelry Store, or GG Digital Store, etc., but are not limited to these.
[0094] For example, in a reading scenario, the retrieved candidate search terms could be at least one of the following: novel title, author, trending news terms, and journal title. Similarly, in an audio-visual scenario, the retrieved candidate search terms could be at least one of the following: video title, video genre, drama title, song title, singer, video creator's name, and performer's name.
[0095] In some embodiments, after recalling a number of candidate search terms, to improve the recommendation effect of the candidate search terms, the electronic device can perform quality checks on the recalled candidate search terms and then filter out the candidate search terms that do not meet preset quality conditions. The quality conditions can be specifically set according to the actual application scenario, and this embodiment does not impose any restrictions on them.
[0096] For example, an electronic device can use a pre-stored thesaurus and / or a pre-trained search term classification model to classify each candidate search term and determine its category; then, candidate search terms that do not belong to a preset category are deleted. The thesaurus includes several search terms and their categories. The search term classification model is used to classify and detect the input search terms to determine their category. It is understood that the preset categories can be specifically set according to the actual application scenario; for example, in a product purchase scenario, the preset categories include at least one of product and store; or, in a reading scenario, the preset categories include at least one of book title and author; but are not limited to these.
[0097] In one example, for any candidate search term, the electronic device can search a lexicon for matching search terms and then determine the category of the matching search terms as the category of the candidate search term.
[0098] In another example, for any candidate search term, the electronic device can use a pre-trained search term classification model to classify the candidate search term and obtain the category output by the search term classification model. The search term classification model can be trained using supervised training based on search term samples and their category labels. It is understood that this embodiment does not impose any restrictions on the specific model structure of the search term classification model; it can be specifically configured according to the actual application scenario, such as using a deep learning model to achieve entity recognition.
[0099] In another example, for any candidate search term, the electronic device first searches for matching search terms in a terminology database. If a matching search term exists in the database, the category of the matching search term is determined as the category of the candidate search term. The terminology database includes several search terms and their categories. If no matching search term exists in the database, a pre-trained search term classification model is used to classify the candidate search term, obtaining the category output by the search term classification model. This embodiment combines a terminology database and a search term classification model to determine the category of candidate search terms, thereby deleting candidate search terms that do not belong to the preset category. This helps ensure the quality of candidate search terms and improves subsequent recommendation efficiency.
[0100] In some embodiments, after recalling several candidate search terms, for certain scenarios with strong spatial characteristics, the electronic device can also make a supply judgment on the service indicated by each candidate search term to determine whether the service indicated by the candidate search term can be provided to the user within the user's delivery range; wherein, the user's delivery range is determined based on the user's location information; thereby, candidate search terms that cannot provide services to the user can be deleted to avoid invalid recommendations that cannot meet the user's needs.
[0101] For example, in a food delivery scenario, electronic devices can assess the supply of goods indicated by each candidate search term to determine whether the goods can be provided within the user's delivery area. Candidate search terms for goods that cannot be provided within the user's delivery area can then be removed. In one example, if the candidate search term includes "coffee," and the supply assessment determines that coffee cannot be provided within the user's delivery area, then the candidate search term "coffee" can be filtered out, preventing invalid recommendations that fail to meet the user's needs.
[0102] The search term includes at least one of product terms and store names. Therefore, candidate search terms include at least one of candidate product terms and candidate store names.
[0103] In one possible implementation, if the candidate search term is a candidate store name, the electronic device can determine whether the user's delivery range is met based on the location information of the store indicated by the candidate store name and the user's location information; for example, the distance between the two is determined based on the location information of the store indicated by the candidate store name and the user's location information. If the distance is less than the delivery distance indicated by the user's delivery range, it means that the store's service can be provided to the user within the user's delivery range; otherwise, it is determined that there is no supply within the user's delivery range.
[0104] In one possible implementation, if the candidate word is a candidate product word, the electronic device can search for stores that contain products indicated by the candidate product word. For example, the electronic device can pre-store the correspondence between product words and store names, and then search for stores that contain products indicated by the candidate product word from the pre-stored correspondence between product words and store names; and then determine whether the delivery range of the user is met based on the location information of the store and the user's location information.
[0105] Furthermore, considering that the same product may have multiple different names or aliases, and the candidate product terms recalled in this specification embodiment may only be one of the product's names, in order to avoid misjudging the supply relationship due to different names for the same product—for example, a product may be available within a user's delivery range but is filtered out simply because its name differs from the candidate product terms, thus leading to an incorrect judgment of the supply relationship—this specification embodiment provides the following two possible implementation methods to solve this problem.
[0106] In one possible implementation, the electronic device can pre-store a product name table, which includes different names for the same product. After obtaining candidate product terms, the electronic device can retrieve all target product terms corresponding to the product indicated by the candidate product terms from the pre-stored product name table; then, based on the target product terms, it can search for stores containing the product indicated by the target product term from the pre-stored correspondence between product terms and store names. In this embodiment, it helps to avoid or reduce the occurrence of supply judgment errors due to different names for the same product, thus improving the accuracy of supply judgment.
[0107] In another possible implementation, a neural network model can be pre-trained to convert different names for the same product into the same representation vector. Furthermore, the electronic device can pre-store the correspondence between different names for the same product (i.e., different product names) and representation vectors. After obtaining candidate product terms, the electronic device can convert these candidate product terms into target representation vectors based on the pre-trained neural network model; then, based on the target representation vectors, it can determine all target product terms corresponding to the target vectors from the pre-stored correspondence between representation vectors and product names; finally, based on the target product terms, it can search for stores containing the product indicated by the target product term from the pre-stored correspondence between product terms and store names. In this embodiment, it helps to avoid or reduce the occurrence of supply judgment errors due to different names for the same product, thus improving the accuracy of supply judgment.
[0108] For example, the neural network includes at least an embedding layer and an encoder; the embedding layer is used to transform the candidate product words to obtain an embedding vector; the encoder is used to map the embedding vector from the character vector space to the numerical vector space to obtain the representation vector.
[0109] For example, the neural network model can be obtained through contrastive learning and representation learning based on product samples with multiple different names. Contrastive learning, a type of self-supervised learning, learns the feature representation of samples by comparing them separately with positive and negative examples in the feature space. Contrastive learning focuses on learning the common features among similar instances and distinguishing the differences between dissimilar instances. Compared to generative learning, contrastive learning does not need to focus on the tedious details of instances; it only needs to learn to distinguish data at the abstract semantic level of the feature space. Therefore, the model and its optimization become simpler, and its generalization ability is stronger. Representation learning is a collection of techniques for learning a feature, transforming raw data into a form that can be effectively developed by machine learning. It avoids the hassle of manually extracting features, allowing the computer to learn how to use features while also learning how to extract features: learning how to learn.
[0110] During training, several binary samples are acquired, some of which include two positive samples and others include one positive sample and one negative sample. The two positive samples include different product names of the same product, and the negative sample belongs to a different product name than the positive sample. The binary samples are input into a preset neural network with two branches, and each branch processes one of the samples in the binary samples to obtain two representation vectors. The weights of the two branches are shared. The parameters of the preset neural network are adjusted according to the similarity between the representation vectors corresponding to the two positive samples and / or the difference between the representation vectors of the positive sample and the representation vector of the negative sample, to obtain a trained neural network. The trained neural network has at least one of the branches.
[0111] The optimization objectives of the neural network model include: minimizing the distance between the representation vectors corresponding to different names of the same product sample, and / or maximizing the distance between the representation vectors corresponding to at least two names of different product samples. In other words, during the training process of the neural network model, based on product samples with multiple different names, the neural network model learns a function F that encodes the input data into a representation vector, making the representation vectors corresponding to different names of the same product sample as similar as possible, while making the representation vectors corresponding to at least two names of different product samples as different as possible, thereby improving the accuracy of the model.
[0112] In some embodiments, after recalling several candidate search terms, the electronic device can filter out the target search term from the several candidate search terms based on the historical exposure and click data of different candidate search terms. For example, for any user, the search terms displayed on the user's client's search page (i.e., the exposure of the search terms) and the user's feedback on the displayed search terms (such as clicks on the search terms) can be recorded in the user's corresponding user behavior log; to improve recommendation accuracy, the historical exposure and click data of different candidate search terms can be obtained from the user behavior log of this client and / or the user behavior logs of other users belonging to the same user group as the user.
[0113] For example, an electronic device can determine, based on historical exposure and click data of different candidate search terms, candidate search terms that have been exposed and clicked during the historical display process, and candidate search terms that have been exposed but not clicked during the historical display process. The exposed and clicked candidate search terms reflect user preferences, while the exposed but not clicked candidate search terms indicate that the user may not be interested in them. Therefore, the finally determined target search term may include at least some candidate search terms that have been exposed and clicked during the historical display process, and some candidate search terms that have not been exposed. The target search term is not included in the candidate search terms that have been exposed but not clicked during the historical display process. This achieves the filtering of candidate search terms based on user preferences, determining candidate search terms that can meet the user's search needs; and the inclusion of unexposed candidate search terms in the target search term helps to explore and uncover user interests.
[0114] In some embodiments, electronic devices can generate target recommendation text based on candidate search terms, thereby recommending search terms in text form. The target recommendation text can be anthropomorphic text (such as text in the form of a dialogue), thereby enhancing the sense of interaction with users and increasing users' search enthusiasm.
[0115] In one possible implementation, the electronic device pre-stores copywriting templates for different time periods and / or different categories; for example, please refer to Table 1, which shows copywriting templates for the food delivery scenario; where “$keyword” in Table 1 is used to indicate the search term to be inserted. For example, in the food delivery scenario, 6:00-10:00 is the breakfast period, 11:00-13:00 is the lunch period, 15:00-16:00 is the afternoon tea period, 17:00-20:00 is the dinner period, and 22:00-24:00 is the late-night snack period.
[0116] After recalling several candidate search terms, for any given candidate search term, the electronic device can match a second candidate text template from the text template library based on at least one of the candidate search term's category and the current time period; then, based on the candidate search term and the matched second candidate text template, it generates a target recommendation text. This embodiment achieves the recommendation of search terms in a preset text format, which can enhance the interactive experience with users.
[0117] Table 1
[0118] Time period Category Copywriting template breakfast fruit A healthy day starts with $keyword~ breakfast Desserts and Drinks A energizing morning requires $keyword~ Lunch Chinese cuisine How about trying $keyword for lunch? afternoon tea Desserts and Drinks Grab some $keywords to relax! night snack Chinese cuisine Eating $keyword for a late-night snack is so satisfying!
[0119] In the second possible implementation, a copywriting generation model can be pre-trained according to actual needs. For example, it can be trained in a supervised manner based on several samples and their labels to obtain the copywriting generation model. Any sample includes at least one of the category to which the reference search term belongs and the reference time period, as well as the reference search term, and the sample is labeled with recommended copywriting that includes the reference search term. The trained copywriting generation model is used to generate recommended copywriting based on at least one of the category to which the output search term belongs and the reference time period, as well as the reference search term.
[0120] In practical applications, after recalling several candidate search terms, for any given candidate search term, the electronic device can input at least one of the candidate search term's category and current time period, along with the candidate search term itself, into a pre-trained copywriting generation model for processing, thereby obtaining the target recommended copywriting output by the copywriting generation model. This embodiment implements search term recommendation in copywriting form, which can enhance the interactive experience with users.
[0121] In a third possible implementation, the electronic device can determine a first candidate copy template from the historical recommended copy based on the exposure and click data of the historical recommended copy, and then generate at least one target recommended copy based on the plurality of candidate search terms and the first candidate copy template.
[0122] For example, for any user, the recommended texts displayed on the search page of the user's client (i.e., the exposure of the recommended texts) and the user's feedback on the displayed recommended texts (such as the clicks on the recommended texts) can be recorded in the user's corresponding user behavior log; to improve the accuracy of recommendations, historical recommended texts and the exposure and click data of historical recommended texts can be obtained from at least one of the following: the user behavior log of this client, the user behavior logs of other users belonging to the same user group as the user, and the user behavior logs of other users.
[0123] For example, the historical recommendation text includes at least one of the following: (1) recommendation text displayed on the search page of the user's client; (2) recommendation text displayed on the search page of the clients of other users belonging to the same user group as the user; wherein, different users belonging to the same user group have the same or similar preferences; (3) recommendation text displayed on the search page of other users' clients. For example, the first candidate text template is generated based on historical recommendation text that has been exposed and clicked during the historical display process. This embodiment realizes the determination of text style forms that conform to user preferences and / or are popular based on the exposure and click situation of historical recommendation texts, thereby enabling the recommendation of search terms in text style forms that conform to user preferences and / or are popular, enhancing the sense of interaction with users, and improving users' search enthusiasm.
[0124] In one example, if the historical recommended copy that has been displayed and clicked during the history display includes phrases like "Barbecue for late-night snacks, so awesome!" and "Xiao Bao recommends stir-fried beef noodles for late-night enjoyment," then the first candidate copy templates generated could be "Barbecue for late-night snacks, so awesome!" and "Xiao Bao recommends $keyword for late-night enjoyment!" Here, "$keyword" indicates the search term to be inserted. Assuming the candidate search terms include crayfish and barbecue, the generated target recommended copy could be "Barbecue for late-night snacks, so awesome!" and "Xiao Bao recommends barbecue for late-night enjoyment!"
[0125] In one exemplary embodiment, please refer to Figure 4 For any given user, the recommended content displayed on the search page of that user's client and the user's feedback on that content can be recorded in the user's corresponding user behavior log. In other words, the user behavior log records the search terms contained in the recommended content and their exposure and click data, as well as the recommended content and its exposure and click data.
[0126] After recalling several candidate search terms, the electronic device can first obtain historical exposure and click data of different candidate search terms from the user behavior log of this client. Then, based on the historical exposure and click data of different candidate search terms, it can filter out target search terms from the several candidate search terms. For example, the target search terms may include at least some candidate search terms that have been exposed and clicked in the historical display process, as well as some candidate search terms that have not been exposed. The target search terms are not included in the candidate search terms that have been exposed but not clicked in the historical display process. This achieves the filtering of candidate search terms based on user preferences and determines candidate search terms that can meet the user's search needs.
[0127] Furthermore, the electronic device can obtain exposure and click data of historical recommended texts from the user behavior logs of this client, and then determine a first candidate text template from the historical recommended texts based on the exposure and click data of the historical recommended texts; for example, the first candidate text template is generated based on the historical recommended texts that have been exposed and clicked during the historical display process, thereby realizing the acquisition of the text style form preferred by the user.
[0128] When there are multiple target search terms, they can be divided into different parts. Then, for each part of the target search terms, different target recommendation copy generation methods can be used to generate copy. In one example, multiple target search terms can be divided into three parts. For the first part of the target search terms, the electronic device can generate at least one target recommendation copy based on the target search term and the first candidate copy template. For the second part of the target search terms, the electronic device matches a second candidate copy template from the copy template library based on at least one of the target search term's category and the current time period, and then generates a target recommendation copy based on the target search term and the matched second candidate copy template. For the third part of the target search terms, the electronic device can input the target search term's category and at least one of the current time period, along with the target search term itself, into a pre-trained copy generation model for processing, obtaining the target recommendation copy output by the copy generation model. This embodiment generates recommendation copy based on different schemes, avoiding user fatigue caused by repeatedly displaying the same copy style. Displaying recommended search terms in copy format enhances user interaction and increases user search engagement.
[0129] After obtaining multiple target recommendation texts, the electronic device can sort these texts according to the user's preferences, and then display them on the search page according to the sorting results. The user's preferences can be determined based on the exposure and click data of historical recommendation texts obtained from the user behavior log of this client. Users can trigger target recommendation texts as needed, allowing the electronic device to perform data searches when a target recommendation text is triggered, eliminating the need for users to type search terms, reducing user steps, and improving search efficiency. For example, the target recommendation texts displayed on the search page and the user's feedback on them (such as clicks) can be recorded in the user's corresponding user behavior log, serving as reference data for subsequent processes such as candidate search term selection, target recommendation text generation, and target text sorting.
[0130] In some embodiments, after generating target recommendation text, the electronic device can also detect the text quality of each target recommendation text to obtain target recommendation text that meets the text quality conditions, and then display the target recommendation text that meets the text quality conditions on the search page.
[0131] In one possible implementation, a sentiment classification model can be pre-trained to perform sentiment analysis on the input text to determine its sentiment classification, which includes positive, neutral, or negative sentiment. The sentiment classification model can be obtained through supervised training based on several text samples and their sentiment labels (positive, neutral, or negative sentiment). It is understood that the embodiments in this specification do not impose any limitations on the specific model results of the language model described, and can be specifically set according to the actual application scenario. For example, the sentiment classification model can be a BERT (Bidirectional Encoder Representation from Transformers) model or other deep learning models.
[0132] In practical applications, electronic devices can use a pre-trained sentiment classification model to process the target recommendation text and obtain its sentiment classification information. For example, target recommendation texts with a sentiment classification of "negative sentiment" can be filtered out. In one example, if the target recommendation text is "milk tea doesn't taste good," and the sentiment classification model determines that the target recommendation text's sentiment classification information is "negative sentiment," then the target recommendation text "milk tea doesn't taste good" can be deleted.
[0133] In another possible implementation, a language model can be pre-trained to measure the reasonableness of a sentence (judging the context-dependent features of natural language and sentence fluency). Supervised training can be performed based on several text samples and their fluency labels to obtain the language model. It is understood that the embodiments in this specification do not impose any limitations on the specific model results of the language model described, and can be specifically set according to the actual application scenario. For example, the language model can be a BERT (Bidirectional Encoder Representation from Transformers) model or other deep learning models.
[0134] In practical applications, electronic devices can use pre-trained language models to detect the text fluency of the target recommended text and obtain the text fluency score. For example, target recommended texts whose text fluency does not meet preset fluency requirements can be filtered out. In one example, if the target recommended text is "Crispy shrimp cakes are loved by everyone," and the language model determines that the text fluency of this target recommended text does not meet the preset fluency requirements, then the target recommended text "Crispy shrimp cakes are loved by everyone" can be deleted.
[0135] In another possible implementation, a relevance evaluation model can be pre-trained to evaluate whether the target recommended text contains the search term, and / or whether the target recommended text is suitable for the current time period, and output a relevance evaluation result; for example, the relevance evaluation result includes "yes" or "no".
[0136] For example, several training samples can be obtained. Each training sample includes a reference text and its reference time period. Each training sample corresponds to a positive label or a negative label. A positive label indicates that the reference text contains the search term and / or that the reference text matches the reference time period, such as "yes" or "1". A negative label indicates that the reference text does not contain the search term or that the reference text does not match the reference time period, such as "no" or "0". Then, supervised training can be performed based on several training samples and their labels (positive labels or negative labels) to obtain a relevance evaluation model. Of course, positive labels and negative labels can also be represented in other ways, and this embodiment does not impose any restrictions on this.
[0137] In practical applications, electronic devices can use a pre-trained relevance evaluation model to process the target recommended text and the current time period to obtain a relevance evaluation result for the target recommended text. This relevance evaluation result indicates whether the target recommended text contains the search term and / or whether the target recommended text is suitable for the current time period. For example, if the relevance evaluation result is "no," it means that the target recommended text does not contain the search term and / or does not fit the current time period; if the relevance evaluation result is "yes," it means that the target recommended text contains the search term and fits the current time period. Of course, the relevance evaluation result can also be represented in other ways, and this embodiment does not impose any restrictions on this.
[0138] In one exemplary implementation, target recommendation texts that are classified as positive or neutral emotions, whose text fluency meets preset fluency requirements, and whose relevance evaluation results meet preset relevance requirements (preset relevance requirements indicate that the target recommendation text contains search terms and that the target recommendation text is relevant to the current scenario) can be displayed on the search page, thereby improving recommendation accuracy.
[0139] In some embodiments, after generating the target recommendation text, the target recommendation text can be displayed on the search page to recommend search terms to users in an interactive text format, enhancing the sense of interaction with users and increasing users' search enthusiasm; furthermore, the electronic device can perform data search when the target recommendation text is triggered (e.g., when the user clicks on the target recommendation text), without requiring the user to type search terms, reducing the user's operation steps and improving search efficiency.
[0140] For example, when there are at least two target recommendation texts, the electronic device can determine the display order of each target recommendation text based on the user's preference information and the category to which the target search terms in each target recommendation text belong, so as to display the target recommendation texts on the search page in the order of display; wherein, the category to which the target search terms belong is used to ensure that at least two target recommendation texts containing target search terms belonging to the same category are not displayed consecutively, so as to avoid user fatigue caused by the continuous appearance of search terms in the same category; the preference information is determined based on at least one of the user's historical purchase behavior, historical search behavior, and historical browsing behavior.
[0141] For example, please refer to Figure 5 The electronic device can display the target recommendation text as a scrolling comment on the search page. In one example, the target recommendation text can be displayed in a scrolling comment format on the search page according to the display order determined by the above process.
[0142] For example, please refer to Figure 5 The search page displays a virtual avatar, and electronic devices can display the target recommendation text near the virtual avatar in a way that simulates the virtual avatar speaking, thereby enhancing the sense of interaction with the user and increasing the user's enthusiasm for triggering the recommendation text.
[0143] Furthermore, if there are at least two target recommendation texts, after displaying one of the target recommendation texts near the virtual avatar in a manner that simulates the virtual avatar speaking for a preset duration, that target recommendation text can be displayed on the search page as a pop-up comment, and the other target recommendation text can continue to be displayed near the virtual avatar. The target recommendation texts displayed near the virtual avatar in a manner that simulates the virtual avatar speaking can be displayed in the display order determined by the above process. The specific value of the preset duration can be set according to the actual application scenario; this embodiment does not impose any restrictions on this.
[0144] For example, please refer to Figure 6The electronic device can respond to a trigger command on the target recommended text to obtain search results related to the search terms contained in the target recommended text; and then display the search results on a results display page; wherein, the results display page also includes a search bar, which displays the search terms contained in the target recommended text, so that the user can clearly understand the search object of this search process. For example, if the user clicks... Figure 5 The target recommendation text in the article is "Eating kueh teow is great on a rainy day". Figure 6 The word "kueh teow" from the target recommendation text was displayed in the search bar.
[0145] For example, the target recommendation text displayed on the search page and the user's feedback on the target recommendation text (such as triggering the target recommendation text) can be recorded in the user's corresponding user behavior log. In other words, the user behavior log records the search terms contained in the recommendation text and their exposure and click data, as well as the recommendation text and its exposure and click data, so as to serve as reference data for subsequent processes such as candidate search term selection, target recommendation text generation, and target text ranking.
[0146] The various technical features in the above embodiments can be combined arbitrarily, as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, the arbitrary combination of various technical features in the above embodiments is also within the scope of this specification.
[0147] Accordingly, please refer to Figure 7 , Figure 7 This is a flowchart illustrating another search recommendation method provided in the embodiments of this specification. The method can be executed by a client (or an electronic device with the client installed), and includes:
[0148] In S301, in response to a search page display instruction, at least one target recommendation text is obtained; the target recommendation text includes search terms.
[0149] In S302, the target recommendation text is displayed on the search page in the form of bullet comments; and / or, the search page displays a virtual avatar, and the target recommendation text is displayed near the virtual avatar in a manner that simulates the virtual avatar speaking.
[0150] This embodiment recommends search terms in the form of text, which can enhance the interaction with users and increase their search activity.
[0151] In some embodiments, displaying the target recommendation text near the virtual avatar in a manner that simulates the virtual avatar speaking includes:
[0152] When there are at least two target recommendation texts, after displaying one of the target recommendation texts near the virtual image in a manner that simulates the virtual image speaking for a preset duration, the target recommendation text is displayed on the search page in the form of bullet comments, and the other target recommendation text is displayed near the virtual image.
[0153] In some embodiments, the method further includes: when there are at least two target recommendation texts, determining the display order of each target recommendation text based on the user's preference information and the category to which the target search terms in each target recommendation text belong, so as to display the target recommendation texts on the search page in the display order; wherein, the category to which the target search terms belong is used to ensure that at least two target recommendation texts containing target search terms belonging to the same category are not displayed consecutively; the preference information is determined based on at least one of the user's historical purchase behavior, historical search behavior, and historical browsing behavior.
[0154] In some embodiments, obtaining at least one target recommended copy includes: performing data retrieval based on historical search data to obtain a plurality of candidate search terms; determining a first candidate copy template from the historical recommended copy based on the exposure and click data of the historical recommended copy; and generating at least one target recommended copy based on the plurality of candidate search terms and the first candidate copy template.
[0155] In some embodiments, after retrieving data based on historical search data to obtain several candidate search terms, the method further includes: for each candidate search term, determining the supply of the service indicated by the candidate search term to determine whether the service indicated by the candidate search term can be provided to the user within the user's delivery range; wherein the user's delivery range is determined based on the user's location information; and deleting candidate search terms that cannot provide services to the user.
[0156] In some embodiments, the search term includes product terms and / or store names; the step of determining the supply of the service indicated by the candidate search term and whether the service indicated by the candidate search term can be provided to the user within the user's delivery range includes: if the candidate search term is a candidate store name, determining whether the user's delivery range is met based on the location information of the store indicated by the candidate store name and the user's location information; if the candidate term is a candidate product term, searching for stores that contain the product indicated by the candidate product term, and determining whether the user's delivery range is met based on the location information of the store and the user's location information.
[0157] In some embodiments, the search for stores containing products indicated by the candidate product term includes: obtaining all target product terms corresponding to the products indicated by the candidate product term from a pre-stored product name table; the product name table pre-stores different names for the same product; and searching for stores containing products indicated by the target product term from the pre-stored correspondence between product terms and store names.
[0158] In some embodiments, the search for stores containing the product indicated by the candidate product term includes: converting the candidate product term into a target representation vector according to a pre-trained neural network model; wherein the neural network model is used to convert different names of the same product into the same representation vector; determining all target product terms corresponding to the target vector from a pre-stored correspondence between representation vectors and product names based on the target representation vector; and searching for stores containing the product indicated by the target product term from a pre-stored correspondence between product terms and store names based on the target product term. In some embodiments, the historical recommendation copy includes at least one of the following: recommendation copy displayed on the search page of a user's client; recommendation copy displayed on the search page of the clients of other users belonging to the same user group as the user; wherein different users belonging to the same user group have the same or similar preferences; and recommendation copy displayed on the search page of other users' clients. The first candidate copy template is generated based on historical recommendation copy that has been exposed and clicked during the historical display process.
[0159] In some embodiments, after performing data retrieval based on historical search data to obtain a plurality of candidate search terms, the method further includes: filtering target search terms from the plurality of candidate search terms based on historical exposure and click data of different candidate search terms; wherein, the target search terms include at least some candidate search terms that have been exposed and clicked in the historical display process, and do not include candidate search terms that have been exposed but not clicked in the historical display process.
[0160] The step of generating at least one target recommendation text based on the plurality of candidate search terms and the first candidate text template includes: generating at least one target recommendation text based on the target search term and the first candidate text template. In some embodiments, it further includes: for any candidate search term, matching a second candidate text template from a text template library based on at least one of the category to which the candidate search term belongs and the current time period, the text template library including text templates under different time periods and / or different categories; generating the target recommendation text based on the candidate search term and the matched second candidate text template.
[0161] In some embodiments, the method further includes: for any candidate search term, inputting at least one of the category to which the candidate search term belongs and the current time period, as well as the candidate search term itself, into a pre-trained copywriting generation model for processing to obtain the target recommended copywriting output by the copywriting generation model; wherein, the copywriting generation model is trained based on several samples and their labels; any sample includes at least one of the category to which the reference search term belongs and the reference time period, as well as the reference search term, and the sample is labeled with recommended copywriting including the reference search term.
[0162] In some embodiments, the target recommended text displayed on the search page meets the text quality criteria. The method further includes: after obtaining the target recommended text, detecting the text quality of each target recommended text to obtain target recommended text that meets the text quality criteria.
[0163] The step of detecting the text quality of each of the target recommendation texts includes: processing the target recommendation texts using a pre-trained sentiment classification model to obtain the sentiment classification information of the target recommendation texts; the sentiment classification model is used to perform sentiment analysis on the input text to determine the sentiment classification of the input text, the sentiment classification including positive sentiment, neutral sentiment, or negative sentiment; and / or detecting the text fluency of the target recommendation texts using a pre-trained language model to obtain the text fluency of the target recommendation texts; and / or processing the target recommendation texts and the current time period using a pre-trained relevance evaluation model to obtain the relevance evaluation result of the target recommendation texts; the relevance evaluation model is used to evaluate whether the target recommendation texts contain search terms, and / or whether the target recommendation texts are suitable for the current time period.
[0164] In some embodiments, the step of retrieving data based on historical search data to obtain several candidate search terms includes: determining search terms and at least one reference information for the search terms based on the historical search data of other users near the user's location in a recent period; determining the search trend of the search terms based on the at least one reference information for the search terms, and identifying search terms with an upward trend as candidate search terms; and / or determining candidate search terms based on at least one of the user's historical behavior data and the historical behavior data of other users belonging to the same user group as the user; wherein the historical behavior data includes at least one of historical purchase behavior data, historical search behavior data, and historical browsing behavior data.
[0165] In some embodiments, after retrieving data based on historical search data to obtain several candidate search terms, the method further includes: classifying each candidate search term using a pre-stored thesaurus and / or a pre-trained search term classification model to determine the category of each candidate search term; the thesaurus includes several search terms and their categories; the search term classification model is used to classify and detect the input search terms to determine the category of the input search terms; and deleting candidate search terms that do not belong to a preset category.
[0166] In some embodiments, the method further includes: in response to a triggering instruction on the target recommended text, obtaining search results related to the search terms contained in the target recommended text; and displaying the search results on a results display page; wherein the results display page further includes a search bar that displays the search terms contained in the target recommended text.
[0167] For the above embodiments, please refer to the relevant details. Figure 2A The method implementation examples are described in detail here, and will not be repeated here.
[0168] Figure 8 This is a schematic structural diagram of a device provided in an exemplary embodiment. Please refer to... Figure 8 At the hardware level, the device includes a processor 802, an internal bus 804, a network interface 806, memory 808, and non-volatile memory 810, and may also include other hardware required for business operations. One or more embodiments of this specification can be implemented in software, such as the processor 802 reading the corresponding computer program from the non-volatile memory 810 into memory 808 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0169] Accordingly, embodiments of this specification also provide an electronic device, including:
[0170] processor;
[0171] Memory used to store processor-executable instructions;
[0172] The processor implements the method described above by running the executable instructions.
[0173] Accordingly, this disclosure also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of any of the methods described above.
[0174] Accordingly, this disclosure also provides a computer program product that, when executed by a processor, implements the steps of any of the methods described above.
[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0176] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
[0177] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0178] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0179] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0180] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0181] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0182] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this specification. The singular forms “a,” “described,” and “the” used in one or more embodiments of this specification and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0183] It should be understood that although the terms first, second, third, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of one or more embodiments of this specification, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "in response to a determination," or "when," or "in the event of a determination."
[0184] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.
Claims
1. A search recommendation method, characterized in that, include: In response to the search page display instructions, recall several candidate search terms; When the candidate search terms include candidate product terms, determine all target product terms corresponding to the product indicated by the candidate product terms; If a product named after the target product term can be provided to the user within the user's delivery range, then a target recommendation copy is generated based on the candidate product term; wherein, for any candidate search term, the category to which the candidate search term belongs, the current time period, and the candidate search term are input into a pre-trained copy generation model for processing to obtain the target recommendation copy output by the copy generation model; The target recommendation text is displayed on the search page so that a product search can be performed when the target recommendation text is triggered.
2. The method according to claim 1, characterized in that, The step of determining all target product terms corresponding to the product indicated by the candidate product term includes: The candidate product terms are converted into target representation vectors using a pre-trained neural network model; the neural network model is used to convert different product names of the same product into the same representation vector. The results of the transformation using the neural network model are all target product words of the target representation vector.
3. The method according to claim 2, characterized in that, The result of the transformation using the neural network model is determined to be the target product word of the target representation vector, including: Based on the pre-stored correspondence between different product names and representation vectors of the same product, determine all target product words corresponding to the target representation vector.
4. The method according to claim 2, characterized in that, The neural network model includes an embedding layer and an encoder; the target representation vector is obtained by converting the candidate product words into embedding vectors through the embedding layer, and then mapping the embedding vectors from the character vector space to the numerical vector space by the encoder.
5. The method according to claim 2, characterized in that, Training the neural network model includes: Obtain several binary sample pairs, wherein a portion of the binary sample pairs includes two positive samples, and another portion of the binary sample pairs includes one positive sample and one negative sample; the two positive samples include different product names of the same product, and the negative sample and the positive sample belong to product names of different products; The binary sample is input into a neural network model to be trained with two branches. Each branch processes one of the binary samples to obtain two representation vectors corresponding to the binary sample output by the two branches. The neural network model to be trained is trained with the optimization objective of minimizing the distance between the representation vectors corresponding to different product names belonging to the same product and / or maximizing the distance between the representation vectors corresponding to product names belonging to different products. The weights of the two branches are shared; the trained neural network model includes at least one of the branches.
6. The method according to claim 1, characterized in that, The step of determining all target product terms corresponding to the product indicated by the candidate product term includes: Based on the candidate product terms, all target product terms are obtained from the product name table of the products indicated by the candidate product terms; wherein, the product name table includes different product names corresponding to the same product.
7. The method according to any one of claims 1 to 6, characterized in that, If a product named after the target product term can be provided to the user within the user's delivery range, then a target recommendation copy is generated based on the candidate product term. Prior to this, the process also includes: Identify stores that contain products named with the target product term and obtain the location information of those stores; Based on the store's location information and the user's location information, determine whether it is possible to provide the user with a product named after the target product term within the user's delivery range.
8. The method according to claim 1, characterized in that, Also includes: When the candidate search terms include candidate store terms, obtain the location information of the store indicated by the candidate store terms; Based on the location information of the stores indicated by the candidate store keywords and the user's location information, determine whether the products of the stores indicated by the candidate store keywords can be provided to the user within the user's delivery range; If so, generate target recommendation copy based on the candidate product terms.
9. The method according to claim 1, characterized in that, The step of generating target recommendation copy based on the candidate product terms includes: If the candidate product term has been exposed and clicked in the historical display process, or if the candidate product term has not been exposed in the historical display process, a target recommendation copy is generated based on the candidate product term.
10. The method according to claim 1, characterized in that, The step of generating target recommendation copy based on the candidate product terms includes: When there are multiple candidate product terms, divide the multiple candidate product terms into at least two parts; For a subset of candidate product keywords, target recommendation copy is generated based on the candidate product keywords and the first candidate copy template; wherein, the first candidate copy template is generated based on historical recommendation copy that has been exposed and clicked during the historical display process; For the other part of the candidate product words, a target recommendation copy is generated based on the candidate product words and the second candidate copy template; wherein, the second candidate copy template is matched from the copy template library according to the category to which the candidate product words belong and / or the current time period; and / or, at least one of the category to which the candidate product words belong and the current time period, as well as the candidate product words, are input into a pre-trained copy generation model for processing to obtain the target recommendation copy output by the copy generation model.
11. The method according to claim 1, characterized in that, The search page displays a virtual avatar; displaying the target recommendation text on the search page includes: When there are at least two target recommendation texts, one of the target recommendation texts is displayed near the virtual avatar in a manner that simulates the virtual avatar speaking. After a preset time, the target recommendation text is displayed on the search page in the form of a bullet screen, and the other target recommendation text continues to be displayed near the virtual avatar.
12. The method according to claim 1, characterized in that, Displaying the target recommendation text on the search page includes: When there are at least two target recommendation texts, the display order of each target recommendation text is determined according to the category to which the candidate product words in the target recommendation texts belong, and the target recommendation texts are displayed on the search page according to the display order; wherein, the category to which the candidate product words in the target recommendation texts belong is used to ensure that at least two target recommendation texts containing candidate product words belonging to the same category are not displayed consecutively.
13. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1 to 12 by executing the executable instructions.
14. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 12.
15. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Application recommendation method and device
CN106649781A
Search method, search server, and search system
CN109388742A
Information recommendation method and device in input scene
CN110162710A
Recommendation word display method and device, equipment and computer readable storage medium
CN110532351A
Name matching method, training method, equipment and storage medium
CN114510944A