An intelligent material selection system and method based on double-engine hybrid retrieval
Patent Information
- Application Number
- CN202610932825.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]现有物料选型系统无法在一次查询中同时兼顾精确参数匹配与模糊语义理解
[0014] The beneficial effects of this invention are as follows: By using a large language model, user natural language queries are automatically decomposed into hard constraints and soft constraints, and routed to structured retrieval engines and unstructured retrieval engines respectively. This enables SQL exact matching and vector semantic retrieval to be executed in parallel and the results to be fused. This achieves cross-modal joint retrieval of structured parameters and unstructured documents, ensuring zero-error matching of exact parameters and uncovering potential materials that conform to semantic descriptions. This significantly improves the accuracy and efficiency of complex material selection. At the same time, by encapsulating database operations into standardized tool call interfaces through the model context protocol, the system security and scalability are ensured.
Smart Images

Figure CN122925692A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and big data retrieval technology, specifically relating to an intelligent material selection system and method based on dual-engine hybrid retrieval. Background Technology
[0002] In the industrial manufacturing sector, the selection of complex materials such as electronic components heavily relies on two types of data: one is structured parameter information stored in relational databases, including precise values such as model number, voltage, and capacitive load; the other is technical description information stored in unstructured documents such as PDF datasheets and application notes, including semantic descriptions such as power consumption characteristics, light emission methods, and packaging forms. Traditional material selection systems typically employ either a single database search or a full-text search. The former can only perform precise numerical matching but cannot understand ambiguous semantic requirements, while the latter can only perform text matching based on keywords and cannot handle queries for precise parameter ranges. This forces engineers to repeatedly switch between multiple systems during the selection process, resulting in low search efficiency and an easy oversight of high-quality materials that meet the requirements.
[0003] The prior art patent CN115455249B discloses a dual-engine driven multimodal data retrieval method, device, and system. This technical solution uses multimodal data as input, constructs a semantic tag library and a unified feature space, and uses a cross-modal semantic tag retrieval engine and a cross-modal feature vector retrieval engine to complete data queries that meet the retrieval conditions in the multimodal database. However, this prior art is aimed at general multimodal data retrieval scenarios. Its dual-engine division of labor is based on the type of retrieval technology rather than the constraint features of the query content. It does not involve the intent recognition and constraint type decomposition of the user's natural language query, nor does it specifically adapt to the industry characteristics of the severe separation between structured parameters and unstructured documents in the material selection field. Therefore, it cannot simultaneously take into account accurate parameter matching and fuzzy semantic understanding in a single query, and it is difficult to solve the technical problem of data silos and semantic missingness in complex material selection. Summary of the Invention
[0004] Existing material selection systems cannot simultaneously handle precise parameter matching and fuzzy semantic understanding in a single query. Structured database searches can only perform precise numerical matching and cannot understand semantic descriptions such as "low power consumption"; full-text search engines can only match text based on keywords and cannot handle queries with precise numerical ranges such as "voltage withstand greater than 600V"; while a single RAG system can understand semantics, it is prone to illusions or inaccurate recall when faced with precise numerical requirements. The separation of structured parameters and unstructured documents creates data silos, requiring engineers to switch repeatedly between multiple systems, resulting in low selection efficiency and the potential to miss high-quality materials.
[0005] To address the aforementioned technical problems, the present invention provides the following technical solution: an intelligent material selection system based on dual-engine hybrid retrieval, comprising an intelligent routing module, a dual-engine retrieval module, and a result fusion module. The intelligent routing module receives user natural language queries, identifies and extracts numerical and logical hard constraints and descriptive semantic soft constraints, and generates routing instructions which are output to the dual-engine retrieval module. The dual-engine retrieval module receives the routing instructions and performs parallel retrieval. The structured retrieval engine maps hard constraints to a database schema to generate SQL for exact matching and obtains material codes, while the unstructured retrieval engine performs semantic retrieval of soft constraints in a pre-built vector knowledge base to obtain document fragments. The dual-engine retrieval module outputs the material codes and document fragments to the result fusion module. The result fusion module associates and binds the material codes and document fragments, removes duplicates, and generates a material selection suggestion list.
[0006] Specifically, the structured search engine calls the large language model to generate initial SQL. A Python node then uses regular expressions to extract a clean SELECT statement, which is then transmitted to the model context protocol interface for secure query execution. The structured search engine configures the model context protocol service, encapsulating database connection, authentication, and SQL execution into standardized tool call interfaces. The large language model obtains the raw data results by calling these standardized tool call interfaces.
[0007] Specifically, the unstructured retrieval engine calls the document parser to perform layout analysis on the electronic component specifications to extract text and table content. The extracted content is then converted into vector data through an embedding model and stored in a vector knowledge base. Based on soft-constraint semantic vectors, the engine retrieves the most similar document fragments from the vector knowledge base.
[0008] Specifically, the results fusion module uses the material code returned by the structured search engine as the primary key to retrieve the corresponding technical specifications from unstructured document fragments, performs deduplication on duplicate material records, and generates a rich text selection report by comprehensively sorting them according to parameter matching degree and semantic similarity.
[0009] This invention also provides an intelligent material selection method based on dual-engine hybrid retrieval, comprising the following steps: S1 receives the user's natural language query, identifies and extracts the numerical and logical hard constraints and the descriptive semantic soft constraints, and generates routing instructions to distribute to the structured search engine and the unstructured search engine respectively. S2, the structured retrieval engine receives hard constraints, maps the database schema, generates SQL, executes precise matching to obtain material codes, and the unstructured retrieval engine receives soft constraints, performs semantic retrieval in a pre-built vector knowledge base to obtain document fragments; S3 associates and binds material codes with document fragments to remove duplicates, generating a comprehensive result set containing basic parameters and technical specifications.
[0010] Specifically, in step S2, the structured search engine uses the model context protocol to call the database tool to execute the cleaned SQL query and obtain the material code and attribute value that meet the precise parameter requirements.
[0011] Specifically, in step S1, the large language model performs intent recognition on the query statement according to the preset classification rules. Query content containing numerical ranges or logical conditions is identified as hard constraints, while requirement content that does not contain precise numerical conditions and relies on semantic understanding is identified as soft constraints. Routing instructions are generated and distributed to the corresponding search engines respectively.
[0012] Specifically, in step S2, the unstructured retrieval engine calls the document parser to perform layout analysis on the electronic component specification sheet to extract text and table content. The extracted content is then converted into vector data and stored in the vector knowledge base through an embedding model. Based on the semantic vectors of soft constraints, the engine retrieves the document fragments with the highest similarity in the vector knowledge base.
[0013] Specifically, in step S3, the material codes in the bill of materials are used as indexes to traverse the document fragments returned by the unstructured search engine. The successfully matched material attribute values are concatenated with the document fragments to form rich text data blocks. The data is then sorted by a weighted average of parameter matching degree and semantic similarity, and a comprehensive result set combining text and images is output.
[0014] The beneficial effects of this invention are as follows: By using a large language model, user natural language queries are automatically decomposed into hard constraints and soft constraints, and routed to structured retrieval engines and unstructured retrieval engines respectively. This enables SQL exact matching and vector semantic retrieval to be executed in parallel and the results to be fused. This achieves cross-modal joint retrieval of structured parameters and unstructured documents, ensuring zero-error matching of exact parameters and uncovering potential materials that conform to semantic descriptions. This significantly improves the accuracy and efficiency of complex material selection. At the same time, by encapsulating database operations into standardized tool call interfaces through the model context protocol, the system security and scalability are ensured. Attached Figure Description
[0015] Figure 1 This is a system block diagram of the present invention.
[0016] Figure 2 This is a flowchart of the method of the present invention. Detailed Implementation
[0017] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0018] Example 1: This example provides an intelligent material selection system based on dual-engine hybrid retrieval, such as... Figure 1 As shown, the system deployment architecture includes a front-end interaction module, an intelligent routing module, a dual-engine retrieval module, and a result fusion module.
[0019] The front-end interaction module provides users with a web interface or API, through which engineers can input natural language query requests. For example, an engineer might input, "I want to select a low-power LED that is side-emitting and has a red / green dual-color configuration. What are some recommended options in the library?" The front-end interaction module then transmits this natural language query request to the intelligent routing module.
[0020] The intelligent routing module integrates a large language model, responsible for intent recognition and semantic decomposition of the input text. The system identifies "LED," "side-emitting," and "red / emerald green dual-color" in the query as hard constraints, and "low power consumption" as a soft constraint. Hard constraints are quantifiable, precise numerical or logical conditions in the user's natural language query; these conditions are suitable for precise matching in relational databases using structured query languages. Soft constraints are semantically descriptive, fuzzy requirements in the user's query; these requirements are difficult to express with precise numerical values and require similarity matching through semantic retrieval technology. After recognition, the intelligent routing module generates corresponding routing instructions, outputting hard constraint routing instructions to the structured retrieval engine and soft constraint routing instructions to the unstructured retrieval engine.
[0021] The dual-engine retrieval module includes a structured retrieval engine and an unstructured retrieval engine. The structured retrieval engine, built on the AI application development platform, receives hard-constraint routing instructions and calls a large language model to generate initial SQL. The large language model is assigned the role of a "database expert proficient in SQL," strictly limiting its query functionality to predefined material data tables. The query logic priority is defined as prioritizing filtering by functional description fields, characteristic parameter fields, and category name fields. The output format standard mandates that all newline characters be removed from the generated SQL statement, compressing it into a single line of text. The large language model automatically maps the database schema, generating standard SQL statements. Subsequently, the system uses Python nodes and regular expressions to accurately extract clean SELECT statements from the text generated by the large language model. The MCP (Model Context Protocol) service is configured and enabled in the AI application development platform. This service encapsulates a series of underlying logics, such as database connection, authentication, SQL execution, and result return, into standardized tool call interfaces. The Python node transmits the cleaned SELECT statement to the MCP interface. After receiving the statement, the MCP server performs authentication and permission verification. Once it confirms that the statement only operates on the predefined material data table and is a SELECT query, it executes the query in the relational database, retrieves the raw data results, and returns a list of material codes.
[0022] The unstructured retrieval engine is built on an AI knowledge base and receives soft-constraint routing instructions. The engine first uses a document parser to perform OCR and layout analysis on electronic component datasheets, extracting text and table content. The original PDF datasheets contain a large amount of unstructured information, such as power consumption characteristics, light emission methods, and packaging diagrams. Layout analysis technology can accurately identify titles, paragraphs, tables, and image areas in the document, extracting the table content into structured text data. Subsequently, an embedding model is used to convert the extracted content into vector data and store it in a vector knowledge base. The embedding model maps text fragments to high-dimensional semantic vectors, ensuring that semantically similar texts are close in distance in the vector space. Based on the semantic vectors of the soft constraints, the system retrieves the most similar document fragments from the vector knowledge base. For example, for the soft constraint of "low power consumption," the system generates a corresponding semantic vector, calculates the cosine similarity in the vector knowledge base, and returns the top few most similar document fragments.
[0023] The results fusion module receives a list of material codes returned by the structured search engine and document fragments returned by the unstructured search engine. Using the material codes returned by the structured search engine as the primary key, the module retrieves the corresponding technical specifications from the unstructured document fragments. If the structured search returns the material code for Galaxy Optoelectronics S2106JHMRGT-002, the module searches for the corresponding PDF datasheet fragment in the document fragments, extracting its forward voltage (VF) parameter, power consumption characteristics, and package diagram. Duplicate material records are deduplicated; when both structured and unstructured searches return the same material, only one record is retained, and the attribute information from both sources is merged. A rich text selection report is generated by comprehensively sorting the results based on parameter matching and semantic similarity. Parameter matching reflects the degree to which material parameters conform to user hard constraints, while semantic similarity reflects the semantic closeness between the material's technical documents and user soft constraints. The final report is presented to the user in the form of a highlighted summary, structured tables, or a combination of text and graphics.
[0024] This embodiment also provides an intelligent material selection method based on dual-engine hybrid retrieval, such as... Figure 2 As shown, it includes the following steps: S1 receives user natural language queries, identifies and extracts hard constraints (numerical and logical conditions) and soft constraints (descriptive semantics), and generates routing instructions to distribute to the structured and unstructured search engines, respectively. The large language model performs intent recognition on the query statements according to preset classification rules, identifying queries containing numerical ranges or logical conditions as hard constraints. For example, "withstand voltage 600V" contains the value 600V and the logical condition "equal to," and "input voltage greater than 5V" contains the value 5V and the logical condition "greater than." Requirements that do not contain precise numerical conditions and rely on semantic understanding are identified as soft constraints. For example, "low power consumption" does not contain any quantifiable current or power values, and "high reliability" does not contain any quantifiable lifetime or failure rate values. These requirements rely on semantic understanding for similarity matching. After identification, routing instructions are generated and distributed to the corresponding search engines.
[0025] S2: The structured retrieval engine receives hard-constraint mappings to the database schema, generates SQL, and performs exact matching to obtain material codes. The unstructured retrieval engine receives soft constraints and performs semantic retrieval in a pre-built vector knowledge base to obtain document fragments. The structured retrieval engine uses a model context protocol to call database tools to execute cleaned SQL queries, obtaining material codes and attribute values that meet the precise parameter requirements. The unstructured retrieval engine calls a document parser to perform layout analysis on electronic component specifications to extract text and table content. Through an embedding model, the extracted content is converted into vector data and stored in a vector knowledge base. Based on the semantic vectors of soft constraints, the engine retrieves the most similar document fragments from the vector knowledge base.
[0026] S3 associates and binds material codes with document fragments to remove duplicates, generating a comprehensive result set containing basic parameters and technical specifications. Using the material code in the bill of materials as an index, it traverses the document fragments returned by the unstructured search engine, concatenating the successfully matched material attribute values with the document fragments into a rich text data block. For example, material code S2106JHMRGT-002 is concatenated with document fragments extracted from its PDF specification, such as "Side Chip, side-emitting type, red / emerald green dual-color, forward voltage VF: red light 1.8V to 2.4V, emerald green light 2.8V to 3.7V," into a single rich text data block. The results are then sorted by a weighted average of parameter matching and semantic similarity, outputting a comprehensive result set combining text and images.
[0027] Example 2: This example improves upon Example 1 in terms of prompt word generation rules and the secure execution of the Model Context Protocol. Example 1 has provided a general description of the process by which the structured search engine generates SQL through a large language model and executes the query via the MCP service. This example details the design of prompt word generation rules for material selection, as well as the specific configuration and security verification mechanism of the MCP service, using a power supply material selection scenario as an example to illustrate the complete technical chain.
[0028] The engineer inputs a natural language query request through the API interface of the front-end interaction module: "A power module with a maximum capacitive load of 2200μF and an input current of approximately 600mA needs to be selected." The front-end interaction module transmits this request to the intelligent routing module. The intelligent routing module's large language model performs intent recognition on the query statement, identifying "maximum capacitive load 2200μF" as a hard constraint containing the numerical value 2200μF and the logical condition "equal to," and "input current approximately 600mA" as a hard constraint containing the numerical value 600mA and the logical condition "approximately equal to." This query does not contain vague descriptions that rely on semantic understanding; soft constraints are either empty or only contain default general requirements such as "high reliability." After recognition, the intelligent routing module generates corresponding routing instructions and outputs the hard constraint routing instructions to the structured retrieval engine.
[0029] After receiving the hard-constraint routing instructions, the structured search engine initiates the execution of the workflow built on the AI application development platform. The large language model generates initial SQL based on the prompt word generation rules for material selection. The specific configuration of the prompt word generation rules includes the following four dimensions of technical constraints: First, role setting rules. The prompt word template explicitly assigns the model the role of "a database expert proficient in SQL". This setting injects professional domain database operation paradigms into the system prompt words, enabling the large language model to automatically follow SQL syntax specifications when generating code, avoiding the generation of inefficient or incorrect query logic.
[0030] Second, data source constraint rules. The prompt word template strictly limits the model to querying data only from the predefined power module material data table. Specifically, the table structure information of the power module material data table is predefined in the system context, including fields such as material number, material name, functional description, characteristic parameters, and category name, and explicitly instructs the model not to access system tables or other unauthorized data tables. Through this constraint, the SQL statements generated by the large language model will not attempt to access system tables or other unauthorized data tables, eliminating the risk of unauthorized data access at the source.
[0031] Third, query logic priority rules. The prompt word template specifies that the logical priority of SQL generation is to prioritize filtering by the function description field, characteristic parameter field, and category name field. For example, when the query contains "maximum capacitive load 2200μF", it will first match "maximum capacitive load" in the "characteristic parameter" field, and then verify the "power module" category in the "function description" field. This priority setting improves the query recall and execution efficiency.
[0032] Fourth, output formatting rules. The prompt word template mandates that all newline characters be removed from the SQL statements generated by the large language model, compressing them into a single line of text output. Furthermore, the output must be a SELECT query statement; generating INSERT, UPDATE, DELETE, or other data modification statements is prohibited. Large language models often use Markdown formatting tags and line breaks / indentation in natural language interactions; mandatory compression into a single line prevents escaping errors or truncation during subsequent transmission and API parsing.
[0033] The large language model automatically maps the schema of the power module material database to generate standard SQL statements. For example, the generated SQL statement might be: query the power module material table for records with a maximum capacitive load of 2200μF and an output current close to 600mA. The system uses Python nodes to accurately extract clean SELECT statements from the text generated by the large language model using regular expressions. Specifically, the regular expression matching pattern is designed to accurately extract clean query statements that begin with the keyword "SELECT" and end with a semicolon from a text. This matching pattern can recognize the standard SELECT query statement structure, including SELECT clauses, FROM clauses, optional WHERE clauses, ORDER BY clauses, and LIMIT clauses, while ignoring descriptive text, comments, or extra spaces and line breaks that may be present in the content generated by the large language model. The Python node uses this regular expression to extract clean SELECT statements from the complete text content generated by the large language model, removing redundant descriptive text before and after, ensuring that the instructions passed to the underlying database are absolutely clean executable code.
[0034] Configure and enable the MCP service in the AI application development platform. This service encapsulates a series of underlying logic, such as database connection strings, authentication credentials, SQL execution permissions, and result return formats, into standardized tool call interfaces. Specific configurations for the MCP service include: configuring database connection parameters, including the database address, port number, and database name; configuring authentication credentials, including encrypted storage of the username and password; and configuring the SQL execution timeout. After the MCP service starts, it exposes a set of standardized tool call interfaces. Large language models or other nodes in the workflow can perform database operations by calling these standardized tool call interfaces without directly accessing the database connection credentials or the underlying database driver.
[0035] The Python node transmits the extracted clean SELECT statement to the MCP interface. The MCP server first performs a security check on the SELECT statement, checking for operations that may pose security risks, such as deletion, update, or table structure modification. After confirmation, the MCP service establishes a connection with the relational database using pre-configured database connection parameters, completing authentication and permission checks, such as verifying whether the current session has read-only permissions, and executing the query in a secure environment. In this embodiment, the structured search engine returns the material code closest to the requirement as FK3-05S05EK, and extracts its core parameters: input voltage range of 4.5V to 9VDC, output voltage and current of 5V / 600mA, maximum capacitive load of 2200μF, and full-load input current of 801mA. The output current of 5V / 600mA matches the user's output requirements, the maximum capacitive load of 2200μF perfectly matches the user's hard constraints, and the full-load input current of 801mA differs from the user's 600mA requirement; the system notes this difference in the report for the user to confirm its acceptability.
[0036] Example 3: This example improves upon Example 1 in terms of the selection of optical characteristics for electronic components and the cross-modal fusion fault-tolerant mechanism. Example 1 has provided a general description of the process by which the unstructured retrieval engine obtains document fragments through document parsing and vector retrieval, and then associates and binds the results through the fusion module. This example uses a practical case of LED characteristic material selection to elaborate in detail on the deep parsing of unstructured documents, the construction process of the vector knowledge base, and the refined cross-modal fusion logic.
[0037] An engineer inputs a natural language query request through the web interface of the front-end interaction module: "I want to select a low-power LED, requiring side emission and red / green dual-color. What recommendations are available?" The front-end interaction module transmits this request to the intelligent routing module. The intelligent routing module's large language model performs intent recognition on the query, identifying "LED" as a hard constraint for the category name, "side emission" as a hard constraint for the packaging form, and "red / green dual-color" as a hard constraint for the emission color. "Red / green dual-color" is stored in the database as a color code, which the system converts into color field matching logic in the SQL query conditions. "Low power consumption" does not contain any quantifiable current or power values and belongs to a descriptive requirement that relies on semantic understanding; the model identifies it as a soft constraint. After recognition, the intelligent routing module generates corresponding routing instructions, outputting the hard constraint routing instructions to the structured search engine and the soft constraint routing instructions to the unstructured search engine.
[0038] After receiving the hard-constraint routing instructions, the structured retrieval engine initiates the execution of the workflow built on the AI application development platform. The large language model is assigned the role of a "database expert proficient in SQL," with strict data source constraints limiting queries to a predefined LED material data table. The query logic priority is defined as: first filtering by the category name field ("LED"), then by the packaging form field ("Side Chip"), and finally by the emission color field ("Red and Emerald Green"). The large language model automatically maps the LED material database schema, generating standard SQL statements. For example, the generated SQL statement might be: "Query records from the LED material table whose packaging form is equal to 'Side Chip' and whose emission color includes both red and emerald green." The system uses Python nodes and regular expressions to precisely extract clean SELECT statements from the text generated by the large language model, removing all newline characters and compressing it into a single line of text. The cleaned SQL statement is then transmitted to the database for execution via the MCP service to obtain a list of material codes that meet the criteria. In this embodiment, the material code list returned by the structured search engine includes records such as Galaxy Optoelectronics S2106JHMRGT-002 and Everlight 17-223 / R6G6C-D30 / 3C.
[0039] After receiving the "low power" soft constraint routing instruction, the unstructured retrieval engine begins execution of a workflow built on an AI knowledge base. The engine first uses a document parser to perform OCR and layout analysis on the LED electronic component specifications, extracting text and table content. The original PDF specifications contain unstructured information such as power consumption characteristics, luminous efficiency curves, and thermal resistance parameter tables. Layout analysis technology identifies parameter table areas in the document, extracting structured table content such as luminous flux parameters under operating current conditions. An embedding model is then used to convert the extracted content into vector data and store it in a vector knowledge base. An embedding model is a deep learning model that maps text to a high-dimensional vector space, enabling semantically similar text to similar positions in the vector space. The system vectorizes each text fragment extracted during the document parsing stage, generating fixed-dimensional floating-point vectors. All vector data, along with their corresponding original text fragments and metadata (such as the source PDF filename, page number, and material code), are stored in the vector database. Simultaneously, an efficient vector index structure is constructed to support subsequent efficient similarity retrieval.
[0040] Based on the semantic vector of "low power consumption," the system retrieves the document fragments with the highest similarity from the vector knowledge base. The system calculates the cosine similarity between the query vector and each vector in the knowledge base. Cosine similarity is calculated by taking the dot product of the two vectors and dividing by the product of their magnitudes; the closer the result is to 1, the more semantically similar the two vectors are. The system sorts all document fragments in descending order of cosine similarity and returns the document fragments with the highest similarity. For example, it returns document fragments most closely related to the semantics of "low power consumption," such as descriptions like "This device adopts a low-current drive design, with a typical low operating current" and "Optimized chip structure reduces forward voltage drop, resulting in significantly lower overall power consumption compared to conventional products."
[0041] The results fusion module uses the material code returned by the structured search engine as the primary key to search the metadata of unstructured document fragments. If the metadata of a document fragment contains the material code, a match is successful, and the matching material attribute values are concatenated with the document fragment to form a rich text data block. If the metadata of a document fragment does not contain the material code, i.e., a match is unsuccessful, the unmatched item is marked with "structured data source only" and retained in the result set, rather than being directly removed. This processing method ensures that even if some materials do not have corresponding descriptions in unstructured documents, they will not be missed by the system.
[0042] For the Galaxy Optoelectronics S2106JHMRGT-002, the system extracted its key parameters: the device was identified as a side-chip emission type, with characteristics perfectly meeting the requirements for red / emerald green dual-color emission, and a forward voltage VF of 1.8V to 2.4V for red light and 2.8V to 3.7V for emerald green light. For the Everlight 17-223 / R6G6C-D30 / 3C, the system similarly extracted its parameters: this device is a side-chip emission type with red / yellow-green dual-color emission. The system intelligently identified that the "yellow-green" color is relatively close to the user's required "emerald green" color spectrum, and the forward voltage VF is 1.55V to 2.15V, providing the user with a potentially more cost-effective or supply-competitive alternative.
[0043] The result fusion module performs deduplication on the same material returned by the two searches. Deduplication is based on the material code; if two records have the same material code, only one is retained, and the information from both records is merged into the retained record. After deduplication, the system performs a comprehensive ranking based on a weighted value of parameter matching and semantic similarity. Specifically, for each record, a weighted value of its parameter matching score and semantic similarity score is calculated. The parameter matching score is calculated based on the degree of matching of hard constraints in the structured search engine; the more accurate the hard constraint matching, the higher the score. The semantic similarity score is determined based on the cosine similarity value returned by the unstructured search engine; the higher the cosine similarity, the higher the score. The parameter matching score and semantic similarity score are multiplied by their respective weight coefficients and then summed to obtain the comprehensive ranking score. Higher weight coefficients are assigned to structured parameter matching, and lower weight coefficients are assigned to semantic similarity. The system sorts the result set from high to low according to the comprehensive ranking score, and finally generates a comprehensive result set combining text and images in rich text format, including material model, key parameter tables, specification summaries, etc.
Claims
1. An intelligent material selection system based on dual-engine hybrid retrieval, characterized in that, It includes an intelligent routing module, which receives user natural language queries, identifies and extracts numerical and logical hard constraints and descriptive semantic soft constraints, and generates routing instructions to be output to the dual-engine retrieval module. The dual-engine retrieval module receives routing instructions and performs parallel retrieval. The structured retrieval engine maps hard constraints to a database schema to generate SQL and performs exact matching to obtain material codes. The unstructured retrieval engine performs semantic retrieval of soft constraints in a pre-built vector knowledge base to obtain document fragments. The dual-engine retrieval module outputs material codes and document fragments to the result fusion module. The result fusion module associates and binds material codes and document fragments to remove duplicates and generates a list of material selection suggestions.
2. The intelligent material selection system based on dual-engine hybrid retrieval according to claim 1, characterized in that, The structured search engine calls the large language model to generate initial SQL, uses regular expressions through Python nodes to extract clean SELECT statements, and then transmits the clean SELECT statements to the model context protocol interface to execute a secure query.
3. The intelligent material selection system based on dual-engine hybrid retrieval according to claim 1 or 2, characterized in that, The structured search engine configuration model context protocol service encapsulates database connection, authentication, and SQL execution into standardized tool call interfaces. The large language model obtains the raw data results by calling the standardized tool call interfaces.
4. The intelligent material selection system based on dual-engine hybrid retrieval according to claim 1, characterized in that, The unstructured retrieval engine calls the document parser to perform layout analysis on the electronic component specifications to extract text and table content. The extracted content is then converted into vector data and stored in a vector knowledge base through an embedding model. Based on soft-constraint semantic vectors, the engine retrieves the document fragments with the highest similarity in the vector knowledge base.
5. The intelligent material selection system based on dual-engine hybrid retrieval according to claim 1, characterized in that, The results fusion module uses the material code returned by the structured search engine as the primary key to retrieve the corresponding technical specifications from unstructured document fragments, performs deduplication on duplicate material records, and generates a rich text selection report by comprehensively sorting them according to parameter matching degree and semantic similarity.
6. A smart material selection method based on dual-engine hybrid retrieval, characterized in that, Includes the following steps: S1 receives the user's natural language query, identifies and extracts the numerical and logical hard constraints and the descriptive semantic soft constraints, and generates routing instructions to distribute to the structured search engine and the unstructured search engine respectively. S2, the structured retrieval engine receives hard constraints, maps the database schema, generates SQL, executes precise matching to obtain material codes, and the unstructured retrieval engine receives soft constraints, performs semantic retrieval in a pre-built vector knowledge base to obtain document fragments; S3 associates and binds material codes with document fragments to remove duplicates, generating a comprehensive result set containing basic parameters and technical specifications.
7. The intelligent material selection method based on dual-engine hybrid retrieval according to claim 6, characterized in that, In step S2, the structured search engine uses the model context protocol to call the database tool to execute cleaned SQL queries and obtain material codes and attribute values that meet the requirements of accurate parameters.
8. The intelligent material selection method based on dual-engine hybrid retrieval according to claim 6, characterized in that, In step S1, the large language model identifies the intent of the query statement according to the preset classification rules. Query content containing numerical ranges or logical conditions is identified as hard constraints, while requirement content that does not contain precise numerical conditions and relies on semantic understanding is identified as soft constraints. Routing instructions are generated and distributed to the corresponding search engines.
9. The intelligent material selection method based on dual-engine hybrid retrieval according to claim 6, characterized in that, In step S2, the unstructured retrieval engine calls the document parser to perform layout analysis on the electronic component specification sheet to extract text and table content. The extracted content is then converted into vector data and stored in the vector knowledge base through an embedding model. Based on the semantic vectors with soft constraints, the engine retrieves the document fragments with the highest similarity in the vector knowledge base.
10. The intelligent material selection method based on dual-engine hybrid retrieval according to claim 6, characterized in that, In step S3, the material codes in the bill of materials are used as indexes to traverse the document fragments returned by the unstructured retrieval engine. The successfully matched material attribute values are concatenated with the document fragments to form rich text data blocks. The data is then sorted by a weighted average of parameter matching degree and semantic similarity, and a comprehensive result set combining text and images is output.
Citation Information
Patent Citations
Dual-engine driven multi-modal data retrieval method, device and system
CN115455249B