Index information generation and product search method and system, electronic device, medium

By generating dynamic and static indexes through hierarchical clustering of users and products, the problem of low product retrieval accuracy in existing technologies is solved, and the matching of products with user needs is realized, thereby improving retrieval accuracy.

CN121387900BActive Publication Date: 2026-03-20HANGZHOU ALIBABA INT NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, product retrieval generates index information based solely on the inherent characteristics of the products, resulting in a low degree of matching between the retrieved products and user needs, and insufficient retrieval accuracy.

Method used

By performing hierarchical clustering on user and product sets, dynamic and static indexes are generated. The dynamic index reflects user preferences based on user representations, while the static index is based on product features. These are combined to obtain comprehensive index information for product retrieval.

Benefits of technology

It improves the accuracy of product retrieval, ensuring that the retrieved products match both the query information and the user's needs, thus enhancing the accuracy of the retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121387900B_ABST
    Figure CN121387900B_ABST
Patent Text Reader

Abstract

A kind of generation and commodity retrieval method and system of index information, electronic equipment, medium, comprising: determine the user set that at least one target commodity exists historical interaction behavior;Multiple target goods belong to the same leaf cluster in commodity hierarchical clustering tree, commodity hierarchical clustering tree is obtained based on hierarchical clustering of commodity representation;Hierarchical clustering is carried out to the user in user set to obtain user hierarchical clustering tree;The target leaf cluster of target commodity is determined based on the similarity between the first average user representation of the user with target commodity existing historical interaction behavior and the second average user representation of each leaf cluster in user hierarchical clustering tree;The cluster identifier of each level cluster on the clustering path where target leaf cluster is located is spliced to obtain dynamic index, static index and dynamic index are spliced into index information;Static index is spliced from the cluster identifier of each level cluster to which target commodity belongs.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] One or more embodiments of the present specification relate to the technical field of computer technology, and particularly relate to an index information generation and commodity retrieval method and system, an electronic device, and a medium. BACKGROUND

[0002] In an e-commerce scenario, a commodity list presented to a user is obtained by sorting commodity recall results according to a preset strategy, and the commodity recall results include a plurality of commodities matching query information retrieved from a commodity database according to the query information. In related technologies, index information is generated for each commodity, and a generative recall model is trained. When performing commodity retrieval, the query information is input into the generative recall model, the index information related to the input query information is recalled through the generative recall model, and commodity retrieval is performed based on the recalled index information. In related technologies, the index information can be determined based on commodity features. However, the index information generated by the above method is only related to the inherent features of the commodity, and therefore, when commodity retrieval is performed based on the above index information, only the features of the retrieved commodities can be guaranteed to match the query information, but the retrieved commodities cannot be guaranteed to match user demand, resulting in a low retrieval accuracy. SUMMARY

[0003] Therefore, one or more embodiments of the present specification provide technical solutions as follows.

[0004] According to a first aspect of one or more embodiments of the present specification, a method for generating index information is provided, and the method comprises the following steps:

[0005] determining a user set having a historical interaction behavior with at least one target commodity in a plurality of target commodities; the plurality of target commodities belong to a same leaf cluster in a commodity hierarchical clustering tree, and the commodity hierarchical clustering tree is obtained by performing hierarchical clustering on commodity representations of each commodity in a preset commodity set;

[0006] performing hierarchical clustering on each user in the user set based on user representations of the users, to obtain a user hierarchical clustering tree;

[0007] performing the following operations for each target commodity in the plurality of target commodities:

[0008] obtaining a first average user representation of each user having a historical interaction behavior with the target commodity and a second average user representation of each leaf cluster in the user hierarchical clustering tree;

[0009] determining a target leaf cluster of the target commodity based on a similarity between the first average user representation and the second average user representation of each leaf cluster in the user hierarchical clustering tree.

[0010] concatenate the cluster identifiers of the clusters at each level on the cluster path where the target leaf cluster is located to obtain a dynamic index corresponding to the target commodity, and concatenate the static index corresponding to the target commodity and the dynamic index corresponding to the target commodity to obtain the index information of the target commodity; wherein the static index is obtained by concatenating the cluster identifiers of the clusters at each level to which the target commodity belongs.

[0011] According to a second aspect of one or more embodiments of the present specification, a commodity retrieval method is provided, the method comprising:

[0012] obtaining target input information, the target input information comprising target query information input by a user, user information of the user, and context information;

[0013] inputting the target input information into a pre-trained generative recall model to enable the generative recall model to recall target index information matching the target input information; wherein the generative recall model is trained based on sample input information and index information of sample commodities, the sample commodities being commodities that have been interacted with by a user among commodities retrieved based on the sample input information, the target index information and the index information of the sample commodities being generated based on the method of the first aspect of one or more embodiments of the present specification;

[0014] obtaining a target commodity identifier pre-associated with the target index information;

[0015] performing commodity retrieval based on the target commodity identifier.

[0016] According to a third aspect of one or more embodiments of the present specification, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor, by running the executable instructions, implements the steps of the method according to the first aspect or the second aspect of one or more embodiments of the present specification.

[0017] According to a fourth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, having stored thereon computer instructions which, when executed by a processor, implement the steps of the method according to the first aspect or the second aspect of one or more embodiments of the present specification.

[0018] According to a fifth aspect of one or more embodiments of the present specification, a computer program product is provided, comprising computer programs or instructions which, when executed by a processor, implement the steps of the method according to the first aspect or the second aspect of one or more embodiments of the present specification.

[0019] According to a sixth aspect of one or more embodiments of the present specification, a commodity retrieval system is provided, comprising:

[0020] a server configured to store index information of each commodity, receive a commodity retrieval request comprising target input information, perform commodity retrieval based on the method according to the second aspect of one or more embodiments of the present specification in response to the commodity retrieval request, and send commodity information of the retrieved commodity to a client; the index information is obtained based on the method according to the first aspect of one or more embodiments of the present specification;

[0021] the client is configured to obtain the commodity information sent by the server and display the obtained commodity information.

[0022] As can be seen from the above embodiments, the present specification determines a user set having a historical interaction behavior with at least one of a plurality of target commodities, performs hierarchical clustering based on user representation, splices the cluster identifiers of each level cluster obtained from the hierarchical clustering result to obtain a dynamic index, and splices the dynamic index and a static index obtained based on the hierarchical clustering result of the commodities to obtain the index information of the commodities. On the one hand, the dynamic index is obtained based on the hierarchical clustering result of the user representation, and the user representation can reflect the user preference. On the other hand, the static index is obtained based on the hierarchical clustering result of the commodities, and the hierarchical clustering result of the commodities can reflect the inherent characteristics of the commodities. Therefore, the finally obtained index information is related to both the user preference and the inherent characteristics of the commodities. In this way, when the commodities are retrieved based on the index information, the characteristics of the retrieved commodities can be matched with the query information, and the retrieved commodities can be matched with the user demand, thereby improving the retrieval accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 FIG. 1 is a schematic diagram of a system architecture provided by an exemplary embodiment.

[0024] Figure 2 FIG. 2 is a flowchart of a method for generating index information provided by an exemplary embodiment.

[0025] Figure 3 FIG. 3 is a schematic diagram of a hierarchical clustering process provided by an exemplary embodiment.

[0026] Figure 4 FIG. 4 is a schematic diagram of an updating process of index information provided by an exemplary embodiment.

