WO2022083596A1 - 一种排序方法、装置、设备及计算机存储介质 - Google Patents

一种排序方法、装置、设备及计算机存储介质 Download PDF

Info

Publication number
WO2022083596A1
WO2022083596A1 PCT/CN2021/124783 CN2021124783W WO2022083596A1 WO 2022083596 A1 WO2022083596 A1 WO 2022083596A1 CN 2021124783 W CN2021124783 W CN 2021124783W WO 2022083596 A1 WO2022083596 A1 WO 2022083596A1
Authority
WO
WIPO (PCT)
Prior art keywords
sorting
commodity
preset
sorted
model
Prior art date
Application number
PCT/CN2021/124783
Other languages
English (en)
French (fr)
Inventor
王胜利
朱鉴
张晓敏
李文杰
Original Assignee
北京沃东天骏信息技术有限公司
北京京东世纪贸易有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京沃东天骏信息技术有限公司, 北京京东世纪贸易有限公司 filed Critical 北京沃东天骏信息技术有限公司
Priority to EP21882012.4A priority Critical patent/EP4207035A1/en
Priority to US18/249,458 priority patent/US20240004888A1/en
Publication of WO2022083596A1 publication Critical patent/WO2022083596A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24578Query processing with adaptation to user needs using ranking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • G06Q30/0255Targeted advertisements based on user history
    • G06Q30/0256User search
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0623Item investigation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0641Shopping interfaces
    • G06Q30/0643Graphical representation of items or shoppers

