Method and device for constructing search model and commodity search method and device

By optimizing the weight value of the search model and using the weight value of linear and cross-nonlinear terms, the problem of low efficiency of manual parameter configuration in the existing technology is solved, the product search and ranking model is quickly constructed and optimized, and the resource utilization rate is improved.

CN110827106BActive Publication Date: 2024-10-22BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201810894185.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-08-08
Publication Date
2024-10-22
Estimated Expiration
2038-08-08

AI Technical Summary

Technical Problem

When the existing product search and sorting business quickly adjusts the sorting results, it is necessary to manually configure the correction parameters of different categories, which is inefficient and consumes a lot of resources. Especially in the case of multiple categories, it is difficult to find the optimal parameters.

Method used

Quickly build a search model based on the original scoring function and sorting factors. By optimizing the weight values ​​of the sorting factors, using the weight values ​​of linear terms and cross-nonlinear terms, and using the basic data set and objective function to automatically solve parameters, manual configuration and resource consumption are reduced.

Benefits of technology

It improves the construction efficiency and optimization efficiency of the search model, saves system resources, and enables the ability to quickly adjust the sorting results, which is suitable for multi-category scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110827106B_ABST
    Figure CN110827106B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method for constructing a search model, including: constructing a basic data set using a product search result set of a first scoring function; constructing a second scoring function based on the first scoring function and a ranking factor; and optimizing the weight value of the ranking factor according to the basic data set by category. The embodiment of the present invention also corresponds to a device and a product search method and device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for constructing a search model and a product search method and device. Background Art

[0002] In product search and ranking, each product is typically scored based on the user's query, purchase preferences, and product attributes. Products are then sorted in descending order by score, and the ordered list of products is presented to the user. In this process, the scoring function is a key factor influencing product ranking.

[0003] Due to the ever-changing market, product search rankings often require rapid adjustments based on business needs. For example, a business may need to factor in specific product attributes (such as brand) in the ranking process, but the existing scoring function often doesn't include these product attributes. We call these product attributes introduced into the scoring function to meet business needs ranking factors. Adding correction factors to the existing scoring function is a viable solution for quickly adjusting ranking results.

[0004] However, the inventors discovered that because different query terms fall into different categories, product prices, user browsing habits, and purchasing habits vary within those categories, necessitating the configuration of different correction parameters for each category. Given the large number of query terms, manually configuring correction parameters for each category based on experience is extremely inefficient. Furthermore, directly optimizing the undetermined parameters of the scoring function for different query terms across multiple categories requires significant resources, such as data traffic and machines, and results in lengthy AB experiments. Furthermore, due to resource constraints, the number of parameter combinations available for experimentation is often limited, making it difficult to find the optimal parameters. Summary of the Invention

[0005] In view of this, an embodiment of the present invention provides a method for constructing a search model, which can quickly construct a search model based on the original scoring function and ranking factors, thereby solving the above-mentioned problem.

[0006] According to a first aspect of an embodiment of the present invention, a method for constructing a search model is provided, comprising:

[0007] The basic data set is constructed by using the product search result set of the first scoring function;

[0008] Constructing a second scoring function based on the first scoring function and the ranking factor; and

[0009] The classification category optimizes the weight value of the ranking factor according to the basic data set.

[0010] Preferably, the weight value of the ranking factor is category-specific.

[0011] Preferably, the ranking factor is a parameter representing one or more commodity attributes.

[0012] Preferably, the method further comprises: constructing a second scoring function for each of the plurality of ranking factors using the same weight value.

[0013] Preferably, the weight value of the ranking factor includes a linear weight value of the ranking factor and a cross non-linear weight value of the ranking factor and the first scoring function.

[0014] Preferably, the relationship between the first scoring function and the second scoring function is expressed by the following equation:

[0015]

[0016] Among them, s(w) is the strength of the ranking factor of commodity w,

[0017] c w represents the category of product w, r(q, w|u) is the first scoring function, which represents the relevance between a user u, query word q and product w, and r′(q, w|u) is the second scoring function. and are the weight values ​​of the linear term and the cross nonlinear term respectively.

[0018] Preferably, the weight value of the ranking factor is optimized according to the basic data set:

