Search method and apparatus
By rewriting the terminology and modifying the target user's input search terms based on the user's historical search terms from the same session, related product recommendations are generated. This solves the problem that the products at the bottom of the search results are irrelevant to the user's search terms and improves the conversion rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI BILIBILI TECH CO LTD
- Filing Date
- 2022-11-28
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, the products recommended at the bottom of the search bar are unrelated to the user's search terms, resulting in a low conversion rate.
By acquiring the target user's input search terms, and using a pre-set rewritten terminology list, the search terms from the same conversation of multiple users are rewritten to generate related product recommendations.
This improved the relevance of recommended products at the bottom of the search results to user needs, increased user clicks and purchase interest, and improved conversion rates.
Smart Images

Figure CN115827841B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet, and particularly relates to a search method and device, computer equipment and storage medium. BACKGROUND
[0002] The search bottom (feedblast) is a module below the search result page, which receives the traffic when the user continues to slide down after viewing the search result.
[0003] In the search result page, since the user has a relatively strong search intention, the recommended goods in the search bottom should have certain relevance with the user's search word (query), so that the recommended goods meet the user's demand, and thus the conversion rate of the recommended goods is improved. However, the recommendation logic of the search bottom in the search page of most platforms currently still only considers the user and the goods, so that the recommended goods in the search bottom are irrelevant to the user's search word in many cases, the recommended goods do not meet the user's demand, and cannot arouse the user's interest in clicking or purchasing, so the conversion rate is low. SUMMARY
[0004] The present application aims to provide a search method and device, computer equipment and storage medium, which are used to solve the technical problem of low conversion rate of recommended goods in the search bottom.
[0005] One aspect of the present application provides a search method, comprising: obtaining a first search word input by a target user; rewriting the first search word according to a preset rewriting word table to obtain N second search words, the rewriting word table being obtained according to historical search words of multiple users in the same session, and N being a positive integer; determining an associated good recommended to the target user according to the second search word, and returning the associated good.
[0006] Optionally, the method further comprises: obtaining first historical search words and second historical search words of multiple users in the same session, the first historical search words being historical search words whose corresponding click rate meets a first preset condition or whose corresponding conversion rate meets a second preset condition, and the second historical search words being historical search words whose corresponding click rate does not meet the first preset condition and whose corresponding conversion rate does not meet the second preset condition; forming a word pair set by respectively grouping each first historical search word and each second historical search word into a word pair, the word pair set including a plurality of groups of word pairs; determining whether the word pairs in the word pair set meet a third preset condition, and saving the current word pair to the rewriting word table in the case that the current word pair meets the third preset condition, the third preset condition at least including that the co-occurrence frequency of the word pair is greater than or equal to a frequency threshold.
[0007] Optionally, the third preset condition further comprises that the similarity of the word pair is greater than or equal to a similarity threshold.
[0008] Optionally, before the determining whether the word pair in the set of word pairs meets the third preset condition, the method further comprises: obtaining semantic vectors of the first historical search word and the second historical search word in the word pair; and determining the similarity of the first historical search word and the second historical search word in the word pair according to the semantic vectors.
[0009] Optionally, the determining the associated commodity recommended to the target user according to the second search word comprises: dividing the N second search words into a first priority queue and a second priority queue, the first priority queue and the second priority queue each comprising a plurality of second search words; recalling first commodities according to a recall sub-model in a search model and the second search words in the first priority queue; and in a case where the number of the first commodities is greater than or equal to a number threshold, or the current request concurrency number is greater than or equal to a concurrency threshold, determining the associated commodity according to the search model and the first commodities.
[0010] Optionally, the method further comprises: in a case where the number of the first commodities is less than the number threshold, and the request number is less than a preset number, recalling second commodities according to the recall sub-model and the second search words in the second priority queue; and determining the associated commodity according to the search model, the first commodities and the second commodities.
[0011] Optionally, the method further comprises: in a case where the number of the second search words in the first priority queue is less than a first number, obtaining associated words of the second search words in the first priority queue from a knowledge graph to serve as candidates; or, in a case where the number of the second search words in the second priority queue is less than a second number, obtaining associated words of the second search words in the second priority queue from the knowledge graph to serve as candidates.
[0012] Optionally, the determining the associated commodity recommended to the target user according to the second search word comprises: obtaining third commodities output by a first ranking sub-model in a search model, using a second ranking sub-model in the search model, the third commodities being commodities determined by the search model according to the second search word; scoring the third commodities using the second ranking sub-model to obtain ranking scores of the third commodities; obtaining similarities of the third commodities corresponding to the second search words and the first search word respectively, and determining similarity scores of the third commodities according to the similarities of the second search words and the first search word; determining final scores of the third commodities according to the ranking scores and the similarity scores; and taking the third commodities with final scores greater than a score threshold as the associated commodities.
[0013] An aspect of an embodiment of the present application further provides a search device, comprising: an obtaining module, configured to obtain a first search word input by a target user; a rewriting module, configured to rewrite the first search word according to a preset rewriting word table to obtain N second search words, the rewriting word table being obtained according to historical search words of multiple users in a same session, and N being a positive integer; and a determining module, configured to determine an associated commodity recommended to the target user according to the second search words, and return the associated commodity.
[0014] An aspect of an embodiment of the present application further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor is configured to implement the steps of the search method.
[0015] An aspect of an embodiment of the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executable by at least one processor to make the at least one processor execute the steps of the search method.
[0016] The search method, device, computer device and storage medium provided by the embodiments of the present application have the following advantages:
[0017] By obtaining a first search word input by a target user, rewriting the first search word according to a preset rewriting word table to obtain N second search words, wherein the rewriting word table is obtained according to historical search words of multiple users in a same session, and then determining an associated commodity recommended to the target user according to the second search words and returning the associated commodity, since the rewriting word table is obtained according to historical search words of multiple users in a same session, and the historical search words of the users in the same session have relevance, therefore, by rewriting the original search word input by the user according to the rewriting word table, and then obtaining the associated commodity according to the rewritten search word to recommend to the user, the commodity recommended by the search feedblast has certain relevance with the search word of the user, so that the recommended associated commodity meets the demand of the user, and is easy to arouse the interest of the user in clicking or purchasing, and improves the conversion rate. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 An environment architecture diagram of a search method of an embodiment of the present application is schematically shown;
[0019] Figure 2 A flowchart of the search method of the first embodiment of the present application is schematically shown
[0020] Figure 3 An application example diagram of the search method of the present embodiment is shown;
[0021] Figure 4 For Figure 2 Flowchart of the newly added step;
[0022] Figure 5 For Figure 4 Flowchart of the newly added step;
[0023] Figure 6 For the application example diagram of the search method of the embodiment of the present application;
[0024] Figure 7 For Figure 2 Flowchart of the sub-step of step S430 in the middle;
[0025] Figure 8 For Figure 7 Flowchart of the newly added step in the middle;
[0026] Figure 9 For Figure 2 Flowchart of another sub-step of step S430 in the middle;
[0027] Figure 10 For the flowchart of the search method of the embodiment of the present application;
[0028] Figure 11 For the search result page obtained by the search method of the embodiment of the present application;
[0029] Figure 12 The block diagram of the search device of the second embodiment of the present application is schematically shown;
[0030] Figure 13 The hardware architecture diagram of the computer device of the third embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", and the like in the description of the embodiments of the present application are only for the purpose of description and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions of various embodiments can be combined with each other, but it must be based on the realization of ordinary skilled in the art, when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, nor within the scope of protection claimed by the present application.
[0033] In the description of the present application, it should be understood that the step number before the step does not indicate the order of execution of the steps before and after the step, and is only used to facilitate the description of the present application and to distinguish each step, therefore it should not be understood as a limitation of the present application.
[0034] The following is the explanation of the terms involved in the present application:
[0035] Search bottom feed blast: a module below the search result page, such as the "recommended" product list exposed by sliding down the search result.
[0036] Query: search term searched by user.
[0037] Session: identifies a user's session behavior, which can be continuous across multiple channels, such as visiting the recommendation and search in succession, which can be counted as a session.
[0038] Click rate (ctr): refers to the ratio of the number of clicks to the number of views of a certain content on a website page, i.e. clicks / views, which is a percentage, reflecting the degree of attention of a certain content on a web page.
[0039] Conversion rate: refers to the ratio of the number of conversion behaviors completed in a statistical period to the total number of clicks of the promoted information, i.e. orders / clicks.
[0040] ES is an open source search engine developed based on Java, designed for cloud computing, capable of real-time search, stable, reliable and fast.
[0041] Figure 1 The environment architecture diagram of the embodiment of the present application is schematically shown, as shown in the figure:
[0042] The client 300 connects the server 100 through the network 200. A user inputs a search term through the client 300, so that the server 100 can obtain the corresponding search term. After obtaining the search term, the server 100 obtains a plurality of rewritten search terms by rewriting the search term according to a preset rewriting word table in addition to obtaining normal search results according to the search term, wherein the rewriting word table is obtained according to historical search terms of a plurality of users in the same session and includes a plurality of rewriting word pairs, and is used to rewrite the search term according to the rewriting word pairs to obtain the rewritten search terms; after obtaining the rewritten search terms, the server 100 can determine associated commodities recommended to the user according to a preset search model using the rewritten search terms; and the associated commodities are returned to the client 300 through the network 200 and displayed in the same search page as the normal search results. The client 300 can display the associated commodities at the bottom of the search (feedblast).
[0043] In an exemplary embodiment, the server 100 can refer to a data center, for example, a single house, or distributed in different geographical locations (for example, in several houses). The server 100 can provide services through one or more networks 200.
[0044] The network 200 includes various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and / or the like. The network 200 can include physical links, such as coaxial cable links, twisted-pair cable links, fiber-optic links, combinations thereof, and / or the like. The network 200 can include wireless links, such as cellular links, satellite links, Wi-Fi links, and / or the like.
[0045] The client 300 can include a mobile device, a tablet device, a laptop computer, a smart device (for example, a smart clothing, a smart watch, a smart glasses), a virtual reality headset, a game device, a set-top box, a digital streaming device, a robot, a vehicle terminal, a smart television, a television box, or an electronic book reader.
[0046] In the related art, the commodities recommended in the search bottom are determined according to the factors of the user and the commodity, and are irrelevant to the search term of the user, so that the commodities recommended in the search bottom do not meet the demand of the user, cannot arouse the interest of the user in clicking or purchasing, and the conversion rate is low.
[0047] The search scheme of the embodiments of the present application can make the commodities recommended in the search bottom meet the demand of the user, improve the interest of the user in clicking or purchasing, and improve the conversion rate.
[0048] The search scheme of the embodiments of the present application will be introduced through a plurality of embodiments below. For the convenience of understanding, the following will be described with the search scheme of the client 300. Figure 1The server 100 in the system 1000 is exemplarily described as the execution subject.
[0049] Embodiment One
[0050] Figure 2 A flow chart of a search method according to an embodiment of the present application is shown schematically, including steps S410-S430, which are explained as follows.
[0051] In step S410, a first search term input by a target user is acquired.
[0052] The first search term refers to an original search term input by the target user in the client 300. After the target user inputs the first search term in the client 300 and clicks the search button, the first search term is sent to the server 100 through the network 200, and the server 100 can acquire the first search term.
[0053] In step S420, the first search term is rewritten according to a preset rewriting term table to obtain N second search terms, the rewriting term table is obtained according to historical search terms of multiple users in a same session, and N is a positive integer.
[0054] The historical search terms in the same session refer to historical search terms in a session. The session can be defined as a session in which the search page is not exited for more than a predetermined time or the search corresponding application is not exited, and the historical search terms refer to terms used by the user to search.
[0055] The server 100 can save the historical search terms of the user in the same session, so as to mine the historical search terms of multiple (a large number of) users in the same session, and obtain the rewriting term table. The rewriting term table includes a plurality of rewriting term pairs, which are used to rewrite the first search term according to the rewriting term pairs.
[0056] Since the historical search terms of the user in the same session generally have certain relevance, the historical search terms can be mined to obtain the corresponding rewriting term table. When the server 100 mines the historical search terms of the user in the same session, all the historical search terms in the same session can be considered to have relevance, and each historical search term and the remaining historical search terms are respectively grouped into a term pair in the rewriting term table. The historical search terms in the same session can also be evaluated, and the term pairs satisfying certain conditions are used as the term pairs in the rewriting term table. The mining manner can be set according to actual needs, which is not limited specifically herein.
[0057] The server 100 can match the first search word with the words in the rewriting word table after obtaining the first search word, and rewrite the first search word according to the words corresponding to the words matched with the first search word in the rewriting word table, so as to obtain the rewritten second search word. For example, if the first search word is A, and the rewriting word table includes the rewriting word pair A and B, the search word A can be matched with the rewriting word pair in the rewriting word table, the matched rewriting word pair A and B is determined, A is rewritten as B, and B is obtained as the second search word. If the rewriting word table includes multiple groups of rewriting word pairs that can be matched with the first search word, multiple second search words can be obtained.
[0058] In step S430, the associated goods recommended to the target user are determined according to the second search word, and the associated goods are returned.
[0059] When the server 100 determines the associated goods recommended to the target user according to the second search word, the server 100 can recall, rough sort and fine sort the goods according to the second search word through a preset search model, so as to determine the associated goods recommended to the target user. The search model can include a recall sub-model, a rough sort sub-model and a fine sort sub-model, so that the search model can complete the corresponding recall, rough sort and fine sort operations, and finally determine the associated goods returned to the target user.
[0060] It can be understood that the server 100 can also use the search model to recall, rough sort and fine sort the goods according to the first search word, so as to determine the goods corresponding to the first search word directly input by the target user. Alternatively, the server 100 can determine the associated goods recommended to the target user according to the second search word independently of the search corresponding to the first search word, and perform independent sorting. When the associated goods are returned, the search result corresponding to the first search word can be returned together and displayed in different areas or modules in the same search page.
[0061] Please refer to Figure 3As shown in the figure, the search method of the embodiment of the application can be applied to online request shunting, which is divided into two groups, one is an experimental group using the search method of the embodiment of the application, and the other is a control group using the current method of recommending based on user and commodity factors, so that the optimization effect of the search method of the embodiment of the application can be determined by comparing the two groups. Specifically, if the traffic is the control group, the original search feed can be returned directly; if the traffic is the experimental group, the search words input by the user can be rewritten according to the rewritten word table mined, and then the recall and sorting are performed to finally determine the associated commodities recommended to the user and displayed in the search feed. The rewritten word table can be mined in the offline stage and synchronized to the DB (database) of the server through the hive; in the online stage, the rewritten word table can be synchronized to the memory, so as to facilitate online use.
[0062] The search method of the embodiment of the application obtains the first search word input by the target user, rewrites the first search word according to the preset rewritten word table, obtains N second search words, wherein the rewritten word table is obtained according to the historical search words of multiple users in the same session; and determines the associated commodities recommended to the target user according to the second search words and returns the associated commodities. Since the rewritten word table is obtained according to the historical search words of multiple users in the same session, and the historical search words of the user in the same session have relevance, the original search word input by the user is rewritten through the rewritten word table, and the associated commodities are obtained according to the rewritten search word and recommended to the user, so that the commodities recommended in the search feed have certain relevance with the search word of the user, so that the recommended associated commodities meet the needs of the user, easily arouse the interest of the user in clicking or purchasing, and improve the conversion rate, so as to facilitate achieving the purpose or effect of increasing the number of payment users.
[0063] In the exemplary embodiment, as shown in Figure 4 The search method can further include steps S440-S460, specifically as follows:
[0064] In step S440, the first historical search word and the second historical search word of multiple users in the same session are obtained, the first historical search word is a historical search word corresponding to a click rate satisfying a first preset condition or a conversion rate satisfying a second preset condition, and the second historical search word is a historical search word corresponding to a click rate not satisfying the first preset condition and a conversion rate not satisfying the second preset condition.
[0065] The first preset condition can include, but is not limited to, a click rate greater than or equal to a click rate threshold. Similarly, the second preset condition can include, but is not limited to, a conversion rate greater than or equal to a conversion rate threshold. Alternatively, the first preset condition or the second preset condition can further limit the historical search words themselves, for example, limit the click rate of the historical search words with sufficient exposure (i.e., exposure rate greater than a certain value) within a certain time (such as 30 days) to be greater than or equal to a preset click rate threshold. The more users a search word is used by, the greater its exposure rate, and the less it is used, the smaller its exposure rate. Since search words used by a small number of users have less representative significance, selecting historical search words with sufficient exposure can make the determined first historical search words and second search words more representative and more useful.
[0066] The server 100 can obtain historical search words of multiple users in the same session, compare the historical search words in the same session with the first preset condition and the second preset condition, and if the click rate corresponding to the historical search words meets the first preset condition or the conversion rate corresponding to the historical search words meets the second preset condition, determine the historical search words as the first historical search words; if the click rate corresponding to the historical search words does not meet the first preset condition and the conversion rate corresponding to the historical search words does not meet the second preset condition, determine the historical search words as the second historical search words.
[0067] In step S450, the first historical search words and the second historical search words are respectively grouped into word pairs to form a word pair set, and the word pair set includes a plurality of word pairs.
[0068] Specifically, each first historical search word can be respectively grouped into a word pair with each second historical search word, and then a word pair set composed of a plurality of word pairs can be formed according to the formed word pairs. For example, if the first historical search word of a user in the same session is A, and the second historical search word is B and C, then AB and AC two word pairs can be formed respectively. Alternatively, the first historical search word and the second historical search word can be randomly grouped into a word pair, for example, in the foregoing example, AB word pair or AC word pair can be randomly generated.
[0069] It should be understood that the historical search words in the same session can be multiple, or only one. In the case of only one historical search word, it is impossible to determine the associated historical search word, so in actual application, if the first historical search word and the second historical search word in the same session are not obtained, the process of this mining can be ended.
[0070] In step S460, it is determined whether the word pairs in the word pair set meet a third preset condition, and in the case that the current word pair meets the third preset condition, the current word pair is saved to the rewrite word table, and the third preset condition at least includes that the co-occurrence frequency of the word pair is greater than or equal to a frequency threshold.
[0071] When the third preset condition is that the co-occurrence frequency of the word pair is greater than or equal to a frequency threshold, the server 100 can calculate the co-occurrence frequency of each word pair in the word pair set, and compare the calculated result with the frequency threshold, so as to determine whether the co-occurrence frequency of each word pair is greater than or equal to the frequency threshold. For example, if the third preset condition is that the co-occurrence frequency of the word pair is greater than or equal to 20, the server 100 can compare the co-occurrence frequency of each word pair with 20, and if the co-occurrence frequency is greater than or equal to 20, it is determined that the word pair satisfies the third preset condition, otherwise, it does not satisfy the third preset condition. Of course, if the third preset condition further includes other conditions, the server 100 can further determine whether the word pair satisfies the other conditions, and then determine whether it satisfies the third preset condition. In the case that the current word pair satisfies the third preset condition, the current word pair is saved in the rewritten word table as one of the rewritten word pairs in the rewritten word table; if the current word pair does not satisfy the third preset condition, the current word pair is abandoned, and whether other word pairs satisfy the third preset condition is determined.
[0072] In the embodiment, the first historical search word and the second historical search word of the multiple users in the same session are obtained, wherein the first historical search word is a historical search word corresponding to a click rate satisfying a first preset condition or a conversion rate satisfying a second preset condition, and the second historical search word is a historical search word corresponding to a click rate not satisfying the first preset condition and a conversion rate not satisfying the second preset condition; each first historical search word and each second historical search word is respectively formed into a word pair to form a word pair set, it is determined whether the word pair in the word pair set satisfies a third preset condition, and in the case that the current word pair satisfies the third preset condition, the current word pair is saved in the rewritten word table, wherein the third preset condition at least includes that the co-occurrence frequency of the word pair is greater than or equal to a frequency threshold; since the first historical search word is a historical search word with good click rate or conversion rate, and the second historical search word is a historical search word with poor click rate or conversion rate, the first historical search word and the second historical search word are formed into a word pair, and then the rewritten word table is determined, so that when the original search word (first search word) of the user is rewritten through the rewritten word table, a rewritten word (second search word) with good click rate or conversion rate can be obtained, thereby improving the click rate or conversion rate of the associated commodity; in addition, since the third preset condition at least includes that the co-occurrence frequency of the word pair is greater than or equal to the frequency threshold, and the co-occurrence frequency of the word pair can effectively reflect the correlation of the historical search words in the word pair, the word pair satisfying the third preset condition is used as the rewritten word in the rewritten word table, so that the related historical search words can be effectively used as the rewritten word.
[0073] In the exemplary embodiment, the third preset condition further includes that the similarity of the word pair is greater than or equal to a similarity threshold.
[0074] The similarity threshold can be set according to actual needs, for example, 0.6, which is not limited here.
[0075] It can be understood that the rewrite word table is determined by the co-occurrence frequency of the word pair, and although the historical search words with relevance can be determined as rewrite words, the accuracy is low. The third preset condition further includes that the similarity of the word pair is greater than or equal to a similarity threshold, the rewrite words can be determined by double standards, the accuracy of the rewrite word table is improved, and the determined associated commodities are more in line with the needs of the target user.
[0076] In an exemplary embodiment, before step S460, that is, before determining whether the word pair in the word pair set meets the third preset condition, steps S470-S480 can be included, as shown in the following. Figure 5
[0077] Step S470: Obtain semantic vectors of the first historical search word and the second historical search word in the word pair.
[0078] Optionally, when the semantic vectors of the first historical search word and the second historical search word in the word pair are obtained, a word2vec model can be used to obtain the semantic vectors, where the word2vec model is a light neural network structure, which only includes an input layer, a hidden layer, and an output layer. When the word2vec model is used to obtain the semantic vectors of the first historical search word and the second historical search word in the word pair, the skip-gram algorithm in the word2vec model can be used to obtain the corresponding semantic vectors. Since the word2vec model is relatively light, using the word2vec model to determine the similarity of the word pair can reduce the occupation of the server computing resources.
[0079] Step S480: Determine the similarity of the first historical search word and the second historical search word in the word pair according to the semantic vectors.
[0080] After obtaining the corresponding semantic vectors, the server 100 can determine the similarity of the first historical search word and the second historical search word in the word pair according to a similarity algorithm. The similarity algorithm can be set according to actual needs, for example, cosine similarity, and the like, which is not limited here.
[0081] As shown in Figure 6 As shown, it is an application example diagram of the rewriting word mining by the search method of the embodiment of the present application. As shown, the conversation can be first divided into single search word (query) conversation and multi search word (query) conversation, and then the search words are further divided into first historical search words (i.e. "good" query in the figure) and second historical search words (i.e. "bad" query in the figure) according to the click rate or conversion rate and other indicators; then the "good" query and the "bad" query are paired based on the search words in the same conversation which are generally related to each other, and the rewritten word table is finally determined according to the co-occurrence frequency and the similarity threshold of the paired word pairs. The similarity is obtained by the word2vec model to obtain the semantic vector, and then the cosine similarity is calculated.
[0082] In the embodiment, the semantic vectors of the first historical search words and the second historical search words in the word pair are obtained, and the similarity of the first historical search words and the second historical search words in the word pair is determined according to the semantic vectors, so that whether the word pair meets the third preset condition can be conveniently determined.
[0083] In the related art, the search words of the user are rewritten by using the synonym mining method, but this method needs to be classified into two categories, and at least 10,000 level of manual annotation is needed to obtain the training sample, so a large amount of human cost is needed. In the above embodiment, the word pair composed of the historical search words in the same conversation is determined by the co-occurrence frequency and the similarity of the word pair, so that the automatic mining of the rewritten word can be realized, the rewriting expansion recall can be made without labeling, a large amount of human cost is not needed, and the implementation difficulty of the rewriting expansion recall is reduced. At the same time, the rewritten word can be quality labeled according to the actual effect (such as conversion rate) online, so that the rewritten word in the rewritten word table can be further optimized.
[0084] In the exemplary embodiment, in step S430, the associated commodity recommended to the target user is determined according to the second search word, such as Figure 7 As shown, it can include steps S431-S433, specifically as follows:
[0085] In step S431, the N second search words are divided into a first priority queue and a second priority queue, and the first priority queue and the second priority queue respectively include a plurality of second search words.
[0086] In the step of dividing the N second search terms into the first priority queue and the second priority queue, the word pairs can be sorted according to the co-occurrence frequency and / or the similarity, and the word pairs with higher ranks can be placed in the first priority queue, and the word pairs with lower ranks can be placed in the second priority queue. The specific allocation rules can be set according to actual needs, and are not limited herein. The number of second search terms included in the first priority queue and the second priority queue can be equal or not equal. For example, if there are 20 second search terms in total, the first 2 second search terms with higher ranks can be placed in the first priority queue, and the remaining 18 second search terms with lower ranks can be placed in the second priority queue.
[0087] It can be understood that the number of second search terms is usually large in order to ensure the number of returned commodities in the search. If all the second search terms are placed in the search engine for searching, the search engine will occupy more computing resources, and the performance of the search engine will be affected. If the second search terms are divided into two priority queues for searching, the performance of the search engine can be reduced while ensuring the number of returned commodities in the search. In actual applications, the N second search terms can also be divided into multiple priority queues.
[0088] In the step S432, the first commodities are recalled according to the recall sub-model in the search model and the second search terms in the first priority queue.
[0089] Specifically, the first commodities can be recalled according to the recall sub-model in the search model and the second search terms in the first priority queue.
[0090] The search model can specifically include links such as recall, coarse ranking, and fine ranking, so that the recommendation of commodities can be realized. The search model and the recall sub-model, the coarse ranking sub-model, and the fine ranking sub-model included therein can be used for recommending commodities. The coarse ranking sub-model can specifically use an artificial rule strategy model, a linear model, a double tower inner product deep model, or a lightweight MLP (Multi-Layer Perceptron) coarse ranking model. The fine ranking sub-model can specifically use a linear model or a deep learning model. The specific models and algorithms used by the coarse ranking sub-model and the fine ranking sub-model can be set according to actual needs, and are not limited herein.
[0091] The first commodities refer to the commodities recalled by the recall sub-model according to the second search terms in the first priority queue.
[0092] In the step S433, the associated commodities are determined according to the search model and the first commodities in the case that the number of first commodities is greater than or equal to a number threshold, or the current request concurrency is greater than or equal to a concurrency threshold.
[0093] In the step of determining the associated commodities according to the search model and the first commodities, the associated commodities can be determined according to the first commodities by using the search model. The quantity threshold and the concurrency threshold can be set according to actual needs, and are not specifically limited herein. When the quantity of the first commodities is greater than or equal to the quantity threshold, it indicates that the quantity of the recalled commodities is sufficient, and a sufficient quantity of the associated commodities can be returned, so that the search according to the second search terms in the second priority queue is not needed, thereby further reducing the occupation of the search engine resources. When the current request concurrency is greater than or equal to the concurrency threshold, it indicates that the current request quantity is too large (for example, during an activity), and if the search according to the second search terms in the second priority queue is performed, the request concurrency will be further increased, and the search engine will be occupied by too many resources, so that the associated commodities are determined according to the first commodities, thereby reducing the occupation of the search engine resources.
[0094] In the step of determining the associated commodities according to the search model and the first commodities, the associated commodities can be determined according to the first commodities by using the search model. The quantity threshold and the concurrency threshold can be set according to actual needs, and are not specifically limited herein. When the quantity of the first commodities is greater than or equal to the quantity threshold, it indicates that the quantity of the recalled commodities is sufficient, and a sufficient quantity of the associated commodities can be returned, so that the search according to the second search terms in the second priority queue is not needed, thereby further reducing the occupation of the search engine resources. When the current request concurrency is greater than or equal to the concurrency threshold, it indicates that the current request quantity is too large (for example, during an activity), and if the search according to the second search terms in the second priority queue is performed, the request concurrency will be further increased, and the search engine will be occupied by too many resources, so that the associated commodities are determined according to the first commodities, thereby reducing the occupation of the search engine resources.
[0095] In the step of determining the associated commodities according to the search model and the first commodities, the associated commodities can be determined according to the first commodities by using the search model. The quantity threshold and the concurrency threshold can be set according to actual needs, and are not specifically limited herein. When the quantity of the first commodities is greater than or equal to the quantity threshold, it indicates that the quantity of the recalled commodities is sufficient, and a sufficient quantity of the associated commodities can be returned, so that the search according to the second search terms in the second priority queue is not needed, thereby further reducing the occupation of the search engine resources. When the current request concurrency is greater than or equal to the concurrency threshold, it indicates that the current request quantity is too large (for example, during an activity), and if the search according to the second search terms in the second priority queue is performed, the request concurrency will be further increased, and the search engine will be occupied by too many resources, so that the associated commodities are determined according to the first commodities, thereby reducing the occupation of the search engine resources.
[0096] In the example embodiment, as shown in FIG. 4, Figure 8 The search method can further include steps S434-S435, and the details are as follows.
[0097] In the step S434, when the quantity of the first commodities is less than the quantity threshold and the request quantity is less than the preset quantity, the second commodities are recalled according to the second search terms in the second priority queue by using the recall sub-model.
[0098] The second commodities are the commodities recalled according to the second search terms in the second priority queue by using the recall sub-model.
[0099] The preset number of times can be set according to actual needs, and is not limited here. Since the second search terms are divided into two priority queues (the first priority queue and the second priority queue), and the search results of the search terms in the same priority queue generally do not change, the preset number of times can be consistent with the number of priority queues. For example, if the priority queues are two, the preset number of times can be 2. In some scenarios, the request number of times can be a request batch, that is, a request belongs to the first batch of requests. For example, the request batch corresponding to the first priority queue is the first batch of requests, and the request batch corresponding to the second priority queue is the second batch of requests.
[0100] When the number of the first commodities is less than the number threshold, it indicates that the number of the recalled commodities is small, and it is insufficient to return a sufficient number of associated commodities. Therefore, the server 100 can continue to recall commodities according to the second search terms in the second priority queue by using the recall sub-model in the case where the request number of times is less than the preset number of times, to obtain the recalled second commodities.
[0101] In step S435, the associated commodities are determined according to the search model, the first commodities, and the second commodities.
[0102] Specifically, step S435 can be: determining the associated commodities according to the search model, the first commodities, and the second commodities. After recalling the first commodities and the second commodities, the server 100 can collectively take the first commodities and the second commodities as recalled commodities according to the search model, and then process the recalled commodities (the first commodities and the second commodities) by using the coarse sorting sub-model and the fine sorting sub-model, to obtain the corresponding associated commodities.
[0103] In this embodiment, by using the recall sub-model to recall the second commodities according to the second search terms in the second priority queue in the case where the number of the first commodities is less than the number threshold and the request number of times is less than the preset number of times, and then determining the associated commodities according to the search model, the first commodities, and the second commodities, the second search terms of the two priority queues can be used for searching, so that a large number of associated commodities can be returned.
[0104] In an exemplary embodiment, the search method can further include: in the case where the number of the second search terms in the first priority queue is less than the first number, obtaining associated words of the second search terms in the first priority queue from the knowledge graph for candidate; or in the case where the number of the second search terms in the second priority queue is less than the second number, obtaining associated words of the second search terms in the second priority queue from the knowledge graph for candidate.
[0105] The associated words can include, but are not limited to, hypernyms, hyponyms, synonyms, and the like.
[0106] The first and second quantities can be set according to actual needs. For example, the first quantity can be 10, and the second quantity can be 100. There is no specific limit here. When the server 100 retrieves related words from the knowledge graph for candidate search, it can make the number of second search words in the first priority queue equal to the first quantity, and the number of second search words in the second priority queue equal to the second quantity.
[0107] Since there may be insufficient numbers of second search terms in the first priority queue or the second priority queue, this would result in fewer related products being returned. Therefore, by obtaining related terms from the knowledge graph as candidates, we can ensure that there are a sufficient number of second search terms, thereby ensuring that more related products are returned for users to choose from and improving the user experience.
[0108] In an exemplary embodiment, such as Figure 9 As shown, step S430, which determines the related products recommended to the target user based on the second search term, may also include steps S510 to S550, as follows:
[0109] Step S510: Use the second ranking sub-model in the search model to obtain the third product output by the first ranking sub-model in the search model. The third product is the product determined by the search model based on the second search term.
[0110] The second sorting sub-model can be the aforementioned fine sorting sub-model, while the first sorting sub-model can be the aforementioned coarse sorting sub-model.
[0111] Specifically, the search model can recall products based on the second search term through the recall sub-model. After passing through the coarse ranking sub-model, its output is a certain number of third products obtained after coarse ranking, while the input of the fine ranking sub-model is this certain number of third products.
[0112] Step S520: The third product is scored using the second ranking sub-model to obtain the ranking score of the third product.
[0113] Step S530: Obtain the similarity between the second search term and the first search term corresponding to the third product, and determine the similarity score of the third product based on the similarity between the second search term and the first search term.
[0114] Step S540: Determine the final score of the third product based on the ranking score and similarity score.
[0115] Step S550: The third product with a final score greater than the score threshold is designated as the associated product.
[0116] It can be understood that if the associated commodities are determined directly according to the scores of the commodities in the fine ranking sub-model in the search model, the associated commodities are actually determined by the second search terms (i.e. the rewritten search terms), and the relevance of each second search term to the first search term is different, so that the final associated commodities returned have better relevance to the original search term of the user and the accuracy of the recommended associated commodities is further improved by comprehensively scoring the scores of the commodities in the fine ranking sub-model and the similarity scores obtained according to the similarity of the second search terms corresponding to the commodities to the first search term.
[0117] Please refer to Figure 10 , which is a flowchart of a search method of an embodiment of the present application. As shown in the figure, the second search terms are divided into two priority queues, the first priority queue is used to make a request first, if the result of the request is greater than or equal to 300 (i.e. the quantity threshold described above), or the number of concurrent requests during the activity is too large (i.e. greater than the concurrent threshold described above), the second priority queue is not used to make a request, and the final associated commodities are returned directly according to the first priority queue after coarse ranking and fine ranking; if the result of the request is less than 300 and the number of requests is less than 2 (corresponding to the preset number of times described above), the second priority queue is used to continue to make a request; after the request is made using the second priority queue, since the number of requests at this time is equal to 2, the loop of making a request is not performed, coarse ranking and fine ranking are performed according to the commodities currently recalled, and the final associated commodities recommended to the user are determined and returned. In the fine ranking stage, the final score of the commodities can be determined by combining the fine ranking score and the similarity described above, and the final associated commodities are determined according to the final score.
[0118] Please refer to Figure 11 , which is an example diagram of a search result page obtained by the search method of an embodiment of the present application. As shown in the figure, when the user searches for “Dun XX days”, the search result card display ends and other commodities related to the Dun X series can be displayed.
[0119] Embodiment Two
[0120] Figure 12 A block diagram of a search device 600 according to Embodiment Two of the present application is schematically shown, which can be divided into one or more program modules stored in a storage medium and executed by one or more processors to complete the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments capable of completing a specific function, and the functions of the program modules in the embodiments will be specifically described below.
[0121] As shown in Figure 12 , the search device 600 can include an acquisition module 610, a rewriting module 620 and a determination module 630.
[0122] The acquisition module 610 is configured to acquire a first search term input by a target user.
[0123] The rewriting module 620 is configured to rewrite the first search term according to a preset rewriting word table to obtain N second search terms, the rewriting word table being obtained according to historical search terms of a plurality of users in a same session, and N being a positive integer.
[0124] The determination module 630 is configured to determine, according to the second search terms, associated commodities recommended to the target user, and return the associated commodities.
[0125] In an exemplary embodiment, the search device 600 further comprises a mining module (not shown in the figure), wherein the mining module is configured to: acquire first historical search terms and second historical search terms of a plurality of users in a same session, the first historical search terms being historical search terms corresponding to a click rate satisfying a first preset condition or a conversion rate satisfying a second preset condition, and the second historical search terms being historical search terms corresponding to a click rate not satisfying the first preset condition and a conversion rate not satisfying the second preset condition; form a word pair set by grouping each first historical search term and each second historical search term into a word pair, the word pair set including a plurality of groups of word pairs; determine whether a word pair in the word pair set satisfies a third preset condition, and in a case where the current word pair satisfies the third preset condition, save the current word pair into the rewriting word table, the third preset condition at least including a co-occurrence frequency of the word pair being greater than or equal to a frequency threshold.
[0126] In an exemplary embodiment, the third preset condition further includes a similarity of the word pair being greater than or equal to a similarity threshold.
[0127] In an exemplary embodiment, the mining module is further configured to: acquire semantic vectors of the first historical search term and the second historical search term in the word pair; and determine the similarity of the first historical search term and the second historical search term in the word pair according to the semantic vectors.
[0128] In an exemplary embodiment, the determination module 630 is further configured to: divide the N second search terms into a first priority queue and a second priority queue, the first priority queue and the second priority queue each including a plurality of second search terms; recall first commodities according to a recall sub-model in a search model and the second search terms in the first priority queue; and in a case where a number of the first commodities is greater than or equal to a number threshold, or a current request concurrency is greater than or equal to a concurrency threshold, determine the associated commodities according to the search model and the first commodities.
[0129] In an exemplary embodiment, the determination module 630 is further configured to: in a case where the number of the first commodities is less than the number threshold, and a request number is less than a preset number, recall second commodities according to the second search terms in the second priority queue by using the recall sub-model; and determine the associated commodities according to the search model, the first commodities, and the second commodities.
[0130] In the example embodiment, the rewriting module 620 is further configured to: in a case where the number of the second search words in the first priority queue is less than the first number, obtain the associated words of the second search words in the first priority queue from the knowledge graph to generate the candidate; or in a case where the number of the second search words in the second priority queue is less than the second number, obtain the associated words of the second search words in the second priority queue from the knowledge graph to generate the candidate.
[0131] In the example embodiment, the determining module 630 is further configured to: obtain, by using a second ranking sub-model in the search model, a third commodity output by the first ranking sub-model in the search model, the third commodity being a commodity determined by the search model according to the second search word; score the third commodity by using the second ranking sub-model to obtain a ranking score of the third commodity; obtain the similarity of the third commodity to the second search word and the first search word respectively, and determine a similarity score of the third commodity according to the similarity of the second search word to the first search word; determine a final score of the third commodity according to the ranking score and the similarity score; and take the third commodity with the final score greater than the score threshold as the associated commodity.
[0132] Embodiment Three
[0133] Figure 13 A hardware architecture diagram of a computer device 700 suitable for a search method according to Embodiment Three of the present application is schematically shown. The computer device 700 can be a device capable of automatically performing numerical calculation and / or data processing according to pre-set or stored instructions. For example, it can be a rack-mounted server, a blade server, a tower server or a cabinet server (including a standalone server or a server cluster composed of multiple servers), a gateway, etc. As shown, the computer device 700 at least includes but is not limited to a memory 710, a processor 720, a network interface 730 which can be communicatively linked through a system bus. Among them: Figure 13
[0134] The memory 710 includes at least one type of computer-readable storage media, such as a flash memory, a hard disk, a multimedia card (e.g., SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 710 can be an internal memory module of the computer device 700, such as a hard disk or a memory of the computer device 700. In other embodiments, the memory 710 can also be an external memory device of the computer device 700, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like. Of course, the memory 710 can include both an internal memory module and an external memory device of the computer device 700. In this embodiment, the memory 710 is generally used to store an operating system and various application programs installed in the computer device 700, such as program codes of a search method, and the like. In addition, the memory 710 can also be used to temporarily store various data that have been output or will be output.
[0135] The processor 720 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 720 is generally used to control the overall operation of the computer device 700, such as performing control and processing related to data interaction or communication of the computer device 700, and the like. In this embodiment, the processor 720 is used to run program codes or process data stored in the memory 710.
[0136] The network interface 730 can include a wireless network interface or a wired network interface, which is generally used to establish a communication link between the computer device 700 and other computer devices. For example, the network interface 730 is used to connect the computer device 700 with an external terminal through a network, to establish a data transmission channel and a communication link between the computer device 700 and the external terminal, and the like. The network can be an Intranet, the Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth, Wi-Fi, and the like wireless or wired network.
[0137] It should be noted that, Figure 13 Only the computer device with the components 710-730 is shown, but it should be understood that all the shown components are not required to be implemented, and more or fewer components can be alternatively implemented.
[0138] In this embodiment, the search method stored in the memory 710 can also be divided into one or more program modules, and executed by one or more processors (in this embodiment, the processor 720) to complete the search method in the embodiments of the present application.
[0139] Embodiment Four
[0140] The embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the search method in the embodiments.
[0141] In this embodiment, the computer readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read only memory (ROM), an electrically erasable programmable read only memory (EEPROM), a programmable read only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the computer readable storage medium can be an internal storage unit of the computer device, for example, a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium can also be an external storage device of the computer device, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Of course, the computer readable storage medium can also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer readable storage medium is usually used to store an operating system and various application software installed on the computer device, for example, program codes of the search method in the embodiments, etc. In addition, the computer readable storage medium can also be used to temporarily store various data that have been output or will be output.
[0142] Obviously, those skilled in the art should understand that each module or each step of the above-mentioned embodiments of the present application can be realized by a general computing device, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices, and optionally, each module or each step can be realized by program codes executable by a computing device, so that each module or each step can be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described can be executed in different orders, or each module or each step can be manufactured into an individual integrated circuit module, or multiple modules or steps can be manufactured into a single integrated circuit module. Therefore, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0143] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A search method characterized by, The method comprises: obtaining a first search term input by a target user; rewriting the first search term according to a preset rewriting word table to obtain N second search terms, the rewriting word table being obtained according to historical search terms of multiple users in the same session, and N being a positive integer; determining, according to the second search terms and a search model or according to a similarity between the second search terms and the first search term, an associated commodity recommended to the target user, and returning the associated commodity. The method further comprises: obtaining first historical search terms and second historical search terms of multiple users in the same session, the first historical search terms being historical search terms corresponding to a click rate satisfying a first preset condition or a conversion rate satisfying a second preset condition, and the second historical search terms being historical search terms corresponding to a click rate not satisfying the first preset condition and a conversion rate not satisfying the second preset condition; grouping the first historical search terms and the second historical search terms into word pairs to form a word pair set, the word pair set comprising a plurality of word pairs; determining whether a word pair in the word pair set satisfies a third preset condition, and saving the current word pair to the rewriting word table if the current word pair satisfies the third preset condition, the third preset condition at least comprising a co-occurrence frequency of the word pair being greater than or equal to a frequency threshold.
2. The search method of claim 1, wherein, The third preset condition further comprises a similarity of the word pair being greater than or equal to a similarity threshold.
3. The search method of claim 2, wherein, Before the determination of whether the word pair in the word pair set satisfies the third preset condition, the method further comprises: obtaining semantic vectors of the first historical search term and the second historical search term in the word pair; determining a similarity of the first historical search term and the second historical search term in the word pair according to the semantic vectors.
4. The search method according to any one of claims 1 to 3, characterized in that, The determination of the associated commodity recommended to the target user according to the second search terms and the search model or according to the similarity between the second search terms and the first search term comprises: dividing the N second search terms into a first priority queue and a second priority queue, the first priority queue and the second priority queue each comprising a plurality of second search terms; recalling first commodities according to a recall sub-model in the search model and the second search terms in the first priority queue; determining the associated commodity according to the search model and the first commodities if the number of the first commodities is greater than or equal to a quantity threshold or if the current request concurrency is greater than or equal to a concurrency threshold.
5. The search method of claim 4, wherein, The method further comprises: recalling second commodities according to the second search terms in the second priority queue using the recall sub-model if the number of the first commodities is less than the quantity threshold and the request frequency is less than a preset frequency. determining the associated commodity according to the search model, the first commodities and the second commodities.
6. The search method of claim 4, wherein, The method further comprises: if the number of the second search terms in the first priority queue is less than a first quantity, obtaining associated words of the second search terms in the first priority queue from a knowledge graph to perform candidate selection. or In a case where a number of the second search terms in the second priority queue is less than a second number, a candidate is obtained by acquiring, from the knowledge graph, associated words of the second search terms in the second priority queue.
7. The search method according to any one of claims 1 to 3, wherein, The determining of the associated commodities recommended to the target user according to the second search terms and a search model or according to a similarity between the second search terms and the first search term comprises: The third commodity is a commodity determined by the search model according to the second search term. The third commodity is scored by using the second ranking sub-model to obtain a ranking score of the third commodity. The similarity scores of the third commodities are respectively obtained according to similarities between the second search terms corresponding to the third commodities and the first search term, and the similarity scores of the third commodities are determined according to the similarities between the second search terms and the first search term. The final scores of the third commodities are determined according to the ranking scores and the similarity scores. The third commodities with final scores greater than a score threshold are taken as the associated commodities.
8. A search apparatus characterized by comprising: The search device further comprises a mining module, and the mining module is configured to: Obtain first historical search terms and second historical search terms of a plurality of users in a same session, the first historical search terms being historical search terms with a corresponding click rate satisfying a first preset condition or a corresponding conversion rate satisfying a second preset condition, and the second historical search terms being historical search terms with a corresponding click rate not satisfying the first preset condition and a corresponding conversion rate not satisfying the second preset condition. The first historical search terms and the second historical search terms are respectively grouped to form a set of word pairs, and the set of word pairs comprises a plurality of groups of word pairs. Determine whether a word pair in the set of word pairs satisfies a third preset condition, and in a case where a current word pair satisfies the third preset condition, save the current word pair to the rewriting word table, the third preset condition at least comprising a co-occurrence frequency of the word pair being greater than or equal to a frequency threshold. The processor, when executing the computer program, is configured to implement the steps of the search method in any one of claims 1 to 7. The computer readable storage medium stores a computer program, and the computer program is executable by at least one processor to enable the at least one processor to execute the steps of the search method in any one of claims 1 to 7. 9. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, 10. A computer-readable storage medium, characterized in that,
Citation Information
Patent Citations
Searching method and server
CN109948014A
Information recommendation method and device, electronic equipment and storage medium
CN111782935A
Data processing method and device and computer equipment
CN115292577A