Definitions

  • the present application relates to the technical field of commodity search, and in particular, to a sorting method, apparatus, device, and computer storage medium.
  • Sorting is a core task in the search system. Specifically, in the commodity search scenario, the user enters a commodity-related keyword to query, and then obtains the commodity list returned by the search system. A product decides whether to place an order or not.
  • the sorting link of the product list usually includes a recall link, a rough sorting link (optional), a fine sorting link and a re-sorting link.
  • the fine sorting process usually models the products and users, and scores the potential purchase intention of the recalled product list according to the user's interests. Find the ideal product quickly and accurately, and ultimately improve core business metrics.
  • the user browses the product list after querying, and the user makes a decision based on the products displayed in the window and the products displayed by sliding pages. Influence. That is to say, the product position in the product list itself will affect the user's decision, and the user's decision will affect the next product position. In this way, the obtained sorting results are always negatively affected by location bias, so that the sorting results are not close enough to the needs of users.
  • the embodiments of the present application provide a sorting method, apparatus, device, and computer storage medium, which can reduce the negative impact of location bias on sorting results, and make the sorting results of commodities more in line with user needs.
  • an embodiment of the present application provides a sorting method, the method comprising:
  • the first sorting result is obtained by finely sorting at least one commodity to be sorted in the preset commodity list based on the query requirement;
  • a feature value set of each commodity to be sorted in the preset commodity list is determined; wherein, the feature value set includes at least a target position feature value, and the target position feature value is based on the obtained by calculating the sorting position and the preset display position of the commodities to be sorted in the first sorting result;
  • the preset commodity list is reordered by using a preset rearrangement model to obtain a second sorting result.
  • an embodiment of the present application provides a sorting apparatus, the sorting apparatus includes an acquisition unit, a feature unit, and a sorting unit; wherein,
  • the obtaining unit is configured to determine the first sorting result based on the query requirement of the user; wherein, the first sorting result is obtained by finely sorting at least one commodity to be sorted in the preset commodity list based on the query requirement;
  • the feature unit is configured to determine, based on the first sorting result, a feature value set of each commodity to be sorted in the preset commodity list; wherein the feature value set at least includes a target location feature value, and the The target position feature value is calculated based on the sorting position of the commodities to be sorted in the first sorting result and the preset display position;
  • the sorting unit is configured to reorder the preset commodity list by using a preset rearrangement model based on the feature value set of each commodity to be sorted in the preset commodity list, to obtain a second sorting result.
  • an embodiment of the present application provides a sorting device, where the sorting device includes a memory and a processor; wherein,
  • the memory for storing executable instructions capable of being executed on the processor
  • the processor is configured to execute the steps of the method according to the first aspect when running the executable instructions.
  • an embodiment of the present application provides a computer storage medium, where a sorting program is stored in the computer storage medium, and when the sorting program is executed by at least one processor, the steps of the method described in the first aspect are implemented.
  • Embodiments of the present application provide a sorting method, apparatus, device, and computer storage medium.
  • the method includes: determining a first sorting result based on a user's query requirement; wherein, the first sorting result is based on the query requirement. Obtained by performing fine sorting on at least one commodity to be sorted in the preset commodity list; based on the first sorting result, a set of characteristic values of each commodity to be sorted in the preset commodity list is determined; wherein, in the set of characteristic values At least the target position feature value is included, and the target position feature value is calculated based on the sorting position and the preset display position of the commodities to be sorted in the first sorting result; based on each item in the preset commodity list A set of feature values of the commodities to be sorted, and the preset list of commodities is reordered by using a preset rearrangement model to obtain a second sorting result.
  • the preset rearrangement model is used to reorder the commodities more precisely, so that the preset rearrangement model can sort the commodities in a global perspective, so that the final sorting result is closer to the user's browsing behavior.
  • the fine sorting process can be fully considered in the reordering process.
  • it also alleviates the location bias brought by the placement and the negative impact of the location bias on the sorting result, making the sorting result fairer, so that the final sorting result is more in line with user needs and improves user satisfaction.
  • FIG. 1 is a schematic flowchart of a sorting method provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of another sorting method provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another sorting method provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of steps for calculating a target position feature value provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a sorting apparatus provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of another sorting apparatus provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a specific hardware structure of a sorting device provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of the composition and structure of a commodity search system according to an embodiment of the present application.
  • an embodiment of the present application provides a sorting method.
  • the basic idea of the method is to determine a first sorting result based on a user's query requirement; wherein, the first sorting result is based on the query requirement. Obtained by performing fine sorting on at least one commodity to be sorted in the commodity list; based on the first sorting result, a set of characteristic values of each commodity to be sorted in the preset commodity list is determined; wherein the set of characteristic values at least includes The target position feature value, the target position feature value is calculated based on the sorting position and the preset display position of the commodities to be sorted in the first sorting result; based on each item to be sorted in the preset commodity list Sort the feature value set of the commodities, and use the preset rearrangement model to re-sort the preset commodity list to obtain a second sorting result.
  • the preset rearrangement model is used to reorder the commodities more precisely, so that the preset rearrangement model can sort the commodities in a global perspective, so that the final sorting result is closer to the user's browsing behavior.
  • the fine sorting process can be fully considered in the reordering process.
  • it also alleviates the location bias brought by the placement and the negative impact of the location bias on the sorting results, making the sorting results fairer, so that the final sorting results are more in line with user needs and improve user satisfaction.
  • FIG. 1 shows a schematic flowchart of a sorting method provided by an embodiment of the present application. As shown in FIG. 1 , the method may include:
  • S101 Determine a first sorting result based on a user's query requirement.
  • the first sorting result is obtained by fine sorting at least one commodity to be sorted in the preset commodity list based on the query requirement.
  • the entire sorting chain can be divided into recall, rough sorting, fine sorting and re-sorting.
  • the recall link refers to quickly recalling a small number of potentially interesting items from the massive item library according to some characteristics of the user, and then handing them over to the sorting link; The results are roughly sorted, and under the premise of ensuring a certain accuracy, the number of items to be transmitted in the future is further reduced.
  • the rough sorting process is not necessary and can be cancelled in simple scenarios; the fine sorting process refers to the use of a large number of product features and complex
  • the model is used to personalize the sorting of items as accurately as possible; the reordering process refers to the process of further sorting the head sequence in the fine sorting result.
  • the sorting method provided by the embodiment of the present application is mainly applied in the reordering link, that is, the system has completed the preliminary sorting of the commodities, that is, the system has obtained the first sorting result according to the user's query requirement.
  • the commodities referred to in the embodiments of the present application not only include conventional commodities on e-commerce websites, but can also be applied in various search fields, such as video search, news search, or advertisement push and other fields.
  • the query requirement is used to indicate the expectation of the target product entered by the user on the product search page.
  • the user enters the requirements for the target commodity through the commodity search page, such as commodity name, commodity type, commodity material, price range, etc.
  • a session is generated. Simply put, every time the search button is clicked, a query is performed.
  • the system will collect the query words entered by the user on the product search page, and perform natural language analysis to obtain the user's query requirements.
  • the query requirement may only refer to the requirement input by the user, or it may be processed by the system according to the group characteristics of the user and the requirement input by the user. For example, if the user inputs a certain keyword, the query requirement may be generated only according to the keyword, or the query requirement may be further generated according to the user's identity characteristics and keywords.
  • the first sorting result is obtained by sorting at least one commodity to be sorted in the preset commodity list based on the query requirement.
  • the preset commodity list includes commodities to be sorted.
  • the preset commodity list may be all commodities in the e-commerce website system, or may be some commodities filtered after recall, rough sorting or fine sorting. That is to say, the first sorting result may be obtained according to a preset fine sorting model. Therefore, in some embodiments, the determining the first sorting result based on the user's query requirement may include:
  • the initial commodity sequence is intercepted based on a preset quantity to obtain the preset commodity list.
  • the preset fine-arrangement model is used to sort the preset commodity list to obtain the refined initial commodity sequence.
  • the preset fine-arrangement model may include various models, such as Deep Interest Network (DIN), Deep Neural Networks (DNN) model, and wide&Deep model.
  • the commodity search system first receives the user's query requirements, such as query keywords, price ranges, etc., and based on the user's query requirements, a preset refined sorting model is used to sort multiple items in the preset commodity list. Commodities are calculated and sorted to obtain an initial sequence of commodities.
  • the processing volume may be too large. Therefore, some commodities at the head of the initial commodity sequence can be queued for more refined rearrangement.
  • Inheritance intercept the initial commodity sequence according to the preset quantity to obtain the preset commodity list.
  • the preset number may be determined according to a usage scenario, which is not limited in this embodiment of the present application.
  • the initial commodity sequence can also be determined as a preset commodity list without considering the processing amount.
  • a feature value set of each commodity to be sorted is obtained.
  • features such as material, price, purchase quantity, etc. These features can be used as the feature value for scoring the item in the re-sorting process.
  • the feature value set further includes target location feature values of the commodities to be sorted, and the target location feature values are calculated based on the sorting positions and preset display positions of the commodities to be sorted in the first sorting result. .
  • the position of the commodity to be sorted in the sequence of the commodity to be sorted is used to make full use of the sorting result of the previous module, and the preset display position is an assumed display position, which can reduce the position bias caused by the final display position.
  • the embodiment of the present application co-codes two positions, thereby introducing the target position feature value.
  • the preset placement is used as the assumed placement of the product, so that the placement of all products is the same, and there will be no bias due to placement. ; Then, using the preset display position and the sorting position in the first sorting result to synthesize the feature value of the target position, not only can realize the correction of the displayed position, but also consider the position relationship in the first sorting result, and strengthen the personalized sorting The effect of sorting results is closer to the user's browsing behavior.
  • the feature value of the target position can be calculated by pooling.
  • the method may further include:
  • the determining the target location feature value of each commodity to be sorted may specifically include:
  • the first position code value of each commodity to be sorted is determined through a first preset lookup table
  • the second preset code value of each item to be sorted is determined through a second preset lookup table
  • the first position code value of each item to be sorted and the second preset code value of each item to be sorted are pooled to obtain the target position feature value of each item to be sorted.
  • the first preset lookup table and the second preset lookup table are position-coding comparison tables using a certain position encoding method, that is, according to the sorting position of the first sorting result, the first preset lookup table can be The first position code value corresponding to the position is determined in the first position; according to the preset display position, the second position code value corresponding to the position can be found in the second preset lookup table.
  • the specific location encoding method may be flexibly selected by using a scenario, which is not specifically limited in this embodiment of the present application.
  • the random learnable vector encoding method is to randomly initialize a vector with the same dimension as the input layer, set the parameters to the learnable state, and the gradient of the model can be returned to the position encoding layer, that is, the position in the random learnable vector encoding method.
  • the coding relationship is learned and can be closer to the actual location.
  • the preset placement positions are encoded into another vector in the same way, and fused with the ranking positions in the first ranking result to form the final target position feature value.
  • the embodiment of the present application incorporates the sorting position and the preset display position in the first preset lookup table to jointly construct the feature value of the target position, thereby improving the accuracy of the sorting result. In this way, comprehensive location information is included in the feature value set of each commodity to be sorted, so that the subsequent reordering results are closer to actual needs.
  • S103 Based on the feature value set of each commodity to be sorted in the preset commodity list, use a preset rearrangement model to rearrange the preset commodity list to obtain a second sorting result.
  • the preset rearrangement model refers to a model obtained by training based on historical data and capable of indicating the degree of conformity between user requirements and commodities. That is to say, according to the query demand and the feature value set of each item to be sorted, the preset rearrangement model can calculate the degree to which the item to be sorted meets the user's needs, and then determine the final position of the item, thereby obtaining the second ranking The result is the reordered item sequence.
  • the preset rearrangement model can also be updated according to the time axis.
  • the preset rearrangement model is generally obtained by training in the offline phase.
  • the trained preset rearrangement model is directly used for calculation, so that the final ranking result can be quickly determined according to the user's query requirements, and then displayed to the user.
  • the preset reordering model is used to reorder the preset commodity list to obtain a second ranking
  • the preset reordering model is used to reorder the preset commodity list to obtain a second ranking
  • a preset rearrangement model is used to calculate the score of each commodity to be sorted
  • the preset rearrangement model can calculate the score of the to-be-sorted product from the feature value set of the to-be-sorted product.
  • the essence of the score is the probability value of the user accessing the to-be-sorted product. Therefore, the higher the score of the item to be sorted, the higher the possibility of the user accessing the item is considered, that is, the higher the degree of compliance of the item with the query requirement. Then, according to the score, the items to be sorted are re-sorted to obtain the second sorting result.
  • calculating the score of each item to be sorted by using a preset rearrangement model according to the feature value set of each item to be sorted in the preset item list may specifically include:
  • the input of the preset rearrangement model includes two aspects. On the one hand, it is the query feature corresponding to each query (ie, the query demand feature value vector). This part of the feature mainly reflects the user's expectation for the target product. Including the user's own user group characteristics; on the other hand, the characteristics of the commodity to be selected (ie commodity feature value vector), this part of the characteristics mainly reflects the multiple characteristics of each of the multiple refined products.
  • the query feature value vector is determined, and then for each feature value set of the product to be sorted, the product feature value vector is determined, and the two vectors are spliced together to obtain the rearrangement input vector, By inputting the vector into the preset rearrangement model, the score of each item to be sorted can be calculated.
  • the query product After obtaining the second sorting result, the query product can be displayed to the user. Therefore, in some embodiments, after reordering the preset commodity list by using the preset reordering model to obtain a second sorting result, the method further includes:
  • the second sorting result is obtained by further rearranging according to the first sorting result, which is closer to the user's needs, therefore, based on the second sorting result, the product is recommended to the user to improve the user's purchasing behavior.
  • the second sorting result may be a re-sorting result of a small number of commodities, so other sorting results of the previous sorting link can be spliced together for recommendation when the commodities are recommended.
  • the rearranged commodity sequence can be obtained through the preset rearranging model, so that the sorting result is more in line with the user's requirement.
  • An embodiment of the present application provides a sorting method, and the method may include: determining a first sorting result based on a user's query requirement; wherein the first sorting result is based on the query requirement for at least one item in a preset commodity list
  • the products to be sorted are obtained by fine sorting; based on the first sorting result, a set of feature values of each product to be sorted in the preset product list is determined; wherein, the set of feature values at least includes the feature value of the target location,
  • the feature value of the target position is calculated based on the sorting position of the commodities to be sorted in the first sorting result and the preset display position; based on the feature value of each commodity to be sorted in the preset commodity list collection, and using a preset rearrangement model to reorder the preset commodity list to obtain a second sorting result.
  • the preset rearrangement model is used to reorder the commodities more precisely, so that the preset rearrangement model can sort the commodities in a global perspective, so that the final sorting result is closer to the user's browsing behavior.
  • the fine sorting process can be fully considered in the reordering process.
  • it also alleviates the location bias brought by the placement and the negative impact of the location bias on the sorting results, making the sorting results fairer, so that the final sorting results are more in line with user needs and improve user satisfaction.
  • FIG. 2 it shows a schematic flowchart of another sorting method provided by the embodiment of the present application. As shown in FIG. 2 , the method may further include:
  • S201 Acquire multiple sets of historical query data.
  • the preset rearrangement model requires a large amount of search data for training.
  • the preset rearrangement model can be trained according to multiple sets of historical query data, wherein each set of historical query data mainly includes: historical query requirements, historical commodity collections, and commodity access results.
  • S202 Build a rearrangement model, perform model training on the rearrangement model according to the multiple sets of historical query data, and determine the rearrangement model obtained after training as the preset rearrangement model.
  • the rearrangement model can include a variety of sorting models, one of which can be the Listwise sorting model.
  • the Listwise sorting model can use the entire search result under the same query as a training instance, and at the same time, all items are scored and analyzed. sort.
  • the construction of the rearrangement model may refer to the prior art, which is not limited in the embodiment of the present application.
  • Each group of historical query data (ie, each query) is equivalent to a training instance, and a preset rearrangement model can be obtained by training the constructed rearrangement model according to the acquired multiple groups of historical query data.
  • a preset rearrangement model can be obtained by training the constructed rearrangement model according to the acquired multiple groups of historical query data.
  • the historical query data includes historical query requirements, historical commodity sets and commodity access results; correspondingly, in some embodiments, the rearrangement model is modeled according to the multiple sets of historical query data
  • the rearrangement model obtained after training is determined as the preset rearrangement model, which may specifically include:
  • Multiple sets of historical input data are generated based on historical query requirements and historical commodity sets in the multiple sets of historical query data; wherein the historical input data at least include the target location feature value of each historical commodity in the historical commodity set ;
  • the rearrangement model obtained after training is determined as the preset rearrangement model.
  • a set of historical query data refers to one session data, and specifically, for each session data, it includes at least historical query requirements, historical commodity collections, and commodity access results.
  • each query in the historical query data is equivalent to a piece of data, and each query includes at least historical query requirements (that is, the query requirements entered by the user), historical commodity collection (here refers to the query that is finally displayed to the user in this query) All commodities and sequence positions) and commodity access results (here refers to the final display effect, such as whether the user purchases, whether to browse, whether to bookmark, etc.).
  • historical input data can be obtained, that is, as the input of model training; according to the commodity access results, it is processed into multiple probability value sets, which are used as the output of model training, and finally the preset rearrangement model is obtained after training.
  • generating a plurality of historical input data based on historical query requirements and historical commodity sets in the plurality of historical query data may include:
  • the obtained plurality of historical input vectors are determined as the plurality of historical input data.
  • a historical query eigenvalue vector is generated according to the historical query requirements, and a historical commodity eigenvalue vector is determined according to the historical commodity set, and the historical query eigenvalue vector and The eigenvalue vectors of historical commodities are spliced to obtain the historical input vector corresponding to this query.
  • the method may further include:
  • target position feature values of the plurality of historical items are generated.
  • the original sorting position and the actual display position can be obtained.
  • the original sorting position refers to the position of the product calculated in the previous sorting link;
  • the actual display position refers to the position on the page displayed to the user. s position.
  • the fine sorting position is the original sorting position. Based on the original ranking position and the actual placement position, the target position feature value can be generated.
  • the feature value of the target position is composed of two parts, the ranking position in the first sorting result and the actual placement position, and the actual placement position refers to the position that is finally displayed to the user on the website page.
  • the target position feature value of the historical product is composed of the sorting position and the actual display position in the previous sorting result.
  • the preset display position is 1 (that is, the product list first place), which avoids positional bias.
  • the meaning and essence actually represented by these two target position feature values are actually the same.
  • the method may further include:
  • the training source data is generally read in batches, resulting in the splitting of sessions at the data boundaries of different batches, thus disrupting the data distribution;
  • the aggregation operation in the training phase is time-consuming, and performing a large number of aggregation operations in each experiment will affect the model iteration efficiency and waste valuable computing resources. Therefore, the embodiment of the present application chooses to complete the aggregation in the stage of offline data preparation, and generates session data in a unified format for each session.
  • the target position feature value is obtained, which can be used as one of its commodity features, so that the preset rearrangement model obtained by training fully considers the position bias, and the online search part gives more accurate sorting results.
  • the first one is to use the self-attention mechanism to extract features in the commodity sequence after a certain link of the sorting link, such as after the refined sorting, and at the same time use the previous sorting module to score the position generated by the sorting, and to evaluate the position of the commodity sequence. position to encode.
  • a shallow multilayer perceptron is used to score the items in the sequence to achieve refined reordering.
  • the second is to solve the problem of data deviation.
  • the display position is used as the basic feature to input into the model. After the shallow perceptron transformation, the probability corresponding to the display position is obtained and added to the original connection function of the model, which is equivalent to introducing bias in the training phase. information.
  • placement features are normalized to a uniform location to remove location bias.
  • the product position generated by the previous sorting module in the sorting chain is used as the position code, and the problem of position bias is not considered.
  • the problem of positional bias will be further magnified, because when calculating the self-attention score, the positional codes of any two items in the sequence will be involved in the calculation, and the model can see the order and positional deviation of the entire sequence. will have a negative impact on the model as a whole.
  • the display position is used as an input feature, and the display position is predicted at the same time, and the way of informing the model of deviation information is also flawed.
  • the final position of the item in the sequence will be affected by the context. Therefore, to solve the positional deviation, the single-point position cannot be evaluated in isolation, and it needs to be considered from a global perspective.
  • the embodiments of the present application there are two purposes of the embodiments of the present application.
  • One is to apply the Listwise model to fine-tune the reordering of commodities, so that the sorting result is closer to the user's browsing behavior, and the user experience is improved.
  • the second is to use the target position feature value in the re-ranking model, and input the display position deviation of the old system into the current model to achieve better position correction and enhance the personalized sorting effect.
  • the target position feature value is input into the Listwise model as a feature
  • the embodiments of the present application have good application prospects in the fields of search, advertisement and recommendation of various services.
  • the current sorting module is limited by the inference performance.
  • the pointwise method is used to score the products, and they are displayed to the user after sorting according to the score. This method does not consider the influence of the context of the product sequence, and does not conform to the user's browsing method. issues like lack of diversity.
  • the reordering module is added to use the Listwise model to finely sort the key positions of the head. The model can sort the products in the global perception perspective, and the sorting results are more in line with the user's browsing behavior.
  • the second is to use the feature value of the target position to eliminate the position bias, add the feature value of the target position to the model input, know the position bias when the model calculates the self-attention score, reduce the negative impact of the display position, and make the ranking result fairer. Implicitly enhance user personalization experience.
  • sorting is an important module that directly affects user experience. Users browse the sample sequences generated by the product search system and interact with the system based on their own preferences. At the same time, these systems also have a feedback loop effect similar to the commodity search system, which is affected by the location bias. The re-ranking model of the placement coding is used to improve the ranking results and promote user satisfaction.
  • the embodiment of the present application provides a sorting method, and the specific implementation of the foregoing embodiment is described in detail. It can be seen from this that, after the fine sorting, a preset rearrangement model is used to reorder the commodities more finely, thereby
  • the preset rearrangement model can sort commodities in a global perspective, so that the final sorting result is closer to the user's browsing behavior; in addition, the target position feature value is obtained by calculating according to the sorting position in the first sorting result and the preset display position , and take the feature value of the target position as one of the features of the product, which can fully consider the sorting results of the fine sorting process in the process of re-sorting, and at the same time reduce the positional bias brought by the display position and reduce the positional bias on the sorting results.
  • the negative impact makes the sorting results more fair, so that the final sorting results are more in line with user needs and improve user satisfaction.
  • FIG. 3 shows a schematic flowchart of another sorting method provided by the embodiment of the present application. As shown in FIG. 3 , the method may include:
  • S301 In the offline stage, historical data is read, and the historical data is processed to obtain model training input data and model training supervision data.
  • the complete commodity sorting process includes links such as recall, rough sorting, fine sorting, and rearranging, and the sorting method in the embodiment of the present application is applied in the rearranging link.
  • the preset rearrangement model adopted in the embodiment of the present application is the Listwise rearrangement model.
  • the Listwise rearrangement module is placed after the fine sorting, and the list of head products in the fine sorting result is sorted more finely.
  • session-formatted data based on historical data, that is, the product list returned by a user's query.
  • Each session is distinguished by a unique ID.
  • the common format for generating session data is the intuitive Pointwise format.
  • the data is stored in a table, the rows correspond to the commodities, and the columns are the query features and commodity features, respectively. During training, they are aggregated by ID. Data entry model for the same session.
  • this method has the disadvantage of inefficiency in large-scale commodity search systems, because the amount of e-commerce data is very large, and the training phase is limited by memory, and the data is generally read in batches, resulting in different batches of data.
  • this embodiment prepares data and completes the aggregation in the offline phase, and finally generates an example of the aggregation format of session data as shown in Table 1.
  • the row of the table represents a complete session, and the number of columns in each row varies, mainly including the number of query feature columns, the total number of session items, query feature columns, and commodity feature columns.
  • the query feature can indicate the user's query needs. Since the session corresponds to the query one-to-one, in order to reduce the input and output overhead, only one query feature is saved in each session. When reading the data in the training phase, it is combined with the product feature to form a complete model. training input data.
  • the supervision data of the Listwise rearrangement model can be understood as the probability value of the user's behavior towards the product in each query, such as the probability value of click, the probability value of collection, or the value of purchase probability, etc. It can also be a combination of the above probabilities. Therefore, according to the historical data, it is also necessary to process the model training supervision data.
  • S302 Use model training input data and model training supervision data to train to obtain a preset rearrangement model
  • the preset rearrangement model is obtained by using the model training input data and the model training supervision data to train.
  • the process of model training mainly includes three steps, namely feature preprocessing (equivalent to processing original data into model training input data), self-attention score calculation, and implicit transformation.
  • Feature preprocessing preprocessing the input features.
  • the specific feature preprocessing method to choose can be determined according to the usage scenario.
  • the logminmax normalization is to apply maxmin normalization after taking the log of the features.
  • the process is shown in equations (2) and (3).
  • the advantage of logminmax normalization is that the feature interval can be narrowed by taking the log to prevent the maximum feature value. If it is too large, it will affect the features with smaller values.
  • Bucketing is a common method of discretization. Continuous features are offlined into a series of 0/1 discrete features. The bucketing operation can be regarded as the discretization of numerical variables, and then one-hot encoding is performed through binarization.
  • the bucketing methods in the related art include equidistant bucketing and equal-frequency bucketing.
  • Equidistant bucketing means that the width of each bucket is fixed, that is, the value range is fixed, such as 0-9, 10-19, 20-29, etc. This is suitable for the situation where the sample distribution is relatively uniform, and avoids the occurrence of The number of buckets is very small, while the number of buckets is too large.
  • Equal frequency binning also known as quantile binning. That is, each bucket has the same number of samples, but there may be cases where samples with too large differences in value are placed in the same bucket, and the bucketing method can be flexibly selected according to the feature type.
  • n can be 8
  • the parameters of the feature vector are updated with the model training process.
  • the final model training input data is fused by splicing, as shown in equation (4).
  • Self-attention calculation The calculation of self-attention is divided into two steps. One is to calculate the attention score of each item in the sequence. First, the InputEmbedding is projected to three directions through linear transformation, which are recorded as Q, K, and V respectively. The self-attention score calculation formula is shown in formula (5). Linear transformation.
  • Implicit transformation Different from the fine-arrangement model that uses deep neural networks as feature extractors and classifiers, the preset rearrangement model uses the Transformer encoder that considers sequence information as the feature extractor, and the matrix vector obtained above is used as the feature extractor. Extracting again, the extracted intermediate vector is already a dense vector with high information density, so the output layer only needs a shallow multi-layer perceptron as a classifier.
  • a feedforward neural network with a hidden layer is used as the output layer, and finally, the softmax function is used to score all the items in the sequence, and the formula is shown in formula (6).
  • formula (7) is the calculation formula of the softmax function.
  • x is the input layer vector and f(x) represents the rearrangement model.
  • the self-attention mechanism Since the self-attention mechanism does not retain position information, it is necessary to encode the original position as a feature into a vector and input it into the encoder, add position information when calculating the self-attention score, and make full use of the sorting results of the fine sorting process.
  • Common positional encodings include sinusoidal function encoding, random learnable vector encoding and relative positional encoding. Under the curse of massive data of commodity search, the use of random learnable vector coding is the best, because the coding model can summarize the position law from the data. The way of random learnable vector encoding is to randomly initialize a vector with the same dimension as the input layer, set the parameters to the learnable state, and the gradient of the model can be returned to the position encoding layer.
  • the actual placement is encoded into another vector in the same way, and fused with the refined position encoding to form the final target position feature value.
  • the final position code There are two key points when forming the final position code. One is to make full use of the information of the precise arrangement position and the actual display position, and adopt the strategy of sum pooling for fusion. The second is to avoid the model relying too much on the actual display position, and use random mask technology to introduce randomness, that is, discard a certain proportion of sample display positions.
  • the first position of the display position is unbiased, and the masked samples are treated as unbiased samples, that is, the display position of the mask sample is uniformly replaced by 1, and the probability of random mask is 20%.
  • the final actual placement generation process is shown in Figure 4.
  • the fine-arrangement position is looked up using the fine-arrangement look-up table to obtain the fine-arrangement position code.
  • the old system placements equivalent to actual placements
  • first perform a 20% random mask operation that is, select 20% of the products, and uniformly replace their actual placements with preset placements to avoid The final result is too dependent on the actual placement; for placements that have undergone random masks, continuous vector transformation (embedding) is performed, and then placement codes are obtained according to the encoding lookup table (encoding).
  • a pooling operation sum pooling
  • the actual placement position is encoded into another vector in the same way, and fused with the refined position encoding to form the final target position feature value.
  • the preset rearrangement model can be finally trained.
  • the fine-ranking position comes from the scoring of the fine-ranking model.
  • the fine ranking model is a Pointwise structure in the prediction stage. Before reordering, the fine ranking score corresponding to each product is stored in the corresponding data structure. In the reordering stage, the product list needs to be sorted according to the fine ranking score. Since reordering is a more refined sorting process, the computational overhead is relatively large. In order not to affect the response time of the overall search system, only the top part of the list, such as the top 10 or the top 30, is selected for sorting and scoring. After sorting by the fine sorting, the items are counted from 1 according to the sequence position, and the fine sorting position is generated. When inputting the model, the refined position is used as the index of the position code, which can quickly obtain the position code of the product sequence learned in the offline phase.
  • the display position feature In the online prediction stage, the display position feature needs to be completed after all the sorting steps are completed, so the display position feature cannot be directly obtained.
  • the first position In order to eliminate the influence of the display position bias on the product search system, and at the same time, the first position is assumed to be unbiased in the offline training truncation. Therefore, the display position of all products is forcibly set to 1 in the online prediction stage, and the corresponding position code can be directly obtained at the input layer. Again, the final positional code is obtained by sum pooling.
  • This application has good application prospects in the fields of search, advertisement and recommendation of various businesses.
  • the current sorting module is limited by the inference performance.
  • the pointwise method is used to score the products, and they are displayed to the user after sorting according to the score. This method does not consider the influence of the context of the product sequence, and does not conform to the user's browsing method. issues like lack of diversity.
  • the reordering module is added to use the Listwise model to finely sort the key positions of the head. The model can sort the products in the global receptive field, and the sorting results are more in line with the user's browsing behavior.
  • the second is to use the feature value of the target location to eliminate the location bias, encode the display location into the model input, know the location bias when the model calculates the self-attention score, reduce the negative impact of the display location, and make the ranking result fairer, which can be hidden Improve the personalized experience of users.
  • sorting is an important module that directly affects user experience. Users browse the sample sequences generated by the product search system and interact with the system based on their own preferences. At the same time, these systems also have feedback loop effects similar to commodity search systems, which are affected by location bias. Applying the re-ranking model of placement coding bias correction to improve the ranking results and promote user satisfaction.
  • the embodiment of the present application provides a sorting method, and the specific implementation of the foregoing embodiment is described in detail. It can be seen from this that after the fine sorting, the products are more refined by using a preset It is assumed that the rearrangement model can sort commodities in a global perspective, so that the final sorting result is closer to the user's browsing behavior; in addition, the feature value of the target position is calculated according to the sorting position and the preset display position in the first sorting result, Taking the feature value of the target position as one of the features of the product can fully consider the sorting results of the fine sorting process in the process of re-sorting, and at the same time, it also reduces the position bias brought by the display position, and reduces the negative position bias on the sorting results. Influence, making the sorting results more fair, so that the final sorting results are more in line with user needs and improve user satisfaction.
  • FIG. 5 it shows a schematic diagram of the composition and structure of a sorting apparatus 40 provided by an embodiment of the present application.
  • the sorting apparatus 40 includes an acquisition unit 401 and a feature unit 402 and sorting unit 403; wherein,
  • the obtaining unit 401 is configured to determine a first sorting result based on a user's query requirement; wherein, the first sorting result is obtained by finely sorting at least one commodity to be sorted in a preset commodity list based on the query requirement;
  • the feature unit 402 is configured to, based on the first sorting result, determine a feature value set of each commodity to be sorted in the preset commodity list; wherein, the feature value set at least includes a target location feature value, and the target The position feature value is calculated based on the sorting position and the preset display position of the commodities to be sorted in the first sorting result;
  • the sorting unit 403 is configured to use a preset rearrangement model to reorder the preset commodity list based on the feature value set of each commodity to be sorted in the preset commodity list to obtain a second sorting result.
  • the obtaining unit 401 is specifically configured to receive the user's query requirement; based on the user's query requirement, use a preset fine-arrangement model to fine-sort a plurality of commodities to obtain an initial commodity sequence; The initial commodity sequence is intercepted by setting the number to obtain the preset commodity list.
  • the sorting device 40 further includes a position unit 404 configured to determine the target position feature value of each item to be sorted; the position unit 404 is specifically configured to be based on each item to be sorted In the sorting position in the first sorting result, the first position code value of each commodity to be sorted is determined through the first preset lookup table; based on the preset display position of each commodity to be sorted, the second preset Let the look-up table determine the second preset code value of each item to be sorted; pool the first position code value of each item to be sorted and the second preset code value of each item to be sorted. Calculation is carried out to obtain the target position feature value of each commodity to be sorted.
  • the sorting unit 403 is specifically configured to use a preset rearrangement model to calculate the score of each item to be sorted according to the feature value set of each item to be sorted in the preset item list; Sort the preset list of products according to the score of each product to be sorted to obtain the second sorting result.
  • the sorting unit 403 is further configured to determine a query feature value vector based on the query requirement; determine a product feature value vector based on the feature value set of each item to be sorted; The vector and the commodity feature value vector are spliced to obtain a rearrangement input vector; the rearrangement input vector is input into the preset rearrangement model to obtain the score of each commodity to be sorted.
  • the sorting apparatus 40 further includes a display unit 405 configured to recommend commodities to the user based on the second sorting result.
  • the sorting apparatus 40 further includes a training unit 406, configured to obtain multiple sets of historical query data; Model training is performed, and the rearrangement model obtained after the training is determined as the preset rearrangement model.
  • the historical query data includes historical query requirements, historical commodity sets, and commodity access results; the training unit 406 is further configured to generate, based on the historical query requirements and historical commodity sets in the multiple sets of historical query data Multiple sets of historical input data; wherein, the historical input data at least include the target location feature value of each historical commodity in the historical commodity set; according to the commodity access results in the multiple sets of historical query data, generate multiple access probability value set; take the multiple groups of historical input data as model input, use the multiple access probability value sets as model output, and perform model training on the rearrangement model; determine the rearrangement model obtained after training as the Describe the default rearrangement model.
  • a "unit” may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, it may also be a module, and it may also be non-modular.
  • each component in this embodiment may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software function modules.
  • the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or The part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium, and includes several instructions for making a computer device (which can be It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • this embodiment provides a computer storage medium, the computer storage medium stores a sorting program, and the sorting program implements the steps of the method in any one of the preceding embodiments when executed by at least one processor.
  • the sorting device 50 may include: a communication interface 501 , a memory 502 and a processor 503 ; the various components are coupled together through a bus device 504 .
  • the bus device 504 is used to implement the connection communication between these components.
  • the bus device 504 also includes a power bus, a control bus and a status signal bus.
  • the various buses are labeled as bus devices 504 in FIG. 7 .
  • the communication interface 501 is used for receiving and sending signals in the process of sending and receiving information with other external network elements;
  • memory 502 for storing executable instructions that can be executed on processor 503;
  • the processor 503 is configured to, when running the executable instructions, execute:
  • the first sorting result is obtained by finely sorting at least one commodity to be sorted in the preset commodity list based on the query requirement;
  • a feature value set of each commodity to be sorted in the preset commodity list is determined; wherein, the feature value set includes at least a target position feature value, and the target position feature value is based on the obtained by calculating the sorting position and the preset display position of the commodities to be sorted in the first sorting result;
  • the preset commodity list is reordered by using a preset rearrangement model to obtain a second sorting result.
  • the memory 502 in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which acts as an external cache.
  • RAM Static RAM
  • DRAM Dynamic RAM
  • SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Double Data Rate SDRAM DDRSDRAM
  • Enhanced Synchronous Dynamic Random Access Memory Enhanced SDRAM, ESDRAM
  • Synchronous link DRAM Synchronous link DRAM, SLDRAM
  • Direct Rambus RAM Direct Rambus RAM
  • the processor 503 may be an integrated circuit chip, which has signal processing capability. In the implementation process, each step of the above-mentioned method can be completed by an integrated logic circuit of hardware in the processor 503 or an instruction in the form of software.
  • the above-mentioned processor 503 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory 502, and the processor 503 reads the information in the memory 502, and completes the steps of the above method in combination with its hardware.
  • the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof.
  • the processing unit can be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSP Device, DSPD), programmable Logic Devices (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), General Purpose Processors, Controllers, Microcontrollers, Microprocessors, Others for performing the functions described herein electronic unit or a combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device Digital Signal Processing Device
  • DSPD Digital Signal Processing Device
  • PLD programmable Logic Devices
  • Field-Programmable Gate Array Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • the techniques described herein may be implemented through modules (eg, procedures, functions, etc.) that perform the functions described herein.
  • Software codes may be stored in memory and executed by a processor.
  • the memory can be implemented in the processor or external to the processor.
  • the processor 503 is further configured to execute the steps of the method in any one of the foregoing embodiments when executing the executable instructions.
  • the commodity search system 60 at least includes a sorting device 40 .
  • the commodities are rearranged more precisely by using the preset rearrangement model, so that the preset rearrangement model can sort the commodities in a global perspective. Sorting is performed so that the final sorting result is closer to the browsing behavior of the user; in addition, the feature value of the target position is calculated according to the sorting position and the preset display position in the first sorting result, and the feature value of the target position is used as one of the commodities.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Engineering & Computer Science (AREA)
  • Game Theory and Decision Science (AREA)
  • Computational Linguistics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例提供了一种排序方法、装置、设备及计算机存储介质,该方法包括:基于用户的查询需求,确定第一排序结果;基于第一排序结果,确定预设商品列表中每一待排序商品的特征值集合;其中,特征值集合中至少包括目标位置特征值,目标位置特征值是基于待排序商品在第一排序结果中的排序位置和预设展示位置进行计算得到的;基于预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对预设商品列表进行重排序,得到第二排序结果。这样,通过综合考虑第一排序结果中的排序位置和预设展示位置,并将所得到的目标位置特征值作为待排序商品的特征之一,从而能够充分考虑位置偏见对商品的影响,使得最终的排序结果更加符合用户需求。

