An intelligent search engine system and method based on hybrid NLP and vector retrieval
The intelligent search engine system based on NLP and vector hybrid retrieval solves the problems of inaccurate query parsing and insufficient semantic understanding in existing technologies. It achieves accurate understanding and semantic association retrieval of users' natural language queries, and improves the accuracy and intelligence of the search engine in complex business scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2026-04-03
AI Technical Summary
Existing search engines are insufficient in terms of query parsing accuracy and semantic understanding capabilities, making it difficult to handle complex queries and business scenarios involving multiple entities and relationships.
An intelligent search engine system based on NLP and vector hybrid retrieval is adopted. Through structured modeling by the query parsing module, combined with sparse extended index and vectorized hypergraph index, it can achieve accurate understanding and semantic association recall of users' natural language queries.
It improves the accuracy and intelligence of the search engine in complex business scenarios, and can meet business constraints such as supplier ratio, category ratio and price range, thereby enhancing the interpretability of the results and user trust.
Smart Images

Figure CN121029791B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to an intelligent search engine system and method based on NLP and vector hybrid retrieval. Background Technology
[0002] In modern information retrieval, e-commerce, knowledge management, and intelligent question answering applications, search engine systems have become crucial tools for information acquisition and decision support. Users typically initiate search requests through natural language input, keyword input, or batch list input, and the system returns candidate results based on a pre-built index and retrieval model. However, with the continuous growth of data volume and the diversification of data structures, existing search engines still have significant shortcomings in query parsing, semantic understanding, candidate recall, and ranking optimization.
[0003] In existing technologies, mainstream search methods typically fall into two categories: keyword matching and vector-based semantic retrieval. Firstly, keyword retrieval methods based on sparse indexes rely on inverted index structures for matching, quickly returning candidate objects containing the target keywords. These methods are simple to implement and highly efficient. However, their ability to understand natural language input from users is limited, making it difficult to identify semantic relationships between terms. They also perform poorly with synonyms, aliases, or complex semantic expressions, easily leading to insufficient recall. Secondly, semantic retrieval methods based on vectorized models use deep learning models to map documents and queries into vector representations, utilizing similarity calculations to achieve semantic-level matching, thus identifying semantically similar content. However, pure vectorized retrieval is easily limited by the distribution of the vector space, insufficient for handling complex queries involving multiple entities and relationships, and lacks direct support mechanisms when precise control over constraints such as suppliers, categories, and price ranges is required.
[0004] In summary, existing search engine technologies have shortcomings in terms of query parsing accuracy and semantic association recall. Summary of the Invention
[0005] (a) Technical problems to be solved
[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, this application provides an intelligent search engine system and method based on NLP and vector hybrid retrieval, which solves the technical problems of inaccurate query parsing and insufficient semantic understanding ability in the prior art.
[0007] (II) Technical Solution
[0008] To achieve the above objectives, the main technical solutions adopted in this application include:
[0009] In a first aspect, embodiments of this application provide an intelligent search engine system based on a hybrid NLP and vector retrieval method, comprising:
[0010] The query parsing module is used to receive the query statement input by the user and obtain structured query information based on the query statement;
[0011] The symbiotic index module includes: a sparse extended index unit, used to generate extended terms based on keywords in the structured query information through a sparse extended model, and to construct a sparse inverted index table;
[0012] Vectorized hypergraph indexing units are used to model documents, products, suppliers, brands, categories, attributes, and compliance tags in pre-stored business data as nodes, and model ownership, supply, matching, and restriction relationships as hyperedges, forming a hypergraph index with vector representation;
[0013] The recall orchestration module is used to obtain a set of candidate objects corresponding to the structured query information based on the structured query information, combined with the sparse inverted index table, the hypergraph index, and set matching calculation.
[0014] The constraint reordering module is used to calculate the joint priority score between the query and the candidate objects based on the candidate object set, and obtain the sorting result under the constraints of supplier ratio, category ratio and price range.
[0015] The evidence generation module is used to generate evidence information based on the sorting results and output the evidence information to the user interface so that the user can confirm the search results based on the evidence.
[0016] Preferably, the query parsing module includes:
[0017] The input processing unit is used to receive query statements input by the user, which include natural language text, symbols, numbers, model parameters, range descriptions, and batch lists;
[0018] The word segmentation and entity recognition unit is used to segment the query statement into words and extract entities such as brand, product name, supplier, category, geographical location and unit of measurement through named entity recognition to form a keyword set and an entity set.
[0019] The keyword set includes keywords obtained after word segmentation. These keywords are terms that can independently express the search intent, including product names, brand names, key elements of models, and specification parameter names.
[0020] The entity set includes entity objects identified by named entity recognition, including product entities, brand entities, supplier entities, category entities, geographic location entities, and unit of measurement entities;
[0021] The constraint identification unit is used to identify negation expressions, range conditions, numerical ranges, and set entries in the query statement, forming a set of constraint conditions and a set of set entries.
[0022] The set of constraints includes logical negation conditions, time range constraints, price range constraints, quantity range constraints, and geographical range constraints parsed from the query statement.
[0023] The collection of entries includes multiple search object entries entered in the form of a list or file in the batch list. Each search object entry corresponds to the identifier, model or specification parameters of a candidate object.
[0024] The normalization unit is used to standardize the extracted model parameters and numerical ranges to obtain a unified expression for the model parameters and numerical ranges.
[0025] The structured generation unit is used to combine keyword sets, entity sets, constraint sets, and set entry sets with model parameter expressions and numerical range expressions to generate structured query information.
[0026] Preferably, the sparse expansion model in the sparse expansion index unit is a semantic expansion model trained based on pre-acquired domain sample data, used to generate several semantically similar or semantically related expanded terms for keywords and assign expansion confidence.
[0027] The domain sample data is used to train a sparse extended model to learn the correspondence between keywords and semantically similar or related terms.
[0028] The sample data in this field includes: product description text, brand information, supplier information, category information, specifications, attribute key-value pairs, and compliance tags.
[0029] Preferably, the process of constructing a sparse inverted index table using sparse extended index units specifically includes:
[0030] Obtain the keywords and their expanded terms generated by the sparse expansion model to form a target term set;
[0031] The target term set includes keywords and several semantically similar or semantically related extended terms generated therefrom;
[0032] Retrieve candidate objects containing any term from the target term set from the pre-stored business data, and record the position of the term in each field of the candidate object;
[0033] The pre-stored business data includes documents, products, suppliers, brands, categories, attribute information, and compliance label information in a business database or knowledge base;
[0034] For each term and its candidate, the sparse weight is calculated according to formula (1);
[0035] The formula (1) is:
[0036] W t,d =α·TF t,d ·FW t +β·EC t +γ·PD t,d ;
[0037] W t,d Let be the sparse weight of term t in candidate object d;
[0038] TF t,d It is the ratio of the number of times term t appears in candidate object d to the total number of terms in candidate object d;
[0039] FW t The importance coefficient pre-defined among the candidate objects containing term t;
[0040] EC t Generate extended confidence scores for term t in the sparse extended model;
[0041] PD t,d This indicates the density of the distribution of term t among candidate object d;
[0042] α is the first preset weight;
[0043] β is the second preset weight;
[0044] γ is the third preset weight;
[0045] Using terms as index keys, write the corresponding candidate object identifiers and sparse weights to build a sparse inverted index table with terms as keys and candidate object identifiers as values.
[0046] Preferably, the vectorized hypergraph indexing unit models pre-stored business data as a vectorized hypergraph index, specifically including:
[0047] Instantiate documents, products, suppliers, brands, categories, attributes, and compliance tags as nodes, and generate semantic vectors for the nodes;
[0048] Based on the relationship between products and categories, the supply relationship between suppliers and products, the matching relationship between products, and the compliance label restriction relationship, hyperedges are constructed and corresponding hyperedge semantic vectors are generated.
[0049] The semantic vectors of nodes and the semantic vectors of hyperedges are stored together to form a vectorized hypergraph index.
[0050] Preferably, the recall orchestration module, based on the structured query information, and in conjunction with the sparse inverted index table, hypergraph index, and set matching calculation, obtains a set of candidate objects corresponding to the structured query information, specifically including:
[0051] Based on the set of keywords in the structured query information, the first candidate object set is retrieved from the sparse inverted index table;
[0052] Based on the entity set and keyword set in the structured query information, semantic similarity calculation and relation expansion are performed in the vectorized hypergraph index to obtain the second candidate object set;
[0053] Based on the set of collection entries in the structured query information, the corresponding object entities are directly matched to obtain the third candidate object set;
[0054] The first, second, and third candidate object sets are merged and deduplicated, and then weighted and fused based on sparse matching score, semantic similarity score, relational path information, and set item coverage to obtain the final candidate object set.
[0055] Preferably, the first, second, and third candidate object sets are merged and deduplicated, and then weighted and fused based on sparse matching scores, semantic similarity scores, relational path information, and set item coverage to obtain the final candidate object set, specifically including:
[0056] For each candidate object in the candidate object set after merging and deduplicating the first, second, and third candidate object sets, calculate the sparse matching score, vector similarity score, hypergraph path score, and set entry coverage score respectively.
[0057] The sparse matching score is the sum of the sparse weights of the matched keywords and their extended terms in the candidate object;
[0058] The vector similarity score is the similarity between the semantic vector of the candidate object node or the semantic vector of the hyperedge and the corresponding entity or keyword vector in the query.
[0059] The hypergraph path score is the reciprocal of the shortest path length between the candidate object node and the query node in the hypergraph;
[0060] The set item coverage score is the proportion of the number of set items that match the candidate object to the total number of set items;
[0061] The sparse matching score, vector similarity score, hypergraph path score, and set item coverage score are weighted and fused to form a joint priority score for candidate objects;
[0062] Based on the joint priority scores of the candidate objects, the first, second, and third candidate object sets are merged and deduplicated, and then sorted in descending order to obtain the final candidate object set.
[0063] Preferably, the constraint reordering module, for the final candidate object set, obtains the sorting result under the constraints of supplier ratio, category ratio, and price range; specifically including:
[0064] If the proportion of suppliers to which a candidate belongs does not exceed a preset first threshold, the supplier score is determined to be 0; if it exceeds the first threshold, the supplier score is obtained according to the following formula:
[0065] Supplier score = -Ws × (proportion of suppliers to candidate - first threshold);
[0066] Where Ws is the supplier constraint weight;
[0067] If the proportion of candidates belonging to a category does not exceed the preset second threshold, the category score is 0; if it exceeds the second threshold, the category score is obtained according to the following formula:
[0068] Category score = -Wc × (proportion of candidate objects belonging to the category - second threshold);
[0069] Where Wc is the category constraint weight;
[0070] If the price of the candidate object is within the specified range [P] min P max Within this range, the price score is obtained using the following formula:
[0071]
[0072] Wp price constraint weight; P 中 =(P min +P max ) / 2;
[0073] P min To specify the minimum price for the query; P max To specify the maximum price for the query;
[0074] If the price of the candidate object exceeds the specified range [P] min P max If the value is 1, the price score is obtained using the following formula:
[0075]
[0076] The candidate object set is sorted in descending order based on the final score to generate the sorting result;
[0077] The final score is calculated as follows: combined priority score + supplier score + category score + price score.
[0078] Preferably, the evidence generation module generates evidence information based on the ranking results. This evidence information includes term matching evidence and hypergraph path evidence, and is output to the user interface along with the content of the corresponding candidate objects, so that the user can confirm the search results based on the evidence. Specifically, this includes:
[0079] For each sorted candidate object, record the keywords and their extended terms that it hits in the sparse inverted index table, and use the keywords and their extended terms that each candidate object hits in the sparse inverted index table as evidence of term hits;
[0080] For each sorted candidate object, the shortest path between it and the query node is calculated based on the vectorized hypergraph index and used as evidence of the hypergraph path.
[0081] Each candidate object, along with its corresponding term matching evidence and hypergraph path evidence, is output to the user interface.
[0082] On the other hand, this embodiment also provides an intelligent search method based on NLP and vector hybrid retrieval, which is executed by the intelligent search engine system based on NLP and vector hybrid retrieval described in the first aspect.
[0083] (III) Beneficial Effects
[0084] The intelligent search engine system and method based on NLP and vector hybrid retrieval provided in this application, by introducing structured modeling of keywords, entities, and constraints during the query parsing stage, can achieve accurate understanding and standardized expression of users' natural language queries, avoiding recall bias caused by semantic ambiguity or inconsistent formatting in traditional retrieval. Simultaneously, the hybrid retrieval mechanism combining sparse extended indexes and vectorized hypergraph indexes not only covers the accuracy of keyword matching but also captures implicit semantic associations using vector semantic computation and hypergraph relationship expansion, thereby significantly improving the comprehensiveness and intelligence of recall. Furthermore, through multi-dimensional score fusion and constraint rearrangement of candidate objects, the system can output reasonably ranked results while meeting business constraints such as supplier ratio, category ratio, and price range, effectively avoiding situations where results are concentrated on a single supplier, single category, or price deviation. Further, the evidence generation module can intuitively display evidence of keyword hits and hypergraph paths, enabling users to clearly understand the basis for result ranking, thereby enhancing the interpretability of the system and user trust. Therefore, this application not only improves the accuracy of the search engine in complex business scenarios. Attached Figure Description
[0085] Figure 1This is a schematic diagram of the structure of an intelligent search engine system based on NLP and vector hybrid retrieval according to an embodiment of this application;
[0086] Figure 2 This is a schematic diagram of the structure of a symbiotic index module in an intelligent search engine system based on NLP and vector hybrid retrieval according to an embodiment of this application;
[0087] Figure 3 This is a schematic diagram of the query parsing module in an intelligent search engine system based on NLP and vector hybrid retrieval according to an embodiment of this application. Detailed Implementation
[0088] To better explain and facilitate understanding of this application, the following detailed description of the application is provided in conjunction with the accompanying drawings and specific embodiments.
[0089] Among related technologies, intelligent retrieval for search engines can be mainly categorized as follows:
[0090] The first category is retrieval schemes based on deep semantic vectors. This approach utilizes pre-trained language models (such as BERT) to map queries and documents to the same vector space, achieving semantic retrieval by calculating vector similarity. While this method can overcome keyword limitations and capture semantic-level matching relationships, it places extremely high demands on vector training corpora and computational power. Especially when domain data is insufficient or labels are scarce, the model's generalization performance is inadequate, leading to biased results. Furthermore, pure vector retrieval lacks interpretability, making it difficult for users to understand the rationale behind the search results.
[0091] The second category is rule-based or knowledge-based retrieval schemes. These schemes rely on manually pre-defined rules, knowledge graphs, or entity relationship networks to parse and logically match query statements, thereby completing entity or relationship retrieval. While they may perform well in specific business scenarios, the rules are manually maintained, resulting in poor scalability and insufficient adaptability to the diversity of query semantics and dynamic business needs, easily leading to missed detections or rigid matching.
[0092] To address this, the intelligent search engine system and method based on NLP (Natural Language Processing) and vector hybrid retrieval provided in this application, by introducing structured modeling of keywords, entities, and constraints during the query parsing stage, can achieve accurate understanding of users' natural language queries and avoid recall bias caused by semantic ambiguity. Simultaneously, by combining a hybrid retrieval mechanism of sparse extended index and vectorized hypergraph index, it ensures the accuracy of keyword matching while capturing implicit semantic associations through semantic computation and hypergraph relationship expansion, significantly improving the comprehensiveness and intelligence of recall. Furthermore, through multi-dimensional score fusion and constraint rearrangement of candidate objects, the system can output reasonably ranked results while meeting business conditions such as supplier ratio, category ratio, and price range; and the introduction of the evidence generation module significantly enhances the interpretability and user trust of the results. Therefore, this application not only improves the accuracy of the search engine in complex business scenarios.
[0093] To better understand the above technical solutions, exemplary embodiments of this application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application can be understood more clearly and thoroughly, and that the scope of this application can be fully conveyed to those skilled in the art.
[0094] Figure 1 This is a schematic diagram of the structure of an intelligent search engine system based on NLP and vector hybrid retrieval according to an embodiment of this application, as shown below. Figure 1 As shown, the intelligent search engine system based on NLP and vector hybrid retrieval of this application includes:
[0095] The query parsing module receives user-input query statements and obtains structured query information based on the query statements; see also Figure 3 The query parsing module described in this embodiment includes:
[0096] The input processing unit is used to receive query statements input by the user, which include natural language text, symbols, numbers, model parameters, range descriptions, and batch lists;
[0097] For example, the input processing unit is used to receive query statements input by the user. These query statements include natural language text, symbols, numbers, model parameters, range descriptions, and batch lists. For instance, a user could input "Huawei laptops released in 2023 with 16GB of RAM, not secondhand, priced between 5000 and 7000, batch list attached." This input simultaneously includes natural language, numerical ranges, and batch lists.
[0098] The word segmentation and entity recognition unit is used to segment the query statement into words and extract entities such as brand, product name, supplier, category, geographical location and unit of measurement through named entity recognition to form a keyword set and an entity set.
[0099] The keyword set includes keywords obtained after word segmentation. These keywords are terms that can independently express the search intent, including product names, brand names, key elements of models, and specification parameter names.
[0100] The entity set includes entity objects identified by named entity recognition, including product entities, brand entities, supplier entities, category entities, geographic location entities, and unit of measurement entities;
[0101] In this embodiment, the keyword set includes terms that can express the search intent after word segmentation, such as "laptop" and "memory"; the entity set includes structured entity objects obtained by named entity recognition, such as brand = Huawei, product = laptop, parameter = 16GB memory, time = 2023.
[0102] The constraint identification unit is used to identify negation expressions, range conditions, numerical ranges, and set entries in the query statement, forming a set of constraint conditions and a set of set entries.
[0103] The set of constraints includes logical negation conditions, time range constraints, price range constraints, quantity range constraints, and geographical range constraints parsed from the query statement.
[0104] The collection of entries includes multiple search object entries entered in the form of a list or file in the batch list. Each search object entry corresponds to the identifier, model or specification parameters of a candidate object.
[0105] For example, "Do not use secondhand" in the statement is parsed as a logical negation condition; "Price between 5000 and 7000" is parsed as a price range constraint; and the model list in the attachment file is parsed as a set of entries.
[0106] The normalization unit is used to standardize the extracted model parameters and numerical ranges to obtain a unified expression for the model parameters and numerical ranges. For example, "16G memory" and "16GB RAM" are normalized to {memory = 16GB}; "5000 to 7000 yuan" and "5k-7k" are normalized to {price ∈ [5000, 7000]}, thereby avoiding inconsistencies in matching caused by different expressions.
[0107] The structured generation unit is used to combine keyword sets, entity sets, constraint sets, and set entry sets with model parameter expressions and numerical range expressions to generate structured query information.
[0108] For example, the final structured query information includes:
[0109] Keyword set: {"notebook", "memory"};
[0110] Entity set: {Brand = Huawei, Product = Laptop, Parameter = 16GB RAM, Time = 2023};
[0111] Set of constraints: {Release date = 2023, NOT secondhand, price ∈ [5000, 7000]};
[0112] Collection of items: {List of attachment models};
[0113] Standardized representation: {Memory = 16GB, Price range = [5000, 7000]};
[0114] Through the above processing, the user's natural language query is transformed into logically clear, machine-readable structured query information, providing reliable input for subsequent indexing, recall, and ranking.
[0115] This embodiment achieves a semantically structured representation of natural language queries through word segmentation and entity recognition, effectively improving retrieval accuracy. The constraint recognition unit supports negation conditions, range constraints, and set entries, meeting complex retrieval needs, and is particularly suitable for scenarios such as e-commerce, supply chain, and industrial procurement. The normalization unit eliminates differences between different parameter and numerical range representations, avoiding missed matching results. The structured generation unit integrates multiple types of information to form standardized query input, providing high-quality semantic support for the combination of sparse indexes and vector indexes.
[0116] like Figure 2 As shown, the symbiotic index module includes: a sparse extended index unit, used to generate extended terms based on keywords in the structured query information through a sparse extended model, and to construct a sparse inverted index table;
[0117] In this embodiment, the sparse expansion model in the sparse expansion index unit is a semantic expansion model trained based on pre-acquired domain sample data. It is used to generate several semantically similar or related expanded terms for a keyword and assign expansion confidence scores. For example, when the keyword "laptop" is input, the expansion model can generate semantically related terms such as "laptop" and "thin laptop". When the keyword "memory" is input, the expansion model can generate terms such as "RAM", "memory stick", "16GB memory", and "DDR4". Each expanded term is accompanied by an expansion confidence score; for example, the confidence score for "thin laptop" is 0.87.
[0118] The domain sample data is used to train a sparse extended model to learn the correspondence between keywords and semantically similar or related terms.
[0119] The domain sample data includes: product description text, brand information, supplier information, category information, specifications, attribute key-value pairs, and compliance tags, which are used to learn the correspondence between keywords and semantically similar or related terms.
[0120] In this embodiment, the process of constructing a sparse inverted index table using the sparse extended index unit specifically includes:
[0121] Obtain the keywords and their expanded terms generated by the sparse expansion model to form a target term set;
[0122] The target term set includes keywords and several semantically similar or semantically related extended terms generated therefrom;
[0123] Retrieve candidate objects containing any term from the target term set from the pre-stored business data, and record the position of the term in each field of the candidate object;
[0124] The pre-stored business data includes documents, products, suppliers, brands, categories, attribute information, and compliance label information in a business database or knowledge base;
[0125] For each term and its candidate, the sparse weight is calculated according to formula (1);
[0126] The formula (1) is:
[0127] W t,d =α·TF t,d ·FW t +β·EC t +γ·PD t,d ;
[0128] W t,d Let be the sparse weight of term t in candidate object d;
[0129] TF t,d The ratio of the number of times term t appears in candidate object d to the total number of terms in candidate object d is dimensionless (number of occurrences / number of occurrences).
[0130] FW t The importance coefficient is a pre-defined value among the candidate terms containing term t; this importance coefficient is dimensionless.
[0131] EC t Generate extended confidence scores for term t in the sparse extended model. The extended confidence score ranges from [0, 1] and is dimensionless.
[0132] PD t,d This represents the density of term t's distribution in candidate document d, and is dimensionless. In this embodiment, the density of term t's distribution in candidate document d is measured by analyzing the spacing between the positions where the term appears in the document. Specifically, all positions where the term appears in the document are first recorded and arranged sequentially to obtain a set of positions. Then, the spacing between adjacent positions is calculated, and the reciprocals of these spacings are summed. In this calculation method, the more concentrated the term's positions, the smaller the spacing between adjacent positions, and the larger the reciprocal value, resulting in a higher density. Conversely, the more dispersed the term distribution, the larger the spacing, and the smaller the reciprocal value, resulting in a lower density. For example, suppose a term t appears in candidate document d at positions [2, 4, 5, 20]. First, the spacing between adjacent positions Δ = [4-2, 5-4, 20-5] = [2, 1, 15]. Then, the reciprocals are calculated and summed to obtain a density of 1 / 2 + 1 / 1 + 1 / 15 ≈ 1.77. As can be seen, the first two occurrences had smaller intervals (2 and 1), contributing the majority of the density value, while the last occurrence had a larger interval (15) and contributed less to the density. This calculation method naturally reflects the density of term distribution in a document. It not only considers the frequency of term occurrences but also distinguishes whether terms are evenly distributed or concentrated. In information retrieval, when a user queries a keyword, if the keyword appears closely in a document, it often means that the document discusses the topic extensively, and therefore such documents are more likely to be highly relevant to the user's query intent. Compared to methods that only use the frequency of occurrences, density calculation based on the inverse of the interval provides a more refined relevance assessment, improving the accuracy and reliability of search results.
[0133] α is the first preset weight; β is the second preset weight; γ is the third preset weight;
[0134] In this embodiment, α = 0.2, β = 0.3, and γ = 0.5;
[0135] Using terms as index keys, corresponding candidate object identifiers and sparse weights are written to establish a sparse inverted index table with terms as keys and candidate object identifiers as values. In this embodiment, the sparse extended index unit establishes a sparse inverted index table with terms as index keys. Each term (including original keywords and extended terms) serves as an index key, pointing to the identifiers of several candidate objects (such as products, documents, suppliers, etc.), and each candidate object is assigned a corresponding sparse weight, thereby achieving efficient retrieval and sorting. Specifically, the keywords and extended terms obtained from query parsing are used as a basic term set, and the candidate objects in which these terms appear are retrieved from the business database. Each term corresponds to a set of candidate object identifiers, and the system assigns sparse weights to the candidate objects. These sparse weights not only consider the number of times the term appears in the candidate objects (term frequency), but also introduce the semantic confidence of the extended terms, the field importance coefficient, and the density of term distribution, thereby more accurately measuring the relevance between terms and candidate objects. Finally, the terms, candidate object identifiers, and their sparse weights are stored in an inverted index structure, forming a sparse inverted index table with terms as keys and candidate objects as values. For example, suppose a user enters the query "Huawei laptop released in 2023 with 16GB RAM, not secondhand, price between 5000 and 7000." After query parsing and expansion, the system obtains a set of terms: original keywords such as "laptop," "Huawei," and "16GB RAM," and expanded terms such as "laptop," "notebook," and "RAM." "Laptop" refers to a laptop computer, "notebook" refers to a paper laptop or a computer laptop, and "RAM" refers to random access memory. Assume the database contains three types of candidate objects: Product A (Huawei MateBook 16GB RAM laptop, price 6500 yuan, released in 2023), Product B (Huawei brand laptop with 16GB RAM, price 6800 yuan), and Product C (secondhand Huawei laptop with 16GB RAM, price 4000 yuan). During index construction, "laptop" is mapped to products A and C, and sparse weights are calculated for each (e.g., A = 0.85, C = 0.65); "laptop" is mapped to product B and assigned a corresponding weight (e.g., 0.72); "Huawei" is mapped to products A, B, and C, but with different weights due to different fields (A = 0.95, B = 0.90, C = 0.50). In this way, each term in the inverted index table corresponds to several candidate objects and their weights. During retrieval, the system quickly locates the set of candidate objects through terms, sorts them based on weights, and then eliminates unsuitable objects based on negative conditions in the query (e.g., "don't use secondhand"), thus obtaining accurate results.The inverted index table significantly improves retrieval efficiency, eliminating the need to traverse the database one by one, and instead enabling direct location of candidate objects through terms; secondly, sparse weights introduce multi-dimensional factors, avoiding the one-sidedness of judging relevance solely based on word frequency, thereby ensuring that the results better meet the semantic needs of users.
[0136] In this embodiment, the sparse expansion index unit semantically expands the keywords output by the query parsing module to generate semantically related expanded terms, and calculates sparse weights based on a preset formula to construct a sparse inverted index table. Specifically, the keywords are first expanded using a sparse expansion model to obtain several semantically similar or related candidate terms, and each expanded term is assigned an expansion confidence level. For example, when a user inputs "notebook," terms such as "laptop," "thin laptop," and "lightweight laptop" can be expanded, and different confidence levels are assigned to them to reflect their semantic similarity to the original keywords. Subsequently, candidate objects are retrieved from a pre-stored business dataset, and the occurrence position and frequency of each term in the object text are recorded.
[0137] In terms of weight calculation, this embodiment adopts a comprehensive weighting formula, which takes into account four dimensions: term frequency (TF), pre-set importance coefficient (FW), extended confidence (EC), and distribution density (PD) to obtain sparse weights.
[0138] For example, when a user searches for "Huawei laptop released in 2023 with 16GB RAM, not secondhand, priced between 5000 and 7000," the system can not only identify core keywords such as "laptop," "memory," and "Huawei," but also expand to include terms like "laptop" and "RAM," assigning them higher expanded confidence scores. If a candidate product description frequently mentions "laptop" and is concentrated in the title area, and its brand field is "Huawei," then the sparsity weight of this candidate product is significantly increased, resulting in a higher ranking in the search results. For another candidate product, although only the word "laptop" appears, the system can still include it in the candidate results due to its high expanded confidence score and high density of distribution.
[0139] The sparse extended index unit in this embodiment not only improves semantic recall and avoids omissions due to differences in user input habits, but also ensures the relevance and reasonable ranking of search results through a multi-dimensional weighted model. Compared with traditional indexing methods that rely solely on word frequency, this solution takes into account both recall and precision, making it particularly suitable for scenarios such as e-commerce, supply chain, and industrial procurement. It can effectively improve search performance and user satisfaction under complex query conditions.
[0140] In one specific embodiment of this application, the sparse extended index unit is further used for:
[0141] Mark the position indexes of the title, abstract, and attribute fields in the candidate objects respectively;
[0142] Different position coefficients are assigned to the frequency of keywords or extended terms in different fields: the position coefficient for the title field is 1.5, the position coefficient for the abstract field is 1.2, and the position coefficient for the body text field is 1.0.
[0143] The position coefficient is multiplied by the original sparse weight to obtain the adjusted sparse weight, which is used for the construction of the inverted index table and subsequent sorting of candidate objects.
[0144] For example, the sparse extended index unit further performs positional weighting on different text fields of candidate objects to improve the accuracy and ranking rationality of search results. Specifically, firstly, the title, abstract, attribute fields, and body text of each candidate object are marked, and the position of keywords or extended terms in each field is recorded. Then, corresponding position coefficients are assigned according to the importance of different fields, with the position coefficient for the title field being 1.5, the position coefficient for the abstract field being 1.2, and the position coefficient for the body text field being 1.0. When keywords or extended terms appear in different fields of a candidate object, their original sparse weights are multiplied by the position coefficient corresponding to that field, thus obtaining the adjusted sparse weights. For example, if a user queries "Huawei 16GB RAM laptop released in 2023", the title of candidate product B is "Huawei MateBook 16GB RAM laptop 2023 new model", the abstract is "thin and light laptop, 16GB RAM, suitable for office and entertainment", and the body text is "high-configuration laptop, superior performance, thin and light and portable". In the calculation process, the original sparse weight of "notebook" in the title is 0.8, which is multiplied by the title coefficient of 1.5 to obtain an adjusted weight of 1.2; the original sparse weight of "16GB memory" in the abstract is 0.7, which is multiplied by the abstract coefficient of 1.2 to obtain 0.84; and the original sparse weight of "laptop" in the body text is 0.6, which is multiplied by the body text coefficient of 1.0 to remain at 0.6. These weighted weights are then summed to obtain the final sparse weight of candidate product B in the inverted index table. This method can highlight the importance of keywords in core fields (such as title and abstract), allowing relevant candidates to be displayed first in the ranking, while suppressing the weight of terms that frequently appear in the body text but are not prominent in the topic. This improves the accuracy and relevance of search results in responding to user query intent, and has significant application value in e-commerce product retrieval and knowledge base retrieval scenarios.
[0145] Vectorized hypergraph indexing units are used to model documents, products, suppliers, brands, categories, attributes, and compliance tags in pre-stored business data as nodes, and model ownership, supply, matching, and restriction relationships as hyperedges, forming a hypergraph index with vector representation;
[0146] The vectorized hypergraph indexing unit is used to model pre-stored business data into a vectorized hypergraph index, specifically including:
[0147] Instantiate documents, products, suppliers, brands, categories, attributes, and compliance tags as nodes, and generate semantic vectors for the nodes;
[0148] Based on the relationship between products and categories, the supply relationship between suppliers and products, the matching relationship between products, and the compliance label restriction relationship, hyperedges are constructed and corresponding hyperedge semantic vectors are generated.
[0149] The semantic vectors of nodes and the semantic vectors of hyperedges are stored together to form a vectorized hypergraph index.
[0150] For example, suppose we have the following business data:
[0151] Documents: Product manuals, technical specifications; Products: Smartwatch A, Smartwatch B; Suppliers: Supplier X, Supplier Y; Brands: Brand1, Brand2; Category: Smart wearable devices; Attributes: Color, storage capacity, battery life; Compliance labels: CE certification, RoHS certification; This business data will be instantiated into nodes, for example:
[0152] Node 1: Smartwatch A; Node 2: Supplier X; Node 3: CE certification; Node 4: Smart wearable device category; then, a semantic vector is generated for each node. Semantic vectors can be generated using pre-trained language models or vectorization methods, based on text descriptions (such as product manuals, brand descriptions), attribute values (color, capacity, etc.), and other contextual information. For example, vectors are generated for node "Smartwatch A," node "Supplier X," and node "CE certification." These vectors can capture the semantic similarity and association features between nodes in a high-dimensional space.
[0153] Construct hyperedges and generate hyperedge vectors. Hyperedges are used to represent complex relationships between multiple nodes. For example:
[0154] Relationship: Smartwatch A → Belongs to → Smart Wearable Devices;
[0155] Supply relationship: Supplier X → Supply → Smartwatch A;
[0156] Matching relationship: (e.g., complementary functions);
[0157] Restriction relationship: CE certification → Restriction → Smartwatch A;
[0158] For each hyperedge, a corresponding hyperedge semantic vector is generated. This vector may be calculated by combining the vectors of the nodes connected to the hyperedge, such as by taking a weighted average of the node vectors or by generating it through a graph neural network. Vector representation can not only capture the direct relationships between nodes, but also reflect semantic similarity or constraints.
[0159] All node vectors and hyperedge vectors are stored uniformly to form a vectorized hypergraph index, facilitating efficient querying and retrieval. For example, when a user searches for "smartwatches that support CE certification," the system can directly calculate the similarity between nodes and hyperedges in the vector space, quickly locating matching products and suppliers. Similarly, when querying "product matching relationships of supplier X," the system can quickly retrieve products related to supplier X and their matching relationships along the hyperedges.
[0160] The recall orchestration module is used to obtain a set of candidate objects corresponding to the structured query information based on the structured query information, combined with a sparse inverted index table, a hypergraph index, and set matching calculations. Specifically, this includes:
[0161] Based on the set of keywords in the structured query information, the first candidate object set is retrieved from the sparse inverted index table;
[0162] Based on the entity set and keyword set in the structured query information, semantic similarity calculation and relation expansion are performed in the vectorized hypergraph index to obtain the second candidate object set;
[0163] Based on the set of collection entries in the structured query information, the corresponding object entities are directly matched to obtain the third candidate object set;
[0164] The first, second, and third candidate object sets are merged and deduplicated, and then weighted and fused based on sparse matching score, semantic similarity score, relational path information, and set item coverage to obtain the final candidate object set.
[0165] For example, suppose a user enters the query "smartwatches that support CE certification provided by supplier X". The query parsing module generates structured query information, including the keyword set {"smartwatch", "CE certification"}, the entity set {supplier X}, and the set of items {a list of products provided by the supplier}.
[0166] First, the recall orchestration module searches a sparse inverted index table based on the keyword set. For example, it searches the inverted index table corresponding to "smartwatch" and "CE certification" to obtain the first candidate object set, such as smartwatch A and smartwatch B. The inverted index utilizes the frequency and position of keyword occurrences to quickly locate documents or products containing keywords, achieving efficient recall.
[0167] Secondly, the module uses entity sets and keyword sets in the vectorized hypergraph index to calculate semantic similarity and expand relationships. For example, the system calculates the semantic similarity between supplier X and smartwatches A and B in the vector space, and expands their related relationships (such as matching or restriction relationships) along the hyperedges to obtain a second set of candidate objects, which may include smartwatches A and C. This can capture candidate objects that are not directly present in the text but are semantically related.
[0168] Secondly, the module performs direct matching based on the set entries in the structured query. For example, if the query specifies "a list of products provided by a supplier," it directly matches all products provided by supplier X, obtaining a third set of candidate objects, such as smartwatch A and smartwatch D. This step ensures that the business constraints are precisely met.
[0169] This embodiment combines keyword indexing, vectorized hypergraph indexing, and set entry matching to cover both explicitly matched objects and semantically related objects, thereby improving the comprehensiveness of the candidate set.
[0170] The first, second, and third candidate object sets are merged and deduplicated, and then weighted and fused based on sparse matching scores, semantic similarity scores, relational path information, and set item coverage to obtain the final candidate object set, which specifically includes:
[0171] For each candidate object in the candidate object set after merging and deduplicating the first, second, and third candidate object sets, calculate the sparse matching score, vector similarity score, hypergraph path score, and set entry coverage score respectively.
[0172] The sparse matching score is the sum of the sparse weights of the matched keywords and their extended terms in the candidate object;
[0173] The vector similarity score is the similarity between the semantic vector of the candidate object node or the semantic vector of the hyperedge and the corresponding entity or keyword vector in the query.
[0174] The hypergraph path score is the reciprocal of the shortest path length between the candidate object node and the query node in the hypergraph;
[0175] The set item coverage score is the proportion of the number of set items that match the candidate object to the total number of set items;
[0176] The sparse matching score, vector similarity score, hypergraph path score, and set item coverage score are weighted and fused to form a joint priority score for candidate objects;
[0177] Based on the joint priority scores of the candidate objects, the first, second, and third candidate object sets are merged and deduplicated, and then sorted in descending order to obtain the final candidate object set.
[0178] After the recall orchestration module obtains the first, second, and third candidate object sets and merges and deduplicates them, it needs to perform priority orchestration on these candidate objects to determine the final order of the candidate object set. Assuming the user inputs the query "smartwatches that support CE certification provided by supplier X", after the aforementioned steps, the merged candidate object set may include smartwatch A, smartwatch B, smartwatch C, and smartwatch D. To determine the priority of these candidate objects, the module calculates the sparse matching score, vector similarity score, hypergraph path score, and set entry coverage score for each candidate object. The sparse matching score refers to the sum of the sparse weights of the candidate objects that match the query keywords (such as "smartwatch" and "CE certification") and their extended terms. For example, smartwatch A matches both "smartwatch" and "CE certification" in the inverted index, resulting in a high sparse matching score. The vector similarity score is calculated by comparing the semantic vector of the candidate object node or the semantic vector of the hyperedge with the entity or keyword vector in the query. For example, although smartwatch C does not directly match all keywords, it has a high vector similarity with supplier X and "CE certification," therefore its vector similarity score is also high. The hypergraph path score reflects the reciprocal of the shortest path length between the candidate node and the query node in the hypergraph. For example, smartwatch B and supplier X are directly connected through a supply relationship, resulting in a shorter path and thus a higher hypergraph path score. The set item coverage score represents the proportion of set items that match the candidate item to the total number of query set items. For example, smartwatch A is exactly in the product list provided by supplier X, therefore it has the highest coverage score.
[0179] After obtaining the scores for each dimension, the sparse matching score, vector similarity score, hypergraph path score, and set item coverage score are weighted and fused to form a joint priority score for each candidate object. For example, higher weights can be given to the sparse matching score and set item coverage score to highlight the precise matching of business constraints, while retaining the consideration of semantic relevance and relationship strength for vector similarity and hypergraph path scores. Finally, the candidate object set is sorted in descending order according to the joint priority score to obtain the final candidate object set. For example, the sorted result may be smartwatch A, smartwatch B, smartwatch C, and smartwatch D, where smartwatch A satisfies keyword hit, semantic relevance, business relationship, and set item constraints, and therefore ranks first.
[0180] This embodiment, through multi-dimensional scoring fusion, can comprehensively and accurately rank candidate objects by taking into account explicit keyword matching, semantic relevance, hypergraph relationship paths, and business set constraints. Secondly, it can flexibly balance the weights of different scoring dimensions, enabling the system to highlight business constraints or semantic connections in different business scenarios, thus improving the matching degree between search results and user intent. Finally, this method can maintain efficient ranking when processing large-scale candidate object sets and provide high-quality, highly relevant candidate sets for subsequent ranking or recommendation stages, thereby significantly improving the overall performance of the retrieval system and the user experience.
[0181] The constraint reordering module is used to calculate the joint priority score between the query and the candidate objects based on the candidate object set, and obtain the ranking result under the constraints of supplier ratio, category ratio, and price range. Specifically, it includes:
[0182] If the proportion of suppliers to which a candidate belongs does not exceed a preset first threshold, the supplier score is determined to be 0; if it exceeds the first threshold, the supplier score is obtained according to the following formula:
[0183] Supplier score = -Ws × (proportion of suppliers to candidate - first threshold);
[0184] Where Ws is the supplier constraint weight;
[0185] If the proportion of candidates belonging to a category does not exceed the preset second threshold, the category score is 0; if it exceeds the second threshold, the category score is obtained according to the following formula:
[0186] Category score = -Wc × (proportion of candidate objects belonging to the category - second threshold);
[0187] Where Wc is the category constraint weight;
[0188] If the price of the candidate object is within the specified range [P] min P max Within this range, the price score is obtained using the following formula:
[0189]
[0190] Wp price constraint weight; P 中 =(P min +P max ) / 2;
[0191] P min To specify the minimum price for the query; P max To specify the maximum price for the query;
[0192] If the price of the candidate object exceeds the specified range [P] min Pmax If the value is 1, the price score is obtained using the following formula:
[0193]
[0194] The candidate object set is sorted in descending order based on the final score to generate the sorting result;
[0195] The final score is calculated as follows: combined priority score + supplier score + category score + price score.
[0196] For example, the constraint reordering module calculates the final score for each candidate based on the joint priority score, combined with business constraints such as supplier ratio, category ratio, and price range, and generates a ranking result. Taking a user query of "smartwatches with CE certification provided by supplier X, priced between 200 and 500 yuan" as an example, assuming the final candidate set includes smartwatches A, B, C, and D, the system first calculates the joint priority score for each candidate based on the recall orchestration module. Subsequently, the constraint reordering module evaluates the supplier ratio. If the supplier ratio of a candidate does not exceed a preset threshold, for example, the first threshold is 50%, the supplier score is 0. If the supplier's product ratio exceeds 50%, a penalty score is calculated using the formula Supplier Score = -Ws × (Candidate's Supplier Ratio - First Threshold) to prevent a single supplier from having an excessively high proportion. Similarly, for category constraints, if the proportion of a candidate's category does not exceed the second threshold (e.g., 60%), the category score is 0; if it exceeds the threshold, a penalty is applied based on the category score = -Wc × (proportion of candidate's category - second threshold) to ensure a reasonable distribution of categories in the ranking results. Regarding price constraints, if the candidate's price falls within the specified range [P]... min P maxWithin the specified range, the price score is calculated using the formula described earlier. Finally, the module weights and sums the joint priority score, supplier score, category score, and price score to obtain the final score for each candidate. These scores are then sorted in descending order to generate a ranking result. For example, the final ranking might be Smartwatch A, Smartwatch C, Smartwatch B, and Smartwatch D. Smartwatch A has the highest score because its joint priority and price are close to the midpoint of the query range, and its supplier and category ratios are reasonable. This constrained ranking method firstly maintains the relevance of the search candidates while considering supplier distribution and category diversity, preventing a single supplier or category from having an excessively high proportion, thus ensuring the fairness and diversity of the recommendation or search results. Secondly, by using price range constraints, it can accurately meet the user's budget or price preferences, making the ranking results more closely match the actual query intent. Finally, this method integrates the joint priority score with the business constraint score, ensuring that the ranking results consider both semantic and business relevance while conforming to specific business or application constraints, thereby significantly improving the accuracy, user satisfaction, and business controllability of the retrieval system.
[0197] The evidence generation module generates evidence information based on the sorting results and outputs the evidence information to the user interface so that the user can confirm the search results based on the evidence. Specifically, this includes:
[0198] For each sorted candidate object, record the keywords and their extended terms that it hits in the sparse inverted index table, and use the keywords and their extended terms that each candidate object hits in the sparse inverted index table as evidence of term hits;
[0199] For each sorted candidate object, the shortest path between it and the query node is calculated based on the vectorized hypergraph index and used as evidence of the hypergraph path.
[0200] Each candidate object, along with its corresponding term matching evidence and hypergraph path evidence, is output to the user interface.
[0201] In this embodiment, the evidence generation module generates evidence information for user reference based on the sorted candidate object set, enabling users to understand and confirm the rationality of the search results. Taking a user query for "smartwatches supported by CE certification provided by supplier X" as an example, assume the first four candidate objects in the sorted results are smartwatches A, B, C, and D. For each candidate object, the module first records the keywords and their extended terms matched in the sparse inverted index table. For example, smartwatch A matches "smartwatch" and "CE certification," and also matches extended terms such as "wearable devices" or "certification compliance." This information constitutes the term matching evidence for the candidate object, demonstrating why the candidate object matches the query keywords. Secondly, the module calculates the shortest path between the candidate object node and the query node based on the vectorized hypergraph index. For example, smartwatch A forms a hypergraph path of length 1 via "supplier X → supply → smartwatch A," while smartwatch C may form a hypergraph path of length 2 via "supplier X → supply → smartwatch B → match → smartwatch C." This information constitutes hypergraph path evidence, reflecting the degree of association between the candidate object and the query entity in business or semantic relationships. Finally, the system outputs each candidate object and its corresponding term matching evidence and hypergraph path evidence to the user interface. For example, it displays the keyword matching and hypergraph path information of each object next to the ranking list, allowing users to intuitively understand why the candidate object was retrieved and the basis for its ranking. This evidence generation method enhances the transparency of search results, enabling users to understand the reasons for the recall and ranking of each candidate object, thereby improving the credibility of the search results. Secondly, the combination of term matching evidence and hypergraph path evidence with keyword matching and business relationship information not only helps users quickly confirm the accuracy of the results but also facilitates the discovery of potential semantic associations or matching patterns. Finally, this module supports visual display on the user interface, making complex index and hypergraph relationship information intuitive and easy to understand, thereby improving the interactivity and user experience of the retrieval system and facilitating decision-making or subsequent processing in business applications.
[0202] This embodiment also provides an intelligent search method based on NLP and vector hybrid retrieval, characterized in that the method is executed by the aforementioned intelligent search engine system based on NLP and vector hybrid retrieval.
[0203] This application proposes an intelligent search engine system based on NLP and vector hybrid retrieval. It transforms user natural language queries into structured, machine-processable query information and achieves accurate recall and efficient ranking through the fusion of sparse inverted indexes and vectorized hypergraph indexes. The system first processes user input through a query parsing module, including natural language text, numbers, symbols, model parameters, range descriptions, and batch lists. The input is processed by a word segmentation and entity recognition unit to generate keyword sets and entity sets. For example, if a user queries "Huawei 16GB RAM laptop released in 2023, not secondhand, price between 5000 and 7000", the system obtains the keyword set {"laptop", "memory"} and the entity set {brand = Huawei, product = laptop, parameter = 16GB RAM, time = 2023}. Logical negation conditions, price ranges, and batch lists are parsed into constraint sets and set entries. Simultaneously, a normalization unit standardizes model parameters and numerical ranges expressed in different ways to avoid matching omissions. The structured generation unit integrates all information to form standardized, machine-readable structured query information, providing reliable input for subsequent indexing and retrieval.
[0204] In terms of index construction, the system achieves multi-dimensional information fusion through a symbiotic index module. On one hand, the sparse expansion index unit utilizes a semantic expansion model trained on domain samples to generate expanded terms for keywords. It then calculates sparse weights by combining term frequency, field importance, expansion confidence, and term distribution density, thereby establishing an efficient sparse inverted index. For example, "notebook" can be expanded to "thin and light notebook" or "laptop," with each term assigned a different confidence level to capture semantically relevant objects. On the other hand, the vectorized hypergraph index unit models business data as nodes (products, suppliers, brands, etc.) and hyperedges (belonging, supply, matching, and restriction relationships), generating corresponding vector representations. It captures complex association information through semantic similarity and relationship paths, achieving semantic-level recall.
[0205] The recall orchestration module integrates sparse indexes, vectorized hypergraph indexes, and set entry matching to generate a candidate object set. The module first retrieves explicit matching objects from the sparse inverted index based on keywords; then, it uses the hypergraph index to perform semantic expansion along nodes and hyperedges to discover potentially semantically related objects; simultaneously, it directly matches batch list items through set entries. Subsequently, a joint priority score is applied to the candidate objects, combining sparse matching scores, vector similarity, hypergraph path scores, and set entry coverage to achieve comprehensive ranking. For example, when querying "smartwatches with CE certification provided by supplier X," the system can return matching product A, and also recommend semantically or business-related products C and D.
[0206] Finally, the constraint re-ranking module adjusts the ranking based on the joint priority score, combined with business constraints (supplier ratio, category ratio, price range, etc.), to ensure that candidate objects are not only semantically relevant but also conform to actual business rules. By weighted fusion of the final scores, a ranking result that satisfies both the search intent and business constraints is achieved, thereby improving the accuracy and satisfaction of user queries.
[0207] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0208] In the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0209] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. An intelligent search engine system based on a hybrid NLP and vector retrieval method, characterized in that, include: The query parsing module is used to receive the query statement input by the user and obtain structured query information based on the query statement; The symbiotic index module includes: a sparse extended index unit, used to generate extended terms based on keywords in the structured query information through a sparse extended model, and construct a sparse inverted index table; and a vectorized hypergraph index unit, used to model documents, products, suppliers, brands, categories, attributes, and compliance tags in pre-stored business data as nodes, and model ownership, supply, matching, and restriction relationships as hyperedges, forming a hypergraph index with vector representation. The recall orchestration module is used to obtain a set of candidate objects corresponding to the structured query information based on the structured query information, combined with the sparse inverted index table, the hypergraph index, and set matching calculation. The constraint reordering module is used to calculate the joint priority score between the query and the candidate objects based on the candidate object set, and obtain the sorting result under the constraints of supplier ratio, category ratio and price range. The evidence generation module is used to generate evidence information based on the sorting results and output the evidence information to the user interface so that the user can confirm the search results based on the evidence. The sparse expansion model in the sparse expansion index unit is a semantic expansion model trained based on pre-acquired domain sample data. It is used to generate several semantically similar or semantically related expanded terms for keywords and assign expansion confidence. The domain sample data is used to train a sparse extended model to learn the correspondence between keywords and semantically similar or related terms. The process of constructing a sparse inverted index table using sparse extended index units specifically includes: Obtain the keywords and their expanded terms generated by the sparse expansion model to form a target term set; The target term set includes keywords and several semantically similar or semantically related extended terms generated therefrom; Retrieve candidate objects containing any term from the target term set from the pre-stored business data, and record the position of the term in each field of the candidate object; For each term and its candidate, the sparse weight is calculated according to formula (1); The formula (1) is: ; Let be the sparse weight of term t in candidate object d; It is the ratio of the number of times term t appears in candidate object d to the total number of terms in candidate object d; The importance coefficient pre-defined among the candidate objects containing term t; Generate extended confidence scores for term t in the sparse extended model; This indicates the density of the distribution of term t among candidate object d; As the first preset weight; The second preset weight; The third preset weight; Using terms as index keys, write the corresponding candidate object identifiers and sparse weights to build a sparse inverted index table with terms as keys and candidate object identifiers as values. The density of term t in candidate object d is represented by analyzing the spacing between the occurrence positions of term t in the document to measure the concentration of the term in the candidate object; the extended confidence reflects the semantic similarity between the extended terms and the keywords.
2. The intelligent search engine system based on NLP and vector hybrid retrieval according to claim 1, characterized in that, The query parsing module includes: The input processing unit is used to receive query statements input by the user, which include natural language text, symbols, numbers, model parameters, range descriptions, and batch lists; The word segmentation and entity recognition unit is used to segment the query statement into words and extract entities such as brand, product name, supplier, category, geographical location and unit of measurement through named entity recognition to form a keyword set and an entity set. The keyword set includes keywords obtained after word segmentation, which are terms that can independently express the search intent, including product name, brand name, model key elements, and specification parameter names; the entity set includes entity objects obtained through named entity recognition, which include product entities, brand entities, supplier entities, category entities, geographic location entities, and unit of measurement entities. The constraint identification unit is used to identify negation expressions, range conditions, numerical ranges, and set entries in the query statement, forming a set of constraint conditions and a set of set entries. The constraint set includes logical negation conditions, time range constraints, price range constraints, quantity range constraints, and geographical range constraints parsed from the query statement; the set of entries includes multiple search object entries entered in the form of a list or file in the batch list, and each search object entry corresponds to the identifier, model, or specification parameters of a candidate object; The normalization unit is used to standardize the extracted model parameters and numerical ranges to obtain a unified expression for the model parameters and numerical ranges. The structured generation unit is used to combine keyword sets, entity sets, constraint sets, and set entry sets with model parameter expressions and numerical range expressions to generate structured query information.
3. The intelligent search engine system based on NLP and vector hybrid retrieval according to claim 2, characterized in that, The sample data in this field includes: product description text, brand information, supplier information, category information, specifications, attribute key-value pairs, and compliance tags.
4. The intelligent search engine system based on NLP and vector hybrid retrieval according to claim 3, characterized in that, in, The pre-stored business data includes documents, products, suppliers, brands, categories, attribute information, and compliance label information in the business database or knowledge base.
5. The intelligent search engine system based on NLP and vector hybrid retrieval according to claim 4, characterized in that, The vectorized hypergraph indexing unit models pre-stored business data into a vectorized hypergraph index, specifically including: Instantiate documents, products, suppliers, brands, categories, attributes, and compliance tags as nodes, and generate semantic vectors for the nodes; construct hyperedges and generate corresponding hyperedge semantic vectors based on the relationships between products and categories, the supply relationships between suppliers and products, the matching relationships between products, and the restriction relationships of compliance tags; store the node semantic vectors and hyperedge semantic vectors in a unified manner to form a vectorized hypergraph index.
6. The intelligent search engine system based on NLP and vector hybrid retrieval according to claim 5, characterized in that, The recall orchestration module, based on the structured query information, and in conjunction with the sparse inverted index table, hypergraph index, and set matching calculation, obtains a set of candidate objects corresponding to the structured query information, specifically including: Based on the keyword set in the structured query information, a first candidate object set is obtained by retrieving from the sparse inverted index table. Based on the entity set and keyword set in the structured query information, semantic similarity calculation and relation expansion are performed in the vectorized hypergraph index to obtain a second candidate object set. Based on the set of set entries in the structured query information, the corresponding object entities are directly matched to obtain a third candidate object set. The first, second, and third candidate object sets are merged and deduplicated, and then weighted and fused according to the sparse matching score, semantic similarity score, relation path information, and set entry coverage to obtain the final candidate object set.
7. The intelligent search engine system based on NLP and vector hybrid retrieval according to claim 6, characterized in that, The first, second, and third candidate object sets are merged and deduplicated, and then weighted and fused based on sparse matching scores, semantic similarity scores, relational path information, and set item coverage to obtain the final candidate object set, which specifically includes: For each candidate object in the candidate object set after merging and deduplicating the first, second, and third candidate object sets, calculate the sparse matching score, vector similarity score, hypergraph path score, and set entry coverage score respectively. The sparse matching score is the sum of the sparse weights of the matched keywords and their extended terms in the candidate object; The vector similarity score is the similarity between the semantic vector of the candidate object node or the semantic vector of the hyperedge and the corresponding entity or keyword vector in the query. The hypergraph path score is the reciprocal of the shortest path length between the candidate object node and the query node in the hypergraph; The set item coverage score is the proportion of the number of set items that match the candidate object to the total number of set items; The sparse matching score, vector similarity score, hypergraph path score, and set entry coverage score are weighted and fused to form a joint priority score for candidate objects. Based on the joint priority score of the candidate objects, the first, second, and third candidate object sets are merged and deduplicated, and then sorted in descending order to obtain the final candidate object set.
8. The intelligent search engine system based on NLP and vector hybrid retrieval according to claim 7, characterized in that, The constraint reordering module, for the final candidate object set, obtains the sorting result under the constraints of supplier ratio, category ratio, and price range; specifically, it includes: If the proportion of suppliers to which a candidate belongs does not exceed a preset first threshold, the supplier score is determined to be 0; if it exceeds the first threshold, the supplier score is obtained according to the following formula: Supplier score = -Ws × (proportion of suppliers to which the candidate belongs - first threshold); Where Ws is the supplier constraint weight; If the proportion of candidates belonging to a category does not exceed the preset second threshold, the category score is 0; if it exceeds the second threshold, the category score is obtained according to the following formula: Category score = -Wc × (proportion of candidate objects belonging to the category - second threshold); Where Wc is the category constraint weight; If the price of the candidate object is within the specified range [P] min P max Within this range, the price score is obtained using the following formula: ; Wp price constraint weight; =(P min +P max ) / 2; P min To specify the minimum price for the query; P max To specify the maximum price for the query; If the price of the candidate object exceeds the specified range [P] min P max If the value is 1, the price score is obtained using the following formula: ; The candidate object set is sorted in descending order based on the final score to generate the sorting result; The final score is calculated as follows: combined priority score + supplier score + category score + price score.
9. The intelligent search engine system based on NLP and vector hybrid retrieval according to claim 8, characterized in that, The evidence generation module generates evidence information based on the ranking results. This evidence information includes term matching evidence and hypergraph path evidence, which are output to the user interface along with the content of the corresponding candidate objects, allowing the user to confirm the search results based on the evidence. Specifically, this includes: For each sorted candidate object, record the keywords and their extended terms that it hits in the sparse inverted index table, and use the keywords and their extended terms that each candidate object hits in the sparse inverted index table as evidence of term hits; For each sorted candidate object, the shortest path between it and the query node is calculated based on the vectorized hypergraph index and used as evidence of the hypergraph path. Each candidate object, along with its corresponding term matching evidence and hypergraph path evidence, is output to the user interface.
10. An intelligent search method based on a hybrid NLP and vector retrieval method, characterized in that, The method is performed by the intelligent search engine system based on NLP and vector hybrid retrieval as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Mixing retrieval method and device based on knowledge graph and vector, equipment and storage medium
CN119357376A
Electronic archive intelligent retrieval method and system
CN120371936A