[0019] Setting an objective function on the query words of the basic data set, wherein the objective function uses the weight value of the ranking factor as a parameter;

[0020] Initializing hyperparameters of the objective function;

[0021] The parameters of the objective function are solved by minimizing the value of the objective function.

[0022] Preferably, the method further includes: correcting the hyperparameters in the objective function according to the AB experiment results, and solving the parameters of the objective function based on the corrected hyperparameters.

[0023] Preferably, the objective function is:

[0024]

[0025] Among them, LOSS is defined on the query word set Q of the basic data set, Q is the query word set, ||Q|| is the size of the query word set Q, l q is the loss corresponding to a single query word q, λ and μ are hyperparameters used to control the complexity of the model. and are the weight values ​​of the linear term and the cross nonlinear term, c w Indicates the category of product w;

[0026] Among them, l q Solve by the following equation:

[0027]

[0028] m c =LS({(l,m k ,c)})

[0029] m k,c =E q,i (r q,i -r q,i+k )

[0030] i, j represent the position of the product after sorting by the new scoring function, n g Indicates the number of products found by query word q, r i , s i , η i They are the original score, ranking factor value, and position weight of the product at position i after sorting by the new scoring function, τ c Measures the closeness of scores between two closely ranked items in the first scoring function.

[0031] ∈ is generally taken as 0.1, m c is the average rate of change of product scores to rankings, m k,c It is defined as the k-order score difference of category c, and the LS function is the least squares method, fitting the sample point set {(k,m k ,c)}, q,i in Eq,i represent the average of all the query words under category c and all the ranking positions of each query word search results, r q,i and r q,i is the product score of the i-th product and the i+k-th product under the first scoring function.

[0032] According to a second aspect of an embodiment of the present invention, a product search method is provided, characterized by comprising:

[0033] receiving a query term;

[0034] Determining the category of the query term;

[0035] Determining a scoring function according to the category of the query term; and

[0036] Product retrieval is performed according to the scoring function, wherein the scoring function is constructed according to the above-mentioned method for constructing a search model.

[0037] According to a third aspect of an embodiment of the present invention, there is provided a search model construction apparatus, comprising:

[0038] A data set construction module, used to construct a basic data set based on the product search results of the first scoring function;

[0039] A ranking function construction module, configured to construct a second scoring function based on the first scoring function and a ranking factor;

[0040] A weight value optimization module is used to optimize the weight value of the ranking factor in the second scoring function according to the basic data set.

[0041] Preferably, the ranking factor is a parameter representing one or more commodity attributes.

[0042] Preferably, the weight value of the ranking factor is category-specific.

[0043] According to a fourth aspect of an embodiment of the present invention, there is provided a product search device, comprising:

[0044] A query word receiving module, configured to receive a query word;

[0045] A determination module, configured to determine the category of the query term and determine a scoring function based on the category of the query term;

[0046] The product search module performs product search according to the scoring function, wherein the scoring function is constructed according to the above-mentioned method for constructing the search model.

[0047] According to a fifth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed, the method for constructing a search model is implemented.

[0048] According to a sixth aspect of an embodiment of the present invention, there is provided a product search device, comprising:

[0049] Memory, for storing computer instructions;

[0050] A processor is coupled to the memory, and is configured to execute the method for constructing a search model based on computer instructions stored in the memory.

[0051] The embodiments of the present invention have the following advantages or beneficial effects: A second scoring function is constructed based on the original scoring function and ranking factors, and weight values ​​are optimized according to the basic data set, eliminating the need to manually configure different correction item parameters for different categories, thereby improving the efficiency of building the search model. Furthermore, weight values ​​are optimized for each category, improving optimization efficiency.

[0052] The preferred embodiment of the present invention has the following advantages or beneficial effects: since the weight value is category-specific, multiple ranking factors can use the same weight value, and the existing weight value can be reused for the new ranking factor, thereby eliminating the need to re-optimize and adjust the weight value, saving system resources.

[0053] The preferred embodiment of the present invention has the following advantages or beneficial effects: in the second scoring function, the weight values ​​of the linear terms and the weight values ​​of the cross nonlinear terms are set, thereby better balancing the influence of the ranking factors on the original search results. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The above and other objects, features and advantages of the present invention will become more apparent through the description of the embodiments of the present invention with reference to the following drawings, in which:

[0055] Figure 1 is a flowchart of a method for constructing a search model according to an embodiment of the present invention;

[0056] Figure 2 yes Figure 1 An optional embodiment of step S103;

[0057] Figure 3 is a flowchart of a commodity search method according to an embodiment of the present invention;

[0058] Figure 4 is a structural diagram of an apparatus for constructing a search model according to an embodiment of the present invention;

[0059] Figure 5 is a structural diagram of a commodity search device according to an embodiment of the present invention;

[0060] Figure 6 4 is a structural diagram of an apparatus for constructing a search model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0061] The present invention is described below based on the following embodiments, but the present invention is not limited to these embodiments. In the detailed description of the present invention below, certain specific details are described in detail. Those skilled in the art can fully understand the present invention without describing these details. To avoid obscuring the essence of the present invention, well-known methods, processes, and procedures are not described in detail. In addition, the drawings are not necessarily drawn to scale.

[0062] Figure 1 FIG. 1 is a flow chart of a method for constructing a search model according to an embodiment of the present invention, which specifically includes the following steps.

[0063] In step S101, a basic data set is constructed using a product search result set of a first scoring function.

[0064] In step S102 , a second scoring function is constructed based on the first scoring function and the ranking factor.

[0065] In step S103, the classification category optimizes the weight value of the ranking factor according to the basic data set.

[0066] In this embodiment, the first scoring function is the original scoring function. A basic data set is constructed based on the product search result set of the original scoring function. The basic data set includes a lot of information, such as query words, the category to which the query words belong, the product list obtained based on the query words, and the product score value obtained based on the scoring function. When the business changes and it is necessary to add a certain ranking factor or enhance the influence of a certain ranking factor, a new scoring function (second scoring function) is constructed based on the original scoring function and the ranking factor. Ranking factors can be, for example, a series of product attributes such as brand, category, manufacturer, whether to transfer to fund products, whether there is negative news, etc. In the second scoring function, the weight value of the ranking factor is very critical. If the weight value is too small, it may cause the ranking to have too little impact on the ranking of the search results. If the weight value is too large, it may cause the ranking factor to destroy the relevance between the search results and the query words. In this embodiment, the classification is continuously optimized and the weight value is adjusted through the basic data set. For example, in the second scoring function, the initial value of the ranking factor's weight is set. The category then substitutes the basic dataset into the second scoring function for a search test, analyzes the resulting product list, and adjusts the weight accordingly. A search test is then performed based on the current weight, and the weight value is further adjusted based on the test results. This operation is repeated several times until the retrieved product list meets the business requirements, at which point optimization of the ranking factor's weight ceases. Because query terms fall into different categories, the basic datasets obtained from query terms in different categories have category characteristics. Therefore, the category optimizes the weights based on the basic dataset, and the resulting weights are also category-specific.

[0067] The embodiment of the present invention quickly constructs a second scoring function based on the ranking factor and optimizes the weight value according to the basic data set, without manually configuring different correction item parameters for different categories, thereby improving the construction efficiency of the search model.

[0068] In a preferred embodiment, multiple ranking factors can use the same weight value. For new ranking factors, existing weight values ​​can be reused without re-optimizing or adjusting the weight values, thereby enabling rapid construction of the search model. For example, based on ranking factor A, such as brand, a weight value (Weight) is obtained. When ranking factor B, such as category, needs to be added, Weight can be used to complete the construction of the search model, i.e., the scoring function.

[0069] The embodiment of the present invention will be described in detail below in conjunction with the basic data set and the corresponding equations set for the first scoring function and the second scoring function.

[0070] For a given batch of query words Q = {q}, the list of products {w q,i} and its corresponding fractional value {r q,i}, i = 1, 2, .., n q , which constitutes the basic data set. q,i The product ranked at position i in the search results for query word q is scored as r. qi , n q The number of products in the search results for the query term q. The significance of preparing a basic dataset is to provide data for model parameter optimization by adding correction terms to the scoring function, avoiding the tedious process of manually configuring parameters for each category.