Description

一种排序方法、装置、设备及计算机存储介质
相关申请的交叉引用
本申请要求在2020年10月20日提交中国专利局、申请号为202011126741.6、申请名称为“一种排序方法、装置、设备及计算机存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及商品搜索技术领域,尤其涉及一种排序方法、装置、设备及计算机存储介质。
背景技术
排序是搜索系统中的一项核心任务,具体来说,在商品搜索的场景中,用户输入商品相关的关键词进行查询,之后会获得搜索系统返回的商品列表,用户通过对比商品列表中的多个商品决定是否下单。对于搜索系统而言,商品列表的排序环节通常包括召回环节、粗排序环节(可选)、精排序环节和重排序环节。其中,精排序环节通常会对商品和用户进行建模,结合用户兴趣对召回的商品列表的潜在购买意向进行打分,将分数高的商品位置前置,将分数偏低的商品后移,使得用户快速准确地找到理想的商品,最终提升核心商业指标。
目前的相关方案中,用户查询之后浏览的是商品列表,用户会根据窗口中展示的商品和滑动翻页展示的商品做决策,此时,商品在商品列表中的位置会对用户的决策造成重要影响。也就是说,商品列表中的商品位置本身会影响用户的决策,而且用户的决策又会影响下一次的商品位置。这样,导致所得到的排序结果始终受到位置偏见的负面影响,使得排序结果不够贴近用户的需求。
发明内容
本申请实施例提供了一种排序方法、装置、设备及计算机存储介质,能够减轻位置偏见对排序结果的负面影响,使得商品排序结果更加符合用户需求。
本申请实施例的技术方案是这样实现的:
第一方面,本申请实施例提供了一种排序方法,该方法包括:
基于用户的查询需求,确定第一排序结果;其中,所述第一排序结果是基于所述查询需求对预设商品列表内至少一个待排序商品进行精排序得到的;
基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合;其中,所述特征值集合中至少包括目标位置特征值,所述目标位置特征值是基于所述待排序商品在所述第一排序结果中的排序位置和预设展示位置进行计算得到的;
基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果。
第二方面,本申请实施例提供了一种排序装置,该排序装置包括获取单元、特征单元和排序单元;其中,
所述获取单元,配置为基于用户的查询需求,确定第一排序结果;其中,所述第一排序结果是基于所述查询需求对预设商品列表内至少一个待排序商品进行精排序得到的;
所述特征单元,配置为基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合;其中,所述特征值集合中至少包括目标位置特征值,所述目标位置特征值是基于所述待排序商品在所述第一排序结果中的排序位置和预设展示位置进行计算得到的;
所述排序单元,配置为基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果。
第三方面,本申请实施例提供了一种排序设备,该排序设备包括存储器和处理器;其中,
所述存储器,用于存储能够在所述处理器上运行的可执行指令;
所述处理器,用于在运行所述可执行指令时,执行如第一方面所述方法的步骤。
第四方面,本申请实施例提供了一种计算机存储介质,该计算机存储介质存储有排序程序,该排序程序被至少一个处理器执行时实现如第一方面所述方法的步骤。
本申请实施例提供了一种排序方法、装置、设备及计算机存储介质,该方法包括:基于用户的查询需求,确定第一排序结果;其中,所述第一排序结果是基于所述查询需求对预设商品列表内至少一个待排序商品进行精排序得到的;基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合;其中,所述特征值集合中至少包括目标位置特征值,所述目标位置特征值是基于所述待排序商品在所述第一排序结果中的排序位置和预设展示位置进行计算得到的;基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果。这样,在精排序之后,利用预设重排模型对于商品进行更精细化的重排序,从而预设重排模型能够在全局视野下对商品进行排序,使得最终的排序结果更贴近用户的浏览行为;另外,通过根据第一排序结果中的排序位置和预设展示位置计算得到目标位置特征值,并将目标位置特征值作为商品的其中一个特征,能够在重排序的过程中充分考虑精排序环节的排序结果,同时还减轻了展示位置带来的位置偏见,减轻了位置偏见对排序结果的负面影响,使得排序结果更加公平,从而最终得到的排序结果更加符合用户需求,提升了用户满意度。
附图说明
图1为本申请实施例提供的一种排序方法的流程示意图;
图2为本申请实施例提供的另一种排序方法的流程示意图;
图3为本申请实施例提供的又一种排序方法的流程示意图;
图4为本申请实施例提供的一种计算目标位置特征值的步骤示意图;
图5为本申请实施例提供的一种排序装置的结构示意图;
图6为本申请实施例提供的另一种排序装置的结构示意图;
图7为本申请实施例提供的一种排序设备的具体硬件结构示意图;
图8为本申请实施例提供的一种商品搜索系统的组成结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
基于此,本申请实施例提供了一种排序方法,该方法的基本思想是:基于用户的查询需求,确定第一排序结果;其中,所述第一排序结果是基于所述查询需求对预设商品列表内至少一个待排序商品进行精排序得到的;基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合;其中,所述特征值集合中至少包括目标位置特征值,所述目标位置特征值是基于所述待排序商品在所述第一排序结果中的排序位置和预设展示位置进行计算得到的;基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果。这样,在精排序之后,利用预设重排模型对于商品进行更精细化的重排序,从而预设重排模型能够在全局视野下对商品进行排序,使得最终的排序结果更贴近用户的浏览行为;另外,通过根据第一排序结果中的排序位置和预设展示位置计算得到目标位置特征值,并将目标位置特征值作为商品的其中一个特征,能够在重排序的过程中充分考虑精排序环节的排序结果,同时还减轻了展示位置带来的位置偏见,减轻了位置偏见对排序结果的负面影响,使得排序结果更加公平,从而最终得到的排序结果更加符合用户需求,提升了用户满意度。
下面将结合附图对本申请各实施例进行详细说明。
在本申请的一实施例中,参见图1,其示出了本申请实施例提供的一种排序方法的流程示意图,如图1所示,该方法可以包括:
S101:基于用户的查询需求,确定第一排序结果。
其中,第一排序结果是基于所述查询需求对预设商品列表内至少一个待排序商品进行精排序得到的。
需要说明的是,对于电商领域,商品排序是一个复杂的过程,一般来说,整个排序链路可以分为召回、粗排序、精排序和重排序。其中,召回环节是指根据用户部分特征,从海量的物品库中快速召回一小部分用户潜在感兴趣的物品,然后交给排序环节;粗排序环节是指使用一个较为简单的模型对召回环节的结果进行粗略的排序,在保证一定精准的前提下,进一步减少往后传送的物品数量,粗排序环节并不是必要的,在简单场景中可以取消;精排序环节是指使用大量的商品特征和复杂模型,尽量精准地对物品进行个性化排序;重排序环节是指对于精排结果中的头部序列进一步进行排序的过程。
本申请实施例提供的排序方法主要应用在重排序环节,也就是说,系统已 经完成了对商品进行了初步排序,即系统根据用户的查询需求已经得到了第一排序结果。另外,本申请实施例所指的商品不仅包括电商网站上常规的商品,还可以应用在多种搜索领域,例如视频搜索、新闻搜索或者广告推送等领域。
还需要说明的是,查询需求用于指示用户在商品搜索页面输入的对于目标商品的期望。在商品搜索的情境下,用户通过商品搜索页面输入对目标商品的要求,例如商品名称、商品类型、商品材质、价格区间等,用户每进行一次搜索都会产生一次会话(query)。简单地说,每点击一次搜索按钮,都进行了一次query。对于每一次query,系统会收集用户在商品搜索页面输入的查询词,进行自然语言解析,从而得到用户的查询需求。另外,查询需求可以仅仅指用户所输入的需求,也可以是系统根据用户的群体特征和用户所输入的需求进行处理后的。例如,用户输入了某一关键词,可以仅根据该关键词生成查询需求,也可以进一步根据用户的身份特征和关键词生成查询需求。
所述第一排序结果是基于所述查询需求对预设商品列表内至少一个待排序商品进行排序得到的。其中,预设商品列表中包括待排序商品,实际应用中,预设商品列表可以是电商网站系统内所有的商品,也可以是在经过了召回、粗排或者精排后筛选的部分商品。也就是说,第一排序结果可以是根据预设精排模型得到的。因此,在一些实施例中,所述基于用户的查询需求,确定第一排序结果,可以包括:
接收所述用户的查询需求;
基于所述用户的查询需求,利用预设精排模型对多个商品进行精排序,得到初始商品序列;
基于预设数量对所述初始商品序列进行截取,得到所述预设商品列表。
需要说明的是,在接收到用户的查询需求后,通过预设精排模型对预设商品列表进行排序,得到精排后的初始商品序列。预设精排模型可以包括多种模型,例如深度兴趣网络(Deep Interest Network,DIN)、深度神经网络(Deep Neural Networks,DNN)模型、wide&Deep模型。
具体地,在一次query中,商品搜索系统首先接收用户的查询需求,例如查询关键词、价位区间等,基于用户的查询需求,通过预设精排模型对预设商品列表中的多个待排序商品进行计算和排序,获得初始商品序列。
还需要说明的是,由于初始商品序列中仍然包括大量的商品,可能导致处理量过大。因此,可以进队初始商品序列头部的部分商品进行更为精细的重排。因袭,根据预设数量对初始商品序列进行截取,得到预设商品列表。预设数量可以根据使用场景确定,本申请实施例不作限定。在不考虑处理量的情况下,也可以将初始商品序列确定为预设商品列表。
S102:基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合。
需要说明的是,对于所获取的第一排序结果,获取其中每一待排序商品的特征值集合。对于每一待排序商品来说,会具有多种不同的特征,比如材质、价格、购买数量等等,这些特征都可以作为重排序过程中对商品进行打分的特征值。
其中,特征值集合中还包括有待排序商品的目标位置特征值,所述目标位置特征值是基于所述待排序商品在所述第一排序结果中的排序位置和预设展示位置进行计算得到的。采用待排序商品在待排序商品序列中的位置是为了充分利用前一模块的排序结果,而预设展示位置是假定的展示位置,能够减少最终展示位置带来的位置偏见。
也就是说,由于重排序环节的存在,对于某一商品而言,第一排序结果中的排序位置和商品最终在页面上的展示位置是不同的,其中,第一排序结果中的排序位置是比较容易比较,而展示位置对于用户的影响相对复杂,比如头部效应等。为了充分利用上一排序结果以及克服展示页面的位置偏见,本申请实施例将两个位置进行共同编码,从而引入了目标位置特征值。
也就是说,在计算过程中,为了尽可能避免展示位置偏差的影响,以预设展示位置作为商品假定的展示位置,这样所有的商品的展示位置均是相同的,不会因为展示位置产生偏见;然后,利用预设展示位置与第一排序结果中的排序位置合成目标位置特征值的方式,既能够实现展示位置的纠偏,又考虑了第一排序结果中的位置关系,加强了个性化排序的效果,使得排序结果更加贴近用户的浏览行为。
具体的,目标位置特征值可以通过池化计算得到。在一些实施例中,在所述基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合之前,所述方法还可以包括:
确定每一待排序商品的目标位置特征值;
相应地,所述确定每一待排序商品的目标位置特征值,具体可以包括:
基于每一待排序商品在所述第一排序结果中的排序位置,通过第一预设查找表确定所述每一待排序商品的第一位置编码值;
基于每一待排序商品的预设展示位置,通过第二预设查找表确定所述每一待排序商品的第二预设编码值;
将所述每一待排序商品的第一位置编码值和所述每一待排序商品的第二预设编码值进行池化计算,得到所述每一待排序商品的目标位置特征值。
需要说明的是,在进行计算时,需要将具体的位置转换为编码值。常见的目标位置特征值方法有正弦函数编码、随机可学习向量编码和相对目标位置特征值。第一预设查找表和第二预设查找表就是采用某一种位置编码方法下的位置-编码对照表,也就是说,根据第一排序结果的排序位置,能够在第一预设查找表中确定该位置对应的第一位置编码值;根据预设展示位置,能够在第二预设查找表中找到该位置对应的第二位置编码值。在这里,具体的位置编码方法可以使用场景进行灵活选择,本申请实施例不作具体限定。
在商品搜索海量数据加持下,使用随机可学习向量编码效果最好,因为编码模型可以从数据中总结出位置规律。随机可学习向量编码的方式是随机初始化一个和输入层维度相等的向量,设置参数为可学习状态,模型的梯度可以回传到位置编码层,也就是说,随机可学习向量编码方法中的位置编码关系是学习得到的,能够更加贴近实际的位置。为了削弱位置偏见,将预设展示位置以相同的方式编码到另一个向量中,并和第一排序结果中的排序位置融合构成最 终的目标位置特征值。
在相关技术中,由于并不会考虑商品的位置信息,所以排序结果不够精准。本申请实施例纳入了第一预设查找表中的排序位置和预设展示位置共同构建了目标位置特征值,从而提高排序结果的准确性。这样,每一待排序商品的特征值集合中都纳入了综合位置信息,使得后续重排序结果更加贴近实际需求。
S103:基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果。
需要说明的是,预设重排模型是指根据历史数据训练得到的,且能够指示用户需求和商品的符合程度的模型。也就是说,根据查询需求和每一待排序商品的特征值集合,预设重排模型能够计算得到待排序商品与用户的需求符合的程度,进而决定该商品的最终位置,从而得到第二排序结果,也就是重排序后的商品序列。
还需要说明的是,预设重排模型同样是可以根据时间轴进行更新的。一般来说,为了避免处理量过大,预设重排模型一般是在离线阶段进行训练得到的。在线上阶段,直接利用训练好的预设重排模型进行计算,从而快速根据用户的查询需求确定最终的排序结果,然后向用户进行展示。
进一步地,在一些实施例中,所述基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果,可以包括:
根据所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型计算所述每一待排序商品的分数;
按照所述每一待排序商品的分数对所述预设商品列表进行排序,得到第二排序结果。
需要说明的是,根据查询需求,预设重排模型能够待排序商品的特征值集合计算得到待排序商品的分数,在这里,分数的本质是用户访问待排序商品的概率值。所以,待排序商品的分数越高,则认为用户访问该商品的可能性越大,即该商品与查询需求的符合程度越高。然后,按照得分高低,将待排序商品进行重新排序,得到第二排序结果。
进一步地,在一些实施例中,所述根据所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型计算所述每一待排序商品的分数,具体可以包括:
基于所述查询需求,确定查询特征值向量;
基于所述每一待排序商品的特征值集合,确定商品特征值向量;
将所述查询特征值向量和所述商品特征值向量进行拼接操作,得到重排输入向量;
将所述重排输入向量输入至所述预设重排模型,得到所述每一待排序商品的分数。
需要说明的是,预设重排模型的输入包括两个方面,一方面是每个query对应的query特征(即查询需求特征值向量),这部分特征主要反应用户对于目标商品的期望,也可以包括用户自身的用户群体特征;另一方面是待选的商品 的特征(即商品特征值向量),这部分特征主要反应多个精排商品各自的多个特征。具体的,根据之前所获得的查询需求,确定查询特征值向量,然后对于每一待排序商品的特征值集合,确定商品特征值向量,将这两部向量拼接在一起,得到重排输入向量,将该向量输入至预设重排模型,即可计算得到所述每一待排序商品的分数。
在得到第二排序结果后,就可以向用户展示查询商品。因此,在一些实施例中,在所述利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果之后,所述方法还包括:
基于所述第二排序结果,向所述用户进行商品推荐。
需要说明的是,由于第二排序结果是根据第一排序结果进一步重排得到的,更加贴近用户需求,因此,基于第二排序结果,向用户进行商品推荐,以提高用户的购买行为。在此,由于处理量有限,第二排序结果可能是对一小部分商品的重排序结果,所以可以在商品推荐时拼接前一排序环节的其他排序结果进行推荐。
这样,通过查询需求和第一排序结果作为输入,通过预设重排模型可以得到重排商品序列,使得排序结果更加符合用户的需求。
本申请实施例提供了一种排序方法,该方法可以包括:基于用户的查询需求,确定第一排序结果;其中,所述第一排序结果是基于所述查询需求对预设商品列表内至少一个待排序商品进行精排序得到的;基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合;其中,所述特征值集合中至少包括目标位置特征值,所述目标位置特征值是基于所述待排序商品在所述第一排序结果中的排序位置和预设展示位置进行计算得到的;基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果。这样,在精排序之后,利用预设重排模型对于商品进行更精细化的重排序,从而预设重排模型能够在全局视野下对商品进行排序,使得最终的排序结果更贴近用户的浏览行为;另外,通过根据第一排序结果中的排序位置和预设展示位置计算得到目标位置特征值,并将目标位置特征值作为商品的其中一个特征,能够在重排序的过程中充分考虑精排序环节的排序结果,同时还减轻了展示位置带来的位置偏见,减轻了位置偏见对排序结果的负面影响,使得排序结果更加公平,从而最终得到的排序结果更加符合用户需求,提升了用户满意度。
在本申请的另一实施例中,参见图2,其示出了本申请实施例提供的另一种排序方法的流程示意图,如图2所示,该方法还可以包括:
S201:获取多组历史查询数据。
需要说明的是,预设重排模型需要大量的搜索数据进行训练。这里,预设重排模型可以根据多组历史查询数据进行训练,其中,每组历史查询数据中主要包括:历史查询需求、历史商品集合和商品访问结果。
S202:构建重排模型,根据所述多组历史查询数据对所述重排模型进行模型训练,将训练后得到的重排模型确定为所述预设重排模型。
需要说明的是,其中,重排模型可以包括多种排序模型,其中一种可以是 Listwise排序模型,Listwise排序模型能够把同一个query下整个搜索结果作为一个训练的实例,同时对所有物品打分并排序。另外,重排模型的构建可以参照现有技术,本申请实施例不作限定。
每组历史查询数据(即每个query)都相当于一个训练实例,根据所获取的多组历史查询数据对构建的重排模型进行训练,能够得到预设重排模型。另外,
需要说明的是,所述历史查询数据包括历史查询需求、历史商品集合和商品访问结果;相应地,在一些实施例中,所述根据所述多组历史查询数据对所述重排模型进行模型训练,将训练后得到的重排模型确定为所述预设重排模型,具体可以包括:
基于所述多组历史查询数据中的历史查询需求和历史商品集合,生成多组历史输入数据;其中,所述历史输入数据中至少包括所述历史商品集合中每一历史商品的目标位置特征值;
根据所述多组历史查询数据中的商品访问结果,生成多个访问概率值集合;
将所述多组历史输入数据作为模型输入,将所述多个访问概率值集合作为模型输出,对所述重排模型进行模型训练;
将训练后得到的重排模型确定为所述预设重排模型。
需要说明的是,实际应用中,一组历史查询数据就是指一个会话数据,具体的,针对每一个会话数据,其中都至少包括历史查询需求、历史商品集合和商品访问结果。在这里,历史查询数据中的每个query相当于一个数据,每个query中至少包括历史查询需求(即用户所输入的查询需求),历史商品集合(这里指的是该query中最终向用户展示的所有商品以及序列位置)和商品访问结果(这里指最终的展示效果,比如用户是否购买、是否浏览、是否收藏等)。
根据历史查询需求和历史商品集合,能够得到历史输入数据,即作为模型训练的输入;根据商品访问结果,处理成多个概率值集合,作为模型训练的输出,最终训练得到预设重排模型。
进一步地,在一些实施例中,所述基于所述多个历史查询数据中的历史查询需求和历史商品集合,生成多个历史输入数据,可以包括:
基于每一历史查询需求,确定每一历史查询特征值向量,以及基于所述每一历史商品集合,确定每一历史商品特征值向量;
将所述每一历史查询特征值向量和所述每一历史商品特征值向量进行拼接操作,得到每一历史输入向量;
将所得到的多个历史输入向量确定为所述多个历史输入数据。
需要说明的是,对于每一个从历史数据中聚合得到的query,根据其中的历史查询需求,生成历史查询特征值向量,根据历史商品集合,确定历史商品特征值向量,将历史查询特征值向量和历史商品特征值向量进行拼接,就得到了对应于本次query的历史输入向量。
同样的,历史商品特征值向量中至少纳入了商品的位置编码。因此,在一些实施例中,在所述基于所述每一历史商品集合,确定每一历史商品特征值向量之前,该方法还可以包括:
获取所述每一历史商品的原始排序位置和实际展示位置;其中,所述实际 展示位置为历史商品在用户展示页面上的排序位置;
基于所述每一历史商品的原始排序位置和展示位置,生成所述多个历史商品的目标位置特征值。
需要说明的是,对于历史数据中每一次query而言,对于每次查询需求,也是经过了召回-粗排-精排-重排的过程。所以对于历史商品集合,能够获取到原始排序位置和实际展示位置,其中,原始排序位置是指该商品在前一排序环节中计算出的位置;实际展示位置是指在向用户展示页面上所处的位置。具体的,如果重排序是放置在精排模块之后的,对于每一历史商品,精排位置即为原始排序位置。根据原始排序位置和实际展示位置进行处理,就可以生成目标位置特征值。
从定义来讲,目标位置特征值由第一排序结果中的排序位置和实际展示位置两部分构成,实际展示位置是指在网站页面上最终向用户展示的位置。然而,在模型训练的过程中,对于历史数据中的每个商品,确实具有实际展示位置的,那么历史商品的目标位置特征值就是由前一排序结果中的排序位置和实际展示位置两部分构成的;在线上排序的过程中,每个商品还未到向用户展示的环节,并没有实际展示位置,所以假定所有的商品都在预设展示位置,比如预设展示位置是1(即商品列表的首位),这样能够避免位置偏见。然而,这两个目标位置特征值实际所代表的含义和本质其实是相同的。
为了避免最终的训练结果过于依赖实际展示位置,可以进行随机掩码操作。因此,在一些实施例中,在所述获取所述每一历史商品的原始排序位置和实际展示位置之后,该方法还可以包括:
基于预设比例值,在所述每一历史商品集合确定多个无偏历史商品;
将所述多个无偏历史商品的实际展示位置替换为所述预设展示位置。
需要说明的是,对于历史商品,随机选取预设比例值(根据实际使用需求确定,例如20%)的历史商品进行随机掩码操作,具体方法是将被选中的商品的实际展示位置替换为预设展示位置。这里预设展示位置可以是指的任意位置。例如,预设展示位置可以为第一位。
从历史数据中提取出统一格式的会话数据具有多种方式。其中一种是Pointwise数据格式,数据存储在一个表中,行对应商品,列分别是query和商品的特征,训练的时候通过身份标识号(Identity document,ID)聚合相同会话的数据输入模型。这种方式在大型商品搜索系统中存在低效的缺点。电商数据量非常庞大,训练阶段需要受到服务器内存的限制,因此一般采取分批读取的方式读取训练源数据,导致不同批次的数据边界处的会话被拆分,从而扰乱数据分布;其次,训练阶段的聚合操作很耗时,每次实验都进行大量的聚合操作会影响模型迭代效率,浪费宝贵的计算资源。因此,本申请实施例选用在离线准备数据的阶段完成聚合,对于每一次会话都产生统一格式的会话数据。
这样,对于历史商品,就得到了目标位置特征值,可以作为其商品特征之一,从而使得训练得到的预设重排模型充分考虑了位置偏见,在线上搜索部分给出更加精确的排序结果。
相关技术中,与本申请实施例相关的排序方法有两种:(1)训练Listwise 排序模型,对商品列表进行重排序;(2)将原商品搜索系统产生的展示位置作为特征输入当前模型,构造展示位置编码并融合原始位置编码。
也就是说,第一种是在排序链路的某一环节,比如精排之后,利用自注意力机制在商品序列中提取特征,同时利用上一个排序模块打分排序产生的位置,对商品序列的位置进行编码。在输出层使用浅层多层感知机对序列中的商品打分,实现精细化重排序。第二种是为了解决数据的偏差问题,将展示位置作为基础特征输入模型,经过浅层的感知机变换之后得到展示位置对应的概率,加入模型原始的连接函数中,相当于在训练阶段引入偏差信息。在预测阶段,展示位置特征归一化为统一的位置以消除位置偏差。
但是,目前没有发现在重排序阶段应用目标位置特征值处理位置偏见的技术实施方案。
相关技术中,使用排序链路中前一个排序模块产生的商品位置作为位置编码,没有考虑位置偏见问题。在使用Listwise模型的重排序阶段位置偏见问题会被进一步放大,因为在计算自注意力得分的时候,序列中任意两个商品的位置编码都会参与计算,模型可以看到整个序列的顺序,位置偏差会对模型整体产生负面影响。传统将展现位置作为输入特征,同时预测展现位置,将偏差信息告知模型的方式同样存在缺陷。在重排序阶段,序列中商品的最终位置会受到上下语境的影响,因此解决位置偏差不能孤立的评估单点位置,需要从全局的角度出发考虑。
综上所述,本申请实施例的目的有两个,一是应用Listwise模型对商品进行精细化重排序,使得排序结果更贴近用户的浏览行为,提升用户体验。二是在重排序模型中使用目标位置特征值,将旧系统的展示位置偏差输入当前模型,实现更优的位置纠偏,加强个性化排序效果。
本申请实施例的关键点主要有如下:
(1)在重排序阶段将目标位置特征值作为特征输入Listwise模型;
(2)构建目标位置特征值,并与相对位置编码融合形成纠偏位置编码。
根据以上优点,本申请实施例在各类业务的搜索,广告和推荐等领域都有很好的应用前景。
具体来说,在商品搜索系统中有两个提升点。一是目前的排序模块受限于推断性能,一般采用Pointwise的方式对商品打分,按照分数排序后向用户展示,这种方式没有考虑商品序列上下文语境的影响,不符合用户的浏览方式,存在多样性缺乏之类的问题。在精排模块之后加入重排序模块对头部重点位置使用Listwise模型进行精细化排序,模型可以在全局的感受视野下对商品排序,排序结果更贴合用户浏览行为。二是使用目标位置特征值消除位置偏见,将目标位置特征值到模型输入中,在模型计算自注意力得分的时候知晓位置偏见,减轻展示位置带来的负面影响,使排序结果更加公平,可以隐式的提升用户个性化体验。
在文本检索,视频搜索,推荐和广告等领域中,排序是一个直接影响用户感受的重要模块,用户通过浏览商品搜索系统产生的样本序列,结合自己的喜好同系统产生交互行为。同时这些系统也有商品搜索系统类似的反馈回路效应, 受到位置偏见的影响,应用展示位置编码纠偏的重排序模型改进提升排序结果,促进用户满意度。
本申请实施例提供了一种排序方法,对前述实施例的具体实现进行了详细阐述,从中可以看出,在精排序之后,利用预设重排模型对于商品进行更精细化的重排序,从而预设重排模型能够在全局视野下对商品进行排序,使得最终的排序结果更贴近用户的浏览行为;另外,通过根据第一排序结果中的排序位置和预设展示位置计算得到目标位置特征值,并将目标位置特征值作为商品的其中一个特征,能够在重排序的过程中充分考虑精排序环节的排序结果,同时还减轻了展示位置带来的位置偏见,减轻了位置偏见对排序结果的负面影响,使得排序结果更加公平,从而最终得到的排序结果更加符合用户需求,提升了用户满意度。
在本申请的又一实施例中,参见图3,其示出了本申请实施例提供的又一种排序方法的流程示意图,如图3所示,该方法可以包括:
S301:离线阶段,读取历史数据,将历史数据处理得到模型训练输入数据和模型训练监督数据。
需要说明的是,实际应用中,完整的商品排序过程包括召回、粗排、精排和重排等环节,本申请实施例中的排序方法应用在重排序环节。具体的,本申请实施例中所采用的预设重排模型为Listwise重排模型。在实际应用过程中,将Listwise重排模块放置于精排之后,对精排结果中的头部商品列表进行更精细的排序。
为了训练Listwise重排,需要根据历史数据产生会话格式的数据,即用户一次查询所返回的商品列表。对于每个会话使用独特的ID进行区分,常见的生成会话数据的格式是直观的Pointwise格式,数据存储在一个表中,行对应商品,列分别是query特征和商品特征,训练的时候通过ID聚合相同会话的数据输入模型。然而,这种方式在大型商品搜索系统中存在低效的缺点,因为电商数据量非常庞大,训练阶段受内存限制一般采取分批读取的方式读取数据,导致不同批次数据边界处的会话被拆分,扰乱数据分布;另外,训练阶段的聚合操作很耗时,每次训练都进行大量的聚合操作会影响模型迭代效率,浪费宝贵的计算资源。所以,为了克服上述缺陷,本实施例在离线阶段准备数据并完成聚合,最终产生如表1所示的会话数据的聚合格式示例。
表1
Figure PCTCN2021124783-appb-000001
如表1所示,表格的行表示一个完整的会话,每行的列数不等,主要包括query特征列数,会话商品总数,query特征列,商品特征列。这里,query特征能够指示用户的查询需求,由于会话和query一一对应,为减小输入输出开销,每个会话只保存一份query特征,训练阶段读取数据时和商品特征拼接构成完整的模型训练输入数据。
另外,Listwise重排模型的监督数据可以理解为每个query中的用户对于商品的行为概率值,例如点击概率值、收藏概率值或者购买概率值等,也可以是以上概率的综合。所以,根据历史数据,还需要处理得到模型训练监督数据。
S302:利用模型训练输入数据和模型训练监督数据训练得到预设重排模型;
需要说明的是,利用模型训练输入数据和模型训练监督数据训练得到预设重排模型。
模型训练的过程主要包括三个步骤,即特征预处理(相当于将原始数据处理成模型训练输入数据)、自注意力分数计算、隐式变换。
(1)特征预处理,对于输入特征进行预处理。数值特征预处理有三种方式,极值(minmax)归一化,对数(logminmax)归一化和分桶,具体选用哪种特征预处理方法可以根据使用场景具体决定。
其中,minmax归一化过程如式(1)所示。
Figure PCTCN2021124783-appb-000002
logminmax归一化是对对特征取log之后再应用maxmin归一,过程如式(2)和式(3)所示,logminmax归一化的优点是通过取log可以缩小特征区间,防止特征最大值过大,影响取值较小的特征。
y=log x………………………………(2)
Figure PCTCN2021124783-appb-000003
分桶是离散化的常用方法,将连续型特征离线化为一系列0/1的离散特征,分桶操作可以看作是对数值变量的离散化,之后通过二值化进行独热编码。
具体的,相关技术中的分桶方式有等距分桶和等频分桶。等距分桶指每个桶的宽度是固定的,即值域范围是固定的,比如是0-9,10-19,20-29等,这种适合样本分布比较均匀的情况,避免出现有的桶的数量很少,而有的桶数量过多的情况。等频分桶,也称为分位数分桶。也就是每个桶有一样多的样本,但可能出现数值相差太大的样本放在同个桶的情况,可以根据特征类型灵活选用分桶方式。
上述的特征通过随机初始化一个n维的特征向量,n可以取8,特征向量的参数随模型训练过程更新。最终的模型训练输入数据采取拼接的方式融合,如式(4)所示。
InputEmbedding=concat(fea1,fea2……fea_n)………………………(4)
(2)自注意力计算,计算自注意力分两步,一是计算序列中每个商品的注意力得分。首先将InputEmbedding通过线性变换投影到三个方向,分别记为Q,K,V,自注意力得分计算公式如式(5)所示,之后通过带有一层隐层的前馈神经网络,进行非线性变换。
Figure PCTCN2021124783-appb-000004
(3)隐式变换,与使用深度神经网络作为特征抽取器和分类器的精排模型不同,预设重排模型使用考虑了序列信息的Transformer编码器作为特征抽取 器,将前述得到的矩阵向量再次进行提取,提取的中间向量已经是高信息密度的稠密向量,因此输出层只需要一个浅层的多层感知机作为分类器即可。这里使用包含一个隐层的前馈神经网络作为输出层,最后用softmax函数对序列中的所有商品打分,公式如式(6)所示。其中,式(7)为softmax函数的计算公式。
scores=softmax(f(x))………………………(6)
Figure PCTCN2021124783-appb-000005
其中,x是输入层向量,f(x)表示重排模型。
由于自注意力机制没有保留位置信息,所以需要将原始位置作为特征编码到向量中输入编码器,在计算自注意力得分时加入位置信息,充分利用精排序环节的排序结果。常见的位置编码有正弦函数编码,随机可学习向量编码和相对位置编码。在商品搜索海量数据加持下,使用随机可学习向量编码效果最好,因为编码模型可以从数据中总结出位置规律。随机可学习向量编码的方式是随机初始化一个和输入层维度相等的向量,设置参数为可学习状态,模型的梯度可以回传到位置编码层。
为了削弱位置偏见,将实际展示位置以相同的方式编码到另一个向量中,并和精排位置编码融合构成最终的目标位置特征值。形成最终位置编码时有两个关键点,一是为了充分利用精排位置和实际展示位置的信息,采取sum pooling的策略进行融合。二是避免模型过于依赖实际展示位置,使用随机mask技术引入随机性,即将一定比例的样本展现位置丢弃。我们假设展现位置首位是无偏的,被mask的样本统一当成无偏样本处理,即mask样本的展现位置统一置换成1,同时随机mask的概率为20%。
最终实际展示位置生成过程如图4所示。根据图4,对于具体的商品而言,首先,根据其在精排环节之后的位置(即精排位置),将精排位置利用精排查找表进行查表,得到精排位置编码。其次,对于旧系统展示位置(相当于实际展示位置),先进行20%的随机掩码(mask)操作,即选取20%的商品,将其实际展示位置统一更换成预设展示位置,以避免最终结果过于依赖实际展示位置;对于经过随机mask的展示位置,进行连续向量转化(embedding),然后再根据编码查找表(encoding)得到展示位置编码。最后,将精排位置编码和展示位置编码进行池化操作(sum pooling),得到最终的目标位置特征值。
也就是说,将实际展示位置以相同的方式编码到另一个向量中,并和精排位置编码融合构成最终的目标位置特征值。形成目标位置特征值时有两个关键点,一是为了充分利用精排位置和实际展示位置的信息,采取sum pooling的策略进行融合;二是避免模型过于依赖实际展示位置,使用随机掩码技术引入随机性,即将一定比例的样本实际展示位置丢弃。假设实际展示位置首位是无偏的,被掩码的样本统一当成无偏样本处理,即掩码样本的实际展示位置统一置换成1,同时随机掩码的概率为20%。
这样,经过以上步骤,同时输入模型训练监督数据,最终能够训练得到预设重排模型。
S303:在线阶段,利用预设重排模型得到商品的重排序结果。
在线上预测阶段,精排位置来源于精排模型打分。精排模型在预测阶段是Pointwise结构,在重排序之前,每个商品对应的精排分数被存储到对应的数据结构中,重排序阶段需要根据精排分数对商品列表排序。由于重排序是更精细的排序环节,计算开销相对较大,为了不影响整体搜索系统的响应时间,这里只选取头部部分列表如前10或前30进行排序和打分。按精排分排序后商品按照序列位置从1开始计数,生成精排位置。输入模型时精排位置作为位置编码的索引,可以快速获取离线阶段学到的商品序列的位置编码。
线上预测阶段展现位置特征需要所有排序环节完成才能产生,所以不能直接获得展现位置特征。为了消除展现位置偏见对商品搜索系统的影响,同时在离线训练截断假设首位无偏,因此在线上预测阶段直接将所有商品的展现位置强制置1,在输入层直接获取对应的位置编码即可。同样,最终的位置编码通过sum pooling获得。
本申请在各类业务的搜索,广告和推荐等领域都有很好的应用前景。
在商品搜索系统中有两个提升点。一是目前的排序模块受限于推断性能,一般采用Pointwise的方式对商品打分,按照分数排序后向用户展示,这种方式没有考虑商品序列上下文语境的影响,不符合用户的浏览方式,存在多样性缺乏之类的问题。在精排模块之后加入重排序模块对头部重点位置使用Listwise模型进行精细化排序,模型可以在全局的感受野下对商品排序,排序结果更贴合用户浏览行为。二是使用目标位置特征值消除位置偏见,将展示位置编码到模型输入中,在模型计算自注意力得分的时候知晓位置偏见,减轻展示位置带来的负面影响,使排序结果更加公平,可以隐式的提升用户个性化体验。
在文本检索,视频搜索,推荐和广告等领域中,排序是一个直接影响用户感受的重要模块,用户通过浏览商品搜索系统产生的样本序列,结合自己的喜好同系统产生交互行为。同时这些系统也有商品搜索系统类似的反馈回路效应,受到位置偏见的影响。应用展示位置编码纠偏的重排序模型改进提升排序结果,促进用户满意度。
本申请实施例提供一种排序方法,对前述实施例的具体实现进行了详细阐述,从中可以看出,在精排序之后,利用预设重排模型对于商品进行更精细化的重排序,从而预设重排模型能够在全局视野下对商品进行排序,使得最终的排序结果更贴近用户的浏览行为;另外,通过根据第一排序结果中的排序位置和预设展示位置计算得到目标位置特征值,并将目标位置特征值作为商品的其中一个特征,能够在重排序的过程中充分考虑精排序环节的排序结果,同时还减轻了展示位置带来的位置偏见,减轻了位置偏见对排序结果的负面影响,使得排序结果更加公平,从而最终得到的排序结果更加符合用户需求,提升了用户满意度。
本申请的再一实施例中,参见图5,其示出了本申请实施例提供的一种排序装置40的组成结构示意图,如图5所示,排序装置40包括获取单元401、特征单元402和排序单元403;其中,
获取单元401,配置为基于用户的查询需求,确定第一排序结果;其中, 所述第一排序结果是基于所述查询需求对预设商品列表内至少一个待排序商品进行精排序得到的;
特征单元402,配置为基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合;其中,所述特征值集合中至少包括目标位置特征值,所述目标位置特征值是基于所述待排序商品在所述第一排序结果中的排序位置和预设展示位置进行计算得到的;
排序单元403,配置为基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果。
在一些实施例中,获取单元401,具体配置为接收所述用户的查询需求;基于所述用户的查询需求,利用预设精排模型对多个商品进行精排序,得到初始商品序列;基于预设数量对所述初始商品序列进行截取,得到所述预设商品列表。
在一些实施例中,如图6所示,该排序装置40还包括位置单元404,配置为确定每一待排序商品的目标位置特征值;该位置单元404,具体配置为基于每一待排序商品在所述第一排序结果中的排序位置,通过第一预设查找表确定所述每一待排序商品的第一位置编码值;基于每一待排序商品的预设展示位置,通过第二预设查找表确定所述每一待排序商品的第二预设编码值;将所述每一待排序商品的第一位置编码值和所述每一待排序商品的第二预设编码值进行池化计算,得到所述每一待排序商品的目标位置特征值。
在一些实施例中,排序单元403,具体配置为根据所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型计算所述每一待排序商品的分数;按照所述每一待排序商品的分数对所述预设商品列表进行排序,得到所述第二排序结果。
在一些实施例中,排序单元403,还配置为基于所述查询需求,确定查询特征值向量;基于所述每一待排序商品的特征值集合,确定商品特征值向量;将所述查询特征值向量和所述商品特征值向量进行拼接操作,得到重排输入向量;将所述重排输入向量输入至所述预设重排模型,得到所述每一待排序商品的分数。
在一些实施例中,如图6所示,该排序装置40还包括展示单元405,配置为基于所述第二排序结果,向所述用户进行商品推荐。
在一些实施例中,如图6所示,该排序装置40还包括训练单元406,配置为获取多组历史查询数据;构建重排模型,根据所述多组历史查询数据对所述重排模型进行模型训练,将训练后得到的重排模型确定为所述预设重排模型。
在一些实施例中,所述历史查询数据包括历史查询需求、历史商品集合和商品访问结果;训练单元406,还配置为基于所述多组历史查询数据中的历史查询需求和历史商品集合,生成多组历史输入数据;其中,所述历史输入数据中至少包括所述历史商品集合中每一历史商品的目标位置特征值;根据所述多组历史查询数据中的商品访问结果,生成多个访问概率值集合;将所述多组历史输入数据作为模型输入,将所述多个访问概率值集合作为模型输出,对所述重排模型进行模型训练;将训练后得到的重排模型确定为所述预设重排模型。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
因此,本实施例提供了一种计算机存储介质,该计算机存储介质存储有排序程序,所述排序程序被至少一个处理器执行时实现前述实施例中任一项所述的方法的步骤。
基于上述的一种排序装置40的组成以及计算机存储介质,参见图7,其示出了本申请实施例提供的一种排序设备50的具体硬件结构示例,如图7所示,所述排序设备50可以包括:通信接口501、存储器502和处理器503;各个组件通过总线设备504耦合在一起。可理解,总线设备504用于实现这些组件之间的连接通信。总线设备504除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图7中将各种总线都标为总线设备504。其中,通信接口501,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
存储器502,用于存储能够在处理器503上运行的可执行指令;
处理器503,用于在运行所述可执行指令时,执行:
基于用户的查询需求,确定第一排序结果;其中,所述第一排序结果是基于所述查询需求对预设商品列表内至少一个待排序商品进行精排序得到的;
基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合;其中,所述特征值集合中至少包括目标位置特征值,所述目标位置特征值是基于所述待排序商品在所述第一排序结果中的排序位置和预设展示位置进行计算得到的;
基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果。
可以理解,本申请实施例中的存储器502可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储 器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步链动态随机存取存储器(Synchronous link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的设备和方法的存储器502旨在包括但不限于这些和任意其它适合类型的存储器。
而处理器503可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器503中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器503可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(APPlication Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器502,处理器503读取存储器502中的信息,结合其硬件完成上述方法的步骤。
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(APPlication Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。
对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
可选地,作为另一个实施例,处理器503还配置为在运行所述可执行指令时,执行前述实施例中任一项所述的方法的步骤。
基于上述排序装置40的组成以及排序设备50的硬件结构示意图,参见图8,其示出了本申请实施例提供的一种商品搜索系统60的组成结构示意图。如图8所示,商品搜索系统60至少包括排序装置40,在精排序之后,利用预设重排模型对于商品进行更精细化的重排序,从而预设重排模型能够在全局视野下对商品进行排序,使得最终的排序结果更贴近用户的浏览行为;另外,通过根据第一排序结果中的排序位置和预设展示位置计算得到目标位置特征值,并 将目标位置特征值作为商品的其中一个特征,能够在重排序的过程中充分考虑精排序环节的排序结果,同时还减轻了展示位置带来的位置偏见,减轻了位置偏见对排序结果的负面影响,使得排序结果更加公平,从而最终得到的排序结果更加符合用户需求,提升了用户满意度。
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征值,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或设备实施例中所揭露的特征值,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (18)

  1. 一种排序方法,所述方法包括:
    基于用户的查询需求,确定第一排序结果;其中,所述第一排序结果是基于所述查询需求对预设商品列表内至少一个待排序商品进行精排序得到的;
    基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合;其中,所述特征值集合中至少包括目标位置特征值,所述目标位置特征值是基于所述待排序商品在所述第一排序结果中的排序位置和预设展示位置进行计算得到的;
    基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果。
  2. 根据权利要求1所述的排序方法,其中,所述方法还包括:
    接收所述用户的查询需求;
    基于所述用户的查询需求,利用预设精排模型对多个商品进行精排序,得到初始商品序列;
    基于预设数量对所述初始商品序列进行截取,得到所述预设商品列表。
  3. 根据权利要求1所述的排序方法,其中,在所述基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合之前,所述方法还包括:
    确定每一待排序商品的目标位置特征值;
    相应地,所述确定每一待排序商品的目标位置特征值,包括:
    基于每一待排序商品在所述第一排序结果中的排序位置,通过第一预设查找表确定所述每一待排序商品的第一位置编码值;
    基于每一待排序商品的预设展示位置,通过第二预设查找表确定所述每一待排序商品的第二预设编码值;
    将所述每一待排序商品的第一位置编码值和所述每一待排序商品的第二预设编码值进行池化计算,得到所述每一待排序商品的目标位置特征值。
  4. 根据权利要求1所述的排序方法,其中,所述基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果,包括:
    根据所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型计算所述每一待排序商品的分数;
    按照所述每一待排序商品的分数对所述预设商品列表进行排序,得到所述第二排序结果。
  5. 根据权利要求4所述的排序方法,其中,所述根据所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型计算所述每一待排序商品的分数,包括:
    基于所述查询需求,确定查询特征值向量;
    基于所述每一待排序商品的特征值集合,确定商品特征值向量;
    将所述查询特征值向量和所述商品特征值向量进行拼接操作,得到重排输 入向量;
    将所述重排输入向量输入至所述预设重排模型,得到所述每一待排序商品的分数。
  6. 根据权利要求1所述的排序方法,其中,在所述利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果之后,所述方法还包括:
    基于所述第二排序结果,向所述用户进行商品推荐。
  7. 根据权利要求1所述的排序方法,其中,所述方法还包括:
    获取多组历史查询数据;
    构建重排模型,根据所述多组历史查询数据对所述重排模型进行模型训练,将训练后得到的重排模型确定为所述预设重排模型。
  8. 根据权利要求7所述的排序方法,其中,所述历史查询数据包括历史查询需求、历史商品集合和商品访问结果;
    相应地,所述根据所述多组历史查询数据对所述重排模型进行模型训练,将训练后得到的重排模型确定为所述预设重排模型,包括:
    基于所述多组历史查询数据中的历史查询需求和历史商品集合,生成多组历史输入数据;其中,所述历史输入数据中至少包括所述历史商品集合中每一历史商品的目标位置特征值;
    根据所述多组历史查询数据中的商品访问结果,生成多个访问概率值集合;
    将所述多组历史输入数据作为模型输入,将所述多个访问概率值集合作为模型输出,对所述重排模型进行模型训练;
    将训练后得到的重排模型确定为所述预设重排模型。
  9. 一种排序装置,所述排序装置包括获取单元、特征单元和排序单元;其中,
    所述获取单元,配置为基于用户的查询需求,确定第一排序结果;其中,所述第一排序结果是基于所述查询需求对预设商品列表内至少一个待排序商品进行精排序得到的;
    所述特征单元,配置为基于所述第一排序结果,确定所述预设商品列表中每一待排序商品的特征值集合;其中,所述特征值集合中至少包括目标位置特征值,所述目标位置特征值是基于所述待排序商品在所述第一排序结果中的排序位置和预设展示位置进行计算得到的;
    所述排序单元,配置为基于所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型对所述预设商品列表进行重排序,得到第二排序结果。
  10. 根据权利要求9所述的排序装置,其中,所述获取单元,具体配置为接收所述用户的查询需求;基于所述用户的查询需求,利用预设精排模型对多个商品进行精排序,得到初始商品序列;基于预设数量对所述初始商品序列进行截取,得到所述预设商品列表。
  11. 根据权利要求9所述的排序装置,其中,所述排序装置还包括位置单元;所述位置单元,配置为确定每一待排序商品的目标位置特征值;
    所述位置单元,具体配置为基于每一待排序商品在所述第一排序结果中的排序位置,通过第一预设查找表确定所述每一待排序商品的第一位置编码值; 基于每一待排序商品的预设展示位置,通过第二预设查找表确定所述每一待排序商品的第二预设编码值;将所述每一待排序商品的第一位置编码值和所述每一待排序商品的第二预设编码值进行池化计算,得到所述每一待排序商品的目标位置特征值。
  12. 根据权利要求9所述的排序装置,其中,所述排序单元,具体配置为根据所述预设商品列表中每一待排序商品的特征值集合,利用预设重排模型计算所述每一待排序商品的分数;按照所述每一待排序商品的分数对所述预设商品列表进行排序,得到所述第二排序结果。
  13. 根据权利要求9所述的排序装置,其中,所述排序单元,还配置为基于所述查询需求,确定查询特征值向量;基于所述每一待排序商品的特征值集合,确定商品特征值向量;将所述查询特征值向量和所述商品特征值向量进行拼接操作,得到重排输入向量;将所述重排输入向量输入至所述预设重排模型,得到所述每一待排序商品的分数。
  14. 根据权利要求9所述的排序装置,其中,所述排序装置还包括展示单元;
    所述展示单元,配置为基于所述第二排序结果,向所述用户进行商品推荐。
  15. 根据权利要求9所述的排序装置,其中,所述排序装置还包括训练单元;
    所述训练单元,配置为获取多组历史查询数据;构建重排模型,根据所述多组历史查询数据对所述重排模型进行模型训练,将训练后得到的重排模型确定为所述预设重排模型。
  16. 根据权利要求15所述的排序装置,其中,所述历史查询数据包括历史查询需求、历史商品集合和商品访问结果;
    所述训练单元,还配置为基于所述多组历史查询数据中的历史查询需求和历史商品集合,生成多组历史输入数据;其中,所述历史输入数据中至少包括所述历史商品集合中每一历史商品的目标位置特征值;根据所述多组历史查询数据中的商品访问结果,生成多个访问概率值集合;将所述多组历史输入数据作为模型输入,将所述多个访问概率值集合作为模型输出,对所述重排模型进行模型训练;将训练后得到的重排模型确定为所述预设重排模型。
  17. 一种排序设备,所述排序设备包括存储器和处理器;其中,
    所述存储器,用于存储能够在所述处理器上运行的可执行指令;
    所述处理器,用于在运行所述可执行指令时,执行如权利要求1至8任一项所述方法的步骤。
  18. 一种计算机存储介质,所述计算机存储介质存储有排序程序,所述排序程序被至少一个处理器执行时实现如权利要求1至8任一项所述方法的步骤。
PCT/CN2021/124783 2020-10-20 2021-10-19 一种排序方法、装置、设备及计算机存储介质 WO2022083596A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21882012.4A EP4207035A1 (en) 2020-10-20 2021-10-19 Sorting method, apparatus and device, and computer storage medium
US18/249,458 US20240004888A1 (en) 2020-10-20 2021-10-19 Sorting method, apparatus and device, and computer storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011126741.6A CN113744015A (zh) 2020-10-20 2020-10-20 一种排序方法、装置、设备及计算机存储介质
CN202011126741.6 2020-10-20

Publications (1)

Publication Number Publication Date
WO2022083596A1 true WO2022083596A1 (zh) 2022-04-28

Family

ID=78728049

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/124783 WO2022083596A1 (zh) 2020-10-20 2021-10-19 一种排序方法、装置、设备及计算机存储介质

Country Status (4)

Country Link
US (1) US20240004888A1 (zh)
EP (1) EP4207035A1 (zh)
CN (1) CN113744015A (zh)
WO (1) WO2022083596A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109033140A (zh) * 2018-06-08 2018-12-18 北京百度网讯科技有限公司 一种确定搜索结果的方法、装置、设备和计算机存储介质
CN111159242A (zh) * 2019-12-27 2020-05-15 杭州趣维科技有限公司 一种基于边缘计算的客户端重排序方法及系统
WO2020133549A1 (en) * 2018-12-29 2020-07-02 Beijing Didi Infinity Technology And Development Co., Ltd. Artificial intelligent systems and methods for semantic-based search
CN111475730A (zh) * 2020-04-09 2020-07-31 腾讯科技(北京)有限公司 基于人工智能的信息推荐方法、装置、电子设备
US20200265095A1 (en) * 2019-02-20 2020-08-20 Microsoft Technology Licensing, Llc System that customizes a re-ranker based upon end user input

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012118696A (ja) * 2010-11-30 2012-06-21 Rakuten Inc ランキング生成装置、ランキング生成プログラム、ランキング生成プログラムを記録したコンピュータ読み取り可能な記録媒体、及びランキング生成方法
US20140012631A1 (en) * 2012-07-03 2014-01-09 Ramot At Tel-Aviv University Ltd. Competitive economy as a ranking device over networks
CN104077306B (zh) * 2013-03-28 2018-05-11 阿里巴巴集团控股有限公司 一种搜索引擎的结果排序方法及系统
US20140297630A1 (en) * 2013-03-29 2014-10-02 Wal-Mart Stores, Inc. Method and system for re-ranking search results in a product search engine
CN105320706B (zh) * 2014-08-05 2018-10-09 阿里巴巴集团控股有限公司 搜索结果的处理方法和装置
CN105260471B (zh) * 2015-10-19 2019-03-26 广州品唯软件有限公司 商品个性化排序模型训练方法及系统
CN106779985A (zh) * 2017-02-24 2017-05-31 武汉奇米网络科技有限公司 一种个性化商品排序的方法及系统
CN109189904A (zh) * 2018-08-10 2019-01-11 上海中彦信息科技股份有限公司 个性化搜索方法及系统
CN111445302A (zh) * 2019-01-17 2020-07-24 北京京东尚科信息技术有限公司 商品排序方法、系统及装置
CN111782926B (zh) * 2019-04-04 2024-04-09 北京沃东天骏信息技术有限公司 用于数据交互的方法、装置、存储介质及电子设备
CN110941762B (zh) * 2019-12-02 2024-01-30 上海麦克风文化传媒有限公司 一种个性化推荐系统排序结果的改进方法
CN111429234B (zh) * 2020-04-16 2023-09-29 电子科技大学中山学院 一种基于深度学习的商品序列推荐方法
CN111523976B (zh) * 2020-04-23 2023-12-08 京东科技控股股份有限公司 商品推荐方法、装置、电子设备及存储介质
CN111553765A (zh) * 2020-04-27 2020-08-18 广州探途网络技术有限公司 一种电商搜索排序方法、装置及计算设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109033140A (zh) * 2018-06-08 2018-12-18 北京百度网讯科技有限公司 一种确定搜索结果的方法、装置、设备和计算机存储介质
WO2020133549A1 (en) * 2018-12-29 2020-07-02 Beijing Didi Infinity Technology And Development Co., Ltd. Artificial intelligent systems and methods for semantic-based search
US20200265095A1 (en) * 2019-02-20 2020-08-20 Microsoft Technology Licensing, Llc System that customizes a re-ranker based upon end user input
CN111159242A (zh) * 2019-12-27 2020-05-15 杭州趣维科技有限公司 一种基于边缘计算的客户端重排序方法及系统
CN111475730A (zh) * 2020-04-09 2020-07-31 腾讯科技(北京)有限公司 基于人工智能的信息推荐方法、装置、电子设备

Also Published As

Publication number Publication date
CN113744015A (zh) 2021-12-03
EP4207035A1 (en) 2023-07-05
US20240004888A1 (en) 2024-01-04

Similar Documents

Publication Publication Date Title
Zhao et al. Deep reinforcement learning for page-wise recommendations
CN110162693B (zh) 一种信息推荐的方法以及服务器
Lian et al. Discrete content-aware matrix factorization
Liu et al. Gated recurrent units based neural network for time heterogeneous feedback recommendation
Guo et al. Personalized ranking with pairwise factorization machines
US20230147941A1 (en) Method, apparatus and device used to search for content
Kouadria et al. A multi-criteria collaborative filtering recommender system using learning-to-rank and rank aggregation
CN110046298A (zh) 一种查询词推荐方法、装置、终端设备及计算机可读介质
Chen et al. Software service recommendation base on collaborative filtering neural network model
CN111695024A (zh) 对象评估值的预测方法及系统、推荐方法及系统
Cao et al. An improved neighborhood-aware unified probabilistic matrix factorization recommendation
Duan et al. A hybrid intelligent service recommendation by latent semantics and explicit ratings
Chuang et al. TPR: Text-aware preference ranking for recommender systems
Shanmuga Sundari et al. Integrating sentiment analysis on hybrid collaborative filtering method in a big data environment
Wang et al. Explainable matrix factorization with constraints on neighborhood in the latent space
WO2022083596A1 (zh) 一种排序方法、装置、设备及计算机存储介质
Pawar et al. Movies Recommendation System using Cosine Similarity
Paul et al. A weighted hybrid recommendation approach for user’s contentment using natural language processing
Wang Fairness Metrics for Recommender Systems
Ren et al. A hybrid recommender approach based on widrow-hoff learning
Muthivhi et al. Multi-modal recommendation system with auxiliary information
Zhen et al. Improved Hybrid Collaborative Fitering Algorithm Based on Spark Platform
Yang et al. Unifying user preference and item knowledge-based similarity models for top-N recommendation
Dai et al. Context-Aware Collaborative Ranking
CK et al. Switching Hybrid Model For Personalized Recommendations By Combining Users Demographic Information

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21882012

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021882012

Country of ref document: EP

Effective date: 20230330

WWE Wipo information: entry into national phase

Ref document number: 18249458

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE