Product searching method and device, equipment, storage medium and product
By combining a large language model and a product domain intent recognition model, natural language queries are automatically transformed into structured search conditions, solving the problems of low efficiency and low accuracy in product search and achieving precise matching of user needs.
Patent Information
- Application Number
- CN202511866147.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-17
AI Technical Summary
In existing technologies, product search relies on communication between business personnel and customers, which leads to product selection that does not match the actual needs of customers, resulting in low efficiency and low accuracy.
By acquiring natural language query content, a product search logic tree is generated using a large language model, and then input into a product domain intent recognition model for intent recognition, generating structured search dimensions and constraints to achieve accurate intent recognition of user needs.
It improves the efficiency and accuracy of product search, and can automatically convert unstructured natural language query content into structured search conditions to achieve precise matching of user needs.
Smart Images

Figure CN121685140A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of artificial intelligence, and particularly relates to a product search method and device, equipment, a storage medium and a product. BACKGROUND
[0002] In the field of wealth management, product search mainly refers to a process of screening matched products from financial products according to user demand. In the prior art, the process relies on communication between business personnel and customers to understand customer demands, and then converts the customer demands into specific search conditions to perform product search on a product shelf.
[0003] However, due to different professional abilities of different business personnel and different understandings of product attributes, the finally screened products do not match the real demands of customers, and the whole process from communication understanding to condition conversion to search execution relies on manual operation, resulting in low product search efficiency. Therefore, how to provide a product search method capable of improving the accuracy and efficiency of product search has become a technical problem to be solved. SUMMARY
[0004] The embodiments of the application provide a product search method, device, equipment, storage medium and product, which can improve the accuracy and efficiency of product search.
[0005] In a first aspect, the embodiments of the application provide a product search method, which comprises: obtaining natural language query content; inputting the natural language query content into a large language model to generate a product search logic tree by the large language model, the product search logic tree comprising a root node and at least one branch node, the root node corresponding to a product category, and each branch node corresponding to a product search dimension and a search constraint condition on the product search dimension; inputting the product search logic tree and the natural language query content into a product field intent recognition model to perform intent recognition by the product field intent recognition model to obtain at least one target intent; searching at least one target product corresponding to the target intent as a search condition.
[0006] In some possible implementation manners, inputting the natural language query content into the large language model to generate the product search logic tree by the large language model comprises: performing semantic understanding on the natural language query content by an attention mechanism of the large language model to obtain user intent keywords; wherein the natural language query content comprises multi-round dialogue content. The weight analysis function of the large language model is used to identify core words with high relevance to product search from the natural language query content, and the syntax and semantics of the core words are labeled based on the semantic role labeling function to obtain product search keywords. Based on the user intent keywords and the product search keywords, the large language model is used to generate a product search logic tree through reasoning based on a thinking chain prompt, wherein the thinking chain is a preset instruction sequence for guiding the large language model to reason according to the prompt words.
[0007] In some possible implementation manners, the method comprises: Based on the product category label set and the product search dimension label set, the prompt words in the thinking chain are determined. When at least one of the product category label set and the product search dimension label set changes, the thinking chain is updated.
[0008] In some possible implementation manners, the product search logic tree and the natural language query content are input into a product domain intent recognition model, and the product domain intent recognition model is used to perform intent recognition to obtain at least one target intent, comprising: The product search logic tree is encoded by using the product domain intent recognition model to obtain a product search logic tree vector. The semantic features of the natural language query content are extracted by using the product domain intent recognition model to obtain a text semantic vector. According to the entity in the natural language query content, a product knowledge graph is queried to obtain a corresponding product attribute feature vector. The product search logic tree vector, the text semantic vector, and the product attribute feature vector are fused to obtain a fused feature vector. The fused feature vector is input into a bidirectional gated recurrent unit network layer in the product domain intent recognition model to extract serialized semantic features. The serialized semantic features are recognized by using the product domain intent recognition model to obtain at least one target intent.
[0009] In some possible implementation manners, before the product search logic tree and the natural language query content are input into the product domain intent recognition model, the method further comprises: A product domain intent recognition training set is obtained, and the product domain intent recognition training set comprises a plurality of product domain intent recognition training samples, each product domain intent recognition training sample comprising: a natural language query content sample, a product search logic tree sample, and an intent label. Based on the product domain intent recognition training set, a product domain intent recognition model to be trained is trained to obtain a trained product domain intent recognition model.
[0010] In some possible implementation manners, before the product field intention recognition training set is used to perform model training on the product field intention recognition model to be trained to obtain the trained product field intention recognition model, the method further includes: obtaining a product field text data set; masking product attribute words in the product field text data set to obtain a masked product field text data set; pre-training the product field intention recognition model to be trained by using the masked product field text data set to obtain a first product field intention recognition model; performing model training on the first product field intention recognition model based on the product field intention recognition training set to obtain the trained product field intention recognition model.
[0011] In some possible implementation manners, after the at least one target product corresponding to the target intention is searched by taking the target intention as a search condition, the method further includes: inputting the target product into the large language model, and generating recommended text corresponding to the target product by using human feedback reinforcement learning of the large language model.
[0012] In a second aspect, an embodiment of the present application provides a product search device, which includes: an obtaining module, configured to obtain natural language query content; a generating module, configured to input the natural language query content into a large language model, and generate a product search logic tree by using the large language model, the product search logic tree including one root node and at least one branch node, the root node corresponding to a product category, and each branch node corresponding to a product search dimension and a search constraint condition on the product search dimension; a processing module, configured to input the product search logic tree and the natural language query content into a product field intention recognition model, and perform intention recognition by using the product field intention recognition model to obtain at least one target intention; a searching module, configured to search at least one target product corresponding to the target intention by taking the target intention as a search condition.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, which includes: a processor and a memory storing computer program instructions; and the processor implements any one of the product search methods described above when executing the computer program instructions.
[0014] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement any one of the product search methods described above.
[0015] In a fifth aspect, the embodiments of the present application provide a computer program product. Instructions in the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the product search method of any one of the above.
[0016] Compared with the prior art, the product search method, device, equipment, storage medium and product provided by the embodiments of the present application can automatically convert the unstructured natural language query content into structured search dimensions and constraint conditions by obtaining the natural language query content, inputting the natural language query content into a large language model, generating a product search logic tree by using the large language model, inputting the product search logic tree and the natural language query content into a product field intent recognition model, performing intent recognition by the product field intent recognition model, obtaining at least one target intent, and simultaneously using the structured search dimensions and constraint conditions and the complete language context to realize accurate intent recognition of user demand, so that the efficiency and accuracy of product search can be improved when the product search is finally performed. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced. Those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0018] Figure 1 A flowchart of a product search method provided by an embodiment of the present application is shown; Figure 2 A flowchart of a product search method provided by another embodiment of the present application is shown; Figure 3 A flowchart of a product search method provided by another embodiment of the present application is shown; Figure 4 A structural diagram of a product search device provided by an embodiment of the present application is shown; Figure 5 A hardware structure diagram of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0019] The features and exemplary embodiments of the various aspects of the present application will be described in detail below with reference to the drawings. For the purpose of clarity, not all of the individual features of the application are described in detail herein. The following detailed description is merely exemplary of the application and is intended to be used in conjunction with the accompanying drawings.
[0020] It should be noted that the relational terms herein, such as first and second, and the like, are used solely to distinguish one from another entity or action, without necessarily requiring or implying any such actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0021] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application comply with the relevant provisions of national laws and regulations.
[0022] It should be noted that in the embodiments of the present application, some software, components, models and other industry existing solutions may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solutions of the present application, but does not mean that the applicant has or will necessarily use the solution.
[0023] At present, when searching for products, communication is mainly carried out between business personnel and customers to understand the product needs of customers, and then the product needs of customers are converted into search conditions according to the professional ability of the business personnel, and product search is carried out in the product shelf. However, due to different professional abilities of business personnel and different understandings of product attributes, the final screened products do not match the real demands of customers, and the whole search period is long and the efficiency is low.
[0024] To solve the problems in the prior art, an embodiment of the present application provides a product search method, device, equipment, storage medium and product. By obtaining natural language query content, inputting the natural language query content into a large language model, and generating a product search logic tree by using the large language model, the unstructured natural language query content can be automatically converted into structured search dimensions and constraint conditions. Then, the product search logic tree and the natural language query content are input into a product domain intent recognition model, intent recognition is performed by the product domain intent recognition model, at least one target intent is obtained, the structured search dimensions and constraint conditions and the complete language context can be simultaneously used to realize accurate intent recognition of user demand, and therefore the efficiency and accuracy of product search can be improved when finally performing product search.
[0025] First, a product search method provided by an embodiment of the present application is introduced.
[0026] Figure 1 A flowchart of a product search method provided by an embodiment of the present application is shown. As shown in the figure, the method can include the following steps: Figure 1 S101: Obtain natural language query content. S102: Input the natural language query content into a large language model, and generate a product search logic tree by using the large language model. The product search logic tree includes a root node and at least one branch node. The root node corresponds to a product category, and each branch node corresponds to a product search dimension and a search constraint condition on the product search dimension. S103: Input the product search logic tree and the natural language query content into a product domain intent recognition model, and perform intent recognition by the product domain intent recognition model to obtain at least one target intent. S104: Search at least one target product corresponding to the target intent as a search condition.
[0027] In the embodiment of the present application, compared with the prior art, the business personnel understand the customer's appeal and convert the customer's appeal into specific search conditions, and search for products on the product shelf, resulting in low efficiency and poor quality of the final product search. In the embodiment of the present application, the natural language query content is obtained, the natural language query content is input into the large language model, the product search logic tree is generated by using the large language model, the unstructured natural language query content can be automatically converted into structured search dimensions and constraint conditions, and then the product search logic tree and the natural language query content are input into the product field intention recognition model. The intention recognition model is used for intention recognition, at least one target intention is obtained, the structured search dimensions and constraint conditions and the complete language context can be used at the same time, the precise intention recognition of the user demand is realized, and therefore the efficiency and accuracy of the product search can be improved when the product search is finally performed.
[0028] The specific implementation of each step is introduced below.
[0029] S101: Obtain natural language query content.
[0030] In the embodiment of the present application, the product demand of the customer is understood by obtaining the natural language query content, wherein the natural language query content can be obtained through the dialogue between the user and the customer service assistant.
[0031] In one example, the natural language query content refers to the unstructured expression input by the user through text or voice. It can be a single sentence query or contain multiple rounds of dialogue with context association.
[0032] S102: Input the natural language query content into the large language model, generate the product search logic tree by using the large language model, the product search logic tree contains a root node and at least one branch node, the root node corresponds to a product category, and each branch node corresponds to a product search dimension and a search constraint condition on the product search dimension.
[0033] In the embodiment of the present application, the matching between the user product appeal and the product attribute needs to be converted manually, which is low in efficiency and poor in quality. With the help of the large language model, the demand logic can be automatically sorted out to form a structured product search logic tree. The product search includes a root node and at least one branch node, the root node corresponds to a product category, for example, deposit, financial product, fund, insurance, bond, etc., and the branch node corresponds to a product search dimension and a search constraint condition corresponding to the dimension, for example, risk level is low risk, investment period is within 6 months.
[0034] Figure 2 A flowchart of a product search method provided by another embodiment of the present application is shown. As shown in Figure 2 the above Figure 1Based on the embodiment shown, one specific implementation of step S102 is: S201: using the attention mechanism of the large language model to perform semantic understanding on the natural language query content to obtain user intent keywords; wherein the natural language query content contains multi-round dialogue content.
[0035] In the embodiment of the present application, the natural language query content contains a large amount of redundant information. Through the attention mechanism of the large language model, user intent keywords can be extracted from the natural language query content containing multi-round dialogue content.
[0036] In one example, in order to adapt to the intent extraction requirements in the multi-round long dialogue scenario, a long-range attention mechanism based on the Transformer-XL architecture can be used, which supports full-length dialogue information of up to 16K tokens (16000 tokens) and can completely cover the full-length semantic information in multi-round dialogue, avoiding missing of key requirement information due to too long dialogue.
[0037] For example, the natural language query content is: “I want to choose a financial product for my parents who have just retired. They are very cautious about spending and have weak risk tolerance. It is best to be short-term, and the money can be taken out directly at maturity. The yield does not need to be too high, but it needs to be stable and not fluctuate too much.” Based on the attention mechanism of the large language model, the user intent keywords extracted are: configuring a stable and short-term financial product for parents who have just retired.
[0038] S202: using the weight analysis function of the large language model to identify core words with high relevance to product search from the natural language query content, and then based on the semantic role labeling function, performing semantic labeling on the core words to obtain product search keywords.
[0039] In the embodiment of the present application, through the weight analysis function of the large language model, core words with high relevance to product search are identified from the natural language query content, and then based on the semantic role labeling function, the semantic roles of the core words are determined to provide specific dimension basis for subsequent logic tree generation.
[0040] In one example, weight analysis can be performed based on Term Frequency-Inverse Document Frequency (TF-IDF), and semantic labeling can be performed based on Semantic Role Labeling (SRL).
[0041] In another example, taking the above natural language query content as an example, weight analysis and semantic role labeling are performed, and the product search keywords obtained can be: weak risk tolerance, short-term, can be taken out directly at maturity, stable yield, and not too much fluctuation.
[0042] S203: Based on user intent keywords and product search keywords, use a large language model to reason through thought chain prompts to generate a product search logic tree. The thought chain is a preset instruction sequence that guides the large language model to reason according to the prompt words.
[0043] In this embodiment, the thought chain is a preset instruction sequence that guides the large language model to reason according to prompt words. The thought chain enables the large language model to generate a product search logic tree based on user intent keywords and product search keywords.
[0044] In one example, the structure of the thought chain could be as follows: select one or more product categories from the product categories provided below based on user intent keywords and product search keywords; assign a product search dimension label to each product search keyword from the product search dimension labels provided below based on the product search keywords.
[0045] The product search logic tree obtained based on the thought chain can be as follows: Root node: Product category is financial product; Branch nodes: weak risk resistance (risk assessment dimension), short-term (investment period dimension), can be withdrawn directly upon maturity (liquidity dimension), stable returns (return performance dimension), avoid excessive fluctuations (return performance dimension).
[0046] In this embodiment, by utilizing the attention mechanism of a large language model to perform semantic understanding of natural language query content, user intent keywords are obtained. This allows for the accurate identification of the user's core needs from complex conversations containing a large amount of background information and redundant details. Then, based on the weight analysis and semantic role labeling functions of the large language model, product search keywords are obtained from the natural language query content. This transforms the user's specific needs description into product search keywords. Consequently, based on the user intent keywords and product search keywords, the large language model uses thought chain prompts to infer and generate a product search logic tree. This accurately displays the user's product category needs and specific product requirements, avoiding the inefficiency and inaccurate product requirement conditions caused by direct manual conversion.
[0047] In one example, a specific implementation of the thought chain is determined as follows: The prompts in the thought process are determined based on the product category tag set and the product search dimension tag set.
[0048] In this embodiment, the prompts need to be relevant to the product characteristics in order to guide the large model to generate a logic tree that matches the product search. In one example, the prompts in the thought chain can be a set of product category tags and a set of product search dimension tags.
[0049] In one example, product category labels can be obtained from the product shelf. Here, the product shelf refers to a platform or dedicated area for displaying and selling various financial products.
[0050] In another example, product search dimension tags can be the product labels carried by each product in the product shelf. Product labels refer to a way of identifying, distinguishing, and describing financial products. They typically include information such as the product name, number, yield, investment period, risk level, usage method, product profile, risk assessment, performance data, sales statistics, and product perspective. This information helps consumers understand the nature and characteristics of the product, enabling them to better select and use it.
[0051] In another example, the prompts in the thought chain can also be used to guide and optimize the priority order of branch nodes in the product search logic tree. Specifically, based on historical product search interaction records, the priority order of product dimension tags in the historical product search interaction records is extracted, and the priority order of product search dimension tags is determined as the execution order of the preset instruction sequence. Thus, when generating the product search logic tree, not only are the dimensions and constraints corresponding to each branch node clearly defined, but they are also assigned importance levels based on historical experience. Consequently, when performing product searches based on this logic tree, if products that fully meet all conditions cannot be retrieved, products that meet the constraints of higher priority dimensions can be selected first based on this priority order, thereby achieving optimal product matching and recommendation under real-world constraints.
[0052] Update the mind chain when at least one of the product category tag set or the product search dimension tag set changes.
[0053] In this embodiment, product tags may change due to the addition of new products or the adjustment of product attributes. When at least one of the product category tag set and the product search dimension tag set changes, the prompt words in the mind chain are updated so that the obtained product search logic tree always fits the attributes of the current product.
[0054] In this embodiment, by determining the prompt words in the thought chain based on the product category tag set and the product search dimension tag set, the product categories and product search dimensions in the generated product search logic tree can be made to match the current product search needs. Furthermore, when at least one of the product category tag set and the product search dimension tag set changes, the thought chain is updated to avoid the problem that the generated search logic tree is inaccurate due to changes in the product category tag set and the product search dimension tag set, which in turn leads to inaccurate final product search.
[0055] S103: Input the product search logic tree and natural language query content into the product domain intent recognition model, and the product domain intent recognition model performs intent recognition to obtain at least one target intent; In this embodiment, the product domain intent recognition model is a vertical domain model specifically trained based on product domain data. It has a deep understanding of the semantics and business logic of the domain and can identify ambiguous user needs in the product search logic tree and natural language query content, and convert them into product domain terms. Therefore, the target intent obtained based on the product domain intent recognition model can fit the product attribute information. The target intent is a structured search condition that includes product category information and corresponding product search dimensions and constraints.
[0056] Although the product search logic tree has structured and clarified user needs and core search criteria, the large language model may have summarized certain details, tone, or implicit information from the original query during its generation. The original natural language query itself still contains complete descriptive details and contextual information. Therefore, inputting both the product search logic tree and the original natural language query into the product domain intent recognition model allows the model to utilize both structured search content and complete linguistic context to cross-validate user needs and supplement intent, thereby performing more accurate intent recognition.
[0057] Figure 3 A flowchart illustrating a product search method according to another embodiment of this application is shown. Figure 3 As shown above, in the above Figure 1 Based on the illustrated embodiment, one specific implementation of step S103 is as follows: S301: Use the product domain intent recognition model to perform feature encoding on the product search logic tree to obtain the product search logic tree vector.
[0058] In this embodiment, the product domain intent recognition model is based on the full-word mask Chinese pre-trained model (BERT-wwm-ext) and has been customized based on product domain knowledge, embedding a product feature encoding layer and a bidirectional gated recurrent unit (BiGRU) feature extraction layer.
[0059] Based on the structure of the product domain intent recognition model, the Transformer encoder module can be used to encode the features of the product search logic tree, resulting in a product search logic tree vector. In a specific example, the dimension of this vector can be 768, consistent with the hidden layer dimension of the basic pre-trained model.
[0060] S302: Use a product domain intent recognition model to extract semantic features from natural language query content to obtain text semantic vectors.
[0061] In this embodiment of the application, since the original query contains details, sentiment and complete context information that may be simplified or omitted during the logic tree generation process, extracting its semantic feature vector can effectively supplement the semantic information that may be lost.
[0062] In one example, the vector corresponding to the [CLS] marker in the Transformer encoder output vector can be selected as the text semantic vector to avoid the problem of excessive smoothing of information when performing average pooling on all output vectors of the encoder, thereby preventing the importance of key sentiment words and negative words from being ignored. In another example, the dimension of the text semantic vector can be 768.
[0063] S303: Based on the entities in the natural language query content, query the product knowledge graph to obtain the corresponding product attribute feature vector.
[0064] In this embodiment, the product domain intent recognition model, by combining product knowledge graphs, can transform colloquial and non-standard expressions in user queries into standardized attribute codes for the product domain, effectively improving the adaptability and accuracy of intent recognition results to actual product scenarios. For example, the user's expression "weak risk resistance" can be transformed into R1 (conservative) or R2 (stable) codes in the product risk level system, and "short-term financial management" can be transformed into standardized term codes such as "3 months," "6 months," and "1 year" in the product term dimension. In one example, the dimension of the product attribute feature vector can be 128.
[0065] In one example, the product knowledge graph is trained and constructed using the TransR algorithm. By integrating structured domain features such as product shelf definitions and product tag attribute descriptions, and unstructured domain text corpora such as investment and financial product manuals, historical dialogue records between account managers and customers, and remote bank customer service dialogue records, the TransR algorithm jointly learns from these heterogeneous data to finally obtain standardized attribute codes for product domains corresponding to colloquial and non-standard expressions.
[0066] In another example, to further improve product search efficiency, the product knowledge graph can build indexes based on entity types, such as risk level, customer tags, and investment period. This allows for the rapid retrieval of corresponding product attribute feature vectors based on entity types when querying the product knowledge graph based on entities in natural language queries.
[0067] S304: The product search logic tree vector, text semantic vector, and product attribute feature vector are fused to obtain a fused feature vector.
[0068] In this embodiment of the application, the feature fusion module of the product domain intent recognition model is used to fuse the product search logic tree vector, text semantic vector and product attribute feature vector to obtain a fused feature vector.
[0069] In one example, the product search logic tree vector, text semantic vector, and product attribute feature vector can be directly concatenated to obtain the fused feature vector. Alternatively, the fused feature vector can be obtained by weighted fusion of the product search logic tree vector, text semantic vector, and product attribute feature vector based on an attention mechanism.
[0070] S305: Input the fused feature vector into the bidirectional gated recurrent unit network layer in the product domain intent recognition model to extract serialized semantic features.
[0071] In this embodiment, the features in the fused feature vector exhibit potential correlations. A Bidirectional Gated Recurrent Unit (BiGRU) network layer effectively captures these sequential correlation features, improving feature effectiveness. The BiGRU network layer includes forward and backward recurrent units, which traverse the features from the beginning and end of the fused feature vector, respectively, to mine the temporal and dependency relationships between features and extract sequential semantic features. In one example, the dimension of the sequential semantic features can be 512.
[0072] S306: Use a product domain intent recognition model to identify the intent of serialized semantic features and obtain at least one target intent.
[0073] In this embodiment of the application, a product domain intent recognition model is used to classify and judge the serialized semantic features. Based on the serialized semantic features, the probability of them belonging to each predefined intent category is predicted, and one or more categories with a probability exceeding a threshold are taken as the final target intent.
[0074] In one example, the target intent can be the lowest-level product tag, or it can be a composite condition composed of multiple product tags. For example, it can be a combination of scenario-level intent and product tags. The scenario-level intent corresponds to a predefined core business scenario, and the product attribute tags are the key constraints under that scenario. Taking the above natural language query content as an example, the target intent can be: retirement pension financial planning, risk level = R1, investment period ≤ 365 days, principal protection attribute = yes, return type = fixed income. The combination not only clarifies the user's core scenario needs, but also accurately breaks down the product screening conditions, which is convenient for subsequent connection to the "scenario-strategy-product" three-layer shelf system. The corresponding strategy shelf can be locked first by the scenario intent, and then the product can be accurately matched within the shelf by the attribute tags, improving search efficiency and matching accuracy.
[0075] In one example, the three-dimensional shelving system is derived by dividing products into shelves based on the four categories of wealth management, product management, and customer / strategy.
[0076] In this embodiment, by vector encoding the product search logic tree and the natural language query content respectively, the product domain intent recognition model can focus on the core dimensions and constraints of user needs without losing the original semantic details. Based on the entities in the natural language query content, the product knowledge graph is queried to obtain the corresponding product attribute feature vector, supplementing the standardized product attribute association information. Therefore, by fusing the product search logic tree vector, the text semantic vector, and the product attribute feature vector, a fused feature vector is obtained, which can achieve deep integration of product search dimensions, original semantic detail features, and domain standardized knowledge features. Then, based on the bidirectional gated recurrent unit network layer, the serialized semantic features in the fused feature vector can be extracted to mine the interaction information between features and avoid intent misjudgment caused by feature isolation. Therefore, the intent recognition of the serialized semantic features is finally performed, and the target intent obtained can accurately match the user's core needs.
[0077] In one example, before step S103, there is also a training process for the product domain intent recognition model. In this application, a two-stage training process is adopted, with the first stage being domain adaptation pre-training and the second stage being intent recognition fine-tuning.
[0078] First, let's explain the first stage of domain adaptation pre-training: Obtain a text dataset in the product domain.
[0079] In this embodiment, domain-adaptive pre-training refers to the targeted pre-training of the model by introducing domain-specific text data, enabling the model to learn domain-specific professional knowledge in advance. By acquiring a product domain text dataset, the product domain intent recognition model can learn product domain-specific professional vocabulary.
[0080] In one example, the product domain text dataset refers to wealth management domain text, such as product descriptions and customer service dialogues.
[0081] In one example, to ensure the privacy of product domain text data, when obtaining the product domain text dataset, sensitive data in the product domain text dataset is first identified and replaced. For example, sensitive numerical data is processed into intervals, such as desensitizing the specific product yield of 3.5% to the interval 3%-4%.
[0082] Mask the product attribute words in the product domain text dataset to obtain the masked product domain text dataset.
[0083] In this embodiment, masking training enables the model to learn the contextual relationships of product attribute words, improving the model's understanding and inference capabilities of core domain vocabulary, and enhancing the model's semantic understanding depth. In one example, a masked language model (MLM) approach can be used to randomly mask some product attribute words in the product domain text dataset to obtain a masked dataset.
[0084] The product domain intent recognition model to be trained is pre-trained using the masked product domain text dataset to obtain the first product domain intent recognition model.
[0085] In this embodiment of the application, the masked product domain text dataset is input into the product domain intent recognition model to be trained. The product domain intent recognition model predicts the original product attribute words corresponding to each masked position based on the context of the masked words. The model continuously adjusts its internal parameters to minimize the difference between its predicted probability distribution and the real product attribute words as the training objective, thus obtaining the first product domain intent recognition model.
[0086] Based on the product domain intent recognition training set, the first product domain intent recognition model is trained to obtain a trained product domain intent recognition model.
[0087] In this embodiment, the first product domain intent recognition model only has basic product domain capabilities and needs to be fine-tuned using a dedicated intent recognition training set in order to accurately adapt to intent recognition tasks and improve recognition accuracy.
[0088] In one example, when transmitting the model parameters of the intent recognition model for the first product domain to the fine-tuning environment for supervised fine-tuning of the intent recognition model, to prevent the model parameters from being tampered with during transmission, an encrypted data transmission channel can be used to transmit the model parameter file. For example, the TLS 1.3 protocol can be used for transmission, and a digital signature can be added to the model parameter file during transmission. The sender uses its private key to encrypt the hash digest of the parameter file to generate a signature, and the receiver uses the corresponding public key to decrypt the signature and verify the file hash value. This ensures that the parameter file has not been tampered with or replaced during transmission, guarantees the integrity of the parameters and the legitimacy of the sender's identity, and the model parameter file can only be used when the verification is successful.
[0089] In this embodiment, by acquiring a product domain text dataset, masking the product attribute words in the product domain text dataset to obtain a masked product domain text dataset, and using the masked product domain text dataset to pre-train the product domain intent recognition model to be trained to obtain a first product domain intent recognition model, the model to be trained can fully learn the product attribute words specific to the product domain before supervised training, avoiding semantic understanding bias in professional scenarios for general models.
[0090] In one example, the specific implementation method for fine-tuning intent recognition is as follows: Obtain a product domain intent recognition training set, which includes multiple product domain intent recognition training samples. Each product domain intent recognition training sample includes: natural language query content samples, product search logic tree samples, and intent tags.
[0091] In this embodiment, each product domain intent recognition training sample is a triple, including: a natural language query content sample, a product search logic tree sample, and an intent label. The product search logic tree sample can be automatically generated based on the aforementioned large language model and thought chain method of this application. The natural language query content sample can be a product search class sample or a product query class sample.
[0092] In one example, natural language query content samples can be determined based on real interaction data accumulated in the product search domain over time, such as: dialogue records between account managers and customers, and Q&A logs of remote bank customer service; for niche scenarios that are not covered by historical data, simulated query texts can also be written by business experts based on the actual needs and characteristics of customer groups to supplement sample diversity.
[0093] In another example, to address the uneven distribution of samples across different intent categories in the training set, different weights can be assigned to the training samples based on different intent labels. Intent categories with fewer training samples can be assigned higher weights, thus providing a greater contribution to the error calculation. For instance, for intent categories like "profit query," "risk assessment," and "product comparison," with corresponding sample sizes of 4200, 3800, and 2500 respectively, the assigned weights could be 0.15, 0.18, and 0.25 respectively.
[0094] Based on the product domain intent recognition training set, the product domain intent recognition model to be trained is trained to obtain a well-trained product domain intent recognition model.
[0095] In this embodiment, the product domain intent recognition model to be trained can be a first product domain intent recognition model. By reusing the model parameters of the first product domain intent recognition model, the understanding of wealth management professional vocabulary accumulated by the model in the pre-training stage can be fully inherited, thereby improving the speed and accuracy of intent recognition training.
[0096] In one example, the gradient descent algorithm can be used to input the product domain intent recognition training samples into the product domain intent recognition model to be trained, obtain the predicted intent, calculate the loss function between the predicted intent and the intent label, and obtain the trained product domain intent recognition model by minimizing the value of the loss function.
[0097] In this embodiment, by reusing the model parameters in the domain adaptation pre-training process, and using the product domain intent recognition training set to fine-tune the intent recognition based on the first product domain intent recognition model, not only can the training speed of the domain intent recognition model be improved, but also the product domain semantic bias problem can be effectively avoided and the accuracy of intent recognition can be improved because the model parameters in the domain adaptation pre-training process are reused.
[0098] S104: Using the target intent as the search criteria, search for at least one target product that corresponds to the target intent.
[0099] In this embodiment of the application, the identified target intent is used as the retrieval condition to search for at least one target product corresponding to the target intent.
[0100] In one example, to further improve product search response efficiency, target intents obtained by users through product search methods within a preset period can be collected. By performing frequency statistical analysis and user click conversion rate analysis on the target intents, high-value target intents with a frequency exceeding a preset frequency threshold or a user click conversion rate exceeding a preset user click conversion rate threshold can be filtered out. Then, the products corresponding to these target intents are stored in the hot data partition of a solid state disk (SSD), while other products can be stored in the warm data partition of a SATA hard disk. This allows product information to be retrieved first from the high-speed SSD when searching for target products corresponding to the target intent based on the search criteria, thereby significantly reducing data I / O latency.
[0101] In one example, after step S104, the following is also included: The target product is input into a large language model, and reinforcement learning based on human feedback from the large language model is used to generate recommendation text corresponding to the target product.
[0102] In this embodiment, the compliance rules for the sale of financial products and consumer protection clauses are internalized into the constraints generated by the large language model through human feedback reinforcement learning. Thus, when the retrieved target product is input into the large language model and the large oracle model generates the corresponding recommendation text for the target product through human feedback reinforcement learning, in one example, the recommendation text can be product marketing rhetoric or product-related content. This allows the recommendation text to accurately match the product characteristics and user needs, and avoids business risks and consumer disputes caused by violations or misleading generated text.
[0103] In one embodiment, to ensure the high availability and service continuity of the product search method and avoid overall service interruption or response timeouts due to problems with a single function, the product search method can be divided into different modules based on functionality. For example, these could be: a user intent keyword recognition module, a product search keyword recognition module, a knowledge graph query module, and a recommendation generation module. Each module adopts a microservice architecture and is independently deployed on different server nodes, achieving cross-module data interaction and communication through standardized interfaces. Simultaneously, a module status monitoring system is deployed to collect core operational metrics of each module in real time, including but not limited to: resource consumption metrics such as CPU utilization, memory utilization, and network I / O load, as well as service performance metrics such as response time, request processing success rate, and number of error triggers. When resource consumption or service performance metrics exceed preset safety thresholds, calls to the faulty module can be automatically skipped, and a preset degradation strategy can be executed. For example, when the knowledge graph query module fails, this module can be skipped directly, and user intent recognition can be performed solely based on the product search logic tree and natural language query content.
[0104] Based on the product search method provided in the above embodiments, this application also provides a specific implementation of a product search device. Please refer to the following embodiments.
[0105] First see Figure 4 , Figure 4 The diagram shows a product search device structure provided in an embodiment of this application. The product search device 400 provided in this embodiment includes: an acquisition module 401, a generation module 402, a processing module 403, and a search module 404.
[0106] Module 401 is used to obtain natural language query content; The generation module 402 is used to input the natural language query content into the large language model and use the large language model to generate a product search logic tree. The product search logic tree contains a root node and at least one branch node. The root node corresponds to the product category, and each branch node corresponds to a product search dimension and the search constraints on that product search dimension. Processing module 403 is used to input the product search logic tree and natural language query content into the product domain intent recognition model, and the product domain intent recognition model performs intent recognition to obtain at least one target intent; Search module 404 is used to search for at least one target product corresponding to the target intent, using the target intent as the search condition.
[0107] In one example, the generation module 402 includes: The first processing submodule is used to perform semantic understanding on natural language query content using the attention mechanism of a large language model to obtain user intent keywords; wherein, the natural language query content includes multi-turn dialogue content; The second processing submodule is used to use the weight analysis function of the large language model to identify core words with high relevance to product search from natural language query content, and then perform grammatical and semantic annotation on the core words based on the semantic role annotation function to obtain product search keywords. The third processing submodule is used to generate a product search logic tree by reasoning based on user intent keywords and product search keywords using a large language model with thought chain prompts. The thought chain is a preset instruction sequence that guides the large language model to reason according to the prompt words.
[0108] In one example, the generation module 402 includes: The determination submodule is used to determine the prompt words in the mind chain based on the product category tag set and the product search dimension tag set. The Change submodule is used to update the mind chain when at least one of the product category tag set or the product search dimension tag set changes.
[0109] In one example, processing module 403 includes: The feature encoding submodule is used to encode the features of the product search logic tree using the product domain intent recognition model to obtain the product search logic tree vector. The feature extraction submodule is used to extract semantic features from natural language query content using a product domain intent recognition model to obtain text semantic vectors. The query submodule is used to query the product knowledge graph based on entities in the natural language query content and obtain the corresponding product attribute feature vectors. The feature fusion submodule is used to fuse the product search logic tree vector, text semantic vector and product attribute feature vector to obtain a fused feature vector. The extraction submodule is used to input the fused feature vector into the bidirectional gated recurrent unit network layer in the product domain intent recognition model to extract serialized semantic features. The intent recognition submodule is used to identify the intent of serialized semantic features using a product domain intent recognition model to obtain at least one target intent.
[0110] In one example, the product search device 400 includes: The first acquisition module is used to acquire a product domain intent recognition training set. The product domain intent recognition training set includes multiple product domain intent recognition training samples. Each product domain intent recognition training sample includes: natural language query content sample, product search logic tree sample, and intent label. The model training module is used to train the product domain intent recognition model to be trained based on the product domain intent recognition training set, so as to obtain a trained product domain intent recognition model.
[0111] In one example, the product search device 400 includes: The second acquisition module is used to acquire text datasets in the product domain. The masking module is used to mask product attribute words in the product domain text dataset to obtain the masked product domain text dataset. The pre-training module is used to pre-train the product domain intent recognition model to be trained using the masked product domain text dataset to obtain the first product domain intent recognition model. The model training module is used to train the first product domain intent recognition model based on the product domain intent recognition training set, so as to obtain a trained product domain intent recognition model.
[0112] In one example, the product search device 400 includes: The generation module is used to input the target product into the large language model and use reinforcement learning based on human feedback from the large language model to generate recommendation text corresponding to the target product.
[0113] Figure 5 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.
[0114] An electronic device may include a processor 501 and a memory 502 storing computer program instructions.
[0115] Specifically, the processor 501 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0116] Memory 502 may include mass storage for data or instructions. For example, and not limitingly, memory 502 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. In one instance, memory 502 may include removable or non-removable (or fixed) media, or memory 502 may be a non-volatile solid-state memory.
[0117] In one instance, memory 502 may be read-only memory (ROM). In one instance, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0118] Memory 502 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this disclosure.
[0119] The processor 501 implements a product search method in the above-described embodiment by reading and executing computer program instructions stored in the memory 502.
[0120] In one example, the electronic device may also include a communication interface 505 and a bus 504. Wherein, as... Figure 5 As shown, the processor 501, memory 502, and communication interface 505 are connected through bus 504 and complete communication with each other.
[0121] The communication interface 505 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0122] Bus 504 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not as a limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 504 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0123] The product search method described in the above embodiments can be implemented using a computer storage medium. This computer storage medium stores computer program instructions; when these instructions are executed by a processor, they implement any of the product search methods described in the above embodiments.
[0124] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the product search methods described in the above embodiments.
[0125] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0126] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0127] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A product search method characterized by, The method comprises the following steps: acquiring natural language query content; inputting the natural language query content into a large language model, and generating a product search logic tree by using the large language model, wherein the product search logic tree comprises a root node and at least one branch node, the root node corresponds to a product category, and each branch node corresponds to a product search dimension and a search constraint condition on the product search dimension; inputting the product search logic tree and the natural language query content into a product field intention recognition model, performing intention recognition by using the product field intention recognition model, and obtaining at least one target intention; searching for at least one target product corresponding to the target intention by taking the target intention as a search condition.
2. The method of claim 1, wherein, The step of inputting the natural language query content into the large language model and generating the product search logic tree by using the large language model comprises the following steps: performing semantic understanding on the natural language query content by using an attention mechanism of the large language model, and obtaining user intention keywords, wherein the natural language query content comprises multi-round dialogue content; identifying core words with high product search relevance from the natural language query content by using a weight analysis function of the large language model, and performing syntax and semantic labeling on the core words based on a semantic role labeling function, and obtaining product search keywords; generating the product search logic tree by using the large language model through thought chain prompting based on the user intention keywords and the product search keywords, wherein the thought chain is a preset instruction sequence for guiding the large language model to perform reasoning according to prompt words.
3. The method of claim 2, wherein, The method comprises the following steps: determining prompt words in the thought chain based on a product category label set and a product search dimension label set; updating the thought chain when at least one of the product category label set and the product search dimension label set is changed.
4. The method of claim 1, wherein, The step of inputting the product search logic tree and the natural language query content into the product field intention recognition model and performing intention recognition by using the product field intention recognition model to obtain at least one target intention comprises the following steps: performing feature coding on the product search logic tree by using the product field intention recognition model to obtain a product search logic tree vector; performing semantic feature extraction on the natural language query content by using the product field intention recognition model to obtain a text semantic vector; querying a product knowledge graph based on an entity in the natural language query content to obtain a corresponding product attribute feature vector; performing feature fusion on the product search logic tree vector, the text semantic vector and the product attribute feature vector to obtain a fusion feature vector; inputting the fusion feature vector into a bidirectional gated recurrent unit network layer in the product field intention recognition model to extract a serialized semantic feature; performing intention recognition on the serialized semantic feature by using the product field intention recognition model to obtain at least one target intention.
5. The method according to claim 1 or 3, characterized in that, Before the product search logic tree and the natural language query content are inputted into the product field intention recognition model, the method further comprises the following steps: The product field intention recognition training set includes a plurality of product field intention recognition training samples, and each product field intention recognition training sample includes natural language query content, a product search logic tree, and an intention label. The product field intention recognition model is trained based on the product field intention recognition training set to obtain a trained product field intention recognition model.
6. The method of claim 5, wherein, Before the product field intention recognition model is trained based on the product field intention recognition training set to obtain a trained product field intention recognition model, the method further includes: obtaining a product field text data set; masking product attribute words in the product field text data set to obtain a masked product field text data set; pre-training the product field intention recognition model based on the masked product field text data set to obtain a first product field intention recognition model; training the first product field intention recognition model based on the product field intention recognition training set to obtain a trained product field intention recognition model.
7. The method of claim 1, wherein, After the at least one target product corresponding to the target intention is searched based on the target intention as a search condition, the method further includes: inputting the target product into the large language model to generate recommended text corresponding to the target product by using human feedback reinforcement learning of the large language model.
8. A product search apparatus characterized by comprising: The device includes: a obtaining module configured to obtain natural language query content; a generating module configured to input the natural language query content into a large language model and generate a product search logic tree by using the large language model, the product search logic tree including a root node and at least one branch node, the root node corresponding to a product category, and each branch node corresponding to a product search dimension and a search constraint condition on the product search dimension; a processing module configured to input the product search logic tree and the natural language query content into a product field intention recognition model, perform intention recognition by using the product field intention recognition model, and obtain at least one target intention; a searching module configured to search at least one target product corresponding to the target intention based on the target intention as a search condition.
9. An electronic device, comprising: The device includes a processor and a memory storing computer program instructions; and the processor implements the product search method according to any one of claims 1-7 when executing the computer program instructions.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the product search method according to any one of claims 1-7.
11. A computer program product, characterised in that, The instructions in the computer program product are executed by the processor of the electronic device, so that the electronic device can execute the product search method according to any one of claims 1-7.