Search recommendation method and apparatus, electronic device, and readable storage medium
Patent Information
- Application Number
- CN202410610191.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2044-05-16
AI Technical Summary
[0003]有鉴于此,本公开实施例提供了一种搜索推荐方法、装置、电子设备及可读存储介质,以解决现有技术中搜索推荐模型的推荐准确性较低的问题
[0008]本公开实施例与现有技术相比存在的有益效果是:通过获取用户输入的搜索词、多个候选对象的特征数据,搜索词可以表示用户的搜索意图,候选对象的特征数据包含可能推荐给用户的各种对象的详细信息,包括候选对象的标题、细节描述以及候选对象的多个属性特征数据,候选对象的属性特征数据可以为候选对象的方面值,即候选对象属性的具体类别或类别。对各个候选对象的各个属性特征数据进行向量嵌入,捕捉不同属性之间的潜在语义关系,将候选对象的离散的属性特征数据转化为连续向量空间中的表示,得到各个候选对象的各个初始属性特征向量。对各个候选对象的各个初始属性特征向量、候选对象的特征数据以及搜索词进行拼接,构建多元化的上下文信息序列,以便全面反映用户意图与候选对象匹配程度,得到对应的多个第一目标输入序列。通过预训练模型将各个第一目标输入序列进一步编码成更高级别的特征表示,提取用户搜索词与各个候选对象属性间的复杂交互信息,得到对应的各个候选对象的多个第一特征向量和搜索词的多个第一特征向量。基于各个候选对象的多个第一特征向量和搜索词的多个第一特征向量进行多粒度属性特征学习,从各个候选对象的多个第一特征向量和搜索词的多个第一特征向量中,提取出属性信息的多个粒度,以反映方面值之间的粗粒度和细粒度的语义关系,得到各个候选对象的第一多粒度属性特征矩阵,有助于捕捉不同属性特征重要性的动态变化,以便更准确地表示候选对象,有助于搜索推荐模型更深入地理解和表示候选对象的特征。将各个多粒度属性特征矩阵和各个候选对象的多个第一特征向量拼接,构造更丰富的候选对象整体表征,得到各个候选对象的第一目标特征矩阵,这是对各个候选对象特征的全面表示。基于各个候选对象的第一目标特征矩阵和搜索词的多个第一特征向量,计算用户选择每个候选对象的第一选择概率,各个候选对象的第一选择概率可以反映各个候选对象与搜索词的匹配度,根据计算得到的各个候选对象的第一选择概率,筛选出最有可能满足用户需求的第一目标对象,即具有最高概率的候选对象,将其推荐给用户。通过对搜索词和候选对象的多维度特征进行深度融合和深度学习建模,利用属性特征信息的多个粒度,捕捉属性特征之间的粗粒度和细粒度的语义关系,提高候选对象与搜索词的匹配程度,解决了现有技术中搜索推荐模型的推荐准确性较低的问题,有效地提高了搜索推荐模型的准确性。
Smart Images

