Search method, device, server and storage medium
By combining search keywords and historical search behavior data, the sorting of search result lists is optimized, which solves the problem of limitations of search result sorting in the existing technology, improves search efficiency and accuracy, and is suitable for music search and other scenarios.
Patent Information
- Application Number
- CN201911425165.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-31
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-12-31
AI Technical Summary
Existing search methods mainly rely on keywords entered by users for search, which results in limitations in the ranking of search results and affects search efficiency.
By combining the search keywords currently submitted by users with historical search behavior data, target feature vectors and behavior feature vectors are generated, and the sorting of the search result list is optimized to improve search efficiency and accuracy.
By combining search keywords and historical search behavior data, the sorting of the search result list is optimized, significantly improving search efficiency and accuracy, and better reflecting the coherence and preferences of users' search behavior.
Smart Images

Figure CN111143695B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a search method, device, server and storage medium. Background Art
[0002] Existing search methods mainly search based on keywords input by users to obtain a search result list corresponding to the keywords. However, the order of each search result in the search result list obtained in this way is only determined by the keywords, which has certain limitations and affects the search efficiency. Therefore, how to improve the search efficiency has become a hot topic of research. Summary of the invention
[0003] The embodiments of the present invention provide a search method, device, server and storage medium, which can combine search keywords and historical search behavior data to determine a search result list, optimize search results, and improve search efficiency and accuracy.
[0004] In a first aspect, an embodiment of the present invention provides a search method, including:
[0005] Obtaining a first search keyword currently submitted by a user and a first target feature vector corresponding to the first search keyword;
[0006] Acquire at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data, wherein each historical search behavior data of the at least one historical search behavior data includes a historical search keyword and / or behavior data of the user on search results;
[0007] A search result list corresponding to the first search keyword is determined based on the first target feature vector and the second target feature vector, wherein the target search result in the search result list has the highest sorting priority, and the target search result is related to the historical search keyword and / or the user's behavior data on the search results.
[0008] In a second aspect, an embodiment of the present invention provides a search device, including:
[0009] A first acquisition module, used to acquire a first search keyword currently submitted by a user and a first target feature vector corresponding to the first search keyword;
[0010] A second acquisition module is used to acquire at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data, wherein each historical search behavior data of the at least one historical search behavior data includes a historical search keyword and / or behavior data of the user on the search results;
[0011] A determination module is used to determine a search result list corresponding to the first search keyword based on the first target feature vector and the second target feature vector, wherein the target search result in the search result list has the highest sorting priority, and the target search result is related to the historical search keyword and / or the user's behavior data on the search results.
[0012] In a third aspect, an embodiment of the present invention provides a server, the server comprising: a processor and a memory, the processor being configured to execute:
[0013] Obtaining a first search keyword currently submitted by a user and a first target feature vector corresponding to the first search keyword;
[0014] Acquire at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data, wherein each historical search behavior data of the at least one historical search behavior data includes a historical search keyword and / or behavior data of the user on search results;
[0015] A search result list corresponding to the first search keyword is determined based on the first target feature vector and the second target feature vector, wherein the target search result in the search result list has the highest sorting priority, and the target search result is related to the historical search keyword and / or the user's behavior data on the search results.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, in which program instructions are stored. When the program instructions are executed, they are used to implement the method described in the first aspect above.
[0017] The embodiment of the present invention can obtain the first search keyword currently submitted by the user and the first target feature vector corresponding to the first search keyword; and obtain at least one historical search behavior data of the user within a preset first time length and the second target feature vector corresponding to the at least one historical search behavior data, each of the at least one historical search behavior data includes a historical search keyword and / or the behavior data of the user on the search results; thereby determining a search result list corresponding to the first search keyword based on the first target feature vector and the second target feature vector, wherein the sorting priority corresponding to the target search result in the search result list is the highest, and the target search result is related to the historical search keyword and / or the behavior data of the user on the search results. Through this implementation, the search keyword and the historical search behavior data can be combined to determine the search result list, thereby optimizing the search results and improving the search efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 is a structural diagram of a search system provided by an embodiment of the present invention;
[0020] Figure 2 is a flowchart of a search method provided by an embodiment of the present invention;
[0021] Figure 3 is a schematic diagram of obtaining a search result list provided by an embodiment of the present invention;
[0022] Figure 4 is a structural schematic diagram of a search device provided by an embodiment of the present invention;
[0023] Figure 5 It is a structural diagram of a server provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The technical solutions in the embodiments of the present invention will be described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] Users' search behaviors often have a certain degree of coherence. For example, in the scenario of music search, the user first searches for "Jay Chou", clicks on a song in the search results, and while listening to the song, thinks of another song by Jay Chou, "Rice Fragrance", and wants to listen to it, so he searches for "Rice Fragrance" and clicks to play it. These user search behaviors are all related and have a certain degree of coherence. Or the user searches for "songs to listen to before bed", finds a series of songs, clicks on one of them, feels good, and wants to see if other songs by this singer are also suitable for listening before bed, so he searches for this singer. Each user's search behavior is related to the historical search behavior and has a certain degree of coherence. Each user's search behavior may affect the next search.
[0026] Therefore, an embodiment of the present invention provides a search method, which determines a search result list by combining the search keyword currently submitted by the user with the historical search behavior data within a period of time, wherein the search result list includes one or more search results, and the order of the search results in the search result list is determined based on the combination of the search keyword currently submitted and the historical search behavior data within a period of time. Through the search method of the embodiment of the present invention, the search results are optimized, and the search efficiency and accuracy are improved.
[0027] For example, in the scenario of music search, assuming that the search keyword currently submitted by the user is "Rice Fragrance", if the user submitted the search keyword "Zhang San" and / or clicked on a song of "Zhang San" within a period of time before the current search keyword was submitted, then based on the search keyword "Rice Fragrance" currently submitted by the user and the historical search behavior data of the search keyword "Zhang San" submitted by the user and the song of "Zhang San" clicked within a period of time before the current search keyword was submitted, it can be determined that the song of "Zhang San" whose lyrics include "Rice Fragrance" is "Rice Field", and the song of other singers whose lyrics include "Rice Fragrance" is determined to be "Rice Field", so that it can be determined that the songs determined from the songs of "Zhang San" whose lyrics include "Rice Fragrance" have the highest sorting priority in the search result list, and the sorting priority of songs of other singers including "Rice Fragrance" in the search result list is after the priority of songs determined from the songs of "Zhang San" whose lyrics include "Rice Fragrance", that is, the arrangement order of the search results in the search result list is determined to be: "Rice Flower Fragrance", "Rice Field".
[0028] The search method provided in the embodiments of the present invention can be applied to a search device. In some embodiments, the search device can be set on a server; in some embodiments, the search device can also be spatially independent of the server, such as the search device can be set on a smart phone, tablet computer, laptop computer, desktop computer, vehicle-mounted smart terminal, smart watch and other smart terminal devices. In some embodiments, the search device can establish a communication connection with the server.
[0029] The search system provided by the embodiment of the present invention is schematically described below with reference to the accompanying drawings.
[0030] See also Figure 1 , Figure 1 1 is a schematic diagram of a structure of a search system provided by an embodiment of the present invention. The search system includes: a search device 11 and a server 12. In some embodiments, the search device 11 and the server 12 can establish a communication connection through a wireless communication connection; wherein, in some scenarios, the search device 11 and the server 12 can also establish a communication connection through a wired communication connection. In some embodiments, the search device 11 can be set on the server 12.
[0031] In one embodiment, the search device 11 can obtain the first search keyword currently submitted by the user and the first target feature vector corresponding to the first search keyword; and obtain at least one historical search behavior data of the user within a preset first time length and the second target feature vector corresponding to the at least one historical search behavior data, each of the at least one historical search behavior data includes a historical search keyword and / or the behavior data of the user on the search results; and according to the first target feature vector and the second target feature vector, determine the search result list corresponding to the first search keyword, the sorting priority corresponding to the target search result in the search result list is the highest, and the target search result is related to the historical search keyword and / or the behavior data of the user on the search results. Through this implementation, the search results can be optimized and the search efficiency and accuracy can be improved.
[0032] The search method provided by the embodiment of the present invention is schematically described below with reference to the accompanying drawings.
[0033] For details, please see Figure 2 , Figure 2 The flowchart of a search method provided by an embodiment of the present invention is shown in FIG. 1 . The search method of the embodiment of the present invention can be executed by a search device, wherein the specific explanation of the search device is as described above. Specifically, the method of the embodiment of the present invention includes the following steps.
[0034] S201: Obtain a first search keyword currently submitted by a user and a first target feature vector corresponding to the first search keyword.
[0035] In an embodiment of the present invention, the server may obtain the first search keyword currently submitted by the user and the first target feature vector corresponding to the first search keyword. In some embodiments, the first keyword carries user-related feature information such as the user's attributes, current time, and device.
[0036] In one embodiment, when the server obtains the first target feature vector corresponding to the first search keyword currently submitted by the user, it can obtain the feature vector corresponding to the first search keyword currently submitted by the user, and encode the feature vector corresponding to the first search keyword to obtain the first target feature vector corresponding to the first search keyword. In some embodiments, the first search keyword includes but is not limited to characters such as text, letters, and numbers.
[0037] For example, the server may obtain the feature vector y corresponding to the first search keyword x currently submitted by the user, and encode the feature vector y corresponding to the first search keyword to obtain the first target feature vector h' corresponding to the first search keyword.
[0038] Acquiring the first target feature vector of the first search keyword facilitates subsequent training of the first training model according to the first target feature vector to obtain a candidate result list.
[0039] In one embodiment, before obtaining the first search keyword currently submitted by the user and the first target feature vector corresponding to the first search keyword, the server may train the second ranking model.
[0040] In one embodiment, when training the second sorting model, the second search keyword submitted by the user at the first moment and the third target feature vector corresponding to the second search keyword can be obtained, and the third target feature vector can be input into the first sorting model to obtain a search result list corresponding to the second search keyword, and obtain the behavior data of the user on the search results included in the search result list, so as to generate training samples based on the third target feature vector, the search result list and the behavior data of the user on the search results included in the search result list, and use the training samples to train the second sorting model. In some embodiments, the first moment is a moment before the current moment. For example, assuming that the current moment is 10 o'clock, the server can obtain the second search keyword submitted by the user at 9:40 before the current moment 10 o'clock and the third target feature vector corresponding to the second search keyword.
[0041] In some embodiments, the first sorting model may include but is not limited to a pairwise model, a listwise model, etc. In some embodiments, the pairwise model is to sort by comparing the order of each pair, and in some embodiments, the listwise model is to sort by optimizing the entire search list.
[0042] In one embodiment, when the server generates training samples based on the third target feature vector, the search result list, and the user's behavior data on the search results included in the search result list, the server can obtain the third search keyword submitted by the user within a preset second time period and the fourth target feature vector corresponding to the third search keyword, add the third target feature vector and the fourth target feature vector to the feature vector set, and use the user's behavior data on the search results included in the search result list to reorder the search results included in the search result list corresponding to the second search keyword, thereby generating training samples based on the feature vector set and the reordered search result list corresponding to the second search keyword.
[0043] In some embodiments, the preset second time period is a time period before the first time. For example, assuming that the current time is 10 o'clock and the first time is 9:40, the server can obtain the third search keyword submitted by the user within 10 minutes before 9:40 (i.e., within the preset second time period) and the fourth target feature vector corresponding to the third search keyword.
[0044] In one example, assuming that the server obtains the third target feature vector X={t1, t2,…} corresponding to the second search keyword submitted by the user at time ti, the third target feature vector is input into the first sorting model, and the search result list corresponding to the second search keyword is obtained as Y={y1, y2, y3}. Assuming that the obtained behavior data of the user on the search results included in the search result list is clicking y2, the search results included in the search result list corresponding to the second search keyword can be re-sorted to obtain Y={y2, y1, y3}, thereby generating training samples {X={t1, t2,…}, Y={y2, y1, y3}} according to the feature vector set X={t1, t2,…} and the re-sorted search result list Y={y2, y1, y3} corresponding to the second search keyword. When the user clicks on y2, the user has search results and behavior data at time ti. If the user clicks again in the next stage, ti can be added to X. Then, similarly, a new Y is constructed based on the search results obtained by training the first sorting model and the user's behavior data (such as the items actually clicked by the user), thereby generating a new training sample {X,Y}.
[0045] In one embodiment, if the user's behavior data at a certain moment is more than a preset second time length away from the behavior data at the previous moment, it is necessary to reconstruct the feature vector set X instead of adding the behavior data at that moment to the previous X.
[0046] By training the second sorting model, it is helpful to input the second target feature vector of the historical search behavior data of a preset first duration and the first target feature vector corresponding to the first search keyword into the trained second sorting model for training after obtaining the first search keyword currently submitted by the user, thereby obtaining a search result list and optimizing the candidate structure list.
[0047] S202: Obtain at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data.
[0048] In an embodiment of the present invention, the server may obtain at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data. In some embodiments, each of the at least one historical search behavior data includes a historical search keyword and / or the behavior data of the user on the search results; in one example, the behavior data may be a selection operation made by the user on the search results, and in some embodiments, the selection operation includes but is not limited to a click operation.
[0049] In one embodiment, when the server obtains at least one historical search behavior data of the user within a preset first time length and the second target feature vector corresponding to the at least one historical search behavior data, it can obtain at least one historical search behavior data of the user within a preset first time length, obtain the historical feature vector corresponding to each historical search behavior data in the at least one historical search behavior data, and encode the historical feature vector corresponding to each historical search behavior data to obtain a second target feature vector of a specified length.
[0050] In one embodiment, if there is no historical search behavior data of the user within the preset first time length, the second target feature vector of the specified length may be set to an all-zero vector.
[0051] In one embodiment, when the server encodes the historical feature vector corresponding to each historical search behavior data to obtain a second target feature vector of a specified length, the server may encode the historical feature vector corresponding to each historical search behavior data according to a neural network encoding model to encode the historical feature vector corresponding to each historical search behavior data into a second target feature vector of a specified length. In some embodiments, the neural network encoding model includes but is not limited to a recurrent neural network (RNN) encoding model.
[0052] For example, assuming that the user enters a first search keyword at the current time t, it is possible to obtain whether the user has performed a search and click behavior within a preset first time period before t, such as within 1 hour. If a search and click behavior has occurred, at least one historical search behavior data within 1 hour before t can be obtained, and the historical feature vector corresponding to the at least one historical search behavior data can be obtained, and the historical feature vector corresponding to the at least one historical search behavior data can be input into the neural network coding model for encoding to obtain a second target feature vector of a specified length. If no search and click behavior has occurred, the second target feature vector is represented by an all-0 vector.
[0053] S203: Determine a search result list corresponding to the first search keyword according to the first target feature vector and the second target feature vector.
[0054] In an embodiment of the present invention, the server can determine a search result list corresponding to the first search keyword based on the first target feature vector and the second target feature vector, wherein the target search result in the search result list has the highest sorting priority, and the target search result is related to the historical search keyword and / or the user's behavior data on the search results.
[0055] For example, in the scenario of music search, assuming that the search keyword currently submitted by the user is "grassland", if the user submitted the search keyword "songs to listen to before bedtime" and / or clicked on a song in the search results of "songs to listen to before bedtime" within a period of time before the current search keyword is submitted, then the first target feature vector corresponding to the search keyword "grassland" currently submitted by the user and the second target feature vector corresponding to the historical search behavior data of the search keyword "songs to listen to before bedtime" submitted by the user and clicking on a song in the search results of "songs to listen to before bedtime" within a period of time before the current search keyword is submitted The feature vector determines the song "The Tranquility of the Prairie" whose lyrics include "prairie" from the songs in "songs to listen to before bedtime", and determines the song "Song of the Prairie" whose other lyrics include "prairie", so that it can be determined that the song whose lyrics include "prairie" determined from the songs in "songs to listen to before bedtime" has the highest sorting priority in the search result list, and the sorting priority of the other songs whose lyrics include "prairie" in the search result list is after the song whose lyrics include "prairie" determined from the songs in "songs to listen to before bedtime", that is, the arrangement order of the search results in the search list is: "The Tranquility of the Prairie", "Song of the Prairie".
[0056] In one embodiment, when the server determines the search result list corresponding to the first search keyword based on the first target feature vector and the second target feature vector, the server can input the first target feature vector into a first sorting model to obtain a candidate result list corresponding to the first search keyword, and input the first target feature vector, the second target feature vector and the candidate result list into a second sorting model to obtain a search result list corresponding to the first search keyword. For example, in a music search engine, the search result list displays songs, and in a web search engine, the search result list displays web pages.
[0057] Specific can Figure 3 Take this as an example to illustrate: Figure 3 is a schematic diagram of obtaining a search result list provided by an embodiment of the present invention, such as Figure 3As shown, assuming that the user enters a first search keyword at the current time t, the first target feature vector h'31 can be obtained by encoding the first search keyword, and at least one historical search behavior data of the user within a preset first time length before t, such as within 1 hour, can be obtained, and the historical feature vector 32 corresponding to the at least one historical search behavior data can be obtained, and then the historical feature vector 32 corresponding to the at least one historical search behavior data can be input into the neural network encoding model 33 for encoding to obtain a second target feature vector h34 of a specified length. Then, the first target feature vector h'31 is input into the first sorting model 35 to obtain a candidate result list 36, and then, based on the candidate result list 36, h' and h are input into the trained second sorting model 37 for training to obtain a search result list 38.
[0058] It can be seen that by combining the first search keyword currently input by the user with the user's historical search behavior data within the preset first time period before the current moment, the impact of the user's historical behavior data on the search results is taken into consideration, and the candidate result list obtained solely through the first sorting model can be further optimized, thereby improving the effectiveness of the search sorting.
[0059] In one embodiment, after determining the search result list corresponding to the first search keyword based on the first target feature vector and the second target feature vector, the server can obtain the user's behavior data on the search results included in the search results list, and train the second training model based on the user's behavior data on the search results included in the search results list. Similarly, whenever a new search result list is obtained, the second training model can be trained based on the user's behavior data on the search results included in the search results list. The specific implementation method of the training process is as described above and will not be repeated here.
[0060] In one embodiment, when the server trains the second training model based on the behavior data of the user on the search results included in the search results in the new search result list, it may stop training for a period of time after the training is mature. In some embodiments, the server may determine whether the second training model is mature based on whether the number of training times meets a preset number threshold, such as determining that the training is mature when the number of training times is greater than the preset number threshold. In other embodiments, the server may determine whether the second training model is mature based on other methods, which are not specifically limited here.
[0061] In one embodiment, the server may also continuously train the second training model based on the behavior data of the user in response to the search results included in the new search result list.
[0062] In one embodiment, the server can obtain user feedback on satisfaction with the search results in the search results list, and determine whether to continue training based on the user feedback on satisfaction with the search results in the search results list. For example, when the user feedback on satisfaction with the search results in the search results list is greater than a preset satisfaction threshold, it can be determined to stop training the second training model.
[0063] The embodiment of the present invention can obtain the first search keyword currently submitted by the user and the first target feature vector corresponding to the first search keyword, and obtain at least one historical search behavior data of the user within a preset first time length and the second target feature vector corresponding to at least one historical search behavior data, each of the at least one historical search behavior data includes the historical search keyword and / or the behavior data of the user on the search results, thereby determining the search result list corresponding to the first search keyword based on the first target feature vector and the second target feature vector, wherein the sorting priority corresponding to the target search result in the search result list is the highest, and the target search result is related to the historical search keyword and / or the behavior data of the user on the search results. Through this implementation, the search results can be optimized and the search efficiency and effectiveness can be improved.
[0064] See also Figure 4 , Figure 4 4 is a schematic diagram of a search device provided by an embodiment of the present invention. Specifically, the device is set in a server, and the device includes: a first acquisition module 401, a second acquisition module 402, and a determination module 403;
[0065] A first acquisition module 401 is used to acquire a first search keyword currently submitted by a user and a first target feature vector corresponding to the first search keyword;
[0066] A second acquisition module 402 is used to acquire at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data, wherein each of the at least one historical search behavior data includes a historical search keyword and / or behavior data of the user on the search results;
[0067] Determination module 403 is used to determine a search result list corresponding to the first search keyword based on the first target feature vector and the second target feature vector, wherein the target search result in the search result list has the highest sorting priority, and the target search result is related to the historical search keyword and / or the user's behavior data on the search results.
[0068] Furthermore, when the second acquisition module 402 acquires at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data, it is specifically used to:
[0069] Acquire at least one historical search behavior data of the user within a preset first time period;
[0070] Obtaining a historical feature vector corresponding to each historical search behavior data in the at least one historical search behavior data;
[0071] The historical feature vector corresponding to each historical search behavior data is encoded to obtain a second target feature vector of a specified length.
[0072] Further, when the determination module 403 determines the search result list corresponding to the first search keyword according to the first target feature vector and the second target feature vector, it is specifically used to:
[0073] Inputting the first target feature vector into a first ranking model to obtain a candidate result list corresponding to the first search keyword;
[0074] The first target feature vector, the second target feature vector and the candidate result list are input into a second sorting model to obtain a search result list corresponding to the first search keyword.
[0075] Furthermore, when the second acquisition module 402 encodes the historical feature vector corresponding to each historical search behavior data to obtain a second target feature vector of a specified length, it is specifically used to:
[0076] The historical feature vector corresponding to each historical search behavior data is encoded according to the neural network encoding model, so as to encode the historical feature vector corresponding to each historical search behavior data into a second target feature vector of a specified length.
[0077] Furthermore, the second acquisition module 402 is further used for:
[0078] If there is no historical search behavior data of the user within the preset first time length, the second target feature vector of the specified length is set to an all-zero vector.
[0079] Furthermore, before the first acquisition module 401 acquires the first search keyword currently submitted by the user and the first target feature vector corresponding to the first search keyword, it is also used to:
[0080] Acquire a second search keyword submitted by the user at a first moment and a third target feature vector corresponding to the second search keyword;
[0081] Inputting the third target feature vector into the first ranking model to obtain a search result list corresponding to the second search keyword;
[0082] Acquire behavior data of the user in response to the search results included in the search result list;
[0083] A training sample is generated according to the third target feature vector, the search result list, and the behavior data of the user in response to the search results included in the search result list, and the second ranking model is trained using the training sample.
[0084] Furthermore, when the first acquisition module 401 generates a training sample according to the third target feature vector, the search result list, and the behavior data of the user on the search results included in the search result list, it is specifically used to:
[0085] Acquire a third search keyword submitted by the user within a preset second time period and a fourth target feature vector corresponding to the third search keyword;
[0086] Adding the third target feature vector and the fourth target feature vector to a feature vector set;
[0087] Reordering the search results included in the search result list corresponding to the second search keyword by using the behavior data of the user on the search results included in the search result list;
[0088] A training sample is generated according to the feature vector set and the reordered search result list corresponding to the second search keyword.
[0089] The embodiment of the present invention can obtain the first search keyword currently submitted by the user and the first target feature vector corresponding to the first search keyword, and obtain at least one historical search behavior data of the user within a preset first time length and the second target feature vector corresponding to at least one historical search behavior data, each of the at least one historical search behavior data includes the historical search keyword and / or the behavior data of the user on the search results, thereby determining the search result list corresponding to the first search keyword based on the first target feature vector and the second target feature vector, wherein the sorting priority corresponding to the target search result in the search result list is the highest, and the target search result is related to the historical search keyword and / or the behavior data of the user on the search results. Through this implementation, the search results can be optimized and the search efficiency and effectiveness can be improved.
[0090] See also Figure 5 , Figure 55 is a schematic diagram of a server structure provided by an embodiment of the present invention. Specifically, the server includes: a memory 501 and a processor 502.
[0091] In one embodiment, the server further includes a data interface 503, and the data interface 503 is used to transfer data information between the server and other devices.
[0092] The memory 501 may include a volatile memory; the memory 501 may also include a non-volatile memory; the memory 501 may also include a combination of the above-mentioned types of memories. The processor 502 may be a central processing unit (CPU). The processor 502 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA) or any combination thereof.
[0093] The memory 501 is used to store programs, and the processor 502 can call the program stored in the memory 501 to perform the following steps:
[0094] Obtaining a first search keyword currently submitted by a user and a first target feature vector corresponding to the first search keyword;
[0095] Acquire at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data, wherein each historical search behavior data of the at least one historical search behavior data includes a historical search keyword and / or behavior data of the user on search results;
[0096] A search result list corresponding to the first search keyword is determined based on the first target feature vector and the second target feature vector, wherein the target search result in the search result list has the highest sorting priority, and the target search result is related to the historical search keyword and / or the user's behavior data on the search results.
[0097] Further, when the processor 502 obtains at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data, it is specifically configured to:
[0098] Acquire at least one historical search behavior data of the user within a preset first time period;
[0099] Obtaining a historical feature vector corresponding to each historical search behavior data in the at least one historical search behavior data;
[0100] The historical feature vector corresponding to each historical search behavior data is encoded to obtain a second target feature vector of a specified length.
[0101] Further, when the processor 502 determines the search result list corresponding to the first search keyword according to the first target feature vector and the second target feature vector, it is specifically configured to:
[0102] Inputting the first target feature vector into a first ranking model to obtain a candidate result list corresponding to the first search keyword;
[0103] The first target feature vector, the second target feature vector and the candidate result list are input into a second sorting model to obtain a search result list corresponding to the first search keyword.
[0104] Furthermore, when the processor 502 encodes the historical feature vector corresponding to each historical search behavior data to obtain a second target feature vector of a specified length, it is specifically used to:
[0105] The historical feature vector corresponding to each historical search behavior data is encoded according to the neural network encoding model, so as to encode the historical feature vector corresponding to each historical search behavior data into a second target feature vector of a specified length.
[0106] Furthermore, the processor 502 is further configured to:
[0107] If there is no historical search behavior data of the user within the preset first time length, the second target feature vector of the specified length is set to an all-zero vector.
[0108] Furthermore, before the processor 502 obtains the first search keyword currently submitted by the user and the first target feature vector corresponding to the first search keyword, it is further configured to:
[0109] Acquire a second search keyword submitted by the user at a first moment and a third target feature vector corresponding to the second search keyword;
[0110] Inputting the third target feature vector into the first ranking model to obtain a search result list corresponding to the second search keyword;
[0111] Acquire behavior data of the user in response to the search results included in the search result list;
[0112] A training sample is generated according to the third target feature vector, the search result list, and the behavior data of the user in response to the search results included in the search result list, and the second ranking model is trained using the training sample.
[0113] Further, when the processor 502 generates a training sample according to the third target feature vector, the search result list, and the behavior data of the user in response to the search results included in the search result list, it is specifically configured to:
[0114] Acquire a third search keyword submitted by the user within a preset second time period and a fourth target feature vector corresponding to the third search keyword;
[0115] Adding the third target feature vector and the fourth target feature vector to a feature vector set;
[0116] Reordering the search results included in the search result list corresponding to the second search keyword by using the behavior data of the user on the search results included in the search result list;
[0117] A training sample is generated according to the feature vector set and the reordered search result list corresponding to the second search keyword.
[0118] The embodiment of the present invention can obtain the first search keyword currently submitted by the user and the first target feature vector corresponding to the first search keyword, and obtain at least one historical search behavior data of the user within a preset first time length and the second target feature vector corresponding to at least one historical search behavior data, each of the at least one historical search behavior data includes the historical search keyword and / or the behavior data of the user on the search results, thereby determining the search result list corresponding to the first search keyword based on the first target feature vector and the second target feature vector, wherein the sorting priority corresponding to the target search result in the search result list is the highest, and the target search result is related to the historical search keyword and / or the behavior data of the user on the search results. Through this implementation, the search results can be optimized and the search efficiency and effectiveness can be improved.
[0119] The embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the present invention is implemented. Figure 2 The method described in the corresponding embodiment can also be implemented Figure 4 The device corresponding to the embodiment of the present invention will not be described in detail here.
[0120] The computer-readable storage medium may be an internal storage unit of the device described in any of the foregoing embodiments, such as a hard disk or memory of the device. The computer-readable storage medium may also be an external storage device of the device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the server. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0121] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0122] The above disclosure is only part of the embodiments of the present invention, which certainly cannot be used to limit the scope of the rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention are still within the scope of the invention.
Claims
1. A search method, It is characterized in that include: Obtaining a first search keyword currently submitted by a user and a first target feature vector corresponding to the first search keyword; Acquire at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data, wherein each historical search behavior data of the at least one historical search behavior data includes a historical search keyword and / or behavior data of the user on search results; Determining a search result list corresponding to the first search keyword according to the first target feature vector and the second target feature vector, including: inputting the first target feature vector into a first sorting model to obtain a candidate result list corresponding to the first search keyword, inputting the first target feature vector, the second target feature vector and the candidate result list into a second sorting model to obtain a search result list corresponding to the first search keyword; the sorting priority corresponding to the target search result in the search result list is the highest, and the target search result is related to the historical search keyword and / or the behavior data of the user on the search result; Before obtaining the first search keyword currently submitted by the user and the first target feature vector corresponding to the first search keyword, the method further includes: Acquire a second search keyword submitted by the user at a first moment and a third target feature vector corresponding to the second search keyword, wherein the first moment is a moment before the current moment; Inputting the third target feature vector into the first ranking model to obtain a search result list corresponding to the second search keyword; Acquire behavior data of the user in response to the search results included in the search result list; Obtain a third search keyword submitted by the user within a preset second time period and a fourth target feature vector corresponding to the third search keyword, wherein the preset second time period is a time period before the first moment; add the third target feature vector and the fourth target feature vector to a feature vector set; reorder the search results included in the search result list corresponding to the second search keyword using the user's behavior data on the search results included in the search result list; generate training samples based on the feature vector set and the reordered search result list corresponding to the second search keyword; and train a second sorting model using the training samples.
2. The method according to claim 1, It is characterized in that The obtaining of at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data includes: Acquire at least one historical search behavior data of the user within a preset first time period; Obtaining a historical feature vector corresponding to each historical search behavior data in the at least one historical search behavior data; The historical feature vector corresponding to each historical search behavior data is encoded to obtain a second target feature vector of a specified length.
3. The method according to claim 2, It is characterized in that The encoding of the historical feature vector corresponding to each historical search behavior data to obtain a second target feature vector of a specified length includes: The historical feature vector corresponding to each historical search behavior data is encoded according to the neural network encoding model, so as to encode the historical feature vector corresponding to each historical search behavior data into a second target feature vector of a specified length.
4. The method according to claim 2, It is characterized in that The method further comprises: If there is no historical search behavior data of the user within the preset first time length, the second target feature vector of the specified length is set to an all-zero vector.
5. A search device, It is characterized in that include: A first acquisition module, used to acquire a first search keyword currently submitted by a user and a first target feature vector corresponding to the first search keyword; A second acquisition module is used to acquire at least one historical search behavior data of the user within a preset first time period and a second target feature vector corresponding to the at least one historical search behavior data, wherein each of the at least one historical search behavior data includes a historical search keyword and / or behavior data of the user on the search results; A determination module, for determining a search result list corresponding to the first search keyword according to the first target feature vector and the second target feature vector, comprising: inputting the first target feature vector into a first sorting model to obtain a candidate result list corresponding to the first search keyword, inputting the first target feature vector, the second target feature vector and the candidate result list into a second sorting model to obtain a search result list corresponding to the first search keyword; in the search result list, the target search result has the highest sorting priority, and the target search result is related to the historical search keyword and / or the behavior data of the user on the search result; Before obtaining the first search keyword currently submitted by the user and the first target feature vector corresponding to the first search keyword, the first acquisition module is also used to obtain the second search keyword submitted by the user at a first moment and the third target feature vector corresponding to the second search keyword, where the first moment is a moment before the current moment; input the third target feature vector into the first sorting model to obtain a search result list corresponding to the second search keyword; obtain the user's behavior data on the search results included in the search result list; obtain the third search keyword submitted by the user within a preset second time period and the fourth target feature vector corresponding to the third search keyword, where the preset second time period is a time period before the first moment; add the third target feature vector and the fourth target feature vector to a feature vector set; use the user's behavior data on the search results included in the search result list to re-sort the search results included in the search result list corresponding to the second search keyword; generate training samples based on the feature vector set and the re-sorted search result list corresponding to the second search keyword; and use the training samples to train the second sorting model.
6. A server, It is characterized in that include: A processor and a memory, wherein the processor and the storage device are connected to each other, wherein the storage device is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores program instructions, which, when executed, are used to implement the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Dynamic search engine and method
CN102207962A
Search intention identification method and device
CN105095187A
Searching method and device based on artificial intelligence
CN106484766A
Searching method and device and storage medium
CN110222260A
Search support apparatus, search support method, and search support program
US20130117285A1