[0071] Assume that the ranking factor is s(w), which reflects the strength of the ranking factors of different products. For example, the ranking factor of a product brand can be defined as the greater the brand awareness, the larger the corresponding ranking factor value. Assume that the original scoring function r(q, w|u) (i.e., the first scoring function) reflects the relevance between the query term q and the product w for a certain user u. Generally speaking, it can be considered that the original scoring function basically describes the relevance between the query term and the product for a given user. Therefore, the revised new scoring function (i.e., the second scoring function) can be defined as:

[0072]

[0073] In formula (1), r′(q, w|u) is the modified scoring function, c w Indicates the category of product w, and are the weights of the linear term and the cross nonlinear term respectively. If and If the value of is too small, the revised ranking will have little impact on the original ranking results and may not reflect the influence of the ranking factor; on the contrary, if it is too large, it may destroy the correlation between the products and query terms in the original ranking results. Considering the differences between the query terms and product categories, the weight and It has category specificity. If suitable parameters can be found for all categories, then formula (1) can achieve the purpose of integrating ranking factors into the existing scoring function model. Considering the product search scenario, there are generally thousands to tens of thousands of categories. If we only rely on AB experiments to configure different weights for each category, the workload is very large and the efficiency is not high. Therefore, it is necessary to use the collected basic data set to define the objective function; by minimizing the objective function, the parameters can be automatically solved.

[0074] The objective function defined to determine the parameters in the revised new scoring function is as follows

[0075]

[0076] Formula (2) is the objective function, also known as the loss function, which is defined on the query word set Q of the basic dataset. ||Q|| is the size of the query word set Q, l q is the loss corresponding to a single query word q, C w represents the category of product w, λ, μ are hyperparameters used to control the complexity of the model, play a regularization role on the model, and balance the interaction between the ranking factor and the original scoring function. When the hyperparameters λ, μ are large, the parameters When the overall LOSS ratio is high, minimizing the LOSS tendency makes the parameter becomes smaller, reducing the correction strength of the new scoring function; conversely, increasing the correction strength of the scoring function. On the other hand, the correction term of the scoring function is positively correlated with the ranking factor. Different values ​​of the λ and μ parameters in the objective function LOSS correspond to different LOSS. In the process of optimizing λ and μ, a new scoring ranking result will be generated. In formula (3), i and j represent the position of the product after the new ranking scoring result is sorted, and n q Indicates the number of products found by query word q, r i , S i ,η, are the original score, ranking factor value, and position weight of the product at the ranking position i in the new ranking and scoring result set, i is the independent variable. When i=j, we get r j , s j , η j , are the original score, ranking factor value, and position weight of the product at the current ranking position i. Formula (4) shows that the position weight decreases as the ranking decreases. Formula (3) reflects the situation where the scores are close in the original scoring function. When the ranking factor value is opposite to the new ranking result, the loss function is large. In other words, the objective function tends to sort the product pairs with similar scores in the original scoring function in descending order according to the ranking factor value. In formula (3), τ c Measures the degree of closeness in the scores of two closely ranked items in the original scoring function, defined as:

[0077]

[0078] In formula (5), ∈ is generally set to 0.1, m cis the average rate of change of product scores to rankings. Based on the basic data set, the statistical correlation between product scores and rankings in the basic data set is analyzed to obtain the calculation formula for the average rate of change. From a business perspective, the purpose of modifying the scoring function is to improve the search ranking of certain products. Therefore, it is necessary to quantitatively calculate the statistical correlation between scores and rankings for all product / query term categories. For all query terms q belonging to category c in the basic data set, (c q =c), define the k-order score difference of category c:

[0079] m k,c =E q,i (r q,i -r q,i+k ) (6)

[0080] Take in formula (6). Find the average of the k-order differences of a category c under the original scoring function (first scoring function). Average the k-order differences of the score sequence of all query words q belonging to category c and each query word under the original scoring function. The k-order difference of the score of the search result of the original scoring function refers to the difference between the first and the first + kth place, the difference between the second and the second + kth place, the difference between the third and the third + kth place, and so on. Find the average of these k-order differences.

[0081] Using the least squares method, we can define the average rate of change of product scores to rankings in category c:

[0082] m c =LS({(l,mm k ,c)}) (7)