[0027] Figure 5 FIG. 5 is a flowchart of a commodity retrieval method provided by an exemplary embodiment.

[0028] Figure 6A structural diagram of a generative recall model provided by an example embodiment.

[0029] Figure 7 A schematic diagram of an overall process provided by an example embodiment.

[0030] Figure 8 A structural diagram of a device provided by an example embodiment.

[0031] Figure 9 A block diagram of an index information generation apparatus provided by an example embodiment.

[0032] Figure 10 A block diagram of a commodity retrieval apparatus provided by an example embodiment. DETAILED DESCRIPTION

[0033] In order to enable persons skilled in the art to better understand the technical solutions in the specification, the technical solutions in the specification will be clearly and completely described below in conjunction with the drawings in the specification. Obviously, the described embodiments are only some of the embodiments of the specification, not all the embodiments. Based on the embodiments in the specification, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the specification.

[0034] The user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the specification are information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0035] Figure 1 A structural diagram of a commodity retrieval system provided by an example embodiment. As shown in Figure 1 , the system can include a server 11, a network 12, and a plurality of electronic devices such as a personal computer (PC) 13, a mobile phone 14, etc.

[0036] The server 11 can be a physical server containing a standalone host, or the server 11 can be a virtual server carried by a host cluster. In the running process, the server 11 can run the server side program of an application to realize the related functions of the application, such as when the server 11 runs the program of the commodity retrieval service, it can realize the service platform of the corresponding commodity retrieval service.

[0037] The personal computer 13 and the mobile phone 14 are only part of the types of electronic devices that can be used by the user. In fact, the user can obviously also use electronic devices of the following types: tablet devices, notebook computers, Personal Digital Assistants (PDAs), wearable devices (such as smart glasses, smart watches, etc.), and the like, and the embodiments of the present specification are not limited in this regard. During operation, the electronic device can run a client-side program of an application to implement the related functions of the application, such as when the electronic device runs the program of the commodity search service, the client of the commodity search service can be implemented. The application program of the client of the commodity search service described above can be started and run on the electronic device. The client-side program can be a native application installed on the electronic device, or the client-side program can be an applet, a fast application, or other similar forms. Of course, when using web page technologies such as HTML5 or the like, the related functions can be implemented through a page displayed by a browser, and the browser can be a standalone browser application or a browser module embedded in some application.

[0038] The network 12 between the electronic devices such as the personal computer 13 and the mobile phone 14 and the server 11 can be implemented by wired or wireless networks based on the communication mode supported by the corresponding electronic device, and the present specification is not limited in this regard. For example, the personal computer 13 can support wired and wireless communication at the same time, and wired or wireless networks can be used as needed to implement communication, while the mobile phone 14 usually only supports wireless communication, and wireless networks can be used to implement communication.

[0039] Based on the above system architecture, the embodiments of the present specification propose an index information generation method, see Figure 2 The index information generation method comprises the following steps:

[0040] Step S12: Determine a user set having a historical interaction behavior with at least one target commodity in a plurality of target commodities; the plurality of target commodities belong to the same leaf cluster in a commodity hierarchical clustering tree, and the commodity hierarchical clustering tree is obtained by performing hierarchical clustering on commodity representations of each commodity in a preset commodity set;

[0041] Step S14: Hierarchical clustering of each user in the user set based on the user representation of each user in the user set, to obtain a user hierarchical clustering tree;

[0042] Step S16: For each target commodity in the plurality of target commodities, the following operations are performed respectively:

[0043] Step S162: obtaining a first average user representation of each user having a historical interaction behavior with the target commodity and a second average user representation of each leaf cluster in the user hierarchical clustering tree;

[0044] Step S164: determining a target leaf cluster of the target commodity based on a similarity between the first average user representation and the second average user representation of each leaf cluster in the user hierarchical clustering tree;

[0045] Step S166: splicing the cluster identifiers of each cluster on the clustering path of the target leaf cluster to obtain a dynamic index corresponding to the target commodity, and splicing a static index corresponding to the target commodity and the dynamic index corresponding to the target commodity to obtain index information of the target commodity; wherein the static index is obtained by splicing the cluster identifiers of each cluster to which the target commodity belongs.

[0046] In step S12, a preset commodity set can be determined. The preset commodity set can include part or all of the commodities of the e-commerce platform. In some embodiments, each commodity in the preset commodity set is a commodity under a same commodity category (such as a leaf category in a commodity category classification system of the e-commerce platform). The commodity category classification system can be represented by a tree structure (hereinafter referred to as a commodity category tree). The leaf category is a commodity category represented by a leaf node in the commodity category tree. For example, a root node root of a commodity category tree represents a “digital product” category, a child node node1 of the root node root represents a “computer” category, and a child node node2 of the node node1 is a leaf node, and the node node2 represents a “laptop computer” category. Therefore, the “laptop computer” is a leaf category.

[0047] After determining the preset commodity set, hierarchical clustering can be performed on the commodity representations of each commodity in the preset commodity set to obtain a tree structure, i.e., a commodity hierarchical clustering tree. The commodity representation can include multi-modal representation, such as text representation, picture representation, and efficiency representation. The text representation can be obtained by encoding the commodity description text such as the title content and / or the commodity details of the commodity. The picture representation can be obtained by encoding the pictures such as the header picture (i.e., the first picture in the commodity main picture) and the detail picture of the commodity. The efficiency representation can be obtained by encoding the commodity interaction information such as the click rate, the transaction rate, and / or the purchase amount of the commodity in a specified time period.

[0048] When performing hierarchical clustering, the number of clustering operations can be specified. For example, with a clustering operation of 4 operations, a hierarchical clustering algorithm (such as K-means hierarchical clustering) can be called 4 times to obtain a hierarchical clustering tree for the products. The hierarchical clustering tree includes multiple levels, each level containing one or more nodes, and each node representing a cluster. Specifically, the level corresponding to the product set is preset as the first level, the node of the first level is the root node, and the cluster corresponding to the root node is the first-level cluster (also called the top-level cluster). The level obtained by performing the first hierarchical clustering on the first-level cluster is the second level, the nodes of the second level are children of the root node, and the cluster corresponding to the nodes of the second level is the second-level cluster. The level obtained by performing the second hierarchical clustering on the second-level cluster is the third level, and so on. The clusters corresponding to leaf nodes are called leaf clusters. In the hierarchical clustering tree, except for the root node, the cluster represented by any node is a subset of the clusters represented by its parent node. A hierarchical clustering tree includes multiple clustering paths, which are paths connecting the root node to the leaf node. The level of each node in the hierarchical clustering tree decreases sequentially from the root node to the leaf node; that is, the root node corresponds to the highest level, and the leaf node corresponds to the lowest level.

[0049] The process of hierarchical clustering of products in a predefined product set is a process of classifying these products level by level, with the classification granularity gradually becoming more refined. It can be understood that the predefined product set represents the largest granular category of these products. The clusters obtained after one hierarchical clustering step represent the classification results obtained after a first-level refinement of these products. The clusters obtained after a second hierarchical clustering step represent the classification results obtained after further refinement of the classification results obtained after the first-level refinement. This hierarchical clustering is performed sequentially, classifying multiple products level by level. In each hierarchical clustering process, a product is assigned to a cluster at that level. Thus, after N (N is a positive integer) clustering steps, each product will be assigned to at most N hierarchical clusters.

[0050] like Figure 3 As shown, the products in layer 210 are from a predefined product set. After one hierarchical clustering, the products in the predefined product set are divided into different clusters, such as clusters labeled 000, 001, and 002 in layer 220. During the second hierarchical clustering process, the products in clusters labeled 000, 001, and 002 in layer 220 are further clustered and assigned to different clusters in layer 230. For example, products within cluster 000 in layer 220 are assigned to clusters labeled 0000 and 0001 in layer 230. After a specified number of hierarchical clustering operations, each product is assigned to a cluster in each clustering process.

[0051] The hierarchical clustering results obtained based on the above process not only include the hierarchical structure of the product hierarchical clustering tree, but also the clustering information obtained from each hierarchical clustering. Specifically, the clustering information includes: the number of clusters obtained in this clustering, the cluster identifier of each cluster, and the item ID of each product within each cluster.

[0052] After obtaining the product hierarchical clustering tree, the same leaf clusters belonging to the product hierarchical clustering tree (e.g., Figure 3 Multiple products in the cluster marked 0000 are identified as target products. After identifying multiple target products, a set of users with historical interaction behavior with at least one of the target products can be further identified. Historical interaction behavior refers to interactions that occurred within a historical time period (e.g., the last 7 days), including but not limited to browsing, adding to cart, favorites, and / or purchasing. Historical interaction behavior can reflect users' interests, potential purchasing intentions, and deeper personalized needs. For example, assuming the identified target products include product A, product B, and product C, and user U1 browsed product A, user U2 favorited product B and purchased product C, and users U3 and U4 purchased product B, then the user set includes users U1, U2, U3, and U4.

[0053] In step S14, hierarchical clustering can be performed on the user representations of each user in the user set to obtain a tree structure, namely, a user hierarchical clustering tree. User representations can include static user representations and dynamic user representations. Static user representations refer to long-term stable and unchanging features, including but not limited to the user's age, gender, region, occupation, and / or income level. Dynamic user representations refer to short-term, real-time, and constantly evolving features, including but not limited to the user's behavioral sequences. Static features provide a stable basic profile of the user, while dynamic features reflect the user's constantly changing real-time preferences and needs. Combining the two allows for a more accurate and comprehensive modeling of the user.

[0054] When performing hierarchical clustering on the user representations, the number of hierarchical clustering can be specified. Taking an example in which the number of clustering is equal to 4 times, the hierarchical clustering algorithm (such as Kmeans hierarchical clustering) can be called 4 times to obtain the user hierarchical clustering tree. The number of clustering used when performing hierarchical clustering on the user representations can be the same as or different from the number of clustering used when performing hierarchical clustering on the commodity representations. Specifically, the user set can be taken as the top-level cluster of the user hierarchical clustering tree (i.e., the cluster corresponding to the root node), and the clusters obtained by performing hierarchical clustering on the user set once can be taken as the sub-clusters under the top-level cluster. In the process of performing hierarchical clustering twice, each cluster obtained by performing hierarchical clustering once is further clustered. The subsequent hierarchical clustering processes are performed in the same way. After a specified number of hierarchical clustering, each user in the user set is divided into a cluster in each clustering process.

[0055] In step S16, the target leaf cluster of each target commodity in the user hierarchical clustering tree can be determined, and then the index information of the target commodity can be determined according to the target leaf cluster. The process is described in detail as follows.

[0056] In step S162, the first average user representation of each user having a historical interaction behavior with the target commodity can be obtained. Specifically, the user representation of each user having a historical interaction behavior with the target commodity can be obtained, and the user representations of each user having a historical interaction behavior with the target commodity are weighted and averaged to obtain the first average user representation of each user having a historical interaction behavior with the target commodity. For example, assuming that the target commodity is commodity A, and users U1, U2 and U3 all have a historical interaction behavior with commodity A, the user representation of user U1, the user representation of user U2 and the user representation of user U3 can be weighted and averaged to obtain the first average user representation of each user having a historical interaction behavior with commodity A. Further, the user representations can be weighted and averaged based on the weight corresponding to each user. The weight corresponding to the user is positively correlated with the number of interactions of the user with the target commodity, and / or is inversely correlated with the time of interaction of the user with the target commodity. The more times the user interacts with the target commodity (e.g., repeatedly browses, purchases multiple times), the more intense and explicit the interest of the user in the target commodity, and the higher weight is given to the user, so that the representation obtained by the final weighted average can better reflect the stable characteristics of the core audience and reduce noise interference. In addition, the user interest and the popularity of the commodity change over time (this phenomenon is called interest drift), and by giving a higher weight to recent interactions, the “interest drift” phenomenon can be dynamically captured, so that the representation obtained by the final weighted average can better reflect the latest interest point of the user.

[0057] The second average user representation of each leaf cluster in the user hierarchical clustering tree can also be obtained. Assuming that the user hierarchical clustering tree includes three leaf clusters C1, C2, and C3, taking leaf cluster C1 as an example, assuming that leaf cluster C1 includes M users, the user representations of the M users can be obtained respectively, and the user representations of the M users are weightedly averaged (the weighted averaging processing manner can refer to the foregoing embodiments) to obtain the second average user representation of leaf cluster C1. The manner of obtaining the second average user representation of other leaf clusters is similar, and will not be described here.

[0058] In the foregoing process, the first average user representation of each user having a historical interaction behavior with the target commodity is an aggregation and abstraction of the characteristics of the "user group interested in the target commodity", and the second average user representation of a certain leaf cluster is an aggregation and abstraction of the characteristics of the "user group having similar user representations". If the first average user representation has a higher similarity with the second average user representation of a certain leaf cluster, it indicates that the "user group interested in the target commodity" has a higher coincidence degree in overall preference and characteristics with the "subdivided user group having specific similar characteristics" represented by the leaf cluster, and the users in the leaf cluster are more likely to be interested in the target commodity. Therefore, in step S164, the similarity between the second average user representation of each leaf cluster and the first average user representation can be determined respectively, and the leaf cluster to which the second average user representation having the highest similarity with the first average user representation belongs can be determined as the target leaf cluster of the target commodity. Taking the foregoing example, the similarity S1 between the second average user representation of leaf cluster C1 and the first average user representation, the similarity S2 between the second average user representation of leaf cluster C2 and the first average user representation, and the similarity S3 between the second average user representation of leaf cluster C3 and the first average user representation can be determined. Assuming that S1 is the maximum among S1, S2, and S3, leaf cluster C1 can be determined as the target leaf cluster of the target commodity.

[0059] In step S166, the cluster identifiers of the clusters at each level on the clustering path of the target leaf cluster can be spliced to obtain the dynamic index corresponding to the target commodity. The clusters at each level on the clustering path of the target leaf cluster include the target leaf cluster and the direct parent cluster at each level on the path from the root node of the user hierarchical clustering tree to the target leaf cluster through multiple hierarchical clustering. For example, assuming that the identifier of the cluster corresponding to the root node of the user hierarchical clustering tree is 110, the cluster with identifier 110 is divided into a cluster with identifier 111 and a cluster with identifier 112 through the first hierarchical clustering, the cluster with identifier 111 is divided into a cluster with identifier 1111 and a cluster with identifier 1112 through the second hierarchical clustering, the cluster with identifier 1111 is divided into a cluster with identifier 11111 and a cluster with identifier 11112 through the third hierarchical clustering, and the cluster with identifier 11111 is the target leaf cluster, the cluster identifiers of the clusters at each level on the clustering path of the target leaf cluster are 110, 111, 1111 and 11111, respectively. The cluster identifiers of the clusters at each level can be spliced to obtain the dynamic index corresponding to the target commodity.

[0060] In some embodiments, the dynamic index is obtained by splicing multiple dynamic index subsequences, and the jth dynamic index subsequence in the multiple dynamic index subsequences is determined based on the cluster identifier of the jth cluster at each level on the clustering path of the target leaf cluster. Assuming that the cluster identifier of the jth cluster at each level is directly taken as the jth dynamic index subsequence, then, continuing the previous example, each dynamic index subsequence in the multiple dynamic index subsequences is 110, 111, 1111 and 11111, respectively, and the following dynamic index can be obtained by splicing: “110 111 1111 11111”.

[0061] After obtaining the dynamic index corresponding to the target commodity, the dynamic index and the static index corresponding to the target commodity can be spliced to obtain the index information of the target commodity.

[0062] In some embodiments, the static index of the target commodity is obtained by splicing a plurality of static index sub-sequences. The first static index sub-sequence in the plurality of static index sub-sequences is determined based on the category identifier of the leaf category to which the target commodity belongs in the commodity category tree, and the i+1th static index sub-sequence in the plurality of static index sub-sequences is determined based on the cluster identifier of the i-level cluster to which the target commodity belongs. Assuming that the category identifier of the leaf category to which the commodity A belongs in the commodity category tree is "100000075", and after 4 times of hierarchical clustering, the cluster identifiers of the clusters to which the target commodity belongs from the first time of hierarchical clustering to the fourth time of hierarchical clustering are 00, 000, 0000, and 0001, respectively, the static index of the commodity A can be represented as "100000075 00 000 0000 0001". The final spliced index information is as follows: "110 111 1111 11111100000075 00 000 0000 0001".

[0063] The above index information generation method first determines the dynamic index based on the hierarchical clustering result of the user representation, and then splices the dynamic index with the static index obtained based on the hierarchical clustering result of the commodity to obtain the index information of the commodity. The static index is obtained based on the commodity representation and can reflect the semantic information of the commodity. When the query information input by the user is obtained, the commodity related to the semantic information of the query information can be retrieved based on the static index. The dynamic index is obtained based on the user representation and can reflect the user preference information. The commodity matching the user preference can be retrieved based on the dynamic index, which solves the problem that the commodities retrieved in the related art cannot match the user demand, and improves the retrieval accuracy.

[0064] In some embodiments, the index information generated for different commodities by the above hierarchical clustering method can be the same. An association relationship between the index information and the commodity identifier can be established, where the commodity identifier can be a string of hash codes, and each commodity has a unique commodity identifier. In retrieval, the index information can be recalled by the generative recall model based on the query information input by the user, the commodity identifier can be recalled based on the association relationship between the index information and the commodity identifier, and the commodity retrieval can be performed based on the commodity identifier. By introducing the index information in commodity retrieval, high-dimensional commodity semantic features can be mapped to a low-dimensional codebook space, which can significantly reduce the storage overhead while ensuring the retrieval efficiency, and is especially suitable for real-time retrieval of a large number of commodities in an e-commerce scenario.

[0065] In some embodiments, since the user representation will change over time, an update condition can be set, and the user set having historical interaction behaviors with at least one target commodity in the plurality of target commodities is updated when the update condition is met. By continuously updating the user set having historical interaction behaviors with the target commodity, the latest interaction behavior sequence of the user and the commodity can be obtained, so that the obtained user representation can keep in synchronization with the dynamically evolving interest preferences of the user. Since the user set having historical interaction behaviors with the target commodity has changed, the target leaf cluster determined for the target commodity subsequently can also change, so that the dynamic index corresponding to the target commodity changes, and the index information of the target commodity is changed. That is, the index information generated for each commodity by the scheme of the embodiments of the present specification is not fixed.

[0066] As shown in Figure 4 , it is assumed that two hierarchical clusterings are performed based on commodity representations, and the obtained commodity hierarchical clustering tree includes four leaf clusters, and the cluster identifiers thereof are respectively denoted as D1, D2, D3 and D4. For the cluster with the cluster identifier D2, it is assumed that two hierarchical clusterings are performed on the users having historical interaction behaviors with the commodities in the cluster, and the obtained user hierarchical clustering tree includes two leaf clusters, and the cluster identifiers thereof are respectively denoted as C1 and C2; for the cluster with the cluster identifier D3, it is assumed that two hierarchical clusterings are performed on the users having historical interaction behaviors with the commodities in the cluster, and the obtained user hierarchical clustering tree includes two leaf clusters, and the cluster identifiers thereof are respectively denoted as C3 and C4. When the method of the embodiments of the present specification is executed at a certain time, the target leaf cluster corresponding to the commodities V1, V2 and V3 is determined as the cluster with the cluster identifier C1, and when the method of the embodiments of the present specification is executed at another time, since the users having historical interaction behaviors with the commodity V2 change, the target leaf cluster determined for the commodity V2 is changed to the cluster with the cluster identifier C2.

[0067] In the above manner, the dynamic index obtained can accurately reflect the current user interest distribution, and further ensure that the index information generated for the target commodity always keeps consistent with the real user preferences, improve the response ability of the commodity retrieval system to the instant intention and interest drift of the user, and return more time-sensitive and relevant personalized results.

[0068] Referring to Figure 5 , the embodiments of the present specification also provide a commodity retrieval method, and the method comprises:

[0069] Step S22: obtaining target input information, the target input information including target query information input by a user, user information of the user and context information;

[0070] Step S24: input the target input information into the pre-trained generative recall model to enable the generative recall model to recall target index information matched with the target input information; wherein the generative recall model is trained based on sample input information and index information of sample commodities, the sample commodities are commodities that are interacted by a user among commodities retrieved based on the sample input information, and the target index information and the index information of the sample commodities are generated based on the method in any of the foregoing embodiments;

[0071] Step S26: obtain a target commodity identifier pre-associated with the target index information;

[0072] Step S28: perform commodity retrieval based on the target commodity identifier.

[0073] The generative recall model in this embodiment can directly recall index information of commodities based on target input information. Since the index information can reflect both semantic information of commodities and user preference information, the commodities retrieved based on the index information can be matched with both semantics of target information and user demand, thereby improving retrieval accuracy.

[0074] In step S22, the target input information includes the following three:

[0075] Target query information input by the user, which can include a plurality of retrieval keywords. For example, when the user wants to retrieve a dress, the target query information input by the user can be: “new, light, chiffon dress”. The target query information can be text information or other modal information such as voice information or picture information. When the target query information is non-text information, the target query information can be parsed to obtain a plurality of retrieval keywords.

[0076] User information, which can include static user information and dynamic user information, and specific definitions are given in the foregoing embodiments.

[0077] Context information, which includes but is not limited to information of a user device, network environment information, time and weather information, geographic location information, network hot search information, a user's social relationship chain and / or crowd characteristic information such as purchasing power, price preference, user label and other characteristic information having a significant crowd trend of the user.

[0078] In step S24, the obtained target input information can be input into the generative recall model. The generative recall model can recall target index information based on the target input information, and the target index information is obtained by splicing static index and dynamic index. The specific generation method is given in the foregoing embodiments.

[0079] In some embodiments, the index information of a plurality of commodities can be the same. In order to distinguish different commodities, the index information of the commodity can be pre-associated with a commodity identifier (item ID). The commodity identifier can be a meaningless hash code, and the commodity identifiers of any two commodities are different. When retrieving, the target index information can be recalled by the generative recall model, and then the target commodity identifier associated with the target index information can be recalled based on the association between the index information and the commodity identifier, and the commodity retrieval can be performed based on the target commodity identifier.

[0080] In some embodiments, referring to Figure 6 , the generative recall model includes an encoder 302 and a decoder 304. The encoder 302 is configured to encode the target input information to obtain a semantic feature vector, and to encode the user information and the context information to obtain a user feature vector. The decoder 304 includes a first decoding module 3042 and a second decoding module 3044. The first decoding module 3042 is configured to decode the semantic feature vector to obtain a target static index, and to output a hidden vector to the second decoding module 3044. The hidden vector is an intermediate vector generated in the process of the first decoding module 3042 generating the target static index. The second decoding module 3044 is configured to decode the user feature vector based on the hidden vector to obtain a target dynamic index. The target index information is obtained by splicing the target static index and the target dynamic index. The hidden vector is an intermediate vector obtained by decoding the semantic feature vector, and contains semantic information corresponding to the query information. The first decoding module 3042 outputs the hidden vector to the second decoding module, so that the second decoding module 3044 can transmit the semantic information as background information of the current retrieval process, so that the target dynamic index obtained by decoding matches the semantics of the query information.

[0081] Further, the target static index includes a plurality of static index sub-sequences. Specifically, a first static index sub-sequence in the target static index is determined based on a category identifier of a leaf category to which the commodity belongs in the commodity category tree, and an i+1th static index sub-sequence in the target static index is determined based on a cluster identifier of an i-level cluster to which the commodity belongs. Similarly, the target dynamic index includes a plurality of dynamic index sub-sequences. Specifically, a jth dynamic index sub-sequence in the target dynamic index is determined based on a cluster identifier of a j-level cluster to which the user currently performing the commodity search belongs in the user hierarchical clustering tree. On this basis, the decoder 304 can sequentially output each static index sub-sequence in the target static index and each dynamic index sub-sequence in the target dynamic index. Taking the target static index as an example, the decoder 304 can first output the first static index sub-sequence in the target static index, then output the second static index sub-sequence in the target static index, and then output the third static index sub-sequence in the target static index, and so on. The decoder 304 outputs the target dynamic index in a similar manner, which will not be described here.

[0082] In some embodiments, continuing to refer to Figure 6 , the decoder 304 further includes a first attention module 3046 and a second attention module 3048. The first attention module 3046 is configured to determine keys (K) and values (V) based on the semantic feature vector, and determine a query (Q) based on the static index sub-sequence output by the decoder 304 last time, perform attention processing based on the keys, values and query determined by the first attention module 3046, obtain a first output vector, and output the first output vector to the first decoding module 3042, so that the first decoding module 3042 decodes the first output vector to obtain a current static index sub-sequence. For example, assuming that the static index sub-sequence output by the decoder last time is the i-th static index sub-sequence, the first attention module 3046 can determine Q based on the i-th static index sub-sequence, take the semantic feature vector as K and V, determine the attention weight based on the correlation between Q and K, and weight V based on the determined attention weight to obtain the first output vector. The first decoding module 3042 decodes the first output vector to obtain the current static index sub-sequence, i.e., the i+1th static index sub-sequence. Through the above processing, long-distance, non-local complex dependency relationships in the semantic feature vector can be effectively captured, key information and their mutual influences can be identified, and more accurate and coherent context information can be provided for subsequent decoding. In addition, the first attention module 3046 can also output a hidden vector obtained in the process of generating the first output vector to the second decoding module 3044.

[0083] The second attention module 3048 is configured to determine a key (K) and a value (V) based on the user feature vector, determine a query (Q) based on a dynamic index subsequence output by the decoder 304 last time, perform attention processing based on the key, the value and the query determined by the second attention module 3048, obtain a second output vector, and output the second output vector to the second decoding module 3044, so that the second decoding module 3044 decodes the second output vector based on the latent vector to obtain a current dynamic index subsequence. For example, assuming that the dynamic index subsequence output by the decoder last time is an i th dynamic index subsequence, the second attention module 3048 can determine Q based on the i th dynamic index subsequence, take the user feature vector as K and V, determine an attention weight based on the correlation between Q and K, and weight V based on the determined attention weight to obtain a second output vector. The second decoding module 3044 decodes the second output vector based on the latent vector, and a current dynamic index subsequence, i.e., an (i+1) th dynamic index subsequence, can be obtained. Through the above processing, long-distance, non-local complex dependency relationships in the user feature vector can be effectively captured, key information and mutual influences thereof can be identified, and more accurate and coherent context information can be provided for subsequent decoding.

[0084] In some embodiments, a plurality of sample data can be obtained, and each piece of sample data includes sample input information and index information of a sample commodity. The sample input information includes query information (query), user information and context information (the user information and the context information can be collectively referred to as user), and one piece of sample data can be denoted as (user, query, index). The plurality of sample data can be input into the generative recall model respectively, so that the generative recall model outputs index information based on the sample input information in the sample data, determines a loss corresponding to the sample data based on the index information output by the generative recall model and the index information in the sample data, weights the losses corresponding to the plurality of sample data based on weights corresponding to the plurality of sample data, obtains a loss of the generative recall model, and trains the generative recall model based on the loss of the generative recall model.

[0085] The interaction behavior data of commodities has the characteristics of dynamic accumulation, and the interaction richness of different commodities is significantly different. For popular commodities with sufficient interaction data, the average user representation is relatively stable and reliable, and the generated dynamic index has high accuracy. However, for long-tail commodities with sparse interaction, due to the limited number of interaction users, the average user representation calculated often has great uncertainty and volatility, which may lead to inaccurate dynamic index generated, resulting in incorrect mounting of commodities to the dynamic index, and further leading to incorrect sample data obtained. If such incorrect sample data is directly used for model training, it will introduce a large number of noise samples, which will negatively affect the learning effect of the model. In order to effectively deal with this problem, the embodiment of the present specification proposes a training strategy based on sample reliability weighting from the perspective of loss function design, the core idea of which is that the weight corresponding to the sample data is positively related to the number of interactions of the sample commodity to which the index information in the sample data belongs. The more the number of interactions of a commodity, the more stable the average user representation of the commodity, and the more reliable the corresponding cluster division, so a higher weight is given in the loss function (i.e. sample reliability weighted loss); on the contrary, although the cluster division of commodities with sparse interaction is uncertain, these samples are not completely discarded, but the noise influence is reduced by reducing their contribution in the loss function, while the potential useful information is retained. Specifically, the reliability weight of each sample is defined as:

[0086]

[0087] wherein, represents a threshold of the number of interactions between a commodity and a user, represents the number of interactions between a commodity and a user. If the commodity has obtained stable user representation, the weight of the corresponding sample data is 1; If the commodity does not satisfy a certain number of interactions, the weight of the corresponding sample data is set to , that is, the weight of the sample data is smaller than that of other sample commodities.

[0088] Figure 7 An illustration of the process from index information generation to generative recall model training is shown, and the overall process includes four steps of data processing, index information generation, generative recall model training and commodity recall. The specific implementation process of each step is as follows:

[0089] ​1. Data processing. Specifically, the commodity information (such as title, brand, category, etc.) can be processed by a pre-trained language model to output commodity representations representing the semantic information of the commodity; the interaction data between commodities and users is processed by a collaborative filtering model, such as a deep structured semantic model (DSSM), to output user representations representing user attributes.

[0090] 2. Index information generation using K-means hierarchical clustering algorithm. Specifically, the generation of index information includes three stages. First, based on the commodity representation, a category-guided hierarchical clustering algorithm is used to generate static index. Then, based on the leaf category cluster in the generated commodity cluster, all users who have historical interaction behavior with the commodities in the leaf category cluster are found, and based on the user representations of these users, a collaborative cluster is generated using a hierarchical clustering algorithm. Finally, the commodities in each commodity cluster are dynamically mounted according to their distance from the final user clusters. Specifically, the following process is included:

[0091] The information of a commodity can be understood from two dimensions: static semantic dimension and dynamic collaborative dimension. For any commodity, its internal semantic information (such as commodity category, attribute, description, etc.) remains relatively stable over a long period of time and is suitable for representation by static indexing. However, the collaborative information of a commodity (i.e., the characteristics of the user group that has historical interaction behavior with the commodity and their preference patterns) evolves dynamically with the continuous accumulation of user behavior data. Based on this observation, the embodiments of the present specification propose to split the traditional single index into static index and dynamic index, forming a composite index structure, to better capture the multi-dimensional feature representation of commodities.

[0092] The construction of static index is relatively direct: first, extract the semantic information of the commodity (such as commodity category, attribute, description, etc.), and encode it through a pre-trained large language model to obtain a dense semantic feature vector representation (i.e., commodity representation). Then, a category-guided hierarchical clustering algorithm is used to cluster the semantic feature vector representations of all commodities. Finally, a hierarchical commodity hierarchical clustering tree is constructed, where each leaf node represents a set of semantically similar commodities.

[0093] The construction process of dynamic index includes the following core steps:

[0094] (1) User group identification: For each commodity cluster after semantic clustering, collect the user set that has interaction behavior with all commodities in the cluster, and establish a mapping set from commodity semantic category to related user group.

[0095] (2) User clustering: Hierarchical clustering is performed on the identified user groups to form a user hierarchical clustering tree. The centroid vector of each leaf cluster in the user hierarchical clustering tree (i.e., the second average user representation) is calculated as the representative representation of the user group.

[0096] (3) Commodity mounting: For each commodity, the average user representation vector (i.e., the first average user representation) is calculated based on its historical interaction users. When the number of interaction users is large, a weighted average or time decay strategy is used to obtain a stable representation. Then, the similarity distance between the first average user representation and each second average user representation is calculated, and the commodity is mounted under the most similar user cluster.

[0097] 3. Using the generated index information, a generative recall model is trained using a weighted loss function based on sample reliability. During model training, two additional attention modules are added on the decoding side to enhance the generation results when decoding static indexes and dynamic indexes.

[0098] Since the generated index information contains information in two different dimensions of semantics and collaboration, the generative recall model should also have the ability to understand and generate these two types of information respectively. Therefore, the embodiments of the present specification make targeted optimization and adjustment to the generative recall model based on the encoder-decoder architecture, so that it can better adapt to the double-layer index system of "static index + dynamic index". Specifically as follows:

[0099] In the encoder design, the embodiments of the present specification generate two different vector representations of semantic feature vectors and user feature vectors. Specifically, the semantic feature vector is mainly obtained from the query information and is specifically used to capture the semantic content, intent understanding and content relevance information of the query information; while the user feature vector is obtained by fusing user information and context information, and focuses on modeling the user's personalized preferences, group affiliation and interaction behavior patterns.

[0100] In the process of generating index information by the decoder, the embodiments of the present specification implement a two-layer index information generation mechanism corresponding to the hierarchical structure of the index construction described above.

[0101] When generating static indexes, an additional attention mechanism is introduced, with the semantic feature vector generated by the encoder as K and V, so that the decoding process can focus on and strengthen semantic-related information, ensuring that the generated static indexes accurately reflect the content needs of user queries. When generating collaborative layer identifiers, an attention mechanism is also used, but with the user feature vector as K and V, guiding the model to focus on the user's personalized preferences and group features, thereby generating dynamic indexes that better conform to the user's collaborative behavior patterns.

[0102] 4、When the user's interaction data with the commodity is updated, the commodity cluster is fixed, the collaborative cluster (i.e. the class cluster in the user hierarchical clustering tree) is re-clustered, and thus the updated index information is obtained. Finally, the trained generative recall model is used to output the target index information online by using the beam search algorithm, and the top 2,000 commodities in the L2P (Label to Position) score corresponding to the target index information are taken as the recall result; at the same time, the commodity index is converted into the actual commodity identifier as the trigger of the online i2i recall, and the i2i recall result of the trigger is also taken as the recall result of the generative recall.

[0103] Compared with the way of generating index information directly based on commodity features in the related art (such as generating a commodity hierarchical clustering tree based on commodity information, and then splicing the class cluster identifiers of the class clusters to which the commodities belong in each hierarchical clustering to obtain the index information), the scheme of the embodiments of the present specification has the following advantages:

[0104] Composite index structure design: The traditional single index is split into a composite structure of static index and dynamic index, the dynamic index is constructed by using a clustering method based on user representation, and the cluster level identifier is used to replace the single commodity identifier, which can capture the multi-dimensional feature representation of the commodity and ensure the stability of the training in the dynamic update environment, and is suitable for the problem of frequent on-off of commodities in the e-commerce scene.

[0105] Two-stage hierarchical decoding mechanism: A two-stage decoding architecture corresponding to the double-layer index structure is designed, semantic feature vectors and user feature vectors are generated by an encoder respectively, a hierarchical attention mechanism is used in the decoder to generate static index and dynamic index respectively, and the semantic understanding ability and the user personalized preference understanding ability are enhanced.

[0106] Sample reliability weighted training strategy: A loss function with sample reliability weighting is designed based on the richness of commodity interaction data, higher weight is given to commodities with rich interaction, and the weight of long-tail commodities with sparse interaction is reduced, which effectively solves the negative impact of the uncertainty of identifier allocation in the dynamic index on the model training.

[0107] Figure 8 FIG. 1 is a schematic structural diagram of a device provided by an example embodiment. As shown in FIG. 1, the device includes a processor 10, a memory 20, and a communication interface 30. Figure 8As shown, the device 400 is comprised primarily of a communication interface 402, a user interface 404, a processor 406, and a data store 408, which are interconnected and communicate with each other through a system bus, network, or other connection mechanism 410. The communication interface 402 enables the device 400 to communicate with other devices, access networks, and transport networks through analog or digital modulation. For example, the communication interface 402 can include a chipset and antenna for wireless communication with a radio access network or access point. In addition, the communication interface 402 can be a wired interface such as an Ethernet, Token Ring, or USB port, or a wireless interface such as Wifi, Bluetooth, Global Positioning System (GPS), or a wide-area wireless interface (e.g., WiMAX or LTE). Of course, the communication interface 402 can support other forms of physical layer interface and standard or proprietary communication protocol. The communication interface 402 can also include multiple physical communication interfaces, such as a Wifi interface, a Bluetooth interface, and a wide-area wireless interface.

[0108] The user interface 404 includes receiving user input and providing output to the user. Thus, the user interface 404 can include input components such as a keypad, keyboard, touch- sensitive or presence-sensitive panel, computer mouse, trackball, joystick, microphone, still camera, and video camera, and output components such as a display screen (which can be combined with a touch-sensitive panel), CRT, LCD, LED, display using DLP technology, printer, other known or future developed equivalent devices. The user interface 404 can also generate audible output through a speaker, speaker jack, audio output port, audio output device, earphones, and other known or future developed equivalent devices. In some embodiments, the user interface 404 can include software, circuitry, or other form of logic that is capable of transmitting data to and receiving data from external user input / output devices. Additionally or alternatively, the device 400 can support remote access from other devices through the communication interface 402 or another physical interface (not shown). The user interface 404 can be configured to receive user input, the location and movement of which can be indicated by an indicator or cursor described herein. The user interface 404 can also be configured as a display device for rendering or displaying a text segment.

[0109] The processor 406 can include one or more general processors and / or specialized processors.

[0110] The data store 408 can include one or more volatile and / or non-volatile storage components, and can be integrated in whole or in part with the processor 406. The data store 408 can include removable and / or non-removable components.

[0111] The processor 406 is capable of executing program instructions 418 (e.g., compiled or interpreted program logic and / or machine code) stored in the data storage 408 to implement the various functionality described herein. The data storage 408 can include a non-transitory computer readable medium having stored thereon program instructions capable, when executed by the device 400, of causing the device 400 to carry out any of the methods, processes, or functions disclosed in the specification and / or drawings. The processor 406 executing the program instructions 418 can cause the processor 406 to use the data 412.

[0112] For example, the program instructions 418 can include an operating system 422 (e.g., an operating system kernel, device drivers, and / or other modules) installed on the device 400 as well as one or more application programs 420 (e.g., a browser, a social application, or a game application). Similarly, the data 412 can include operating system data 416 and application data 414. The operating system data 416 is primarily accessible to the operating system 422, while the application data 414 is primarily accessible to the one or more application programs 420. The application data 414 can be in a file system that is visible or hidden to a user of the device 400.

[0113] The application programs 420 can communicate with the operating system 422 through one or more application programming interfaces (APIs). These APIs facilitate the application programs 420 in reading and / or writing application data 414, communicating or receiving information via the communication interface 402, receiving or displaying information on the user interface 404, etc.

[0114] In some terminology, the application programs 420 can be referred to simply as “apps.” Furthermore, the application programs 420 can be downloaded to the device 400 through one or more online application stores or application markets. However, the application programs can also be installed on the device 400 through other means, such as through a web browser or a physical interface (e.g., a USB port) on the device 400.

[0115] Reference should be made to Figure 9 , the index information generation apparatus can be applied to the device as shown in Figure 8 . Wherein the index information generation apparatus can include:

[0116] The determination module 502 is configured to determine a user set having a historical interaction behavior with at least one target commodity in a plurality of target commodities; the plurality of target commodities belong to a same leaf cluster in a commodity hierarchical clustering tree, and the commodity hierarchical clustering tree is obtained by performing hierarchical clustering on commodity representations of each commodity in a preset commodity set;

[0117] The clustering module 504 is configured to perform hierarchical clustering on each user in the user set based on the user representation of each user in the user set, to obtain a user hierarchical clustering tree.

[0118] The index generation module 506 is configured to perform the following operations for each target commodity in the plurality of target commodities:

[0119] obtain a first average user representation of each user who has a historical interaction behavior with the target commodity and a second average user representation of each leaf cluster in the user hierarchical clustering tree;

[0120] determine a leaf cluster to which the second average user representation with the highest similarity to the first average user representation belongs as a target leaf cluster of the target commodity;

[0121] splice the cluster identifiers of the clusters at each level on the clustering path where the target leaf cluster is located to obtain a dynamic index corresponding to the target commodity, and splice a static index corresponding to the target commodity and the dynamic index corresponding to the target commodity to obtain index information of the target commodity; wherein the static index is obtained by splicing the cluster identifiers of the clusters at each level to which the target commodity belongs.

[0122] Please refer to Figure 10 The commodity retrieval device can be applied to the device as shown in Figure 8 The commodity retrieval device can include:

[0123] The information acquisition module 602 is configured to acquire target input information, wherein the target input information includes target query information input by a user, user information of the user, and context information;

[0124] The index recall module 604 is configured to input the target input information into a pre-trained generative recall model, so that the generative recall model recalls target index information matched with the target input information; wherein the generative recall model is trained based on sample input information and index information of sample commodities, the sample commodities are commodities that are interacted by a user among commodities retrieved based on the sample input information, and the target index information and the index information of the sample commodities are generated based on the index information generation device in any of the preceding embodiments;

[0125] The commodity identifier acquisition module 606 is configured to acquire a target commodity identifier pre-associated with the target index information;

[0126] The retrieval module 608 is configured to perform commodity retrieval based on the target commodity identifier.

[0127] For ease of description, the above apparatus is described in various modules or units in terms of functions. Of course, the functions of each module or unit can be implemented in the same or more software and / or hardware when implementing one or more of the present specification, and the modules implementing the same function can be implemented by a combination of multiple sub-modules or sub-units. The above described apparatus embodiments are only illustrative, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0128] Based on the same idea as the above method, the present specification also provides an electronic device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor implements the steps of the method according to any one of the above embodiments by running the executable instructions.

