Article search result determination method and device
By constructing feature vectors of users and items and calculating correlation scores, it solves the problem of failing to consider the correlation between users and items in the existing technology, improves the relevance of search results and user experience, and reduces computing costs and data interaction.
Patent Information
- Application Number
- CN202410776610.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-24
AI Technical Summary
When recommending items, the existing e-commerce search and recommendation system only considers the correlation between the item and the search keywords and fails to fully consider the correlation between the user and the item, resulting in poor user experience.
The first feature vector is constructed by obtaining the user's historical clicks, collections and purchase records, and the second feature vector is constructed by combining the number of clicks, collections and purchases of the item, calculating the correlation score between the item and the user, and ranking and recommending items with high correlation. .
It improves the relevance of item search results and user experience, reduces computing costs, meets real-time requirements, and reduces data interaction between servers.
Smart Images

Figure CN118691372A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for determining item search results. Background Art
[0002] Search and push systems can be seen everywhere in daily life. For example, users use news websites or applications to search for news, receive news push notifications, and use e-commerce search and push systems to purchase items.
[0003] When users use the search and push system to browse or purchase items, it is very important to improve the user experience by recommending items that are highly relevant to the user based on the keywords searched by the user among a large number of items.
[0004] At present, most e-commerce search and recommendation systems use the Term Frequency-Inverse Document Frequency (TF-IDF) algorithm and the Best Match 25th Iteration Algorithm (BM25 algorithm) to recommend items to users. The above algorithms rank the relevance between items and search keywords and select several top-ranked items to recommend to users. However, the above algorithms only consider the relevance between items and search keywords, and do not consider the relevance between users and items. Therefore, the items selected by the above algorithms have a low relevance to users, and the user experience is poor. Summary of the invention
[0005] The present application provides a method and device for determining item search results, so as to improve the efficiency of determining item search results and the user experience.
[0006] In a first aspect, the present application provides a method for determining item search results, the method comprising:
[0007] Obtaining a search keyword and a first feature vector of a user corresponding to the search keyword; the first feature vector is determined according to the user's historical click records, historical collection records, and historical purchase records; the first feature vector includes a first sub-feature vector, a second sub-feature vector, and a third sub-feature vector; wherein the first sub-feature vector is associated with the category of items clicked by the user, the second sub-feature vector is associated with the category of items collected by the user, and the third sub-feature vector is associated with the category of items purchased by the user;
[0008] Determine N items and N second feature vectors according to the search keyword, wherein the N second feature vectors correspond to the N items one by one; the i-th second feature vector is determined according to the number of clicks, the number of collections, and the number of purchases of the i-th item; the i-th item is any one of the N items, i is a positive integer and i is less than or equal to N; N is a positive integer;
[0009] Determine N first scores according to the N second feature vectors and the first feature vector, and the N first scores correspond to the N items one by one; wherein the first score of the i-th item is used to describe the correlation between the i-th item and the user; the first score of the i-th item is determined according to one or more of the second score of the i-th item, the third score of the i-th item, and the fourth score of the i-th item, wherein the second score of the i-th item is obtained by calculating the inner product of the first sub-feature vector and the i-th second feature vector, the third score of the i-th item is obtained by calculating the inner product of the second sub-feature vector and the i-th second feature vector, and the fourth score of the i-th item is obtained by calculating the inner product of the third sub-feature vector and the i-th second feature vector;
[0010] The N first scores are sorted in descending order, and the items corresponding to the first M scores are selected as the search results corresponding to the search keyword according to the sorting result; M is a positive integer, and M is less than or equal to N.
[0011] The method for determining item search results provided by the present application first determines N items and N second feature vectors based on the search keyword after obtaining the search keyword and the first feature vector of the user corresponding to the search keyword, wherein the second feature vector is determined based on multiple feature dimensions such as the number of clicks on the item and the number of collections; and then determines N first scores for describing the correlation between the item and the user based on the above-mentioned N second feature vectors and the first feature vector, wherein each of the N first scores is determined by at least one of the second score, the third score and the fourth score, wherein the second score is obtained by performing an inner product calculation on the first sub-feature vector associated with the item category clicked by the user and the second feature vector, and the third score is obtained by performing an inner product calculation on the second sub-feature vector associated with the item category collected by the user. The fourth score is obtained by performing inner product calculation on the third sub-feature vector and the second eigenvector, and the fourth score is obtained by performing inner product calculation on the third sub-feature vector associated with the category of items purchased by the user and the second eigenvector. That is to say, the second score is associated with the user's click record feature, the third score is associated with the user's collection record feature, and the fourth score is associated with the user's purchase record feature, that is, the first score is determined based on the three feature dimensions of the user's click, collection and purchase records. Therefore, selecting the top M items according to the first score has a higher degree of relevance to the user, and returning the items with a higher degree of relevance to the user can improve the user's usage experience; and the second to fourth scores are obtained through inner product calculation, the calculation process is simple, and the efficiency of determining the item search results can be improved.
[0012] In one possible design, the method is executed in a cloud server.
[0013] The method proposed in the present application is executed in a cloud server, which reduces the data interaction between multiple servers and meets the real-time requirements; and does not increase the consumption of the graphics processing unit (GPU), and has a low computing cost.
[0014] In a possible design, the N second feature vectors are stored in a cloud server; and the N second feature vectors are updated at a preset frequency.
[0015] The cloud server executing this method and the cloud server storing the N second feature vectors can be the same cloud server. In this way, there is no need to obtain the second feature vector from other servers, which saves transmission time, reduces the time for determining the N first scores, and further improves the efficiency of determining the item search results; and the second feature vector will be updated regularly to ensure the real-time and accuracy of the second feature vector, improve the accuracy of the N first scores determined based on the N second feature vectors and the first feature vector, thereby improving the relevance of the item search results to the user and improving the user experience.
[0016] In a possible design, determining N items according to the search keyword includes:
[0017] Perform word segmentation on the search keyword to obtain K sub-keywords, where K is a positive integer;
[0018] Determine K initial scores corresponding to each item in the first set using a preset algorithm according to the K sub-keywords; wherein the j-th initial score of the w-th item is used to indicate the degree of relevance between the j-th sub-keyword and the w-th item; the w-th item is any item in the first set, w is a positive integer; j is a positive integer and is less than or equal to K;
[0019] Accumulate and sum the K initial scores corresponding to each item in the first set as the initial relevance score between the search keyword and each item in the first set;
[0020] According to the initial relevance score of each item in the first set, N items in the first set with the highest initial relevance scores are determined.
[0021] First, a screening is performed based on the relevance of the items in the first set to the search keyword. Compared with calculating the first score for all items in the first set, calculating the first score only for N items in the first set can save calculation time and improve efficiency.
[0022] In a possible design, the first feature vector is also determined based on at least one of the user's ID, gender, age, address, and membership level.
[0023] In a possible design, the i-th second feature vector is also determined according to at least one of a number, a category, a price, and a brand of the i-th item.
[0024] In a second aspect, the present application further provides an item search result determination device, the device comprising a transceiver unit and a processing unit;
[0025] The transceiver unit is used to obtain a search keyword and a first feature vector of a user corresponding to the search keyword; the first feature vector is determined according to the user's historical click records, historical collection records, and historical purchase records; the first feature vector includes a first sub-feature vector, a second sub-feature vector, and a third sub-feature vector; wherein the first sub-feature vector is associated with a category of items clicked by the user, the second sub-feature vector is associated with a category of items collected by the user, and the third sub-feature vector is associated with a category of items purchased by the user;
[0026] The processing unit is used to determine N items and N second feature vectors according to the search keyword, wherein the N second feature vectors correspond to the N items one by one; the i-th second feature vector is determined according to the number of clicks, the number of collections, and the number of purchases of the i-th item; the i-th item is any one of the N items, i is a positive integer and i is less than or equal to N; N is a positive integer;
[0027] The processing unit is further configured to determine N first scores according to the N second feature vectors and the first feature vector, wherein the N first scores correspond to the N items one by one; wherein the first score of the i-th item is used to describe the correlation between the i-th item and the user; the first score of the i-th item is determined according to one or more of the second score of the i-th item, the third score of the i-th item, and the fourth score of the i-th item, wherein the second score of the i-th item is obtained by calculating the inner product of the first sub-feature vector and the i-th second feature vector, the third score of the i-th item is obtained by calculating the inner product of the second sub-feature vector and the i-th second feature vector, and the fourth score of the i-th item is obtained by calculating the inner product of the third sub-feature vector and the i-th second feature vector; the N first scores are sorted in descending order, and the items corresponding to the first scores in the first M positions are selected as the search results corresponding to the search keyword according to the sorting result; M is a positive integer, and M is less than or equal to N.
[0028] In one possible design, the method is executed in a cloud server.
[0029] In a possible design, the N second feature vectors are stored in a cloud server; and the N second feature vectors are updated at a preset frequency.
[0030] In a possible design, the processing unit is used to determine N items based on the search keyword: perform word segmentation on the search keyword to obtain K sub-keywords; K is a positive integer; use a preset algorithm to determine K initial scores corresponding to each item in the first set based on the K sub-keywords; wherein the j-th initial score of the w-th item is used to indicate the degree of relevance between the j-th sub-keyword and the w-th item; the w-th item is any item in the first set, w is a positive integer; j is a positive integer and j is less than or equal to K; accumulate and sum the K initial scores corresponding to each item in the first set as the initial relevance score between the search keyword and each item in the first set; and determine the N items in the first set with the highest initial relevance scores based on the initial relevance score of each item in the first set.
[0031] In a possible design, the first feature vector is also determined based on at least one of the user's ID, gender, age, address, and membership level.
[0032] In a possible design, the i-th second feature vector is also determined according to at least one of a number, a category, a price, and a brand of the i-th item.
[0033] In a third aspect, the present application also provides an item search result determining device, comprising: one or more processors and one or more memories, wherein the one or more memories store one or more programs, and when the programs are executed by the one or more processors, the device executes a method as described in any one of the above-mentioned first aspects.
[0034] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a program, and when the program is executed on a device, the device executes the method as described in any one of the above-mentioned first aspects.
[0035] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the method described in any one of the above-mentioned first aspects is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 A schematic diagram of the interaction between the search and push system, ES cluster and reasoning service provided in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of a flow chart of a method for determining item search results provided in an embodiment of the present application;
[0039] Figure 3 A schematic diagram of the structure of the device for determining item search results provided in an embodiment of the present application Figure 1 ;
[0040] Figure 4 A schematic diagram of the structure of the device for determining item search results provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0042] The application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems. In the description of the present application, unless otherwise specified, the meaning of "multiple" is two or more.
[0043] At present, the determination of user item search results requires the joint collaboration of the search and push system, the Elasticsearch engine (hereinafter referred to as the ES cluster) and the reasoning service. The search and push system, the ES cluster and the reasoning service are deployed on different servers respectively, and the search and push system and the ES cluster as well as the search and push system and the reasoning service can communicate with each other; among them, users use the search and push system to search for items, and the ES cluster is a distributed, highly scalable, and highly real-time search and data analysis server. For example, the ES cluster can be a cloud server, and the reasoning service has a model for scoring the relevance of items.
[0044] The interaction between the three Figure 1 As shown, the user uses the search and push system to input the search keywords, and the search and push system sends the user's search keywords to the ES cluster. The ES cluster determines the items related to the search keywords based on the TF-IDF algorithm or the BM25 algorithm, and returns the preliminarily screened items to the search and push system; then the search and push system sends the preliminarily screened items and the user ID returned by the ES cluster to the inference service. The inference service uses a model to perform relevance scoring on the preliminarily screened items, and sorts them based on the relevance score, that is, performs secondary screening, and returns the secondary screened items to the search and push system. Finally, the search and push system recommends the secondary screened items to the user.
[0045] According to the above content, the determination of item search results requires multiple data transmissions between the search and push system, ES cluster, and inference service, which prolongs the time of the entire search and push link and affects the user experience; and the model used by the inference service needs to be deployed in the GPU. When the inference model uses the model to perform relevant scoring on items, there will be a certain loss to the GPU, and the GPU cost is relatively high. Therefore, the above method consumes a lot of computing resources and has a high computing cost.
[0046] To solve the above problems, the present application proposes Figure 2 The method for determining item search results shown in the figure can be executed by a cloud server, which can be an ES cluster; or a plug-in in the cloud server, such as a scorer plug-in, which is not limited in this application. The following is an example of a cloud server as the execution subject. The method includes:
[0047] Step 200: The cloud server obtains a search keyword and a first feature vector of a user corresponding to the search keyword.
[0048] Exemplarily, the user's first feature vector can be calculated offline and correspond one-to-one to the user ID. The search and push system can determine the user's first feature vector based on the user ID. When the user enters a search keyword in the search and push system, the search and push system sends the search keyword and the user's first feature vector to the cloud server.
[0049] Exemplarily, the first feature vector can be determined based on the user's historical click records, historical collection records, and historical purchase records. For example, the collection record can be understood as a shopping cart record. The first feature vector includes a first sub-feature vector, a second sub-feature vector, and a third sub-feature vector. The first sub-feature vector is associated with the category of items clicked by the user. For example, the first sub-feature vector can be used to represent the frequency of the user clicking on each category of items; the second sub-feature vector is associated with the category of items collected by the user. For example, the second sub-feature vector can be used to represent the frequency of the user collecting each category of items; the third sub-feature vector is associated with the category of items purchased by the user. For example, the third sub-feature vector can be used to represent the frequency of the user purchasing each category of items.
[0050] Exemplarily, the first feature vector can also be determined based on at least one of the user's number, gender, age, address, and membership level. For example, the first feature vector is determined based on the user's historical click records, historical collection records, historical purchase records, age, and membership level, or the first feature vector is determined based on the user's historical click records, historical collection records, historical purchase records, number, gender, and address.
[0051] Exemplarily, Embedding technology can be used to determine the corresponding sub-feature vector based on the user's historical click records, collection records, purchase records, age, gender and other features. Embedding technology is a technology that converts high-dimensional data (such as text data) into a low-dimensional vector representation, where the high-dimensional data can be the user's click records, collection records, purchase records, age, gender and other feature data. For example, Embedding technology is used to determine the first sub-feature vector based on the user's historical click records. Assume that the determined first sub-feature vector is [0.01, 0.03, 0.02, 0.5].
[0052] Step 201: The cloud server determines N items and N second feature vectors according to the search keyword, and the N second feature vectors correspond to the N items one by one.
[0053] Exemplarily, the cloud server includes a word segmenter or a module with a word segmentation function. First, the cloud server uses the word segmenter to perform word segmentation on the search keyword to obtain K sub-keywords, where K is a positive integer; then, a preset algorithm is used to determine the K initial scores corresponding to each item in the first set based on the K sub-keywords. The preset algorithm can be a TF-IDF algorithm or other algorithms that can score the relevance between items and search keywords, and this application does not limit this; wherein, the jth initial score of the wth item is used to indicate the degree of relevance between the jth sub-keyword and the wth item, wherein the wth item is any item in the first set, w is a positive integer, j is a positive integer and j is less than or equal to K. The first set can be understood as a full set of items, including items of various categories such as fruits, snacks, and electronic products.
[0054] For example, assuming that the search keyword is "Shaanxi apple", the keyword is segmented to obtain two sub-keywords, namely "Shaanxi" and "apple", that is, K is 2, then each item in the first set has 2 initial scores, and the 2 initial scores are determined based on "Shaanxi" and "apple" respectively.
[0055] Further illustratively, the K initial scores corresponding to each item in the first set are accumulated and summed to serve as the initial relevance score between the search keyword and each item in the first set.
[0056] For example, assuming that each item in the first set has 2 initial scores, then the initial relevance score between the search keyword and each item in the first set is the sum of the 2 initial scores; assuming that each item in the first set has 5 initial scores, then the initial relevance score between the search keyword and each item in the first set is the sum of the 5 initial scores.
[0057] After determining the initial relevance score between the search keyword and each item in the first set, the items in the first set can be sorted according to the initial relevance score to determine the N items in the first set with the highest initial relevance scores, where N is a positive integer, for example, N can be 1000 or 2000.
[0058] Exemplarily, N second feature vectors are determined based on the number of clicks, favorites, and purchases of N items. The number of favorites can also be understood as the number of additional purchases. Specifically, the i-th second feature vector can be determined based on the number of clicks, favorites, and purchases of the i-th item. The i-th item is any one of the N items, i is a positive integer and i is less than or equal to N. The i-th second feature vector can also be determined based on at least one of the number, category, price, and brand of the i-th item. Similar to the first to third sub-feature vectors, the second feature vector of each item can also be determined using Embedding technology based on feature data such as the number of clicks, favorites, purchases, price, and brand of the item.
[0059] The above-mentioned N second feature vectors are stored in a cloud server, which may be the same cloud server as the cloud server executed by the method proposed in the present application, or may be different from the cloud server executed by the method proposed in the present application, and the present application does not impose any limitation on this.
[0060] It should be noted that the N second eigenvectors are updated at a preset frequency, for example, daily or weekly, which can be set according to business needs. Since the number of clicks, favorites, purchases and prices of items will change, updating the second eigenvectors at a preset frequency can ensure the real-time and accuracy of the second eigenvectors, and improve the accuracy of the subsequent calculation results of the inner product of the second eigenvector and the first eigenvector.
[0061] The N items determined in this step have a high degree of relevance to the keyword searched by the user, which is equivalent to a preliminary screening of the items in the first set, thereby reducing the number of items that need to determine the first score in step 202 and improving efficiency.
[0062] Step 202: The cloud server determines N first scores according to the N second feature vectors and the first feature vector, and the N first scores correspond one-to-one to the N objects.
[0063] Exemplarily, the first score is used to describe the correlation between the item and the user. Specifically, the first score of the i-th item is used to describe the correlation between the i-th item and the user, and the first score of the i-th item is determined based on one or more of the second score of the i-th item, the third score of the i-th item, and the fourth score of the i-th item, wherein the second score of the i-th item is obtained by calculating the inner product of the first sub-feature vector and the i-th second feature vector, the third score of the i-th item is obtained by calculating the inner product of the second sub-feature vector and the i-th second feature vector, and the fourth score of the i-th item is obtained by calculating the inner product of the third sub-feature vector and the i-th second feature vector.
[0064] Exemplarily, the first sub-feature vector, the second sub-feature vector, the third sub-feature vector and the second feature vector are all one-dimensional vectors, and the elements in the vectors are all floating-point types; for example, assuming that the first sub-feature vector is [0.01, 0.03, 0.02, 0.5], it is a 1×4-dimensional vector; the second sub-feature vector is [0.04, 0.03, 0.06], it is a 1×3-dimensional vector; the third sub-feature vector is [0.04, 0.03, 0.03, 0.08], it is a 1×4-dimensional vector; the second feature vector of an item is [0.02, 0.01, 0.3, 0.45, 0.6], it is a 1×5-dimensional vector.
[0065] It should be noted that if the number of elements contained in the first sub-feature vector is different from that contained in the i-th second feature vector, the feature vector with fewer elements can be padded according to the preset rules so that the number of elements contained in the first sub-feature vector is the same as that contained in the i-th second feature vector. For example, if the first sub-feature vector is [0.01, 0.03, 0.02, 0.5], that is, the number of elements contained in the first sub-feature vector is 4, and the second feature vector of an item is [0.02, 0.01, 0.3, 0.45, 0.6], that is, the number of elements contained in the second feature vector is 5, then the number of elements of the first sub-feature vector can be padded to 5 with 0, so that the number of elements contained in the first sub-feature vector is the same as that contained in the i-th second feature vector, and the first sub-feature vector after the padded processing is [0.01, 0.03, 0.02, 0.5, 0]. The processing of the second and third sub-feature vectors is similar and will not be repeated here.
[0066] The following takes the first item among N items as an example to illustrate the determination of the first score:
[0067] Assume that the second feature vector of the first item is [0.02, 0.01, 0.3, 0.45, 0.6], the first sub-feature vector is [0.01, 0.03, 0.02, 0.5], the second sub-feature vector is [0.04, 0.03, 0.06], and the third sub-feature vector is [0.04, 0.03, 0.03, 0.08]. In this way, the inner product of the second feature vector of the first item and the first sub-feature vector of the user is 0.23, that is, the second score of the first item is 0.23; the inner product of the second feature vector of the first item and the second sub-feature vector of the user is 0.02, that is, the first The third score of the item is 0.02; the inner product of the second feature vector of the first item and the third sub-feature vector of the user is 0.04, that is, the fourth score of the first item is 0.04; the first score of the first item is determined according to one or more of the second score of the first item, the third score of the first item and the fourth score of the first item, for example, the first score of the first item can be one of 0.23, 0.02, and 0.04, or the weighted sum of these three scores is used as the first score of the first item, for example, the first score is 0.23×0.4+0.02×0.1+0.04×0.5=0.03.
[0068] Since the cloud server storing the second feature vector of the item can be the same as the cloud server executed by the present application, the present application does not need to obtain the second feature vector from other servers, which simplifies the calculation process, and the inner product calculation is simple, and the first score of each item can be quickly obtained; in addition, the N items for which the first scores are calculated in this step have a high degree of correlation with the search keywords. Calculating the first scores based on the N items can further improve the relevance of the final search results to the user and enhance the user experience.
[0069] Step 203: The cloud server sorts the N first scores in descending order, and selects the items corresponding to the first M scores as search results corresponding to the search keyword according to the sorting result.
[0070] Exemplarily, after step 202, the first score of each item in N items can be determined, and the N items are sorted from high to low according to the first scores of the items, and the items ranked in the top M positions are selected as the search results corresponding to the search keyword, where M is a positive integer and M is less than or equal to N. In step 200, the search and push system can also send a cutoff number to the cloud server, and the cutoff number can be understood as the number of items included in the search results that the search and push system expects the cloud server to return. For example, if the cutoff number is 500, that is, the search and push system expects the search results returned by the cloud server to contain 500 items, then M is equal to 500, that is, the top 500 items in the N items are selected as the search results corresponding to the search keyword; if the search and push system does not send the cutoff number, then the cloud server can determine the value of M according to the configured default return number. For example, if the default return number is 600, then M is equal to 600, that is, the top 600 items in the N items are selected as the search results corresponding to the search keyword.
[0071] Since the first score of the item is obtained by calculating the inner product of the first eigenvector of the user and the second eigenvector of the item, the M items included in the search results are highly relevant to the user. Returning the M items with a high degree of relevance to the user can improve the user experience. The method for determining the item search results proposed in the present application is executed in the cloud server, which effectively reduces data interaction with other servers and meets real-time requirements. In addition, the method for determining the item search results proposed in the present application will not increase the loss of the GPU and can reduce computing costs.
[0072] Figure 3 and Figure 4 This is a schematic diagram of a possible device for determining item search results provided by an embodiment of the present application. These devices for determining item search results can be used to implement the function of the ES cluster in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment.
[0073] like Figure 3 As shown, the device 300 for determining the item search result includes a transceiver unit 310 and a processing unit 320. The device 300 for determining the item search result is used to implement the above Figure 2 The functions of the ES cluster in the method embodiment shown.
[0074] When the item search result determination device 300 is used to implement Figure 2 The method embodiment shown in the figure shows the function of the ES cluster:
[0075] The transceiver unit 310 is used to obtain a search keyword and a first feature vector of a user corresponding to the search keyword; the first feature vector is determined according to the user's historical click records, historical collection records, and historical purchase records; the first feature vector includes a first sub-feature vector, a second sub-feature vector, and a third sub-feature vector; wherein the first sub-feature vector is associated with the category of items clicked by the user, the second sub-feature vector is associated with the category of items collected by the user, and the third sub-feature vector is associated with the category of items purchased by the user;
[0076] The processing unit 320 is used to determine N items and N second feature vectors according to the search keyword, wherein the N second feature vectors correspond to the N items one by one; the i-th second feature vector is determined according to the number of clicks, the number of collections, and the number of purchases of the i-th item; the i-th item is any one of the N items, i is a positive integer and i is less than or equal to N; N is a positive integer;
[0077] The processing unit 320 is further configured to determine N first scores according to the N second feature vectors and the first feature vector, wherein the N first scores correspond to the N items one by one; wherein the first score of the i-th item is used to describe the correlation between the i-th item and the user; the first score of the i-th item is determined according to one or more of the second score of the i-th item, the third score of the i-th item, and the fourth score of the i-th item, wherein the second score of the i-th item is obtained by calculating the inner product of the first sub-feature vector and the i-th second feature vector, the third score of the i-th item is obtained by calculating the inner product of the second sub-feature vector and the i-th second feature vector, and the fourth score of the i-th item is obtained by calculating the inner product of the third sub-feature vector and the i-th second feature vector; the N first scores are sorted in descending order, and the items corresponding to the first scores in the first M positions are selected as the search results corresponding to the search keyword according to the sorting result; M is a positive integer, and M is less than or equal to N.
[0078] In one possible design, the method is executed in a cloud server.
[0079] In a possible design, the N second feature vectors are stored in a cloud server; and the N second feature vectors are updated at a preset frequency.
[0080] In a possible design, the processing unit 320 is used to determine N items based on the search keyword: perform word segmentation processing on the search keyword to obtain K sub-keywords; K is a positive integer; use a preset algorithm to determine K initial scores corresponding to each item in the first set based on the K sub-keywords; wherein the j-th initial score of the w-th item is used to indicate the degree of relevance between the j-th sub-keyword and the w-th item; the w-th item is any item in the first set, w is a positive integer; j is a positive integer and j is less than or equal to K; accumulate and sum the K initial scores corresponding to each item in the first set as the initial relevance score between the search keyword and each item in the first set; and determine the N items in the first set with the highest initial relevance scores based on the initial relevance score of each item in the first set.
[0081] In a possible design, the first feature vector is also determined based on at least one of the user's ID, gender, age, address, and membership level.
[0082] In a possible design, the i-th second feature vector is also determined according to at least one of a number, a category, a price, and a brand of the i-th item.
[0083] For more detailed description of the transceiver unit 310 and the processing unit 320, please refer to Figure 2 The relevant description in the method embodiment shown is directly obtained and will not be repeated here.
[0084] like Figure 4 As shown, the device 400 for determining the item search result includes a processor 410 and an interface circuit 420. The processor 410 and the interface circuit 420 are coupled to each other. It is understood that the interface circuit 420 can be a transceiver or an input-output interface. Optionally, the device 400 for determining the item search result can also include a memory 430 for storing instructions executed by the processor 410 or storing input data required by the processor 410 to execute instructions or storing data generated after the processor 410 executes instructions.
[0085] When the item search result determination device 400 is used to implement Figure 2 When the method is shown, the processor 410 is used to implement the functions of the processing unit 320, and the interface circuit 420 is used to implement the functions of the transceiver unit 320.
[0086] The division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0087] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0088] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for determining item search results, characterized in that: The method includes: Obtaining a search keyword and a first feature vector of a user corresponding to the search keyword; the first feature vector is determined according to the user's historical click records, historical collection records, and historical purchase records; the first feature vector includes a first sub-feature vector, a second sub-feature vector, and a third sub-feature vector; wherein the first sub-feature vector is associated with the category of items clicked by the user, the second sub-feature vector is associated with the category of items collected by the user, and the third sub-feature vector is associated with the category of items purchased by the user; Determine N items and N second feature vectors according to the search keyword, wherein the N second feature vectors correspond to the N items one by one; the i-th second feature vector is determined according to the number of clicks, the number of collections, and the number of purchases of the i-th item; the i-th item is any one of the N items, i is a positive integer and i is less than or equal to N; N is a positive integer; Determine N first scores according to the N second feature vectors and the first feature vector, and the N first scores correspond to the N items one by one; wherein the first score of the i-th item is used to describe the correlation between the i-th item and the user; the first score of the i-th item is determined according to one or more of the second score of the i-th item, the third score of the i-th item, and the fourth score of the i-th item, wherein the second score of the i-th item is obtained by calculating the inner product of the first sub-feature vector and the i-th second feature vector, the third score of the i-th item is obtained by calculating the inner product of the second sub-feature vector and the i-th second feature vector, and the fourth score of the i-th item is obtained by calculating the inner product of the third sub-feature vector and the i-th second feature vector; The N first scores are sorted in descending order, and the items corresponding to the first M scores are selected as the search results corresponding to the search keyword according to the sorting result; M is a positive integer, and M is less than or equal to N.
2. The method according to claim 1, characterized in that The method is executed in a cloud server.
3. The method according to claim 1, characterized in that The N second feature vectors are stored in the cloud server; the N second feature vectors are updated according to a preset frequency.
4. The method according to claim 1, characterized in that The determining N items according to the search keyword includes: Perform word segmentation on the search keyword to obtain K sub-keywords, where K is a positive integer; Determine K initial scores corresponding to each item in the first set using a preset algorithm according to the K sub-keywords; wherein the j-th initial score of the w-th item is used to indicate the degree of relevance between the j-th sub-keyword and the w-th item; the w-th item is any item in the first set, w is a positive integer; j is a positive integer and is less than or equal to K; Accumulate and sum the K initial scores corresponding to each item in the first set as the initial relevance score between the search keyword and each item in the first set; According to the initial relevance score of each item in the first set, N items in the first set with the highest initial relevance scores are determined.
5. The method according to claim 1, characterized in that The first feature vector is also determined according to at least one of the user's ID, gender, age, address and membership level.
6. The method according to claim 1, characterized in that The i-th second feature vector is also determined according to at least one of the number, category, price and brand of the i-th item.
7. A device for determining item search results, characterized in that: The device comprises a transceiver unit and a processing unit; The transceiver unit is used to obtain a search keyword and a first feature vector of a user corresponding to the search keyword; the first feature vector is determined according to the user's historical click records, historical collection records, and historical purchase records; the first feature vector includes a first sub-feature vector, a second sub-feature vector, and a third sub-feature vector; wherein the first sub-feature vector is associated with a category of items clicked by the user, the second sub-feature vector is associated with a category of items collected by the user, and the third sub-feature vector is associated with a category of items purchased by the user; The processing unit is used to determine N items and N second feature vectors according to the search keyword, wherein the N second feature vectors correspond to the N items one by one; the i-th second feature vector is determined according to the number of clicks, the number of collections, and the number of purchases of the i-th item; the i-th item is any one of the N items, i is a positive integer and i is less than or equal to N; N is a positive integer; The processing unit is further configured to determine N first scores according to the N second feature vectors and the first feature vector, wherein the N first scores correspond to the N items one by one; wherein the first score of the i-th item is used to describe the correlation between the i-th item and the user; the first score of the i-th item is determined according to one or more of the second score of the i-th item, the third score of the i-th item, and the fourth score of the i-th item, wherein the second score of the i-th item is obtained by calculating the inner product of the first sub-feature vector and the i-th second feature vector, the third score of the i-th item is obtained by calculating the inner product of the second sub-feature vector and the i-th second feature vector, and the fourth score of the i-th item is obtained by calculating the inner product of the third sub-feature vector and the i-th second feature vector; the N first scores are sorted in descending order, and the items corresponding to the first scores in the first M positions are selected as the search results corresponding to the search keyword according to the sorting result; M is a positive integer, and M is less than or equal to N.
8. A device for determining item search results, characterized in that: include: One or more processors and one or more memories; wherein the one or more memories store one or more programs, and when the programs are executed by the one or more processors, the device executes the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.