Figure CN118395010B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a search recommendation method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] Information retrieval refers to the process of retrieving relevant information from large amounts of data based on users' information needs. A key task of information retrieval is intensive retrieval, which involves quickly retrieving objects related to user-provided search terms within structured data. For example, on an e-commerce platform, products matching user needs are retrieved based on search terms and recommended to the user. Generating representations of search terms and objects within the platform is crucial during the retrieval process. Existing technologies use a dual-tower model to generate feature representations of search terms and objects, but this fails to fully utilize the structured information of both objects and search terms. This results in a lack of semantic richness and flexibility in the representations of objects and search terms, thus affecting the effectiveness of search recommendations. Summary of the Invention
[0003] In view of this, embodiments of the present disclosure provide a search recommendation method, apparatus, electronic device, and readable storage medium to solve the problem of low recommendation accuracy in existing search recommendation models.
[0004] A first aspect of this disclosure provides a search recommendation method, comprising: acquiring a search term input by a user and feature data of multiple candidate objects, wherein the feature data of the candidate objects includes multiple attribute feature data of the candidate objects; inputting the attribute feature data of each candidate object into a search recommendation model, performing vector embedding on the attribute feature data of each candidate object to obtain initial attribute feature vectors of each candidate object; concatenating the initial attribute feature vectors of each candidate object, the feature data of the candidate objects, and the search term to obtain multiple corresponding first target input sequences; inputting each first target input sequence into a pre-trained model for sequence data vector representation to obtain multiple corresponding first target input sequences of each candidate object. The process involves: 1) deriving a first feature vector and multiple first feature vectors of the search term; 2) performing multi-granularity attribute feature learning based on the multiple first feature vectors of each candidate object and the multiple first feature vectors of the search term to obtain the first multi-granularity attribute feature matrix of each candidate object; 3) concatenating the first multi-granularity attribute feature matrix of each candidate object with the multiple first feature vectors of each candidate object to obtain the first target feature matrix of each candidate object; 4) determining the probability of the user selecting each candidate object based on the first target feature matrix of each candidate object and the multiple first feature vectors of the search term to obtain the first selection probability of each candidate object; and 5) selecting the first target object to recommend to the user from among the multiple candidate objects based on the first selection probability of each candidate object.
[0005] A second aspect of this disclosure provides a search recommendation apparatus, comprising: an acquisition module, configured to acquire a search term input by a user and feature data of multiple candidate objects, wherein the feature data of the candidate objects includes multiple attribute feature data of the candidate objects; a vector embedding module, configured to input the attribute feature data of each candidate object into a search recommendation model, and perform vector embedding on the attribute feature data of each candidate object to obtain initial attribute feature vectors of each candidate object; and a sequence vector representation module, configured to concatenate the initial attribute feature vectors of each candidate object, the feature data of the candidate objects, and the search term to obtain multiple corresponding first target input sequences, and input the first target input sequences into a pre-trained model for sequence data vector representation to obtain multiple first feature vectors of each candidate object. The search term has multiple first feature vectors; a multi-granularity learning module is used to learn multi-granularity attribute features based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term, to obtain the first multi-granularity attribute feature matrix of each candidate object; a candidate object representation generation module is used to concatenate the first multi-granularity attribute feature matrix of each candidate object and multiple first feature vectors of each candidate object to obtain the first target feature matrix of each candidate object; a probability prediction module is used to determine the probability of the user selecting each candidate object based on the first target feature matrix of each candidate object and multiple first feature vectors of the search term, to obtain the first selection probability of each candidate object; and a recommendation module is used to select the first target object to recommend to the user from multiple candidate objects based on the first selection probability of each candidate object.
[0006] A third aspect of this disclosure provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described above.
[0007] A fourth aspect of this disclosure provides a readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.
[0008] The beneficial effects of this disclosure compared to the prior art are as follows: By acquiring the user-input search terms and feature data of multiple candidate objects, the search terms can represent the user's search intent, and the feature data of the candidate objects contain detailed information about various objects that may be recommended to the user, including the title, detailed description, and multiple attribute feature data of the candidate objects. The attribute feature data of the candidate objects can be aspect values of the candidate objects, that is, the specific category or class of the candidate object's attributes. Vector embedding is performed on the attribute feature data of each candidate object to capture the potential semantic relationships between different attributes, transforming the discrete attribute feature data of the candidate objects into representations in a continuous vector space, resulting in initial attribute feature vectors for each candidate object. The initial attribute feature vectors of each candidate object, the feature data of the candidate objects, and the search terms are concatenated to construct a diversified sequence of contextual information to comprehensively reflect the degree of matching between the user's intent and the candidate objects, resulting in multiple corresponding first target input sequences. Through a pre-trained model, each first target input sequence is further encoded into a higher-level feature representation to extract the complex interaction information between the user's search terms and the attributes of each candidate object, resulting in multiple first feature vectors for each candidate object and multiple first feature vectors for the search terms. Multi-granularity attribute feature learning is performed based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term. Multiple granularities of attribute information are extracted from these vectors to reflect the coarse-grained and fine-grained semantic relationships between aspect values, resulting in a first multi-granularity attribute feature matrix for each candidate object. This helps capture the dynamic changes in the importance of different attribute features, enabling a more accurate representation of candidate objects and facilitating a deeper understanding and representation of candidate object features by the search recommendation model. The multi-granularity attribute feature matrices and multiple first feature vectors of each candidate object are concatenated to construct a richer overall representation of the candidate objects, resulting in a first target feature matrix for each candidate object. This matrix provides a comprehensive representation of the candidate object's features. Based on the first target feature matrix of each candidate object and multiple first feature vectors of the search term, the first selection probability of the user choosing each candidate object is calculated. This first selection probability reflects the matching degree between each candidate object and the search term. Based on the calculated first selection probabilities, the first target object most likely to meet the user's needs—the candidate object with the highest probability—is selected and recommended to the user. By deeply fusing and modeling the multi-dimensional features of search terms and candidate objects using deep learning, and by utilizing multiple granularities of attribute feature information, the coarse-grained and fine-grained semantic relationships between attribute features are captured, thereby improving the matching degree between candidate objects and search terms. This solves the problem of low recommendation accuracy in existing search recommendation models and effectively improves the accuracy of search recommendation models. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic diagram illustrating an application scenario of an embodiment of this disclosure;
[0011] Figure 2 This is a flowchart illustrating a search recommendation method provided in an embodiment of this disclosure;
[0012] Figure 3 This is a schematic diagram of the structure of a search recommendation model provided in an embodiment of this disclosure;
[0013] Figure 4 This is a schematic diagram of the structure of a search recommendation device provided in an embodiment of this disclosure;
[0014] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0015] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, so as to provide a thorough understanding of the embodiments of this disclosure. However, those skilled in the art will understand that this disclosure may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this disclosure with unnecessary detail.
[0016] A search recommendation method and apparatus according to an embodiment of the present disclosure will now be described in detail with reference to the accompanying drawings.
[0017] Figure 1 This is a schematic diagram illustrating an application scenario of an embodiment of this disclosure. The application scenario may include terminal devices 1, 2, and 3, server 4, and network 5.
[0018] Terminal devices 1, 2, and 3 can be hardware or software. When terminal devices 1, 2, and 3 are hardware, they can be various electronic devices with displays and supporting communication with server 4, including but not limited to smartphones, tablets, laptops, and desktop computers. When terminal devices 1, 2, and 3 are software, they can be installed in the aforementioned electronic devices. Terminal devices 1, 2, and 3 can be implemented as multiple software programs or software modules, or as a single software program or software module; this disclosure does not limit this. Furthermore, various applications can be installed on terminal devices 1, 2, and 3, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.
[0019] Server 4 can be a server that provides various services, such as a backend server that receives requests sent by terminal devices with which it has established communication connections. This backend server can receive and analyze the requests sent by the terminal devices and generate processing results. Server 4 can be a single server, a server cluster consisting of several servers, or a cloud computing service center. This disclosure embodiment does not limit this.
[0020] It should be noted that server 4 can be either hardware or software. When server 4 is hardware, it can be various electronic devices that provide various services to terminal devices 1, 2, and 3. When server 4 is software, it can be multiple software programs or software modules that provide various services to terminal devices 1, 2, and 3, or it can be a single software program or software module that provides various services to terminal devices 1, 2, and 3. This disclosure does not limit the scope of the embodiments.
[0021] Network 5 can be a wired network using coaxial cable, twisted pair, and fiber optic connection, or it can be a wireless network that enables interconnection of various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), and Infrared. This disclosure does not limit the scope of the network.
[0022] Users can establish a communication connection with server 4 via network 5 through terminal devices 1, 2, and 3 to receive or send information. Specifically, server 4 obtains the user-input search terms and feature data of multiple candidate objects, including multiple attribute feature data of the candidate objects; it inputs the attribute feature data of each candidate object into a search recommendation model, performs vector embedding on the attribute feature data of each candidate object, and obtains the initial attribute feature vectors of each candidate object; it concatenates the initial attribute feature vectors of each candidate object, the feature data of the candidate objects, and the search terms to obtain multiple corresponding first target input sequences, and inputs each first target input sequence into a pre-trained model for sequence data vector representation, obtaining the corresponding multiple first feature vectors of each candidate object and the search terms. Multiple first feature vectors are used; multi-granularity attribute feature learning is performed based on the multiple first feature vectors of each candidate object and the multiple first feature vectors of the search term to obtain the first multi-granularity attribute feature matrix of each candidate object; the first multi-granularity attribute feature matrix of each candidate object and the multiple first feature vectors of each candidate object are concatenated to obtain the first target feature matrix of each candidate object; based on the first target feature matrix of each candidate object and the multiple first feature vectors of the search term, the probability of the user selecting each candidate object is determined to obtain the first selection probability of each candidate object; based on the first selection probability of each candidate object, the first target object recommended to the user is selected from the multiple candidate objects.
[0023] It should be noted that the specific types, quantities, and combinations of terminal devices 1, 2, and 3, server 4, and network 5 can be adjusted according to the actual needs of the application scenario, and this disclosure embodiment does not impose any restrictions on this.
[0024] Figure 2 This is a flowchart illustrating a search recommendation method provided in an embodiment of this disclosure. Figure 2 The search recommendation method can be derived from Figure 1 The server executes this. For example... Figure 2 As shown, the search recommendation method includes:
[0025] Step 201: Obtain the user-input search terms and feature data of multiple candidate objects. The feature data of the candidate objects includes multiple attribute feature data of the candidate objects.
[0026] In some embodiments, the search terms entered by the user are linguistic signals that clearly express the user's needs, which may be the user's current intent or point of interest. By understanding the meaning of the search terms, the search recommendation model can initially locate the products the user wants to find. Specifically, when the search recommendation model is applied to an e-commerce platform, the search terms can be products. For example, if the search term is "pink dress," the candidate items are products on the e-commerce platform. The feature data of the candidate items can be detailed information about the recommended items within the platform, including the title, detailed description, and multiple attribute feature data of the candidate items. The multiple attribute feature data of the candidate items can be attributes such as price, brand, color, size, and category. The multiple attribute feature data of the candidate items comprehensively describes various aspects of the candidate items, helping the search recommendation model to understand the characteristics and attributes of each candidate item more deeply. Acquiring and utilizing the feature data of search terms and candidate items helps the search recommendation model efficiently retrieve results that match the user's needs from massive amounts of data, and make more accurate and personalized recommendations based on the feature data of search terms and candidate items. Multi-dimensional feature data of candidate items helps improve the accuracy of search recommendation results and enhance user experience and satisfaction.
[0027] Step 202: Input the attribute feature data of each candidate object into the search recommendation model, and perform vector embedding on the attribute feature data of each candidate object to obtain the initial attribute feature vector of each candidate object.
[0028] In some embodiments, the attribute feature data of each candidate object is input into the search recommendation model, and vector embedding is performed on the attribute feature data of each candidate object. The attribute feature data of each candidate object typically exists in text, numbers, or other non-numerical forms. Through vector embedding, the potential relationships and patterns between attribute features can be learned, transforming the discrete, high-dimensional attribute feature data of each candidate object into points in a continuous, low-dimensional vector space, i.e., the initial attribute feature vectors of each candidate object. In the aforementioned vector space, each attribute feature can be represented as a vector. The relationship between the initial attribute feature vectors of the candidate objects can be measured by calculating distance or similarity, which helps the search recommendation model better understand and process the attribute feature data of the candidate objects. Specifically, the attribute feature data of the candidate objects can be represented as: V = [v1, v2, ..., v K ], v K This is the feature data of the Kth attribute of the candidate object, where K is the number of attribute features. The initial attribute feature vectors of the candidate object can be represented as: A = [a1, a2, ..., a...]. K ], where a KLet H be the initial feature vector of the Kth attribute of the candidate object, and H be the dimension of the hidden layer. Vector embedding of the Kth attribute feature data of the candidate object can be represented as: a K =W a v K +b a Among them, W a It is an embedding matrix of dimension H×V, where V is the size of the vocabulary of attribute feature data, and b a It is a bias vector of dimension H.
[0029] Step 203: Concatenate the initial attribute feature vectors of each candidate object, the feature data of the candidate object, and the search terms to obtain multiple first target input sequences. Input each first target input sequence into the pre-trained model for sequence data vector representation to obtain multiple first feature vectors of each candidate object and multiple first feature vectors of the search terms.
[0030] In some embodiments, the initial attribute feature vectors of each candidate object, the feature data of the candidate object, and the search terms are concatenated to integrate information from different levels (the attribute feature data of the candidate object, the feature data of the candidate object, and the user's search terms), providing comprehensive data input for pre-training and obtaining multiple corresponding first target input sequences. The first target input sequence includes not only the attribute features of the candidate object itself but also the information of the search terms. The pre-trained model can consider the user's search intent while also taking into account the specific attributes of the candidate object. The constructed first target input sequence is input into the pre-trained model, which can be a Bidirectional Encoder Representation from Transformers (BERT) model, a Convolutional Neural Networks for Sentence Classification (TextCNN) model, or a Long Short-Term Memory (LSTM) network, etc. Utilizing the extensive knowledge learned during pre-training, the model performs in-depth understanding and representation learning of the input sequence, encodes the input first target input sequence, and generates multiple corresponding first feature vectors, including multiple first feature vectors of the candidate objects and multiple first feature vectors of the search terms. The multiple first feature vectors of the candidate objects and the multiple first feature vectors of the search terms are obtained after multi-layer nonlinear transformation, possessing strong semantic information and contextual understanding capabilities, which can improve the encoding quality of the candidate objects and search terms. Specifically, the sequence of feature data of the candidate objects and the sequence of search terms can be represented as X, and the sequence of initial attribute feature vectors of the candidate objects is A = [a1, a2, ..., a...].K The initial attribute feature vectors of the candidate objects, the feature data of the candidate objects, and the search terms are concatenated to obtain the corresponding first target input sequence, which can be represented as: X′=[X, A], where X′ is the first target input sequence, X′=[x1, x2, ..., x L ], where x L Let L be the word or subword at the Lth position, where L is the length of the input sequence. Each first target input sequence is fed into the pre-trained model for sequence data vector representation, resulting in multiple corresponding first feature vectors, which can be represented as: E = [e1, e2, ..., e...]. L ], where e L Let H be the vector at the Lth position, and H be the dimension of the hidden layer. The output sequence E of the pre-trained model can be divided into multiple first feature vectors EL of the candidate objects. i And multiple first feature vectors Eq of the search term, E = [E i E q ]. Multiple first feature vectors E of candidate objects i The vector contains CLS tags and attribute feature tags. The multiple first feature vectors Ea of the search term contain vectors of each word or subword of the search term.
[0031] Step 204: Perform multi-granularity attribute feature learning based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term to obtain the first multi-granularity attribute feature matrix of each candidate object.
[0032] In some embodiments, multi-granularity attribute feature learning is performed based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term, extracting and fusing features at different levels and degrees of detail. Multi-granularity learning of the attribute features of candidate objects, including global granularity, hierarchical granularity, and similarity granularity, can reflect the coarse-grained and fine-grained semantic relationships between attribute features, obtaining richer representations of candidate objects, i.e., the first target feature matrix of each candidate object. Global granularity attribute feature learning is performed based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term, focusing on the overall, generalized feature matching of each candidate object, obtaining the global granularity attribute feature vector of each candidate object. Hierarchical granularity attribute feature learning is performed based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term, decomposing attribute features by level or category. Considering the hierarchical relationships between candidate object categories, the category affiliation of the candidate object at each level is predicted, forming a complete and ordered classification result, i.e., the multi-hierarchical granularity attribute feature vector of each candidate object. Based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term, similarity granularity attribute feature learning is performed to calculate the similarity between the candidate object and the search term on each specific attribute, resulting in multiple similarity granularity attribute feature vectors for each candidate object. The multiple similarity granularity attribute feature vectors, the global granularity attribute feature vectors, and the multiple hierarchical granularity attribute feature vectors of each candidate object are fused to obtain the first multi-granularity attribute feature matrix for each candidate object. Through multi-granularity feature learning, the coarse-grained and fine-grained semantic relationships between attribute feature data are captured, improving the ability to characterize the complexity of candidate objects. This helps the search recommendation model to more comprehensively understand the association between candidate objects and search terms, improving the matching accuracy of candidate object and search term features. Specifically, the first multi-granularity attribute feature matrix P of the candidate object can be represented as P = [P g P h P s ], where P g The global granularity attribute feature vector of the candidate object, P h P is a multi-level granularity attribute feature vector of the candidate object. s It is a feature vector of multiple similarity granular attributes of candidate objects.
[0033] Step 205: Concatenate the first multi-granularity attribute feature matrix of each candidate object and the multiple first feature vectors of each candidate object to obtain the first target feature matrix of each candidate object.
[0034] In some embodiments, the first multi-granularity attribute feature matrix P of the candidate object = [P g Ph P s [E] is a matrix representation of the attribute features of a candidate object learned from multiple granularity levels (global, hierarchical, similarity), containing the feature representations of the candidate object at different granularity levels. Multiple first feature vectors E of the candidate object. q This is obtained by encoding the feature data of candidate objects, the attribute feature vectors of candidate objects, and the features resulting from the interaction with search terms through a pre-trained model. It can represent the basic features of candidate objects across multiple important attribute dimensions. The first multi-granularity attribute feature matrix and multiple first feature vectors of each candidate object are concatenated to integrate the attribute features and basic feature vectors learned from different granularities, resulting in the first target feature matrix of each candidate object. This constructs a more comprehensive and richer feature representation of candidate objects. The first target feature matrix of each candidate object can be used in subsequent selection probability prediction to achieve more accurate search recommendations.
[0035] Step 206: Based on the first target feature matrix of each candidate object and multiple first feature vectors of the search term, determine the probability of the user selecting each candidate object, and obtain the first selection probability of each candidate object.
[0036] In some embodiments, the first target feature matrix of each candidate object is a comprehensive feature representation of each candidate object, which can more comprehensively reflect the relevance of the candidate object to the user's potential needs. Multiple first feature vectors of the search term are obtained by encoding the feature data of the candidate object, the attribute feature vector of the candidate object, and the features resulting from the interaction with the search term through a pre-trained model, and can represent the semantic and contextual information of the user's search intent. Based on the first target feature matrix of each candidate object and the multiple first feature vectors of the search term, a matching model can be used to calculate the user's first selection probability for each candidate object. The first selection probability of each candidate object is a prediction of the user's possible behavior, reflecting the likelihood of the user selecting a particular candidate object given the search term and candidate object features. The higher the first selection probability of a candidate object, the more closely it matches the search term, and therefore the more it should be recommended to the user. The first selection probabilities of each candidate object can be used to rank the candidate objects, selecting the most likely object to be selected by the user as the target object, improving user experience and click-through rate. Calculating based on the first target feature matrix of each candidate object and the multiple first feature vectors of the search term helps the search recommendation model more accurately capture the degree of matching between the search term and the candidate object, which helps reduce recommendation errors, improve recommendation accuracy, and thus enhance user satisfaction.
[0037] Step 207: Based on the first selection probability of each candidate object, select the first target object to recommend to the user from multiple candidate objects.
[0038] In some embodiments, candidate objects are ranked according to their first selection probability. Candidate objects with higher first selection probabilities are ranked higher, indicating they better match the user's search intent and personalized needs. Subsequently, the top-ranked candidate objects are selected as the primary target objects and recommended to the user. By ranking and filtering candidate objects based on their first selection probabilities, the recommended objects are made more likely to be accepted by the user, thus improving recommendation accuracy. This helps reduce the user's search costs and increase user satisfaction.
[0039] Based on the search recommendation method proposed in this disclosure, the method acquires the user's search terms and feature data of multiple candidate objects. The search terms represent the user's search intent, and the feature data of the candidate objects contains detailed information about various objects that may be recommended to the user, including the title, detailed description, and multiple attribute feature data. These attribute feature data can be aspect values, i.e., the specific category or class of the candidate object's attributes. Vector embedding is performed on the attribute feature data of each candidate object to capture the latent semantic relationships between different attributes, transforming the discrete attribute feature data of the candidate objects into representations in a continuous vector space, resulting in initial attribute feature vectors for each candidate object. The initial attribute feature vectors of each candidate object, the feature data of the candidate objects, and the search terms are concatenated to construct a diversified sequence of contextual information to comprehensively reflect the degree of matching between the user's intent and the candidate objects, resulting in multiple first target input sequences. A pre-trained model further encodes each first target input sequence into a higher-level feature representation, extracting the complex interaction information between the user's search terms and the attributes of each candidate object, resulting in multiple first feature vectors for each candidate object and multiple first feature vectors for the search terms. Multi-granularity attribute feature learning is performed based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term. Multiple granularities of attribute information are extracted from these vectors to reflect the coarse-grained and fine-grained semantic relationships between aspect values, resulting in a first multi-granularity attribute feature matrix for each candidate object. This helps capture the dynamic changes in the importance of different attribute features, enabling a more accurate representation of candidate objects and facilitating a deeper understanding and representation of candidate object features by the search recommendation model. The multi-granularity attribute feature matrices and multiple first feature vectors of each candidate object are concatenated to construct a richer overall representation of the candidate objects, resulting in a first target feature matrix for each candidate object. This matrix provides a comprehensive representation of the candidate object's features. Based on the first target feature matrix of each candidate object and multiple first feature vectors of the search term, the first selection probability of the user choosing each candidate object is calculated. This first selection probability reflects the matching degree between each candidate object and the search term. Based on the calculated first selection probabilities, the first target object most likely to meet the user's needs—the candidate object with the highest probability—is selected and recommended to the user. By deeply fusing and modeling the multi-dimensional features of search terms and candidate objects using deep learning, and by utilizing multiple granularities of attribute feature information, the coarse-grained and fine-grained semantic relationships between attribute features are captured, thereby improving the matching degree between candidate objects and search terms. This solves the problem of low recommendation accuracy in existing search recommendation models and effectively improves the accuracy of search recommendation models.
[0040] In some embodiments, the multiple first feature vectors of the candidate objects include the classification identifier vector of the candidate objects and multiple attribute feature vectors of the candidate objects; the multiple first feature vectors of the search term include the classification identifier vector of the search term; and multi-granularity attribute feature learning is performed based on the multiple first feature vectors of each candidate object and the multiple first feature vectors of the search term to obtain the first multi-granularity attribute feature matrix of each candidate object, including: predicting global granularity attribute features of each candidate object based on the classification identifier vector of each candidate object to obtain the global granularity attribute feature vector of each candidate object; and performing hierarchical granularity attribute feature learning on each candidate object based on the attribute feature vectors of each candidate object. The system predicts the feature vectors of each candidate object at multiple levels of granularity. It then concatenates each feature vector of a candidate object with the category identifier vector of the search term to obtain multiple fused feature vectors for each candidate object. Based on these fused feature vectors, it predicts the similarity granularity attribute features of each candidate object, resulting in multiple similarity granularity attribute feature vectors for each candidate object. Finally, it concatenates the global granularity attribute feature vectors, the multiple levels of granularity attribute feature vectors, and the multiple similarity granularity attribute feature vectors for each candidate object to obtain the first multi-granularity attribute feature matrix for each candidate object.
[0041] In some embodiments, the classification identifier vector of a candidate object can reflect the major category or topic information to which the candidate object belongs, helping the model to quickly locate the overall category characteristics of the object. The classification identifier vector of a candidate object is the encoding E of the candidate object. i The vector e containing the CLS tag i,[CLS] Each candidate object includes multiple attribute feature vectors. These feature vectors represent the candidate object's characteristics across various specific attribute dimensions, such as price, brand, and color. The candidate object's encoding E... i The vector e containing attribute feature labels i,[K] Let K be the attribute feature vector of the candidate object, where K represents e i,[K] Let E be the feature vector of the Kth attribute of the candidate object. The category identifier vector of the search term represents the core category information of the user's search intent, and the multiple first feature vectors E of the search term... q The vector e containing the CLS tag q,[CLS] This is a vector of category identifiers for the search terms.
[0042] In some embodiments, based on the classification identifier vector e of each candidate object i,[CLS]Global granularity attribute feature prediction is performed on each candidate object to predict the attribute feature category to which the candidate object belongs, such as category, brand, etc., resulting in a global granularity attribute feature vector for each candidate object. The global granularity attribute feature vector of each candidate object can be represented as p. g,i The global granularity attribute feature vector of each candidate object has a dimension of K, which can grasp the characteristics of the candidate object as a whole and provide a foundation for subsequent multi-granularity feature fusion.
[0043] In some embodiments, hierarchical granularity attribute feature prediction is performed based on the attribute feature vectors of candidate objects. This not only predicts the specific attribute features of candidate objects but also considers the hierarchical relationships between these attribute features. For example, in candidate object categories, a broad category (e.g., "electronic products") can be predicted first, followed by subcategories (e.g., "mobile phones"), and finally, even finer subcategories (e.g., "smartphones"). The prediction is based on the attribute feature vectors e of the candidate objects. i,[K] Hierarchical granularity attribute feature prediction can obtain multiple hierarchical granularity attribute feature vectors for each candidate object. The hierarchical granularity attribute feature vector of each candidate object can be represented as p. h,j,K By predicting hierarchical granularity attribute features, it is possible to predict the category affiliation of candidate objects at each level based on the hierarchical relationship between categories, forming a complete and orderly classification result, and deeply mining the internal structure and detailed information of candidate objects, thereby more accurately characterizing their features.
[0044] In some embodiments, the attribute feature vectors e of each candidate object i,[K] Each is compared with the category identifier vector e of the search term. q,[CLS] By concatenating these features, multiple fused feature vectors for each candidate object are obtained. This establishes a connection between the candidate object and the search term, providing a basis for subsequent granular similarity attribute feature prediction. Based on the fused feature vectors of each candidate object, granular similarity attribute feature prediction is performed on each candidate object, resulting in multiple granular similarity attribute feature vectors for each candidate object. The granular similarity attribute feature vector of a candidate object can be represented as p. s,i,K It can measure the similarity between candidate objects and search terms, helping to retrieve the candidate objects that best match the search terms. The similarity granularity attribute feature vector p of candidate objects s,i,K The dimension is 1. The global granularity attribute feature vectors, the multi-level granularity attribute feature vectors, and the multi-similarity granularity attribute feature vectors of each candidate object are concatenated to construct the first multi-granularity attribute feature matrix P = [P...]. g P h P sThe first multi-granularity attribute feature matrix of the candidate objects contains comprehensive feature information obtained from predictive analysis of the candidate objects from different angles and levels. This is beneficial for the search recommendation model to understand and evaluate the degree of matching between the candidate objects and user needs from multiple perspectives. Through multi-granularity attribute feature learning, feature representations of each candidate object at different granularities are obtained, which helps to establish the connection between the candidate objects and search terms, providing strong support for subsequent accurate recommendations.
[0045] In some embodiments, the probability of a user selecting each candidate object is determined based on the first target feature matrix of each candidate object and multiple first feature vectors of the search term, thereby obtaining the first selection probability of each candidate object. This includes: concatenating multiple first feature vectors of the search term to obtain the feature matrix of the search term; performing matrix multiplication on the first target feature matrix of each candidate object and the feature matrix of the search term to obtain multiple corresponding interaction feature matrices; performing self-attention processing on each interaction feature matrix to obtain multiple corresponding attention feature matrices; and inputting each attention feature matrix into a first fully connected layer for feature transformation to obtain the first selection probability of each candidate object.
[0046] In some embodiments, the search recommendation model includes a matching model. Multiple first feature vectors of the search term are input into the matching model, and these vectors are concatenated to obtain a feature matrix of the search term. The feature matrix of the search term can represent the overall semantic features of the user's search request, containing key and category information implied by the search term. Matrix multiplication is performed between the first target feature matrices of each candidate object and the feature matrix of the search term to capture the potential connections and matching degrees between the candidate object features and the search term features, resulting in multiple corresponding interaction feature matrices. These matrices provide crucial information for subsequent probability prediction. Self-attention processing is applied to each interaction feature matrix, assigning weights based on the differences in feature importance in different contexts. This highlights the candidate object features most relevant to the user's search intent. Self-attention processing emphasizes important features, further optimizing feature representation and yielding multiple attention feature matrices. This helps the search recommendation model focus on the most relevant and important candidate object features related to the search term, improving the accuracy of selection probability prediction. Finally, each attention feature matrix is input into the fully connected layer of the matching model for feature transformation, predicting the probability of the user selecting each candidate object to obtain the first selection probability of each candidate object. Based on the first target feature matrix of each candidate object and multiple first feature vectors of the search term, multi-level feature processing and transformation are performed to gradually extract and integrate the deep correlation information between each candidate object and the search term, thereby accurately predicting the first selection probability of each candidate object, which helps to provide users with more accurate and personalized search recommendation services.
[0047] In some embodiments, each first target input sequence is input into a pre-trained model for sequence data vector representation to obtain multiple first feature vectors of each candidate object and multiple first feature vectors of the search term. This includes: segmenting each first target input sequence into words to obtain multiple first basic units of each first target input sequence; inserting identifiers into the multiple basic units of each first target input sequence to obtain multiple second basic units of each first target input sequence; semantically encoding each second basic unit of each first target input sequence to obtain semantic feature vectors of each second basic unit of each first target input sequence; positionally encoding each second basic unit of each first target input sequence to obtain positional feature vectors of each second basic unit of each first target input sequence; adding the semantic feature vectors and positional feature vectors of each second basic unit of each first target input sequence to obtain fused feature vectors of each second basic unit of each first target input sequence; and performing self-attention processing on the fused feature vectors of each second basic unit of each first target input sequence to obtain multiple first feature vectors of each candidate object and multiple first feature vectors of the search term.
[0048] In some embodiments, the pre-trained model can be an attention-based pre-trained model. Each first target input sequence is segmented into multiple first basic units (e.g., words, phrases, or clauses), i.e., tokens. These multiple first basic units of each first target input sequence break down the complex first target input sequence into more granular, processable elements, facilitating subsequent feature extraction. Identifiers are inserted into these multiple basic units of each first target input sequence to obtain multiple second basic units. The insertion of identifiers helps the search recommendation model distinguish word boundaries and capture potential contextual dependencies. Identifiers can be [CLS], [SEP], etc., and each identifier is also a separate second basic unit in the sequence, i.e., a token. The output feature vector corresponding to the [CLS] identifier can be used as a representation of the entire sequence, for example, the classification identifier vector e of the candidate object. i,[CLS] and the category identifier vector e of the search term q,[CLS]The embedding layer based on the pre-trained model performs semantic encoding on each second basic unit of each first target input sequence, transforming each second basic unit of each first target input sequence into a corresponding semantic feature vector. This maps each second basic unit into a high-dimensional space, ensuring that the semantic feature vectors of second basic units with similar meanings are close in the vector space. Positional encoding is then performed on each second basic unit of each first target input sequence, adding positional feature vectors related to its position in the first target input sequence. This helps the search and recommendation model capture word order information in the sequence, resulting in positional feature vectors for each second basic unit of each first target input sequence. Finally, the semantic feature vectors and positional feature vectors of each second basic unit of each first target input sequence are added together, merging information from both meaning and position, to obtain a fused feature vector for each second basic unit of each first target input sequence. The fused feature vectors of each second basic unit of each first target input sequence can be input into the transformer model for self-attention processing. The weights of each second basic unit are dynamically adjusted based on the content of the first target input sequence to better capture the correlations and dependencies within the sequence. This yields the self-attention processing results for each second basic unit of each first target input sequence. The sequence of self-attention processing results for each second basic unit of each first target input sequence can be represented as E = [e1, e2, ..., e...]. L ], that is, the first feature vectors of each candidate object and the first feature vectors of each search term, i.e., E = [E i E q Based on the pre-trained model, the input sequence of the first target can be transformed into a feature vector rich in semantic, positional, and interaction dependencies. The semantic information of candidate objects and search terms can be learned, thereby improving the encoding quality of candidate objects and search terms. This can be used for subsequent tasks such as probability prediction and ranking, and helps search recommendation models predict the probability of users selecting each candidate object.
[0049] In some embodiments, the pre-trained model includes a recurrent neural network. Before performing self-attention processing on the fused feature vectors of each second basic unit of each first target input sequence, the model further includes: sequentially inputting the fused feature vectors of each second basic unit of each first target input sequence into the recurrent neural network; obtaining the input vector for the current time step based on the fused feature vectors of each second basic unit of each first target input sequence and the hidden layer state vector of the previous time step; performing a nonlinear transformation on the input vector for the current time step to obtain the hidden layer state vector for the current time step; determining the enhanced feature vectors of each second basic unit of each first target input sequence according to the hidden layer state vector of the current time step; and determining the enhanced feature vectors of each second basic unit of each first target input sequence as the first feature vectors of each candidate object and the first feature vectors of each search term.
[0050] In some embodiments, the fused feature vectors of each second basic unit of each first target input sequence are sequentially input into a recurrent neural network (RNN). The RNN processes the sequence data, considering information from previous time steps when processing the input at each time step. This helps capture the temporal dependencies in the input sequence. At each time step, the fused feature vectors of each second basic unit of each first target input sequence at the current time step are combined with the hidden layer state vector of the previous time step to generate the input vector for the current time step. This introduces temporal dependencies, allowing the RNN to consider the contextual relationship between the current input and its predecessor. A nonlinear transformation, such as activation functions like sigmoid or tanh, is applied to the input vector at the current time step to obtain the hidden layer state vector. The hidden layer state vector is a crucial component of the RNN, containing not only information from the current time step but also retaining sequence information from the previous time step through a recurrent mechanism. Based on the hidden layer state vector at the current time step, enhanced feature vectors for each second basic unit of each first target input sequence are generated. These enhanced feature vectors can be represented as E = [e1, e2, ..., e...]. L The enhanced feature vectors of each second basic unit of each first target input sequence contain context-related information after the fused feature vectors of each second basic unit of each first target input sequence have been processed by a recurrent neural network. This can be considered as a learned and enhanced feature representation. The enhanced feature vectors of each second basic unit of each first target input sequence are determined as the first feature vectors of each candidate object and the first feature vectors of each search term, i.e., E = [E...]. i E qWhen inputting the first target input sequences into the pre-trained model for sequence data vector representation, recurrent neural networks can fully utilize the temporal and contextual information in the first target input sequences to generate more expressive and discriminative feature vectors. This helps in subsequent prediction and ranking of candidate object selection probabilities, and improves the accuracy of search recommendation models.
[0051] In some embodiments, the transformer model or recurrent neural network in the pre-trained model can be replaced by a convolutional neural network to learn the semantic information of candidate objects and search terms, and obtain multiple first feature vectors of each candidate object and multiple first feature vectors of the search terms.
[0052] In some embodiments, the search recommendation model includes a multi-classifier, which predicts global granular attribute features of each candidate object based on the classification identifier vector of each candidate object, to obtain a global granular attribute feature vector of each candidate object, including: inputting the classification identifier vector of each candidate object into the multi-classifier for feature transformation processing to obtain a global granular attribute feature vector of each candidate object.
[0053] In some embodiments, the multi-classifier includes a fully connected layer. The classifier vectors of each candidate object are input into the multi-classifier for feature transformation, mapping the classifier vectors of each candidate object to a higher-level feature space. This can capture the latent relationship between candidate object categories and global attributes. A probability distribution vector, i.e., the global granularity attribute feature vector p of each candidate object, can be generated using an activation function (e.g., softmax). g,i The dimension is K, where K equals the number of all possible aspect value categories. The value of each dimension represents the probability that the candidate object belongs to that category, thus transforming the classification identifier vector of each candidate object into a more expressive global granularity attribute feature vector for each candidate object. The global granularity attribute feature vector of the candidate object integrates the influence of the candidate object's category on its global attributes and can be used for further probability prediction tasks.
[0054] In some embodiments, the search recommendation model includes a hierarchical classifier, which predicts hierarchical granular attribute features of each candidate object based on the attribute feature vectors of each candidate object, to obtain multiple hierarchical granular attribute feature vectors of each candidate object. This includes: inputting the attribute feature vectors of each candidate object into a tree-structured hierarchical classifier for recursive processing to obtain multiple hierarchical granular attribute feature vectors of each candidate object.
[0055] In some embodiments, candidate objects (such as products) may have multiple levels of attribute features. For example, a product may initially belong to the broad category of "electronic products," then be further subdivided into the subcategory of "mobile phones," and may further possess more specific attributes such as "brand," "model," and "color." These different levels of attribute features are crucial for understanding the characteristics of candidate objects and meeting users' search and recommendation needs. The hierarchical classifier is a tree-structured neural network that converts the attribute feature vectors e of each candidate object into a hierarchical classifier. i,[k] The input is processed recursively by a hierarchical classifier with a tree structure. Based on the preset hierarchical structure, the classifier processes the attribute feature vectors of each candidate object layer by layer. At each layer, the classifier classifies the candidate object according to its attribute features and extracts the corresponding feature vector. Through this recursive process, multiple hierarchical granularity attribute feature vectors p for each candidate object can be obtained. h,i,K The multi-level granularity attribute feature vectors of candidate objects can comprehensively and finely represent the features of candidate objects, and can be used for subsequent probability prediction of each candidate object.
[0056] In some embodiments, the search recommendation model includes a similarity classifier that predicts the similarity granularity attribute features of each candidate object based on each fused feature vector of each candidate object, thereby obtaining multiple similarity granularity attribute feature vectors for each candidate object. This includes: inputting each fused feature vector of each candidate object into the similarity classifier for feature transformation to obtain multiple similarity granularity attribute feature vectors for each candidate object.
[0057] In some embodiments, the similarity classifier includes a fully connected layer. The fused feature vectors of each candidate object are input into the similarity classifier for feature transformation, mapping the fused feature vectors of each candidate object to a new space representing similarity, resulting in multiple hierarchical granularity attribute feature vectors p for each candidate object. s,i,K The multi-level granularity attribute feature vectors of each candidate object can indirectly reflect the potential correlation between the attribute feature vectors of each candidate object and the identifier feature vector of the search term at each granularity attribute. In the search recommendation method disclosed in this paper, a similarity classifier can be used to predict similarity granular attribute features, enriching and deepening the understanding of candidate objects, thereby improving recommendation performance and user experience.
[0058] In some embodiments, before concatenating the initial attribute feature vectors of each candidate object, the feature data of the candidate object, and the search terms, the method further includes: acquiring the user's feature data, performing vector embedding on the user's feature data to obtain the user's initial feature vector; concatenating the initial attribute feature vectors of each candidate object, the feature data of the candidate object, the search terms, and the user's initial feature vector to obtain multiple corresponding second target input sequences, inputting each second target input sequence into a pre-trained model for sequence data vector representation to obtain multiple second feature vectors of each candidate object, multiple second feature vectors of the search terms, and multiple feature vectors of the user; performing multi-granularity attribute feature learning based on the second feature vectors of each candidate object and the second feature vectors of the search terms to obtain the second multi-granularity attribute feature matrix of each candidate object; concatenating the second multi-granularity attribute feature matrix of each candidate object and the second feature vectors of each candidate object to obtain the second target feature matrix of each candidate object; determining the probability of the user selecting each candidate object based on the second target feature matrix of each candidate object, the second feature vectors of the search terms, and the user's feature vectors to obtain the second selection probability of each candidate object; and selecting a second target object to recommend to the user from multiple candidate objects based on the second selection probability of each candidate object.
[0059] In some embodiments, user feature data may include personal information such as user history, age, and gender. Acquiring user feature data and performing vector embedding transforms it into a computer-processable vector form, yielding the user's initial feature vector. This helps the subsequent search recommendation model understand user preferences and needs. The initial attribute feature vectors of each candidate object, the candidate object's feature data, search terms, and the user's initial feature vector are concatenated to integrate feature data from different sources, forming a unified input sequence—the corresponding multiple second-target input sequences. This helps the search recommendation model consider information from users, candidate objects, and search terms simultaneously, thereby more accurately predicting user choices. The various second-target input sequences are input into a pre-trained model for sequence data vector representation. The pre-trained model captures complex patterns and relationships in the sequence data, transforming the second-target input sequences into higher-level feature vectors. This yields multiple second-target feature vectors for each candidate object, multiple second-target feature vectors for search terms, and multiple feature vectors for the user. The feature vector sequence output by the pre-trained model contains richer information, aiding in subsequent multi-granularity attribute feature learning and probability prediction of candidate objects. Multi-granularity attribute feature analysis is performed based on the second feature vectors of each candidate object and the second feature vectors of the search term. This analysis can include global granularity attribute feature learning, hierarchical granularity attribute feature learning, and similarity granularity attribute feature learning, resulting in a second multi-granularity attribute feature matrix for each candidate object. This improves the matching degree between candidate objects and search terms. The second multi-granularity attribute feature matrix and the second feature vectors of each candidate object are concatenated, combining feature information from different levels to form a more comprehensive feature representation of the candidate object, resulting in the second target feature matrix for each candidate object. Based on the second target feature matrix of each candidate object and multiple second feature vectors of the search term, the second selection probability of the user choosing each candidate object is calculated. The second selection probability of each candidate object reflects the matching degree between each candidate object and the search term. Based on the calculated second selection probabilities of each candidate object, the second target object most likely to meet the user's needs, i.e., the candidate object with the highest probability, is selected and recommended to the user.
[0060] In some embodiments, reference Figure 3The search recommendation model includes: an attribute feature embedding module 301, a concatenation module 302, a pre-trained model 303, a multi-granularity attribute feature learning module 304, a multi-classifier 305, a hierarchical classifier 306, a similarity classifier 307, a candidate object representation generation module 308, and a matching model 309. The attribute feature data of each candidate object is input into the attribute feature embedding module 301 to perform vector embedding, obtaining initial attribute feature vectors for each candidate object. The initial attribute feature vectors of each candidate object, the feature data of the candidate object, and the search terms are input into the concatenation module 302 for concatenation, resulting in multiple corresponding first target input sequences. Each first target input sequence is input into the pre-trained model 303 for sequence data vector representation, obtaining multiple first feature vectors for each candidate object and multiple first feature vectors for each search term. The multiple first feature vectors of the candidate object include the candidate object's classification identifier vector and multiple attribute feature vectors; the multiple first feature vectors of the search term include the search term's classification identifier vector. Multiple first feature vectors of candidate objects and multiple first feature vectors of search terms are input into multi-granularity attribute feature learning module 304 for multi-granularity attribute feature learning. The classification identifier vector of each candidate object is input into multi-classifier 305 for feature transformation processing to obtain global granularity attribute feature vectors of each candidate object. Each attribute feature vector of each candidate object is input into tree-structured hierarchical classifier 306 for recursive processing to obtain multiple hierarchical granularity attribute feature vectors of each candidate object. Each attribute feature vector of each candidate object is concatenated with the classification identifier vector of the search term to obtain multiple fused feature vectors of each candidate object. Each fused feature vector of each candidate object is input into similarity classifier 307 for feature transformation to obtain multiple similarity granularity attribute feature vectors of each candidate object. The global granularity attribute feature vectors, multiple hierarchical granularity attribute feature vectors, and multiple similarity granularity attribute feature vectors of each candidate object are concatenated to obtain the first multi-granularity attribute feature matrix of each candidate object. The first multi-granularity attribute feature matrix of each candidate object and multiple first feature vectors of each candidate object are input into the candidate object representation generation module 308 and concatenated to obtain the first target feature matrix of each candidate object. The first target feature matrix of each candidate object and multiple first feature vectors of the search term are input into the matching model 309 to determine the probability of the user selecting each candidate object, thus obtaining the first selection probability of each candidate object.By deeply fusing and modeling the multi-dimensional features of search terms and candidate objects using deep learning, and by utilizing multiple granularities of attribute feature information, the coarse-grained and fine-grained semantic relationships between attribute features are captured, thereby improving the matching degree between candidate objects and search terms. This solves the problem of low recommendation accuracy in existing search recommendation models and effectively improves the accuracy of search recommendation models.
[0061] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of this disclosure, and will not be described in detail here.
[0062] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein. For details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the method disclosed herein.
[0063] Figure 4 This is a schematic diagram of a search recommendation device provided in an embodiment of this disclosure. Figure 4 As shown, the search recommendation device includes:
[0064] The acquisition module 401 is used to acquire the search terms input by the user and the feature data of multiple candidate objects. The feature data of the candidate objects includes multiple attribute feature data of the candidate objects.
[0065] The vector embedding module 402 is used to input the attribute feature data of each candidate object into the search recommendation model, and to perform vector embedding on the attribute feature data of each candidate object to obtain the initial attribute feature vector of each candidate object.
[0066] The sequence vector representation module 403 is used to concatenate the initial attribute feature vectors of each candidate object, the feature data of the candidate object, and the search term to obtain multiple first target input sequences. The first target input sequences are then input into the pre-trained model for sequence data vector representation to obtain multiple first feature vectors of each candidate object and multiple first feature vectors of the search term.
[0067] The multi-granularity learning module 404 is used to perform multi-granularity attribute feature learning based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term, so as to obtain the first multi-granularity attribute feature matrix of each candidate object.
[0068] The candidate object representation generation module 405 is used to concatenate the first multi-granularity attribute feature matrix of each candidate object and the multiple first feature vectors of each candidate object to obtain the first target feature matrix of each candidate object.
[0069] The probability prediction module 406 is used to determine the probability of a user selecting each candidate object based on the first target feature matrix of each candidate object and multiple first feature vectors of the search term, and to obtain the first selection probability of each candidate object.
[0070] The recommendation module 407 is used to select the first target object to recommend to the user from multiple candidate objects based on the first selection probability of each candidate object.
[0071] According to the technical solution provided in this disclosure, by acquiring user-input search terms and feature data of multiple candidate objects, the search terms can represent the user's search intent, and the feature data of the candidate objects contains detailed information about various objects that may be recommended to the user, including the title, detailed description, and multiple attribute feature data of the candidate objects. The attribute feature data of the candidate objects can be aspect values of the candidate objects, that is, the specific category or class of the candidate object's attributes. Vector embedding is performed on the attribute feature data of each candidate object to capture the potential semantic relationships between different attributes, transforming the discrete attribute feature data of the candidate objects into representations in a continuous vector space, resulting in initial attribute feature vectors for each candidate object. The initial attribute feature vectors of each candidate object, the feature data of the candidate objects, and the search terms are concatenated to construct a diversified contextual information sequence to comprehensively reflect the degree of matching between the user's intent and the candidate objects, resulting in multiple corresponding first target input sequences. The first target input sequences are further encoded into higher-level feature representations through a pre-trained model to extract the complex interaction information between the user's search terms and the attributes of each candidate object, resulting in multiple first feature vectors for each candidate object and multiple first feature vectors for the search terms. Multi-granularity attribute feature learning is performed based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term. Multiple granularities of attribute information are extracted from these vectors to reflect the coarse-grained and fine-grained semantic relationships between aspect values, resulting in a first multi-granularity attribute feature matrix for each candidate object. This helps capture the dynamic changes in the importance of different attribute features, enabling a more accurate representation of candidate objects and facilitating a deeper understanding and representation of candidate object features by the search recommendation model. The multi-granularity attribute feature matrices and multiple first feature vectors of each candidate object are concatenated to construct a richer overall representation of the candidate objects, resulting in a first target feature matrix for each candidate object. This matrix provides a comprehensive representation of the candidate object's features. Based on the first target feature matrix of each candidate object and multiple first feature vectors of the search term, the first selection probability of the user choosing each candidate object is calculated. This first selection probability reflects the matching degree between each candidate object and the search term. Based on the calculated first selection probabilities, the first target object most likely to meet the user's needs—the candidate object with the highest probability—is selected and recommended to the user. By deeply fusing and modeling the multi-dimensional features of search terms and candidate objects using deep learning, and by utilizing multiple granularities of attribute feature information, the coarse-grained and fine-grained semantic relationships between attribute features are captured, thereby improving the matching degree between candidate objects and search terms. This solves the problem of low recommendation accuracy in existing search recommendation models and effectively improves the accuracy of search recommendation models.
[0072] In some embodiments, the multiple first feature vectors of the candidate objects include the classification identifier vector of the candidate objects and the multiple attribute feature vectors of the candidate objects. The multiple first feature vectors of the search term include the classification identifier vector of the search term. The multi-granularity learning module 404 is configured to: perform global granularity attribute feature prediction on each candidate object based on the classification identifier vector of each candidate object to obtain a global granularity attribute feature vector of each candidate object; perform hierarchical granularity attribute feature prediction on each candidate object based on the attribute feature vectors of each candidate object to obtain multiple hierarchical granularity attribute feature vectors of each candidate object; concatenate each attribute feature vector of each candidate object with the classification identifier vector of the search term to obtain multiple fusion feature vectors of each corresponding candidate object; perform similarity granularity attribute feature prediction on each candidate object based on the fusion feature vectors of each candidate object to obtain multiple similarity granularity attribute feature vectors of each corresponding candidate object; and concatenate the global granularity attribute feature vectors, the multiple hierarchical granularity attribute feature vectors, and the multiple similarity granularity attribute feature vectors of each candidate object to obtain a first multi-granularity attribute feature matrix of each candidate object.
[0073] In some embodiments, the probability prediction module 406 is configured to concatenate multiple first feature vectors of the search term to obtain a feature matrix of the search term; perform matrix multiplication on the first target feature matrix of each candidate object and the feature matrix of the search term to obtain multiple corresponding interaction feature matrices; perform self-attention processing on each interaction feature matrix to obtain multiple corresponding attention feature matrices; and input each attention feature matrix into the first fully connected layer for feature transformation to obtain the first selection probability of each candidate object.
[0074] In some embodiments, the sequence vector representation module 403 is configured to: segment each first target input sequence into words to obtain multiple first basic units of each first target input sequence; insert identifiers into the multiple basic units of each first target input sequence to obtain multiple second basic units of each first target input sequence; perform semantic encoding on each second basic unit of each first target input sequence to obtain semantic feature vectors of each second basic unit of each first target input sequence; perform positional encoding on each second basic unit of each first target input sequence to obtain positional feature vectors of each second basic unit of each first target input sequence; add the semantic feature vectors and positional feature vectors of each second basic unit of each first target input sequence to obtain fused feature vectors of each second basic unit of each first target input sequence; and perform self-attention processing on the fused feature vectors of each second basic unit of each first target input sequence to obtain first feature vectors of each candidate object and first feature vectors of each search term.
[0075] In some embodiments, the pre-trained model further includes a recurrent neural network. Before performing self-attention processing on the fused feature vectors of each second basic unit of each first target input sequence, the sequence vector representation module 403 is configured to sequentially input the fused feature vectors of each second basic unit of each first target input sequence into the recurrent neural network; obtain the input vector of the current time step based on the fused feature vectors of each second basic unit of each first target input sequence and the hidden layer state vector of the previous time step; perform a nonlinear transformation on the input vector of the current time step to obtain the hidden layer state vector of the current time step; determine the enhanced feature vectors of each second basic unit of each first target input sequence according to the hidden layer state vector of the current time step; and determine the enhanced feature vectors of each second basic unit of each first target input sequence as the first feature vectors of each candidate object and the first feature vectors of each search term.
[0076] In some embodiments, the search recommendation model further includes a multi-classifier, a hierarchical classifier, and a similarity classifier. The multi-granularity learning module 404 is configured to: input the classification identifier vector of each candidate object into the multi-classifier for feature transformation processing to obtain a global granularity attribute feature vector for each candidate object; input the attribute feature vectors of each candidate object into a tree-structured hierarchical classifier for recursive processing to obtain multiple hierarchical granularity attribute feature vectors for each candidate object; and input the fused feature vectors of each candidate object into a similarity classifier for feature transformation to obtain multiple similarity granularity attribute feature vectors for each candidate object.
[0077] In some embodiments, before concatenating the initial attribute feature vectors of each candidate object, the feature data of the candidate object, and the search term, the search recommendation device is configured to: acquire the user's feature data; perform vector embedding on the user's feature data to obtain the user's initial feature vector; concatenate the initial attribute feature vectors of each candidate object, the feature data of the candidate object, the search term, and the user's initial feature vector to obtain multiple corresponding second target input sequences; input each second target input sequence into a pre-trained model for sequence data vector representation to obtain multiple second feature vectors of each candidate object, multiple second feature vectors of the search term, and multiple feature vectors of the user. Multi-granularity attribute feature learning is performed on each candidate object's second feature vector and each search term's second feature vector to obtain the second multi-granularity attribute feature matrix of each candidate object. The second multi-granularity attribute feature matrix of each candidate object and each candidate object's second feature vector are concatenated to obtain the second target feature matrix of each candidate object. Based on the second target feature matrix of each candidate object, each search term's second feature vector, and each user's feature vector, the probability of the user selecting each candidate object is determined to obtain the second selection probability of each candidate object. Based on the second selection probability of each candidate object, a second target object recommended to the user is selected from multiple candidate objects.
[0078] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this disclosure.
[0079] Figure 5 This is a schematic diagram of the electronic device 500 provided in an embodiment of this disclosure. Figure 5 As shown, the electronic device 500 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program 503, it implements the steps in the various method embodiments described above. Alternatively, when the processor 501 executes the computer program 503, it implements the functions of each module / unit in the various device embodiments described above.
[0080] Electronic device 500 can be a desktop computer, laptop, handheld computer, cloud server, or other electronic device. Electronic device 500 may include, but is not limited to, processor 501 and memory 502. Those skilled in the art will understand that... Figure 5 This is merely an example of electronic device 500 and does not constitute a limitation on electronic device 500. It may include more or fewer parts than shown, or different parts.
[0081] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0082] Memory 502 can be an internal storage unit of electronic device 500, such as a hard disk or RAM of electronic device 500. Memory 502 can also be an external storage device of electronic device 500, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on electronic device 500. Memory 502 can also include both internal and external storage units of electronic device 500. Memory 502 is used to store computer programs and other programs and data required by electronic device.
[0083] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0084] If integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0085] The above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit it. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be included within the protection scope of this disclosure.
Claims
1. A search recommendation method, applied to a search recommendation model, characterized in that, include: The search terms input by the user and feature data of multiple candidate objects are obtained, wherein the feature data of the candidate objects includes multiple attribute feature data of the candidate objects; Input the attribute feature data of each candidate object into the search recommendation model, and perform vector embedding on the attribute feature data of each candidate object to obtain the initial attribute feature vector of each candidate object. The initial attribute feature vectors of each candidate object, the feature data of the candidate object, and the search term are concatenated to obtain multiple corresponding first target input sequences. Each first target input sequence is input into a pre-trained model for sequence data vector representation to obtain multiple first feature vectors of each candidate object and multiple first feature vectors of the search term. Multi-granularity attribute feature learning is performed based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term to obtain the first multi-granularity attribute feature matrix of each candidate object; The first multi-granularity attribute feature matrix of each candidate object and the multiple first feature vectors of each candidate object are concatenated to obtain the first target feature matrix of each candidate object. Based on the first target feature matrix of each candidate object and multiple first feature vectors of the search term, the probability of the user selecting each candidate object is determined, and the first selection probability of each candidate object is obtained. Based on the first selection probability of each of the candidate objects, a first target object is selected from multiple candidate objects to recommend to the user; The multiple first feature vectors of the candidate objects include the classification identifier vector of the candidate objects and the multiple attribute feature vectors of the candidate objects. The multiple first feature vectors of the search term include the classification identifier vector of the search term. The step of performing multi-granularity attribute feature learning based on the multiple first feature vectors of each candidate object and the multiple first feature vectors of the search term to obtain the first multi-granularity attribute feature matrix of each candidate object includes: Based on the classification identifier vector of each candidate object, global granular attribute feature prediction is performed on each candidate object to obtain the global granular attribute feature vector of each candidate object; Based on the attribute feature vectors of each candidate object, hierarchical granularity attribute feature prediction is performed on each candidate object to obtain multiple hierarchical granularity attribute feature vectors of each candidate object; Each attribute feature vector of each candidate object is concatenated with the classification identifier vector of the search term to obtain multiple fused feature vectors for each candidate object. Based on the fusion feature vectors of each candidate object, similarity granularity attribute feature prediction is performed on each candidate object to obtain multiple similarity granularity attribute feature vectors for each candidate object. The global granularity attribute feature vector, the multiple hierarchical granularity attribute feature vectors of each candidate object, and the multiple similarity granularity attribute feature vectors of each candidate object are concatenated to obtain the first multi-granularity attribute feature matrix of each candidate object.
2. The method according to claim 1, characterized in that, The step of determining the probability of the user selecting each candidate object based on the first target feature matrix of each candidate object and multiple first feature vectors of the search term, and obtaining the first selection probability of each candidate object, includes: Multiple first feature vectors of the search term are concatenated to obtain the feature matrix of the search term; Multiply the first target feature matrix of each candidate object and the feature matrix of the search term by matrix multiplication to obtain multiple corresponding interaction feature matrices; Self-attention processing is performed on each of the interaction feature matrices to obtain multiple corresponding attention feature matrices; Each attention feature matrix is input into a fully connected layer for feature transformation to obtain the first selection probability of each candidate object.
3. The method according to claim 1, characterized in that, The step of inputting each of the first target input sequences into a pre-trained model for sequence data vector representation to obtain multiple first feature vectors for each of the candidate objects and multiple first feature vectors for the search term includes: Each of the first target input sequences is segmented into words to obtain multiple first basic units for each of the first target input sequences; Identifiers are inserted into multiple basic units of each of the first target input sequences to obtain multiple second basic units of each of the first target input sequences; Semantic encoding is performed on each second basic unit of each first target input sequence to obtain the semantic feature vector of each second basic unit of each first target input sequence; Position encoding is performed on each second basic unit of each first target input sequence to obtain the position feature vector of each second basic unit of each first target input sequence; The semantic feature vectors of each second basic unit of each first target input sequence and the positional feature vectors of each second basic unit of each first target input sequence are added together to obtain the fused feature vectors of each second basic unit of each first target input sequence. Self-attention processing is performed on the fusion feature vectors of each second basic unit of each first target input sequence to obtain the first feature vectors of each candidate object and the first feature vectors of each search term.
4. The method according to claim 3, characterized in that, The pre-trained model includes a recurrent neural network, and before performing self-attention processing on the fused feature vectors of each of the second basic units of each of the first target input sequences, it further includes: The fused feature vectors of each second basic unit of each first target input sequence are sequentially input into the recurrent neural network. Based on the fused feature vectors of each second basic unit of each first target input sequence and the hidden layer state vector of the previous time step, the input vector of the current time step is obtained. Perform a nonlinear transformation on the input vector at the current time step to obtain the hidden layer state vector at the current time step; Based on the hidden layer state vector at the current time step, determine the enhanced feature vector of each second basic unit of each first target input sequence. The enhanced feature vectors of each second basic unit of each first target input sequence are determined as each first feature vector of each candidate object and each first feature vector of the search term.
5. The method according to claim 1, characterized in that, The search recommendation model includes a multi-classifier, a hierarchical classifier, and a similarity classifier. The step of predicting global granular attribute features for each candidate object based on its classification identifier vector, to obtain a global granular attribute feature vector for each candidate object, includes: The classification identifier vector of each candidate object is input into the multi-classifier for feature transformation processing to obtain the global granularity attribute feature vector of each candidate object. The search recommendation model includes a hierarchical classifier. The step of predicting hierarchical granular attribute features for each candidate object based on its attribute feature vectors, resulting in multiple hierarchical granular attribute feature vectors for each candidate object, includes: Each attribute feature vector of each candidate object is input into the hierarchical classifier of the tree structure for recursive processing to obtain multiple hierarchical granular attribute feature vectors of each candidate object. The step of predicting similarity-granularity attribute features for each candidate object based on its fused feature vectors, resulting in multiple similarity-granularity attribute feature vectors for each candidate object, includes: Each fused feature vector of each candidate object is input into the similarity classifier for feature transformation, resulting in multiple similarity granularity attribute feature vectors for each candidate object.
6. The method according to claim 1, characterized in that, Before concatenating the initial attribute feature vectors of each of the candidate objects, the feature data of the candidate objects, and the search terms, the method further includes: Obtain the user's feature data, perform vector embedding on the user's feature data, and obtain the user's initial feature vector; The initial attribute feature vectors of each candidate object, the feature data of the candidate object, the search term, and the initial feature vector of the user are concatenated to obtain multiple corresponding second target input sequences. Each second target input sequence is input into the pre-trained model for sequence data vector representation to obtain multiple second feature vectors of each candidate object, multiple second feature vectors of the search term, and multiple feature vectors of the user. Based on the second feature vectors of each candidate object and the second feature vectors of the search term, multi-granularity attribute feature learning is performed to obtain the second multi-granularity attribute feature matrix of each candidate object; The second multi-granularity attribute feature matrix of each candidate object and the second feature vector of each candidate object are concatenated to obtain the second target feature matrix of each candidate object. Based on the second target feature matrix of each candidate object, the second feature vector of each search term, and the feature vector of each user, the probability of the user selecting each candidate object is determined, and the second selection probability of each candidate object is obtained. Based on the second selection probability of each of the candidate objects, a second target object is selected from the multiple candidate objects to recommend to the user.
7. A search recommendation apparatus for performing the method according to any one of claims 1-6, characterized in that, include: The acquisition module is used to acquire the user-input search terms and feature data of multiple candidate objects, wherein the feature data of the candidate objects includes multiple attribute feature data of the candidate objects; The vector embedding module is used to input the attribute feature data of each of the candidate objects into the search recommendation model, and to perform vector embedding on the attribute feature data of each of the candidate objects to obtain the initial attribute feature vectors of each of the candidate objects. The sequence vector representation module is used to concatenate the initial attribute feature vectors of each candidate object, the feature data of the candidate object, and the search term to obtain multiple first target input sequences. Each first target input sequence is input into a pre-trained model for sequence data vector representation to obtain multiple first feature vectors of each candidate object and multiple first feature vectors of the search term. The multi-granularity learning module is used to perform multi-granularity attribute feature learning based on multiple first feature vectors of each candidate object and multiple first feature vectors of the search term, so as to obtain the first multi-granularity attribute feature matrix of each candidate object; The candidate object representation generation module is used to concatenate the first multi-granularity attribute feature matrix of each candidate object and the multiple first feature vectors of each candidate object to obtain the first target feature matrix of each candidate object; The probability prediction module is used to determine the probability that the user selects each of the candidate objects based on the first target feature matrix of each candidate object and multiple first feature vectors of the search term, and to obtain the first selection probability of each candidate object. The recommendation module is used to select a first target object to recommend to the user from multiple candidate objects based on the first selection probability of each candidate object.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 6.
9. A readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Commodity search recommendation method and device, equipment and medium
CN115545832A
Object recommendation method and device
CN117893279A