[0129] Based on the same idea as the above method, the present specification also provides a computer readable storage medium, which stores computer instructions, and the instructions are executed by a processor to implement the steps of the method according to any one of the above embodiments.

[0130] Based on the same idea as the above method, the present specification also provides a computer program product, which comprises a computer program or instructions, and the computer program or instructions are executed by a processor to implement the steps of the method according to any one of the above embodiments.

[0131] Based on the same idea as the above method, the present specification also provides a commodity retrieval system, comprising a server and a client. The server is used to store index information of each commodity, receive a commodity retrieval request comprising target input information, respond to the commodity retrieval request, retrieve commodities based on the commodity retrieval method according to any one of the above embodiments, and send commodity information of the retrieved commodities to the client; the index information is obtained based on the index information generation method according to any one of the above embodiments. The client is used to obtain the commodity information sent by the server and display the obtained commodity information. The server in the present embodiment can be deployed in the server 11 shown in the figure, and the client in the present embodiment can be deployed in the personal computer 13 and the mobile phone 14 and other electronic devices shown in the figure. Figure 1 The server in the present embodiment can be deployed in the server 11 shown in the figure, and the client in the present embodiment can be deployed in the personal computer 13 and the mobile phone 14 and other electronic devices shown in the figure. Figure 1 The server in the present embodiment can be deployed in the server 11 shown in the figure, and the client in the present embodiment can be deployed in the personal computer 13 and the mobile phone 14 and other electronic devices shown in the figure.