[0083] In formula (7), LS function is the least square method, k is the horizontal coordinate, m is the l,c As the vertical coordinate, the least square method is used to get the fitting straight line, the slope of which is m c . Generally, k is set to 1 to 5. On average, m c It reflects the score difference corresponding to an average ranking difference in the search results for category c when the original scoring function (the first scoring function) is used.

[0084] In the objective function formula (2), when the hyperparameters λ and μ are given, there are only two parameters to be determined for each category: and Assuming there are N query terms, there are a total of 2N parameters. Minimizing the objective function LOSS can solve for all 2N parameters. Because the objective function for each category is relatively independent, it can be optimized and solved independently. By dividing the basic dataset according to the query terms, minimizing the corresponding objective function, and using a grid search or random search method, the weight values ​​for all categories can be solved.

[0085] For the hyperparameters λ and μ in the objective function formula (4), if the hyperparameters are too large, the weight value and If the value is too small, the ranking factor cannot be effectively integrated; on the contrary, if the value is too small, it is easy to make the weight value and If it is too large, the modification of the scoring function will be large, and the risk of destroying the relevance of the original scoring and ranking results will also increase. Since there are only two undetermined hyperparameters here, they can be selected based on the business indicators of the AB experiment. The specific process is as follows Figure 2 shown.

[0086] Figure 2 yes Figure 1 An optional embodiment of step S103 specifically includes the following steps.

[0087] In step S1031, the hyperparameters of the objective function are set.

[0088] In step S1032 , the parameters of the objective function are solved and optimized based on the basic data set.

[0089] In step S1033, AB experiment is performed.

[0090] In step S1034, it is determined whether the business requirements are met. If the business requirements are met, the optimization of the weight value is stopped and the process ends. If the business requirements are not met, the process jumps to step S1031 and continues.

[0091] Specifically, first set the hyperparameters in the objective function, then solve and optimize the objective function parameters based on the basic data set, and then launch the AB experiment to observe whether it meets the business requirements. If not, modify the hyperparameters of the objective function and iterate again, otherwise end.

[0092] It is understood that although corresponding equations are designed in the above embodiments, the present invention is not limited thereto and the above equations will be continuously improved and optimized in practice.

[0093] Figure 3 1 is a flowchart of a commodity search method according to an embodiment of the present invention, which specifically includes the following steps.

[0094] In step S301, a query word is received

[0095] In step S302, the category of the query word is determined

[0096] In step S303, when the category of the query term is a, the scoring function A is used to return the search results.

[0097] In step S304, when the category of the query word is b, the search results are returned using the scoring function B. Here, a and b are used to identify different query words, and A and B are used to identify different scoring functions.

[0098] In this embodiment, the categories of the search terms are distinguished, and the product list is returned based on the categories of the search terms using the second scoring function obtained in the above embodiment.

[0099] Figure 4 4 is a structural diagram of an apparatus for constructing a search model according to an embodiment of the present invention. The apparatus for constructing a search model includes a data set construction module 401, a ranking function construction module 402, and a weight value optimization module 403.

[0100] The data set construction module 401 constructs a basic data set based on the product search results of the first scoring function. The basic data set includes a variety of information, such as query terms, query term categories, a list of products retrieved based on the query terms, and product scores obtained based on the scoring function.

[0101] Ranking function construction module 402 is used to construct a second scoring function based on the first scoring function and the ranking factors. When business changes require increasing the strength of a ranking factor, a new scoring function (second scoring function) is constructed based on the original scoring function and the newly added ranking factor. Ranking factors include a series of product attributes such as brand, category, manufacturer, whether it is converted to a fund product, and whether there is negative news. In the new scoring function, appropriate weights are used for the newly added ranking factors to ensure that they have an appropriate impact on the retrieved product list.

[0102] Weight optimization module 403 is used to optimize the weights of the ranking factors in the second scoring function for each category based on the basic dataset. Different query terms have different categories, and the basic datasets obtained based on these queries are category-specific. Therefore, by optimizing the weights for each category based on the basic dataset, the resulting weights also have category-specificity.

[0103] The device for constructing a search model provided in this embodiment quickly constructs a second scoring function based on the ranking factor, optimizes the weight value according to the basic data set, and does not need to configure different correction item parameters for different categories, thereby improving the efficiency of constructing the search model.

