Retail industry search system and method based on large language model
By adopting a method based on a large language model in the retail industry search system, expanding and encoding user query intentions and generating interactive features with product description information, the problem that existing search systems cannot accurately understand user intentions is solved, and more efficient and relevant search results are achieved.
Patent Information
- Application Number
- CN202411735440.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The existing product search system relies on keyword matching technology, cannot accurately understand the user's query intention, is difficult to process synonyms or synonyms, and cannot identify the user's potential purchasing intention, resulting in low relevance of search results.
The retail industry search method based on a large language model is adopted, and the target product query statement input by the user is obtained, the search intention expansion and semantic encoding are performed, the target product query intention semantic encoding vector is generated, and the feature query interaction is conducted based on external knowledge with the description information of the alternative products, and the fine-grained semantic interaction feature vector is generated to determine whether to return the relevant product link.
It significantly improves the user's shopping experience and search efficiency, can more accurately understand the user's query intentions, and provides highly relevant product information.
Smart Images

Figure CN119669564A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of retail industry search technology, and more specifically, to a retail industry search system and method based on a large language model. Background Art
[0002] In recent years, with the rapid development of the e-commerce market, more and more consumers have begun to prefer shopping through online platforms. However, facing a wide range of products, finding products that they really like and are satisfied with has gradually become a major problem for consumers. In order to solve this problem, many retail companies have begun to actively develop and optimize their own online product search systems, hoping to help consumers find the products they want faster and more accurately.
[0003] However, most existing product search systems use keyword matching technology, which mainly relies on keywords entered by users for search. Although it can quickly respond to user query requests, it also has obvious limitations. For example, since keyword matching technology mainly focuses on character matching of words and ignores the deep semantic association between product descriptions and user query content, it may be unable to accurately understand the actual needs of users, difficult to handle synonyms or near-synonyms, and unable to identify users' potential purchase intentions. In particular, when users' descriptions of products are not specific enough or use vague words, the search results often have low relevance.
[0004] Therefore, in order to improve search accuracy and user experience, a retail industry search system and method based on a large language model is desired. Summary of the invention
[0005] The present application provides a retail industry search system and method based on a large language model, which can more accurately understand the user's query intention and provide highly relevant product information, thereby significantly improving the user's shopping experience and search efficiency.
[0006] In a first aspect, a retail industry search method based on a large language model is provided, comprising:
[0007] Obtaining a target product query statement input by a user;
[0008] After performing a search intent expansion description on the target product query sentence, semantic encoding is performed to obtain a target product query intent semantic encoding vector;
[0009] Extracting description information of the first candidate product from the product library;
[0010] Performing semantic coding on the description information of the first candidate product to obtain a semantic coding vector of the description information of the first candidate product;
[0011] Performing feature query interaction based on external knowledge guidance on the semantic encoding vector of the query intention of the target product and the semantic encoding vector of the description information of the first candidate product to obtain a query intention-candidate product fine-grained semantic interaction feature vector;
[0012] Based on the query intention-candidate product fine-grained semantic interaction feature vector, it is determined whether to return the link of the first candidate product as a search result.
[0013] The application provides a retail industry search system and method based on a large language model. After obtaining the target product query sentence input by the user, it uses natural language processing technology based on deep learning to expand the search intent and generate a richer query content description. After the user confirms that it is correct, it extracts contextual semantic features and interacts with the description information of the candidate products in a fine-grained semantic query, thereby intelligently identifying whether the candidate product meets the user's search needs. In this way, the user's query intent can be understood more accurately, and highly relevant product information can be provided, thereby significantly improving the user's shopping experience and search efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings of the embodiments of the present application are briefly introduced below. Obviously, the drawings described below only relate to some embodiments of the present application, and are not intended to limit the present application.
[0015] Figure 1 This is a schematic flowchart of a retail industry search method based on a large language model according to an embodiment of the present application.
[0016] Figure 2 This is a data flow diagram of a retail industry search method based on a large language model according to an embodiment of the present application.
[0017] Figure 3 This is a schematic flowchart of a retail industry search method based on a large language model in an embodiment of the present application, in which the target product query statement is semantically encoded after an extended description of the retrieval intent to obtain a semantic encoding vector of the target product query intent.
[0018] Figure 4 In the retail industry search method based on a large language model in an embodiment of the present application, a schematic flowchart of performing feature query interaction based on external knowledge guidance on the query intention semantic encoding vector of the target product and the first candidate product description information semantic encoding vector to obtain a query intention-candidate product fine-grained semantic interaction feature vector.
[0019] Figure 5This is a schematic flowchart of determining whether to return a link to the first candidate product as a search result based on a query intent-candidate product fine-grained semantic interaction feature vector in a retail industry search method based on a large language model in an embodiment of the present application.
[0020] Figure 6 This is a schematic block diagram of a retail industry search system based on a large language model according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work also fall within the scope of protection of the present application.
[0022] In response to the above technical problems, the technical concept of this application is: after obtaining the target product query sentence input by the user, the natural language processing technology based on deep learning is used to expand the search intent, generate a richer query content description, and after the user confirms that it is correct, extract contextual semantic features and interact with the description information of the candidate products in a fine-grained semantic query, so as to intelligently identify whether the candidate product meets the user's search needs. In this way, the user's query intent can be understood more accurately, and highly relevant product information can be provided, thereby significantly improving the user's shopping experience and search efficiency.
[0023] like Figure 1 and Figure 2 As shown, the retail industry search method based on a large language model is characterized in that it includes: S1, obtaining a target product query statement input by a user; S2, performing semantic encoding on the target product query statement after performing retrieval intent expansion description to obtain a target product query intent semantic encoding vector; S3, extracting description information of a first alternative product from a product library; S4, performing semantic encoding on the description information of the first alternative product to obtain a first alternative product description information semantic encoding vector; S5, performing feature query interaction based on external knowledge guidance on the target product query intent semantic encoding vector and the first alternative product description information semantic encoding vector to obtain a query intent-alternative product fine-grained semantic interaction feature vector; S6, based on the query intent-alternative product fine-grained semantic interaction feature vector, determining whether to return a link to the first alternative product as a retrieval result.
[0024] Exemplarily, in step S1, a query statement for a target product input by a user is obtained. It should be understood that the query statement for a target product input by a user is the most direct source of information that reflects the user's current needs, and provides a basic data source for product search. By analyzing the query statement input by the user, the system can start a series of processing flows, including retrieval intent expansion, semantic encoding, and matching with alternative product description information, thereby providing users with more accurate product search results. Compared with traditional keyword matching technology, this method can better understand the actual needs of users, especially when users use vague words or descriptions that are not specific enough. By generating richer query content descriptions and using deep learning technology for semantic understanding and matching, the relevance of the search and user experience are significantly improved.
[0025] In one embodiment, obtaining a target product query statement input by a user includes: designing an easy-to-use search bar so that users can directly type in the product name, characteristics, or other relevant information they want to find. The front-end technology captures the text entered by the user in the search box and passes it to the back-end system as the original query statement. In other embodiments, the system may also guide users to improve their queries through a conversational interface (such as a chatbot), or confirm whether the system's understanding is consistent with the user's intention to increase the accuracy of the query. Subsequently, the user's query statement is securely sent from the client to the server so that the subsequent data processing module can analyze and process it. In this way, the system can effectively obtain the user's query statement, and based on this, carry out subsequent search services to ensure that users can obtain more accurate and relevant search results.
[0026] Exemplarily, in step S2, the target product query statement is semantically encoded after the retrieval intent extension description to obtain the target product query intent semantic encoding vector. It should be understood that the query statement input by the user may usually be just a simple combination of keywords, lacking contextual information, and may even be ambiguous or vague. By extending the description of the retrieval intent, richer and more detailed target product query enhancement content can be generated to better reflect the actual needs of users. By converting the target product query enhancement content into a semantic encoding vector, the system can understand and process the user's query at the semantic level rather than just the lexical level. Using a model such as Bert for semantic encoding can capture the deep associations and contextual meanings between words, thereby generating a vector representation containing rich semantic information.
[0027] In one embodiment, Figure 3As shown, after performing a retrieval intent extension description on the target product query statement, semantic encoding is performed to obtain a target product query intent semantic encoding vector, including: S21, inputting the target product query statement into a retrieval intent extension description module based on a large language model to obtain target product query enhanced content; S22, displaying the target product query enhanced content, and confirming by the customer whether there is a description deviation; S23, after receiving the user's confirmation that there is no description deviation, semantic encoding the target product query enhanced content to obtain the target product query intent semantic encoding vector.
[0028] Exemplarily, in step S21, the target product query statement is input into the retrieval intention extension description module based on the large language model to obtain the target product query enhancement content. It should be understood that considering that the query statement input by the user is usually just a simple keyword combination, lacking context information, and even ambiguous or vague, it may cause the system to be unable to fully understand the actual needs of the user. To this end, the present application uses a retrieval intention extension description module based on a large language model to semantically expand the target product query statement to generate richer and more detailed target product query enhancement content. In a specific example of the present application, the large language model is a GPT-3 (Generative Pre-trained Transformer 3) model, which is trained using a self-supervised learning algorithm and has a strong language generation and understanding ability. It can be based on the short sentence input by the user, combined with context information and a wide knowledge base to identify and supplement potential query intentions and generate a more comprehensive query description. For example, if the user enters "coffee machine", the GPT-3 model may generate "fully automatic household coffee machine, supporting multiple coffee making modes, easy to clean and maintain".
[0029] Exemplarily, in step S22, the target product query enhanced content is displayed, and the customer confirms whether there is a description deviation. It should be understood that, considering that the query content after expansion by the large language model is more detailed, there may be misunderstandings or deviations from the actual needs of the user. Therefore, the present application further displays the target product query enhanced content on the application interface for the user to check and confirm. If the user believes that the description is accurate, proceed to the next step after confirmation; if there is a deviation, the user is allowed to modify or re-enter the query statement based on the target product query enhanced content. In this way, the accuracy of product queries can be effectively ensured.
[0030] Exemplarily, in step S23, after receiving the user's confirmation that there is no description deviation, the target product query enhancement content is semantically encoded to obtain the target product query intention semantic encoding vector. It should be understood that after receiving the user's confirmation that there is no description deviation, in order to fully understand the contextual semantic meaning of the target product query enhancement content, the present application further semantically encodes the target product query enhancement content, converts the text data into a vector representation containing semantic information, thereby providing a basis for subsequent semantic query interaction.
[0031] In one embodiment, semantic encoding is performed on the target product query enhancement content to obtain the target product query intention semantic encoding vector, including: using a semantic encoder based on the Bert model to semantically encode the target product query enhancement content to obtain the target product query intention semantic encoding vector. It should be understood that the process of semantically encoding the target product query enhancement content using a semantic encoder based on the Bert model to obtain the target product query intention semantic encoding vector is processed using Bert, a powerful pre-trained deep learning model. The Bert model considers the contextual information on both sides of a word at the same time through a bidirectional Transformer architecture, so as to more accurately capture the meaning of words in a specific context. It first performs unsupervised pre-training on a large-scale text dataset to learn common language features; then, according to specific task requirements, supervised fine-tuning is performed on a smaller-scale dataset to adapt to specific downstream tasks.
[0032] The Bert model uses two main technologies in the pre-training stage: Masked Language Model (MLM) and Next Sentence Prediction (NSP). MLM randomly masks some words in the input sentence and requires the model to predict these masked words to train the model's ability to understand context. NSP helps the model understand the relationship between sentences, which is very important for tasks such as question answering and natural language reasoning.
[0033] When applying the Bert model for semantic encoding, the target product query enhancement content must first be converted into a form suitable for Bert processing, which usually involves word segmentation, adding special tags (such as [CLS] and [SEP]), and constructing input sequences. Then, the prepared input sequence is fed into the Bert model, and the model generates the hidden state of each word. These hidden states can be regarded as a deep semantic representation of the input text. For the semantic encoding vector of the entire sentence or paragraph, the hidden state corresponding to the [CLS] tag is usually used as a representative, because after being processed by the model, the hidden state of the [CLS] tag already contains the information of the entire input sequence and is suitable as the semantic encoding vector of the entire input text. In this way, the Bert model can convert the target product query enhancement content into a vector representation rich in semantic information. This representation not only retains the semantic features of the original text, but also enhances the system's ability to understand the user's query intent, making the subsequent matching with the description information of the alternative products more accurate and effective. This method overcomes the limitations of traditional keyword matching technology and improves the relevance of search results and user experience.
[0034] Exemplarily, in step S3, the description information of the first candidate product is extracted from the product library. It should be understood that in order to determine the product that matches the user's query intention, the description information of the first candidate product is further extracted from the product library, including key elements such as product name, brand, specification, price, functional characteristics, etc. To simplify the description, in the technical solution of this application, only the semantic matching analysis process between the description information of a single candidate product and the target product query enhancement content is elaborated in detail, but it should be understood that in actual application, this method can be applied to any candidate product in the product library, thereby realizing traversal query of the product library.
[0035] Exemplarily, in step S4, the description information of the first candidate product is semantically encoded to obtain a semantic encoding vector of the description information of the first candidate product. It should be understood that the description information of the first candidate product is semantically encoded to capture the semantic association and contextual meaning between the words in the description information, and convert it into a vector representation containing semantic information to generate a semantic encoding vector of the description information of the first candidate product. In a specific example of the present application, the description information of the first candidate product is also semantically encoded using the semantic encoder based on the Bert model. In this way, by using the same network model to process the target product query enhancement content and the description information of the first candidate product, it can be ensured that the two are comparable at the semantic level, thereby improving the accuracy of subsequent semantic query matching.
[0036] Exemplarily, in step S5, the query intention semantic coding vector of the target product and the semantic coding vector of the first candidate product description information are subjected to feature query interaction guided by external knowledge to obtain a query intention-alternative product fine-grained semantic interaction feature vector. It should be understood that the query intention semantic coding vector of the target product and the semantic coding vector of the first candidate product description information are further subjected to semantic interaction coding to mine the potential semantic association between the two and achieve deep matching at the semantic level. In particular, in order to further improve the accuracy and relevance of semantic matching, the present application introduces external knowledge in the process of semantic interaction coding to strengthen the interaction between the query intention semantic coding vector of the target product and the semantic coding vector of the first candidate product description information, thereby enhancing the depth and breadth of semantic matching.
[0037] In one embodiment, Figure 4 As shown, the target product query intention semantic coding vector and the first candidate product description information semantic coding vector are subjected to feature query interaction guided by external knowledge to obtain a query intention-alternative product fine-grained semantic interaction feature vector, including: S51, based on external knowledge, the target product query intention semantic coding vector and the first candidate product description information semantic coding vector are subjected to fine-grained feature interaction optimization to obtain an external knowledge optimized query intention-alternative product fine-grained feature interaction matrix; S52, based on the external knowledge optimized query intention-alternative product fine-grained feature interaction matrix, the target product query intention semantic coding vector and the first candidate product description information semantic coding vector are subjected to feature modulation optimization respectively to obtain an optimized target product query intention semantic coding vector and an optimized first candidate product description information semantic coding vector; S53, the optimized target product query intention semantic coding vector and the optimized first candidate product description information semantic coding vector are subjected to position-by-position semantic response encoding to obtain the query intention Figure 1 Fine-grained semantic interaction feature vector of product alternatives.
[0038] Exemplarily, in step S51, based on external knowledge, the semantic encoding vector of the target product query intent and the semantic encoding vector of the first candidate product description information are subjected to fine-grained feature interactive optimization to obtain an external knowledge optimized query intent. Figure 1 The fine-grained feature interaction matrix of candidate products includes: inputting the semantic encoding vector of the query intention of the target product and the semantic encoding vector of the description information of the first candidate product into a fine-grained feature interaction network to obtain the query intention Figure 1 Fine-grained feature interaction matrix of candidate products; Figure 1 The fine-grained feature interaction matrix of candidate products is input into the attention unit based on external knowledge to obtain the external knowledge to optimize the query intention Figure 1Fine-grained feature interaction matrix of candidate products. Specifically, the process can be expressed as follows:
[0039]
[0040] Among them, V 1 Represents the semantic encoding vector of the target product query intent, V 2 represents the semantic encoding vector of the first candidate product description information, (·) T represents the transpose of a vector, Represents matrix multiplication operation, M q Indicates the query Figure 1 Fine-grained feature interaction matrix of candidate products, M k and M v represents the learnable memory parameter matrix of the attention unit based on external knowledge, norm(·) represents the normalization function, M y Represents external knowledge to optimize query intent Figure 1 Fine-grained feature interaction matrix of candidate products.
[0041] That is, the semantic encoding vector of the target product query intent and the semantic encoding vector of the first candidate product description information are input into the fine-grained feature interaction network, the correlation between the two is understood from a micro level, the fine-grained interaction information between the two is captured, and the query intent is generated. Figure 1 The fine-grained feature interaction matrix of candidate products is then generated. Figure 1 The fine-grained feature interaction matrix of candidate products is sent to the attention unit based on external knowledge, and the external knowledge is used to further optimize the query intent-fine-grained feature interaction matrix of candidate products, and enhance the model's ability to understand specific domain knowledge. It should be understood that the external knowledge is domain expertise related to the target product obtained from sources such as knowledge graphs. For example, for a query on "coffee machine", external knowledge may include the types of coffee machines, how to use them, basic functions, common uses, well-known industry brands, cleaning and maintenance knowledge, etc. By incorporating external knowledge into the attention mechanism, it can help the model more accurately understand the specific attributes of the product and the specific needs of the user, and capture the potential connection between the two in a larger range, thereby effectively identifying and strengthening the potential correlation between the query content and the description of the candidate products, and optimizing the associated interactive information between the two.
[0042] Exemplarily, in step S52, the query meaning is optimized based on the external knowledge. Figure 1The fine-grained feature interaction matrix of the candidate products is used to perform feature modulation optimization on the semantic coding vector of the query intention of the target product and the semantic coding vector of the description information of the first candidate product to obtain the optimized semantic coding vector of the query intention of the target product and the optimized semantic coding vector of the description information of the first candidate product, including: performing linear transformation on the semantic coding vector of the query intention of the target product to obtain the first query feature vector and the first value feature vector and optimizing the query intention with the external knowledge Figure 1 The fine-grained feature interaction matrix of candidate products is used as a key matrix, and the first query feature vector, the first value feature vector and the key matrix are input into the fine-grained modulation module based on the Transformer structure to obtain the optimized semantic encoding vector of the query intention of the target product; the first semantic encoding vector of the description information of the candidate product is linearly transformed to obtain the second query feature vector and the second value feature vector, and the fine-grained feature interaction matrix optimized by the external knowledge is used as a key matrix, and the second query feature vector, the second value feature vector and the key matrix are input into the fine-grained modulation module based on the Transformer structure to obtain the optimized semantic encoding vector of the description information of the first candidate product. Specifically, the process can be expressed as follows:
[0043]
[0044] Among them, V 1 Represents the semantic encoding vector of the target product query intent, V 2 represents the semantic encoding vector of the description information of the first candidate product, M y Represents external knowledge to optimize query intent Figure 1 Fine-grained feature interaction matrix of candidate products, W 1q and W 1v denote the first query embedding matrix and the first value embedding matrix respectively, V 1q and V 1v denote the first query feature vector and the first value feature vector respectively, W 2q and W 2v denote the second query embedding matrix and the second value embedding matrix, V 2q and V 2v denote the second query feature vector and the second value feature vector, respectively, and b 1q , b 1v , b 2q and b 2v denote different bias terms, softmax(·) denotes a normalized exponential function, d denotes the characteristic scale value of the external knowledge optimized fine-grained feature interaction matrix, V′ 1 and V′ 2They respectively represent the optimized target product query intention semantic coding vector and the optimized first candidate product description information semantic coding vector.
[0045] That is, the query meaning optimized by external knowledge Figure 1 The fine-grained feature interaction matrix of alternative products is used as the key matrix, and the first query feature vector and the first value feature vector are constructed based on the semantic coding vector of the query intention of the target product. The second query feature vector and the second value feature vector are constructed based on the semantic coding vector of the description information of the first alternative product. The self-attention mechanism of the Transformer structure is used to realize the information exchange and integration between the internal and external knowledge of the features, thereby ensuring that the semantic coding vector of the query intention of the target product and the semantic coding vector of the description information of the first alternative product can benefit from external knowledge to improve the quality of their feature expression.
[0046] Exemplarily, in step S53, the optimized target product query intention semantic encoding vector and the optimized first candidate product description information semantic encoding vector are subjected to position-by-position semantic response encoding to obtain the query intention-candidate product fine-grained semantic interaction feature vector, including: calculating the position point-by-position point division between the optimized target product query intention semantic encoding vector and the optimized first candidate product description information semantic encoding vector to obtain the query intention-candidate product fine-grained semantic interaction feature vector. Specifically, the process can be expressed as:
[0047]
[0048] Among them, V' 1 and V' 2 They represent the optimized semantic encoding vector of the query intention of the target product and the optimized semantic encoding vector of the description information of the first candidate product, respectively. i A fine-grained semantic interaction feature vector representing the query intent-alternative product.
[0049] That is, by performing semantic response calculation on the optimized target product query intention semantic coding vector and the optimized first alternative product description information semantic coding vector by positional division, a query intention-alternative product fine-grained semantic interaction feature vector is obtained, thereby achieving a quantitative evaluation of the semantic match between the target product query intention and the alternative product description.
[0050] Exemplarily, in step S6, based on the query intent-alternative product fine-grained semantic interaction feature vector, it is determined whether to return the link of the first candidate product as a search result. Figure 5As shown, based on the query intention-alternative product fine-grained semantic interaction feature vector, determining whether to return the link of the first alternative product as a search result includes: S61, inputting the query intention-alternative product fine-grained semantic interaction feature vector into a search result generator based on a classifier to obtain a search result, and the search result is used to indicate whether to return the first alternative product as a search result; S62, in response to the search result being to return the first alternative product as a search result, returning the link of the first alternative product as a search result. That is, the query intention-alternative product fine-grained semantic interaction feature vector is input into the search result generator based on the classifier for classification processing to determine whether the alternative product meets the user's query intention. The classifier performs multi-level feature learning on the query intention-alternative product fine-grained semantic interaction feature vector to perform probability calculation based on the semantic association features between the user query content and the first alternative product contained therein, to determine whether the first alternative product meets the user's query needs, and generates corresponding search results based on the query results. For example, if the first candidate product meets the user's query requirements, the link to the first candidate product is returned as the search result; if not, the next candidate product is automatically selected from the product library, and the above semantic encoding and matching process is repeated until a product that meets the user's query intention is found.
[0051] In particular, in the technical solution of the present application, the target product query intention semantic coding vector and the first candidate product description information semantic coding vector represent the text semantic coding features of the target product query enhanced content and the text semantic coding features of the description information of the first candidate product, respectively. When performing fine-grained feature interaction based on external knowledge modulation, the difference in semantic density between the target product query intention semantic coding vector and the first candidate product description information semantic coding vector will cause the fine-grained feature interaction to be unbalanced, and semantic interference noise may be introduced in the process of inputting the target product query statement into the retrieval intention extension description module based on the large language model, which ensures the existence of fine-grained feature structural holes in the overall feature manifold of the query intention-candidate product fine-grained semantic interaction feature vector in the high-dimensional feature space. The existence of fine-grained feature structural holes will not only make the semantic coverage of the query intention-candidate product fine-grained semantic interaction feature vector corresponding to the class probability label insufficient, but also cause the outlier class regression inference mapping to be off-target, affecting the accuracy of the retrieval results obtained by inputting the query intention-candidate product fine-grained semantic interaction feature vector into the retrieval result generator based on the classifier.
[0052] In the technical solution of the present application, the query intention-alternative product fine-grained semantic interaction feature vector is input into a classifier-based retrieval result generator to obtain retrieval results, including:
[0053] Inputting the query intention-alternative product fine-grained semantic interaction feature vector into a pre-classifier based on a Softmax function to obtain a query intention-alternative product semantic interaction fine-grained class probability label vector;
[0054] Calculate the product between the query intention-alternative product semantic interaction fine-grained class probability label vector and its transposed vector to obtain the query intention-alternative product semantic interaction fine-grained full label domain modulation matrix;
[0055] Dividing the feature values of each position in the query intention-alternative product semantic interaction fine-grained full label domain modulation matrix by the square root of the scale value of the query intention-alternative product semantic interaction fine-grained full label domain scale modulation matrix;
[0056] The query Figure 1 Semantic interaction of candidate products Fine-grained full-label domain scale modulation matrix input Class probability domain attention sparse module based on multi-level gating function to obtain sparse query meaning Figure 1 Fine-grained full-label domain scale modulation matrix of semantic interaction of candidate products;
[0057] According to the query Figure 1 The fine-grained semantic interaction feature vector of the candidate products is used as the query feature vector, and the sparse query feature vector is transformed into Figure 1 The fine-grained full-label domain scale modulation matrix of the semantic interaction between candidate products and the query semantics Figure 1 The fine-grained semantic interaction feature vectors of candidate products are matrix multiplied to obtain the optimized query meaning. Figure 1 Fine-grained semantic interaction feature vector of candidate products;
[0058] The optimized query Figure 1 The fine-grained semantic interaction feature vector of the candidate products is input into the classifier-based retrieval result generator to obtain the retrieval result.
[0059] The query Figure 1 The optimization process of the fine-grained semantic interaction feature vector of candidate products is expressed as follows:
[0060]
[0061]
[0062]
[0063] λ≥1
[0064]
[0065] Among them, vi Indicates the query Figure 1 The feature value of the ith position of the fine-grained semantic interaction feature vector of the candidate product, L represents the query meaning Figure 1 The scale value of the fine-grained semantic interaction feature vector of the candidate products, Indicates the query Figure 1 The eigenvalue of the i-th position of the semantic interaction fine-grained class probability label vector of the candidate product, V p Indicates the query Figure 1 Fine-grained class probability label vector of semantic interaction of candidate products, represents the matrix multiplication operation, (·) T Represents the transpose of a vector, M p Indicates the query Figure 1 Fine-grained full-label domain scale modulation matrix of semantic interaction of candidate products, θ represents the predetermined threshold, Indicates the query Figure 1 The eigenvalue of the i-th position of the fine-grained full-label domain scale modulation matrix of the semantic interaction of the candidate products, λ represents the predetermined hyperparameter, mask represents the mask function, Represents sparse query meaning Figure 1 The eigenvalue of the i-th position of the fine-grained full-label domain scale modulation matrix of the semantic interaction of the candidate products, M p ' indicates sparse query meaning Figure 1 Fine-grained full-label domain scale modulation matrix of semantic interaction between alternative products, V′ represents the optimized query intent-alternative product fine-grained semantic interaction feature vector.
[0066] Thus, by adding a class probability domain-level optimizable perturbation to the original feature vector to strengthen the dependency entanglement between different variables in the original feature vector based on label domain modulation, the source domain feature vector is optimized based on class probability query scale modulation. In this way, the significant inherent modal information in the source domain features can be more effectively retained, and the interference components in the feature distribution can be effectively masked, thereby improving the adversarial robustness of the manifold expression of the feature vector. In this way, the accuracy of the retrieval result obtained by the retrieval result generator based on the classifier is improved.
[0067] In summary, the retail industry search method based on the large language model according to the embodiment of the present application is explained. After obtaining the target product query sentence input by the user, it uses the natural language processing technology based on deep learning to expand the search intent and generate a richer query content description. After the user confirms that it is correct, it extracts contextual semantic features and interacts with the description information of the candidate products in a fine-grained semantic query, so as to intelligently identify whether the candidate product meets the user's search needs. In this way, the user's query intent can be understood more accurately, and highly relevant product information can be provided, thereby significantly improving the user's shopping experience and search efficiency.
[0068] Figure 6 Schematic block diagram of a retail industry search system based on a large language model according to an embodiment of the present application. Figure 6 As shown, the retail industry search system 100 based on the large language model includes: a target product query statement acquisition module 110, which is used to acquire the target product query statement input by the user; a target product query intention semantic encoding module 120, which is used to perform semantic encoding on the target product query statement after performing retrieval intention expansion description to obtain a target product query intention semantic encoding vector; an alternative product description information extraction module 130, which is used to extract the description information of the first alternative product from the product library; an alternative product description information semantic encoding module 140, which is used to perform semantic encoding on the description information of the first alternative product to obtain a first alternative product description information semantic encoding vector; a feature query interaction processing module 150, which is used to perform feature query interaction based on external knowledge guidance on the target product query intention semantic encoding vector and the first alternative product description information semantic encoding vector to obtain a query intention-alternative product fine-grained semantic interaction feature vector; a retrieval result determination module 160, which is used to determine whether to return the link of the first alternative product as a retrieval result based on the query intention-alternative product fine-grained semantic interaction feature vector.
[0069] In one embodiment, the target product query intention semantic encoding module is used to: input the target product query statement into a retrieval intention extension description module based on a large language model to obtain target product query enhanced content; display the target product query enhanced content, and confirm by the customer whether there is a description deviation; after receiving the user's confirmation that there is no description deviation, semantically encode the target product query enhanced content to obtain the target product query intention semantic encoding vector.
[0070] Here, those skilled in the art can understand that the specific operations of the various modules and units in the retail industry search system based on the large language model have been described in the above reference. Figures 1 to 5 The description of the retail industry search method based on a large language model has been introduced in detail, and therefore, its repeated description will be omitted.
[0071] An embodiment of the present application further provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer implements the methods in the above embodiments of the present application.
[0072] An embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer implements the methods in the above embodiments of the present application.
[0073] An embodiment of the present application also provides a chip, including a circuit, for executing the methods in the above embodiments of the present application.
[0074] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0075] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is a kind of association relationship that describes associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In this application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0076] The prefixes such as "first" and "second" used in the embodiments of the present application are only used to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. The use of prefixes such as ordinal numbers used to distinguish description objects in the embodiments of the present application does not constitute a limitation on the described objects. For the statement of the described objects, please refer to the description in the context of the claims or embodiments, and the use of such prefixes should not constitute an unnecessary limitation.
[0077] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0078] In the various embodiments of the present application, unless otherwise specified or logically conflicting, the terms and / or descriptions between the various embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.
[0079] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0080] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0081] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A retail industry search method based on a large language model, characterized in that: include: Obtaining a target product query statement input by a user; After performing a search intent expansion description on the target product query sentence, semantic encoding is performed to obtain a target product query intent semantic encoding vector; Extracting description information of the first candidate product from the product library; Performing semantic coding on the description information of the first candidate product to obtain a semantic coding vector of the description information of the first candidate product; Performing feature query interaction based on external knowledge guidance on the semantic encoding vector of the query intention of the target product and the semantic encoding vector of the description information of the first candidate product to obtain a query intention-candidate product fine-grained semantic interaction feature vector; Based on the query intention-candidate product fine-grained semantic interaction feature vector, it is determined whether to return the link of the first candidate product as a search result.
2. The retail industry search method based on a large language model according to claim 1, characterized in that: After performing a search intent extension description on the target product query statement, semantic encoding is performed to obtain a target product query intent semantic encoding vector, including: Inputting the target product query statement into a retrieval intention extension description module based on a large language model to obtain target product query enhanced content; Display the target product query enhancement content, and ask the customer to confirm whether there is any description deviation; After receiving confirmation from the user that there is no description deviation, semantic encoding is performed on the target product query enhancement content to obtain a semantic encoding vector of the target product query intention.
3. The retail industry search method based on a large language model according to claim 2, characterized in that: Semantically encoding the target product query enhancement content to obtain a semantic encoding vector of the target product query intention includes: The target product query enhancement content is semantically encoded using a semantic encoder based on the Bert model to obtain a semantic encoding vector of the target product query intention.
4. The retail industry search method based on a large language model according to claim 3, characterized in that: Performing feature query interaction based on external knowledge guidance on the semantic encoding vector of the query intention of the target product and the semantic encoding vector of the description information of the first candidate product to obtain a query intention-candidate product fine-grained semantic interaction feature vector, including: Based on external knowledge, fine-grained feature interaction optimization is performed on the semantic encoding vector of the query intention of the target product and the semantic encoding vector of the description information of the first candidate product to obtain an external knowledge optimized query intention-candidate product fine-grained feature interaction matrix; Optimizing the query intention-candidate product fine-grained feature interaction matrix based on the external knowledge, performing feature modulation optimization on the target product query intention semantic coding vector and the first candidate product description information semantic coding vector respectively to obtain an optimized target product query intention semantic coding vector and an optimized first candidate product description information semantic coding vector; The optimized target product query intention semantic coding vector and the optimized first candidate product description information semantic coding vector are subjected to position-by-position semantic response coding to obtain the query intention-candidate product fine-grained semantic interaction feature vector.
5. The retail industry search method based on a large language model according to claim 4, characterized in that: Based on external knowledge, fine-grained feature interaction optimization is performed on the semantic encoding vector of the query intention of the target product and the semantic encoding vector of the description information of the first candidate product to obtain an external knowledge optimized query intention-candidate product fine-grained feature interaction matrix, including: Inputting the target product query intention semantic encoding vector and the first candidate product description information semantic encoding vector into a fine-grained feature interaction network to obtain a query intention-candidate product fine-grained feature interaction matrix; The query intent-alternative product fine-grained feature interaction matrix is input into an attention unit based on external knowledge to obtain the external knowledge optimized query intent-alternative product fine-grained feature interaction matrix.
6. The retail industry search method based on a large language model according to claim 5, characterized in that: The method optimizes the query intention-candidate product fine-grained feature interaction matrix based on the external knowledge, and performs feature modulation optimization on the target product query intention semantic coding vector and the first candidate product description information semantic coding vector to obtain an optimized target product query intention semantic coding vector and an optimized first candidate product description information semantic coding vector, including: Performing a linear transformation on the target product query intention semantic encoding vector to obtain a first query feature vector and a first value feature vector, and using the external knowledge optimized query intention-alternative product fine-grained feature interaction matrix as a key matrix, inputting the first query feature vector, the first value feature vector and the key matrix into a fine-grained modulation module based on a Transformer structure to obtain the optimized target product query intention semantic encoding vector; The first candidate product description information semantic encoding vector is linearly transformed to obtain a second query feature vector and a second value feature vector, and the external knowledge optimized fine-grained feature interaction matrix is used as a key matrix. The second query feature vector, the second value feature vector and the key matrix are input into the Transformer-based fine-grained modulation module to obtain the optimized semantic encoding vector of the first candidate product description information.
7. The retail industry search method based on a large language model according to claim 6, characterized in that: Performing position-by-position semantic response encoding on the optimized target product query intention semantic encoding vector and the optimized first candidate product description information semantic encoding vector to obtain the query intention-candidate product fine-grained semantic interaction feature vector, including: The query intention-alternative product fine-grained semantic interaction feature vector is obtained by calculating the point-by-point division between the optimized target product query intention semantic coding vector and the optimized first candidate product description information semantic coding vector.
8. The retail industry search method based on a large language model according to claim 7, characterized in that: Determining whether to return the link of the first candidate product as a search result based on the query intention-candidate product fine-grained semantic interaction feature vector includes: Inputting the query intention-candidate product fine-grained semantic interaction feature vector into a classifier-based retrieval result generator to obtain a retrieval result, wherein the retrieval result is used to indicate whether to return the first candidate product as a query result; In response to the search result returning the first candidate product as a query result, a link to the first candidate product is returned as a search result.
9. A retail industry search system based on a large language model, characterized in that: include: A target product query statement acquisition module is used to acquire a target product query statement input by a user; A target product query intention semantic coding module, used for performing semantic coding on the target product query sentence after performing retrieval intention extension description to obtain a target product query intention semantic coding vector; A candidate product description information extraction module is used to extract the description information of the first candidate product from the product library; A semantic coding module for description information of candidate products, configured to semantically code the description information of the first candidate product to obtain a semantic coding vector of the description information of the first candidate product; A feature query interaction processing module, configured to perform feature query interaction based on external knowledge guidance on the semantic encoding vector of the query intention of the target product and the semantic encoding vector of the description information of the first candidate product to obtain a fine-grained semantic interaction feature vector of the query intention-candidate product; The search result determination module is used to determine whether to return the link of the first candidate product as a search result based on the query intention-candidate product fine-grained semantic interaction feature vector.
10. The retail industry search system based on a large language model according to claim 9, characterized in that: The target product query intention semantic encoding module is used to: Inputting the target product query statement into a retrieval intention extension description module based on a large language model to obtain target product query enhanced content; Display the target product query enhancement content, and ask the customer to confirm whether there is any description deviation; After receiving confirmation from the user that there is no description deviation, semantic encoding is performed on the target product query enhancement content to obtain a semantic encoding vector of the target product query intention.
Citation Information
Patent Citations
Commodity shopping guide method and device, equipment and medium
CN116976920A
Method and system for realizing e-commerce commodity information interaction by using large language model
CN117592489A
Large model-based retail industry commodity recommendation method, apparatus and device, and medium
CN118657589A
Commodity object searching method and device, electronic equipment and storage medium
CN118733903A
Voice shopping method, device and computer readable storage medium
US20210358020A1
Cited By
Sea area development suitability evaluation method and system
CN119359157A
Order transaction management method and system based on big data
CN119762181A
Grounding loop test method and system in operation state of high-voltage cable
CN120507569A
Search support system, search support method, and program
JP7861905B1