[0132] Those skilled in the art can understand that:

[0133] In this specification, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusions, such that processes, methods, products, or devices that comprise a list of elements are not limited to those elements, but can include other elements not expressly listed or inherent to such processes, methods, products, or devices. Without further limitation, additional same or equivalent elements can be included in processes, methods, products, or devices that include the described elements.

[0134] In this specification, "one", "a", and "the" do not refer to the singular, but can include the plural as well, unless otherwise indicated.

[0135] In this specification, the first, second, etc. ordinal numbers do not necessarily mean the order, and are often used for the purpose of convenience in distinguishing objects. For example, the first server and the second server usually refer to two servers. In order to distinguish the two servers, they are expressed as the first server and the second server. Of course, at times, the two servers can be the same server.

[0136] In this specification, unless otherwise explicitly stated, "receiving and sending of data" is not necessarily direct receiving and sending, and can be indirect receiving and sending. For example, A receiving data sent by B can be understood as A directly receiving data sent by B, or can be understood as A indirectly receiving data sent by B through C or other subjects. Similarly, B sending data to A can be understood as B directly sending data to A, or can be understood as B indirectly sending data to A through C or other subjects. Here, C can be one subject, or two or more subjects.

[0137] In this specification, unless otherwise explicitly stated, the association relationship generated between structures can be a direct association relationship or an indirect association relationship. For example, when describing "A is connected with B", unless it is explicitly stated that A is directly connected with B, it should be understood that A can be directly connected with B, or A can be indirectly connected with B; for another example, when describing "A is on B", unless it is explicitly stated that A is directly above B (AB is adjacent and A is above B), it should be understood that A can be directly above B, or A can be indirectly above B (there are other elements between AB and A is above B). By analogy.