[0104] In a further embodiment, since the weight values ​​are category-specific, multiple ranking factors can use the same weight values. There is no need to re-optimize and adjust the weight values ​​for new ranking factors, so that the search model can be constructed quickly, saving system resources.

[0105] Figure 55 is a structural diagram of a commodity search device according to an embodiment of the present invention. The commodity search device comprises: a query word receiving module 501, a judgment and determination module 502 and a commodity retrieval module 503.

[0106] The query receiving module 501 is used to receive a query. The determination module 502 is used to determine the category of the query and determine a scoring function based on the query category. The product search module 503 searches for products based on the scoring function. The scoring function used by the product search module 503 is constructed according to the above-mentioned method.

[0107] Figure 6 4 is a structural diagram of an apparatus for constructing a search model according to an embodiment of the present invention. Figure 6 The device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0108] refer to Figure 5 The apparatus includes a processor 501, a memory 502, and input / output devices 503 connected via a bus. The memory 502 includes a read-only memory (ROM) and a random access memory (RAM). Various computer instructions and data required to execute system functions are stored in the memory 502. The processor 501 reads various computer instructions from the memory 502 to execute various appropriate actions and processes. The input / output devices include input parts such as a keyboard and a mouse; output parts such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; storage parts such as a hard disk; and communication parts such as a network interface card such as a LAN card and a modem. The memory 502 also stores the following computer instructions to perform the operations specified by the apparatus of the embodiment of the present invention: constructing a basic data set using a set of product search results using a first scoring function; constructing a second scoring function based on the first scoring function and a ranking factor; and optimizing the weight value of the ranking factor according to the basic data set.

[0109] Accordingly, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed, the operations specified in the above method are implemented.