[0138] This specification uses specific terms to describe embodiments thereof. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of this specification. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described herein, as well as the features of those different embodiments or examples, without contradiction.

[0139] Although one or more embodiments of this specification provide method steps as described in the embodiments or flowcharts, it is understood that the order of steps listed in the embodiments or flowcharts is only one of many possible execution orders and does not represent the only execution order. Therefore, when the claims involve method steps, any changes or adjustments to the order of such steps, or the parallelism between steps, are also within the scope of protection of the claims.

Claims

1. A method for generating index information, the method comprising: Identify the set of users who have historical interaction behavior with at least one of the multiple target products; The multiple target products belong to the same leaf cluster in the product hierarchical clustering tree, which is obtained by hierarchically clustering the product representations of each product in the preset product set. Based on the user representation of each user in the user set, hierarchical clustering is performed on each user in the user set to obtain a user hierarchical clustering tree; Perform the following operations for each of the multiple target products: Obtain the first average user representation of each user who has historical interaction behavior with the target product and the second average user representation of each leaf cluster in the user hierarchical clustering tree. Based on the similarity between the first average user representation and the second average user representation of each leaf cluster in the user hierarchical clustering tree, the target leaf cluster of the target product is determined. The cluster identifiers of each level of clusters along the clustering path to which the target leaf cluster belongs are concatenated to obtain the dynamic index corresponding to the target product. The static index corresponding to the target product is then concatenated with the dynamic index corresponding to the target product to obtain the index information of the target product. The static index is obtained by concatenating the cluster identifiers of each level of clusters to which the target product belongs. The clustering path is the path connecting the root node to the leaf node.

2. The method according to claim 1, further comprising: Retrieve the product category tree; Determine the leaf categories in the product category tree; The set of products belonging to the leaf category is determined as the preset set of products.

3. The method according to claim 2, wherein the static index is obtained by concatenating multiple static index subsequences; wherein, The first static index subsequence among the plurality of static index subsequences is determined based on the class target identification of the leaf category to which the target product belongs in the product category tree; The (i+1)th static index subsequence among the plurality of static index subsequences is determined based on the cluster identifier of the i-th level cluster to which the target product belongs, where i is a positive integer.

4. The method according to claim 1, wherein the dynamic index is obtained by concatenating multiple dynamic index subsequences; wherein, The j-th dynamic index subsequence among the plurality of dynamic index subsequences is determined based on the cluster identifier of the j-th level cluster on the clustering path where the target leaf cluster is located, where j is a positive integer.

5. The method according to claim 1, wherein the second average user representation of the k-th leaf cluster in the user hierarchical clustering tree is determined based on the following: Obtain the user representation of each user belonging to the k-th leaf cluster; k is a positive integer; The user representations of each user belonging to the kth leaf cluster are weighted and averaged to obtain the second average user representation of the kth leaf cluster.

6. A product retrieval method, the method comprising: Obtain target input information, which includes target query information input by the user, user information, and context information; The target input information is input into a pre-trained generative recall model so that the generative recall model recalls target index information that matches the target input information; wherein, the generative recall model is trained based on sample input information and index information of sample products, the sample products are products that have been interacted with by the user among the products retrieved based on the sample input information, and the target index information and the index information of the sample products are generated based on the method described in any one of claims 1 to 5; Obtain the target product identifier that is pre-associated with the target index information; Product retrieval is performed based on the target product identifier.