[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the possible system frameworks, functions, and operations of the systems, methods, and devices of the embodiments of the present invention. The boxes in the flowcharts and block diagrams can represent a module, a program segment, or simply a piece of code. The modules, program segments, and codes are all executable instructions for implementing the specified logical functions. It should also be noted that the executable instructions for implementing the specified logical functions can be recombined to generate new modules and program segments. Therefore, the boxes and the order of the boxes in the accompanying drawings are only used to better illustrate the processes and steps of the embodiments and should not be used as a limitation of the invention itself.

[0111] Each module or unit of the system can be implemented by hardware, firmware or software. Software includes, for example, coding programs formed using various programming languages ​​such as JAVA, C / C++ / C#, SQL, etc. Although the steps and the order of the steps of the embodiment of the present invention are given in the method and the method legend, the executable instructions for implementing the prescribed logical functions of the steps can be recombined to generate new steps. The order of the steps should not be limited to the order of the steps in the method and the method legend, and can be adjusted at any time according to the needs of the function. For example, some of the steps can be executed in parallel or in reverse order.

[0112] The system and method according to the present invention can be deployed on a single or multiple servers. For example, different modules can be deployed on different servers to form dedicated servers. Alternatively, the same functional units, modules, or systems can be deployed in a distributed manner across multiple servers to reduce load. Such servers include, but are not limited to, multiple PCs, PC servers, blade servers, supercomputers, etc., connected to the same local area network or via the Internet.

[0113] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A method for constructing a search model, characterized in that: include: The basic data set is constructed by using the product search result set of the first scoring function; Constructing a second scoring function based on the first scoring function and the ranking factor; as well as The classification optimizes the weight value of the ranking factor according to the basic data set; The weight value of the ranking factor is optimized according to the basic data set: Setting an objective function of the second scoring function on the query words of the basic data set, wherein the objective function uses the weight value of the ranking factor as a parameter; Initializing hyperparameters of the objective function; By minimizing the value of the objective function, the parameters of the objective function are solved. The objective function of the second scoring function is: , Among them, LOSS is defined on the query word set Q of the basic data set, where Q is the query word set. is the size of the query word set, is the loss corresponding to a single query word q, is a hyperparameter used to control the complexity of the model. and are the weight values ​​of the linear term and the cross nonlinear term of the sorting factor, respectively, c w Indicates the category of product w; in, Solve by the following equation: , , , , , i, j represent the position of the product after being sorted by the new scoring function, n q Indicates the number of products found by query word q. They are the original score, ranking factor value, and position weight of the product at position i after being sorted by the new scoring function. They are the original score, ranking factor value, and position weight of the product at position j after being sorted by the new scoring function. Measures the closeness of scores between two items with similar rankings in the first scoring function. Take the value 0.1, m c is the average change rate of product score to ranking, m k,c It is defined as the k-order score difference of category c, and the LS function is the least squares method. To fit the sample point set, E q,i The q and i in the formula represent the average of all the query words and the ranking positions of each query word search results under category c, and r q,i and r q,i+k are the scores of the i-th product and the i+k-th product under the first scoring function.

2. The method according to claim 1, characterized in that The weight value of the ranking factor is category-specific.

3. The method according to claim 1, characterized in that The ranking factor is a parameter that characterizes one or more commodity attributes.

4. The method according to claim 1, characterized in that The relationship between the first scoring function and the second scoring function is expressed by the following equation: , Among them, s(w) is the strength of the ranking factor of commodity w, c w Indicates the category of product w, is the first scoring function, which represents the relevance between a user u, a query word q and a product w. is the second scoring function, and are the weight values ​​of the linear term and the cross nonlinear term respectively.

5. The method according to claim 1, characterized in that Also includes: The hyperparameters in the objective function are modified according to the AB experiment results, and the parameters of the objective function are solved based on the modified hyperparameters.

6. A commodity search method, characterized in that: include: receiving a query term; Determining the category of the query term; Determining a scoring function according to the category of the query term; as well as The product search is performed according to the scoring function, wherein the scoring function is a second scoring function constructed according to the method according to any one of claims 1 to 5.

7. A search model construction device, characterized in that: include: A data set construction module, used to construct a basic data set based on the product search results of the first scoring function; A ranking function construction module, used to construct a second scoring function based on the first scoring function and the ranking factor; A weight value optimization module is used to optimize the weight value of the ranking factor in the second scoring function according to the basic data set, and the weight value optimization module includes: Setting an objective function of the second scoring function on the query words of the basic data set, wherein the objective function uses the weight value of the ranking factor as a parameter; Initializing hyperparameters of the objective function; By minimizing the value of the objective function, the parameters of the objective function are solved. The objective function of the second scoring function is: , Among them, LOSS is defined on the query word set Q of the basic data set, where Q is the query word set. is the size of the query word set, is the loss corresponding to a single query word q, is a hyperparameter used to control the complexity of the model. and are the weight values ​​of the linear term and the cross nonlinear term of the sorting factor, respectively, c w Indicates the category of product w; in, Solve by the following equation: , , , , , i, j represent the position of the product after being sorted by the new scoring function, n q Indicates the number of products found by the query word q. They are the original score, ranking factor value, and position weight of the product at position 𝑖 after being sorted by the new scoring function. They are the original score, ranking factor value, and position weight of the product at position j after being sorted by the new scoring function. Measures the closeness of scores between two items with similar rankings in the first scoring function. Take the value 0.1, m c is the average change rate of product score to ranking, m k,c It is defined as the k-order score difference of the category ranking, and the LS function is the least squares method. To fit the sample point set, E q,i The q and i in the formula represent the average of all the query words and the ranking positions of each query word search results under category c, and r q,i and r q,i+k are the scores of the i-th product and the i+k-th product under the first scoring function.

8. The search model building device according to claim 7, characterized in that: The ranking factor is a parameter that characterizes one or more commodity attributes.

9. The search model construction device according to claim 7, characterized in that: The weight value of the ranking factor is category-specific.

10. A commodity search device, characterized in that: include: A query word receiving module, used for receiving a query word; A determination module, used to determine the category of the query word and determine a scoring function according to the category of the query word; A product search module performs product search according to the scoring function, wherein the scoring function is a second scoring function constructed according to the method according to any one of claims 1 to 5.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed, the method according to any one of claims 1 to 5 is implemented.

12. A commodity search device, characterized in that: include: Memory, for storing computer instructions; A processor is coupled to the memory, and the processor is configured to execute the method according to any one of claims 1 to 5 based on computer instructions stored in the memory.