7. The method according to claim 6, wherein the generative recall model comprises: An encoder is used to encode the target input information to obtain a semantic feature vector, and to encode the user information and the context information to obtain a user feature vector; as well as The decoder includes a first decoding module and a second decoding module; The first decoding module is used to decode the semantic feature vector to obtain the target static index, and output a latent vector to the second decoding module. The latent vector is an intermediate vector generated by the first decoding module in the process of generating the target static index. The second decoding module is used to decode the user feature vector based on the latent vector to obtain the target dynamic index; The target index information is obtained by concatenating the target static index and the target dynamic index.

8. The method according to claim 7, wherein the target static index includes a plurality of static index subsequences, the target dynamic index includes a plurality of dynamic index subsequences, and the decoder sequentially outputs each static index subsequence and each dynamic index subsequence in the plurality of static index subsequences; the decoder further includes: The first attention module is used to determine the key and value based on the semantic feature vector, and to determine the query based on the static index subsequence output by the decoder in the previous step. The first attention module performs attention processing on the key, value and query determined by the first attention module to obtain a first output vector, and outputs the first output vector to the first decoding module so that the first decoding module can decode the first output vector to obtain the current static index subsequence. And, for outputting the hidden vector obtained during the generation of the first output vector to the second decoding module; The second attention module is used to determine the key and value based on the user feature vector, and to determine the query based on the dynamic index subsequence output by the decoder in the previous step. It performs attention processing on the key, value and query determined by the second attention module to obtain a second output vector, and outputs the second output vector to the second decoding module so that the second decoding module decodes the second output vector based on the latent vector to obtain the current dynamic index subsequence.

9. The method according to claim 6, further comprising: Obtain multiple sample data points, each of which includes sample input information and index information of the sample product; Multiple sets of sample data are input into the generative recall model, so that the generative recall model outputs index information based on the sample input information in the sample data; The loss corresponding to the sample data is determined based on the index information output by the generative recall model and the index information in the sample data. Based on the weights corresponding to multiple sample data points, the losses corresponding to the multiple sample data points are weighted to obtain the loss of the generative recall model; wherein, the weights corresponding to sample data points are positively correlated with the number of interactions with the sample products to which the index information in the sample data belongs; The generative recall model is trained based on the loss of the generative recall model.

10. An electronic device, comprising: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method as described in any one of claims 1-9 by executing the executable instructions.

11. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-9.

12. A computer program product comprising a computer program or instructions which, when executed by a processor, implement the steps of the method as claimed in any one of claims 1-9.

13. A product retrieval system, comprising: The server is used to store index information of each product, receive product retrieval requests including target input information, and, in response to the product retrieval requests, perform product retrieval based on the method described in any one of claims 6 to 9, and send the product information of the retrieved products to the client; the index information is obtained based on the method described in any one of claims 1 to 5. The client is used to obtain product information sent by the server and display the obtained product information.

Citation Information

Patent Citations

  • Goods clustering method based on goods network connection graph

    CN105427125A

  • Method and system for querying customer group list of customer in real time in digital marketing

    CN117009453A