An intelligent selection method and device for industrial instruments based on RAG and expert system

By employing a collaborative approach between RAG and expert systems, along with hierarchical parameter models and a two-stage matching algorithm, the problem of parameter combination explosion in industrial instrument selection was solved. This enabled an efficient and accurate selection experience and made expert-level services accessible to everyone, while reducing the user threshold and storage costs.

CN121233637BActive Publication Date: 2026-02-24ZORAN TIANGONG AUTOMATION INSTR (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511799566.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-02-24
Estimated Expiration
2045-12-02

AI Technical Summary

Technical Problem

Existing industrial instrument selection methods suffer from parameter combination explosion, resulting in high storage and retrieval costs. Furthermore, traditional expert selection methods are inefficient, costly, and cannot be scaled up, leading to a poor user experience and making it difficult for non-professional users to select instruments accurately.

Method used

By adopting a collaborative approach between RAG and expert systems, an expert knowledge base is constructed through hierarchical parameter models, two-stage matching, natural language interaction, and rule verification. This enables exponential compression of parameter combinations and provides a conversational selection experience.

Benefits of technology

It reduces database storage capacity and computational complexity, improves selection accuracy and efficiency, enables non-professional users to achieve professional-level selection capabilities, enhances user experience and selection accuracy, and makes expert knowledge accessible to everyone and provides 24/7 online service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121233637B_ABST
    Figure CN121233637B_ABST
Patent Text Reader

Abstract

The application provides an intelligent selection method and device for industrial instruments based on RAG and expert system, and belongs to the technical field of cross between artificial intelligence and industrial automation. L instrument parameters with K selectable items for each parameter are divided into a core parameter set with M (M<=6) parameters and an attribute parameter set with N (N=L-M) parameters, the core parameter set defines a basic model, and dynamic binding of the basic model stored in a table structure and attribute parameters stored in a dictionary structure is realized; a user inquires about a parameter question in a natural language, RAG generates accurate parameter suggestions based on expert knowledge, an expert system verifies parameter accuracy and cross-parameter compatibility in real time, and provides correction suggestions when conflicts occur. The selection process is two-stage matching: a bitmap index locks the basic model corresponding to the core parameter, and a hash lookup verifies the attribute parameter. The instrument selection method provided by the application obtains not only the instrument itself, but also a solution meeting application requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of interdisciplinary technology of artificial intelligence and industrial automation, specifically to a method and device for intelligent selection of industrial instruments based on the collaboration of retrieval-enhanced generation (RAG) and expert systems. Background Technology

[0002] In the field of industrial automation, industrial instruments are the core of process control systems. The accuracy of their selection and / or their applicability to the field directly determine the measurement accuracy, safety and reliability, and subsequent maintenance costs.

[0003] The task of industrial instrument selection is to ensure that the instruments can operate effectively under the process conditions and various possible special requirements of the application scenario. Therefore, industrial instrument selection is not only about choosing the instruments themselves, but also about selecting accessories or components that ensure the instruments can perform normally—that is, obtaining a solution from the manufacturer / supplier regarding the instrument's application requirements. The essence of industrial instrument selection is achieving a proper alignment between instrument performance and the required usage conditions.

[0004] Existing selection methods can be broadly categorized into two types: 1. Relational database retrieval based on a limited number of SKUs (Store Keeping Units). This method typically pre-stores various performance parameters of the product in a structured data format resembling a two-dimensional matrix in a relational database. During the selection process, the powerful retrieval function of the relational database is used to match parameters based on the user's selection parameters. A characteristic of this type of selection system is that the system's backend manages an enumerable number of physically existing instrument product SKUs. 2. Instrument feature parameter filtering method. The basic characteristic of this method is that it typically presents instrument performance parameters to the user in the form of a parameter list, requiring the user to select parameters manually.

[0005] The above two types of industrial instrument selection methods are widely used on various industrial e-commerce platforms and manufacturers' own online selection and sales systems.

[0006] In summary, the basic model of existing methods is for sellers to demonstrate / introduce the main performance parameters of their products to potential customers, that is, to sell products to potential customers rather than help them obtain solutions for their product application needs.

[0007] Ignoring the fact that existing industrial instrument selection methods are limited to product sales / promotion, traditional instrument selection methods heavily rely on experienced instrument experts. These experts, leveraging their profound professional knowledge and rich practical experience, engage in in-depth communication with users to understand specific application scenarios, process conditions, and special requirements, aligning their understanding of application needs with their knowledge of instrument performance. For example, with pressure gauges, if the space for installation is limited, the expert will choose a smaller surface diameter parameter value. Similarly, based on different usage conditions, the expert selects different pressure gauge performance parameters and their values ​​("parameter: parameter value" pairs) to match the appropriate gauge. For example: measured pressure type: gauge pressure; pressure sensing element: Bourdon tube; pressure gauge range: 1.6; surface diameter: 60, etc., thus recommending the most suitable pressure gauge. However, this expert-driven model has significant limitations. On the one hand, expert knowledge and experience are difficult to replicate and scale; their service time and energy are limited, making it impossible to meet the large volume of real-time selection needs, especially 24 / 7 service. On the other hand, training a qualified instrumentation expert requires a long period and high costs, resulting in a scarcity of expert resources and high service costs.

[0008] The aforementioned experts determined various "parameter:parameter value" pairs for the pressure gauge based on the various usage conditions that constitute an application scenario. From the manufacturer's management perspective, this is a pressure gauge model. Since each performance parameter has different selectable values ​​(for example, the pressure gauge range can be 1 MPa, 1.6 MPa, etc.), the information listing the pressure gauge models and their parameter values ​​is what is known as the manufacturer's product datasheet. From a knowledge engineering perspective, the pressure gauge parameter configuration, in which experts select parameter values ​​for the performance parameters corresponding to the various usage conditions that constitute a specific application scenario, is a case representation of expert knowledge.

[0009] If solutions or product models recommended by experts for all possible operating conditions are stored in a computer knowledge base, then theoretically, users only need to provide a selection parameter table that precisely meets the requirements of one of the operating conditions. The system can then use a matching algorithm to find the corresponding instrument model from the knowledge base, which is the solution that meets the application requirements of that instrument.

[0010] However, in practice, the performance or applicability of an industrial instrument is typically described by dozens of technical parameters, each containing multiple options. If the number of usage conditions constituting an application scenario is L, and the upper limit of the number of possible values ​​for each parameter is K, then obviously, the larger the values ​​of L and K, the higher the dimensionality of the parameters, and the more detailed the description of the usage conditions of the application scenario, the higher the field applicability or selection accuracy of the selected instrument. Since a different value for just one of the L parameters results in a different application scenario, the case representation of expert knowledge also becomes different case representations. According to the multiplication theorem, the number of application scenarios that L and K can represent is G = K^L. Typically, K <= 10 and L >= 20 are fundamental conditions for instrument selection. When K and L take their upper and lower limits respectively, G = 10^20, the so-called parameter combination explosion problem, whose storage and retrieval costs are unacceptable for the selection system.

[0011] To avoid parameter combination explosion, low-dimensional parameter modeling is a technical approach used by existing selection systems characterized by managing a limited number of SKUs to address the storage problem of available instrument models. As the foregoing discussion clearly shows, the cost of low-dimensional parameter modeling is reduced selection accuracy.

[0012] Therefore, how to effectively manage and store the massive number of instrument models caused by the explosion of high-dimensional parameter combinations without sacrificing the accuracy of selection has become a technical problem that urgently needs to be solved.

[0013] Furthermore, existing online selection systems typically present parameters to users in the form of a list, requiring users to manually select options. This approach is extremely unfriendly to ordinary users or non-engineering professionals who lack specialized knowledge. Users often do not understand the technical implications of each parameter and its impact on instrument performance, leading to confusion during the selection process and difficulty in making accurate decisions independently, resulting in frequent selection errors.

[0014] In summary, existing technologies suffer from the following shortcomings: First, traditional expert selection methods are inefficient, costly, and cannot be scaled up; second, computer-based expert systems face the challenge of parameter explosion when building knowledge bases; and third, existing selection tools lack effective guidance for non-expert users, resulting in poor user experience and low selection accuracy. Therefore, the market urgently needs a new type of intelligent selection system that can solve the problem of storing and managing massive numbers of models due to parameter explosion, and empower non-expert users through intelligent human-computer interaction, enabling them to easily and accurately complete expert-level instrument selection. Summary of the Invention

[0015] The purpose of this invention is to provide an intelligent selection method and device for industrial instruments that integrates RAG and expert systems. By combining hierarchical parameter models, two-stage matching, natural language interaction, and rule verification, it addresses the shortcomings of existing technologies and achieves: exponential compression of parameter combinations; a conversational selection experience for ordinary users; and efficient and accurate matching with millisecond-level response.

[0016] The technical problem to be solved by the present invention is achieved through the following technical solution.

[0017] This invention proposes a method for intelligent selection of industrial instruments through collaboration between RAG and expert systems, comprising the following steps:

[0018] An expert knowledge base for a hierarchical parameter model of an instrument is constructed. This hierarchical parameter model has L total parameters, which are hierarchically divided into a core parameter set with M core parameters and an attribute parameter set with N attribute parameters. Where L... 20,M 6, N=LM;

[0019] The core parameter set defines a basic instrument model, and the attribute parameter set defines optional parameters associated with the basic instrument model; each of the L parameters has K possible values; the basic instrument model is stored in a table structure, and each record contains a unique identifier; the attribute parameters are stored in a dictionary of parameter-parameter value pairs.

[0020] Users interact with the RAG system through a graphical interface, allowing them to select a parameter value from the available options for L parameters based on their on-site usage requirements. This generates a user selection parameter table that meets the requirements of the application scenario. The level of detail in the application scenario requirements is measured by the number of selection parameters, L = M + N.

[0021] The interaction process includes: the user queries the selection parameters in natural language; the system receives the natural language question input by the user; the system uses the retrieval enhancement generation unit to retrieve relevant knowledge from the expert knowledge base; and the system combines the natural language question with the relevant knowledge to generate a natural language response to assist the user in making a selection.

[0022] Perform a two-phase matching process, which consists of a first phase and a second phase:

[0023] The first stage involves using a bitmap index to perform a full match of M core parameters on the instrument basic model table based on the user selection parameter table, in order to filter out one or more candidate basic instrument models; and

[0024] The second stage involves performing a hash lookup verification on the N attribute parameters of the candidate basic instrument models to determine and output the final instrument model.

[0025] Furthermore, the step of responding to the user's natural language parameter query specifically includes:

[0026] The knowledge documents in the expert knowledge base are pre-vectorized using the BGE-m3 vectorization model and stored in a vector database;

[0027] The user's natural language question is converted into a question vector using the same vectorization model;

[0028] The similarity search is performed on the question vector in the vector database to obtain relevant knowledge fragments.

[0029] The relevant knowledge fragments and the natural language question are input into a large language model (LLM) to generate the natural language response.

[0030] Furthermore, the interactive process of determining the selection parameters also includes one or a combination of the following steps:

[0031] When the user selects any selection parameter value, the system performs real-time verification of the accuracy and compatibility with other parameters based on preset production rules and provides feedback.

[0032] After the user selection parameter table is generated, a comprehensive verification is performed on the compatibility between the parameter values ​​in the table.

[0033] Furthermore, the step of constructing the expert knowledge base also includes: loading the definition documents, usage instructions, industry standards, or expert knowledge documents of the instrument parameters into the expert knowledge base for retrieval by the Retrieval Enhancement Generation (RAG) technology.

[0034] Another aspect of this invention proposes an intelligent selection system for industrial instruments that integrates RAG (Radar Access Registry) and expert systems, comprising:

[0035] The expert knowledge base module stores a pre-defined set of instrument parameter models. Each instrument parameter model has L total parameters, which are hierarchically divided into a core parameter set with M core parameters and an attribute parameter set with N attribute parameters. Where L... 20,M 6, N=LM; The core parameter set defines a basic instrument model, and the attribute parameter set defines optional parameters associated with the basic instrument model; the number of optional values ​​for each of the L parameters is K; the basic instrument model is stored in a table structure, and each record contains a unique identifier; the attribute parameters are stored in a dictionary of parameter-parameter value pairs.

[0036] The interactive requirements gathering module is configured for:

[0037] A graphical user interface is provided, through which users interact with the RAG system, enabling them to select a parameter value from the available options for L parameters based on the on-site usage requirements, thereby generating a user selection parameter table that meets the usage requirements of the application scenario; the level of detail of the usage requirements of the application scenario is measured by the number of selection parameters L=M+N.

[0038] as well as

[0039] In response to a natural language query input by the user on the user interface for any parameter, the system invokes the retrieval enhancement generation unit to retrieve knowledge related to the natural language question from the expert knowledge base, and combines the question with the knowledge to generate a natural language response to be fed back to the user.

[0040] The two-stage matching module is configured for:

[0041] Receive the user selection parameter table;

[0042] The user selection parameter table is applied to a bitmap index for core parameter matching. The bitmap index uses fixed-length binary code to encode the core parameters, quickly identifying one or more candidate base instrument models.

[0043] The candidate basic instrument models are verified by performing attribute parameter verification through hash lookup. The attribute hash table uses the instrument basic model identifier as the key and the attribute dictionary in JSON format as the value. Consistent hashing is used to ensure efficient retrieval, so as to determine and output the final instrument model.

[0044] Furthermore, the Retrieval Enhancement Generation (RAG) unit in the interactive demand acquisition module includes:

[0045] A vectorization model is used to convert the user's natural language question and the knowledge in the expert knowledge base into question vectors and knowledge vectors, respectively.

[0046] A vector database is used to store the knowledge vectors;

[0047] The Large Language Model (LLM) is used to receive relevant knowledge obtained through similarity retrieval from the vector database and combine it with the natural language question to generate the natural language response.

[0048] Furthermore, it also includes: a parameter verification module, configured to perform real-time verification based on preset production rules when the user selects a parameter value, and / or, after the user selection parameter table is generated, to perform comprehensive verification of the compatibility between all parameter values ​​in the table.

[0049] Furthermore, the expert knowledge base also stores definition documents, usage instructions, industry standards, or expert knowledge documents for instrument parameters, and the Retrieval Enhancement Generation (RAG) unit retrieves relevant knowledge from these documents.

[0050] A third aspect of the present invention provides an electronic device comprising:

[0051] A processor, and a memory communicatively connected to the processor;

[0052] The memory stores computer program instructions;

[0053] When the processor executes the computer program instructions stored in the memory, it implements the method described in any of the preceding descriptions.

[0054] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any of the preceding claims.

[0055] Compared with the prior art, the technical solution provided by the present invention has the following significant advantages:

[0056] This solves the irreconcilable contradiction between parameter combination explosion and accurate selection: by using high-dimensional (L... The instrument parameters are creatively stratified into M The invention uses a "core parameter set" consisting of 10 parameters and an "attribute parameter set" consisting of N=LM parameters. It only needs to store approximately g=10^6 basic models and their optional attribute parameter sets to cover models ranging from G=10^L. The complete instrument model generated from 10^20 potential combinations reduces database storage capacity to less than or equal to 1 / 10^14 of the original required capacity. It also reduces computational complexity, making it possible to build an expert knowledge base for storing high-dimensional parameter model sets to support high-precision instrument selection.

[0057] Significantly lowering the barrier to entry for users: This invention integrates advanced Retrieval Enhanced Generation (RAG) technology, transforming the complex parameter selection process into an intelligent question-and-answer interaction similar to a conversation with an expert. Non-professional users do not need to learn complex instrument knowledge beforehand; they can obtain instant and accurate answers by asking questions in natural language, thus enabling them to independently and confidently complete professional-level selection tasks, greatly improving user experience and selection accuracy.

[0058] It achieves efficient and accurate matching: Employing a two-stage matching algorithm of "bitmap index core parameter matching + hash lookup attribute parameter verification," it can achieve fast matching in a vast model database (overall response time). The system subtly and accurately identifies products that meet user needs. It first rapidly narrows the search range using core parameters, then conducts refined verification, balancing matching efficiency and accuracy to ensure the reliability of the selection results.

[0059] This invention enables the democratization of expert knowledge: It encapsulates and reproduces the tacit knowledge and experience of senior experts through a structured knowledge base and an intelligent interactive system, transforming scarce expert resources into 24 / 7 online intelligent services, and realizing the artificial intelligence and democratization of expert-level selection capabilities. Attached Figure Description

[0060] Figure 1 This is a flowchart of an intelligent selection method for industrial instruments that combines RAG and expert systems in one embodiment of the present invention;

[0061] Figure 2 This is a schematic diagram of the RAG system flow of the present invention;

[0062] Figure 3 This is a system flowchart of an industrial instrument intelligent selection method that combines RAG and expert system in one embodiment of the present invention;

[0063] Figure 4 This is a schematic diagram of the intelligent selection device for industrial instruments that integrates RAG and expert systems according to the present invention.

[0064] Figure 5 This is a module relationship diagram of the intelligent industrial instrument selection system provided in the embodiments of the present invention;

[0065] Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0066] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0067] It should be noted that the above detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0068] Figure 1 The flowchart illustrates a method for intelligent selection of industrial instruments that combines RAG and an expert system in one embodiment of the present invention.

[0069] In one embodiment, the method first performs step S101 of constructing and providing an expert knowledge base. To fundamentally solve the problem of "parameter combination explosion" caused by the large number of configurable parameters of instruments, this invention employs a parameter hierarchical method to construct instrument models. Specifically, the aforementioned expert knowledge base stores multiple instrument models, where the parameters of each instrument model are hierarchically divided into a core parameter set consisting of M parameters and an attribute parameter set consisting of N parameters. The core parameter set defines a basic instrument model, and the attribute parameter set defines optional parameters associated with the basic instrument model. The level of detail in the user selection requirements is measured by the number of selection parameters L = M + N, and the total number of instrument technical parameters is equal to the total number of user selection parameters.

[0070] Among them, L 20,M 6. N=LM; The range of M values ​​is set based on engineering trade-offs and optimizations under the triple constraints of the instrument's physical recognizability, production scheduling and management efficiency, and the response performance of the selection system. The core parameters of industrial instruments are essentially those parameters that have intuitive and significant identifiable characteristics during production and management. Taking pressure gauges as an example, the descriptions of "Bourdon tube pressure gauge with a surface diameter of 100 mm and made of stainless steel" and "Bourdon tube pressure gauge with a surface diameter of 60 mm and made of ferrous metal" clearly distinguish the two pressure gauges using only three core parameters. In actual production, arranging product production lines based on the aforementioned physical characteristic identification parameters, such as "stainless steel gauge production line" and "ferrous metal gauge production line," is an optimized and effective management measure for production management and component preparation. Furthermore, the larger the M value, the greater the memory and computational overhead required for the bitmap index, thus affecting the response speed of the two-stage matching. Therefore, this invention sets M... 6 represents the preferred range. Crucially, the constraint N=LM must be satisfied by the dimension N of the attribute parameter set, ensuring that the core parameter set plus the attribute parameter set covers all selection requirements for a total of L. This guarantees that the accuracy of the selection will not be affected by the value of the core parameter set dimension M.

[0071] Below is an example of a standard pressure gauge parameter model designated PG100.1, with L=23 parameters, and without parameter stratification:

[0072] {

[0073] Model_Name": "PG100.1",

[0074] Application Areas: Measurement and Control

[0075] "Varistorage element": "Bourdon tube"

[0076] Pressure type: "gauge pressure"

[0077] "Dial diameter": "100",

[0078] "Tested system pressure": "0.5",

[0079] Nominal range: "1",

[0080] Precision class: 1.6

[0081] Maximum permissible measurement error: 0.005

[0082] "Is it filled with liquid?": "No"

[0083] "Filling type": "None"

[0084] "Is the medium prone to crystallization?": "No",

[0085] "Is the medium viscous?": "No",

[0086] "Corrosive": "Yes",

[0087] "Ambient Temperature": "Room Temperature",

[0088] "Is a condenser coil required?": "No"

[0089] "Do you need a security setting?": "No",

[0090] "Cover Material": "Ordinary Glass"

[0091] "Casing Material": "Stainless Steel"

[0092] Material for wetted parts: Stainless steel

[0093] Is it a special gas?: No

[0094] "Connection Location": "Radial",

[0095] Connection method: Threaded

[0096] Thread size: M20

[0097] }

[0098] If the operating environment changes, for example, if the space is too small to accommodate a pressure gauge with a 100mm dial diameter, but can accommodate a pressure gauge with a 60mm dial diameter, then we can change the parameter value corresponding to the "dial diameter" in the above model to 60, and call this model with the new dial diameter parameter value a new model for distinction, such as PG60.1. Therefore, we need to record another computer-operable conventional pressure gauge parameter model with the same L=23 parameters:

[0099] {

[0100] Model_Name": "PG60.1",

[0101] Application Areas: Measurement and Control

[0102] "Varistorage element": "Bourdon tube"

[0103] Pressure type: "gauge pressure"

[0104] "Dial diameter": "60",

[0105] "Tested system pressure": "0.5",

[0106] Nominal range: "1",

[0107] Precision class: 1.6

[0108] Maximum permissible measurement error: 0.005

[0109] "Is it filled with liquid?": "No"

[0110] "Filling type": "None"

[0111] "Is the medium prone to crystallization?": "No",

[0112] "Is the medium viscous?": "No",

[0113] "Corrosive": "Yes",

[0114] "Ambient Temperature": "Room Temperature",

[0115] "Is a condenser coil required?": "No"

[0116] "Do you need a security setting?": "No",

[0117] "Cover Material": "Ordinary Glass"

[0118] "Casing Material": "Stainless Steel"

[0119] Material for wetted parts: Stainless steel

[0120] Is it a special gas?: No

[0121] "Connection Location": "Radial",

[0122] Connection method: Threaded

[0123] Thread size: M20

[0124] }

[0125] The change in the dial diameter parameter is to adapt to changes in the space of the operating environment. Similarly, experts can choose from the possible options (gauge pressure, differential pressure, absolute pressure, mixed pressure) based on the type of pressure being measured. Obviously, changing the pressure type parameter value again requires a new model with L=23 parameters to represent this difference. If each of the 23 parameters has K=4 possible values, then according to the multiplication theorem, 4^23 can be combined. 70 trillion different models.

[0126] Based on the aforementioned hierarchical parameter modeling method, five parameters—"Application Area," "Pressure Sensitive Element," "Pressure Type," "Dial Diameter," and "Accuracy Class"—are selected as the core parameters of the pressure gauge (M=5), and N=23-5=18 parameters are selected as attribute parameters. This results in a total of 4^5=1024 basic models. Below is an example of a hierarchical parameter model for a pressure gauge, represented in JSON format, with two basic models, "PG100.1" and "PG63.1," and their associated attribute parameters:

[0127] {

[0128] Model_Name": "PG100.1",

[0129] Application Areas: Measurement and Control

[0130] "Varistorage element": "Bourdon tube"

[0131] Pressure type: "gauge pressure"

[0132] "Dial diameter": "100",

[0133] Precision class: 1.6

[0134] },

[0135] {

[0136] Model_Name": "PG63.1",

[0137] Application Areas: Measurement and Control

[0138] "Varistorage element": "Bourdon tube"

[0139] Pressure type: "gauge pressure"

[0140] "Dial diameter": "63",

[0141] Precision class: 2.5

[0142] }

[0143] attribute_file = {

[0144] "Nominal range":{

[0145] "PG100.1": ["1", "2.5", "4", "6", "10", "25", "40"],

[0146] "PG63.1": ["1", "2.5", "4", "6", "10", "25", "40"]

[0147] },

[0148] "Whether it is filled with liquid":{

[0149] "PG100.1": ["Yes", "No"],

[0150] "PG63.1": ["Yes", "No"]

[0151] },

[0152] "Filling type": {

[0153] "PG100.1": ["None", "Glycerin", "Silicone Oil"],

[0154] "PG63.1": ["None", "Glycerin", "Silicone Oil"]

[0155] },

[0156] "Is the medium prone to crystallization?": {

[0157] “PG100.1”: [“No”, “Yes”],

[0158] “PG63.1”: [“No”, “Yes”]

[0159] },

[0160] "Is the medium viscous?": {

[0161] “PG100.1”: [“No”, “Yes”]

[0162] “PG63.1”: [“No”, “Yes”]

[0163] },

[0164] "Corrosive":{

[0165] "PG100.1": ["Yes", "No"],

[0166] "PG63.1": ["Yes", "No"]

[0167] },

[0168] "Casing Material": {

[0169] "PG100.1": ["304 stainless steel", "316L stainless steel", "ferrous metals"],

[0170] "PG100.1": ["304 stainless steel", "316L stainless steel", "ferrous metals"]

[0171] },

[0172] "Material of wetted parts": {

[0173] “PG100.1”: [“Copper”, “304 Stainless Steel”, “316L Stainless Steel”]

[0174] “PG63.1”: [“Copper”, “304 Stainless Steel”, “316L Stainless Steel”]

[0175] },

[0176] "Is the medium viscous?": {

[0177] “PG100.1”: [“No”, “Yes”]

[0178] “PG63.1”: [“No”, “Yes”]

[0179] },

[0180] "Whether it is filled with liquid":{

[0181] "PG100.1": ["Yes", "No"],

[0182] "PG63.1": ["Yes", "No"]

[0183] },

[0184] "Filling type": {

[0185] "PG100.1": ["None", "Glycerin", "Silicone Oil"]

[0186] "PG63.1": ["None", "Glycerin", "Silicone Oil"]

[0187] },

[0188] "Is the medium prone to crystallization?": {

[0189] “PG100.1”: [“No”, “Yes”],

[0190] “PG63.1”: [“No”, “Yes”]

[0191] },

[0192] "Is it a special gas?": {

[0193] “PG100.1”: [“No”, “Oxygen”, “Ammonia”, “Nitrogen”],

[0194] “PG63.1”: [“No”, “Oxygen”, “Ammonia”, “Nitrogen”]

[0195] },

[0196] "Connection location":{

[0197] "PG100.1": [“Radial”, “Axial”, “Eccentric Axial”],

[0198] "PG63.1": ["Radial", "Axial", "Eccentric Axial"]

[0199] },

[0200] "Connection method": {

[0201] "PG100.1": [“thread”, “flange”, “diaphragm”],

[0202] "PG63.1": [“Threaded”, “Flange”, “Diaphragm”]

[0203] },

[0204] "Thread size": {

[0205] “PG100.1”: [“M20”, “1 / 2NPT“, “1 / 4NPT”],

[0206] “PG63.1”: [“M20”, “1 / 2NPT“, “1 / 4NPT”]

[0207] }

[0208] }

[0209] PG100.1 and PG63.1 are identifiers for two basic models. In this way, the system does not need to store approximately 70 trillion complete models; instead, it only needs to store 1024 basic instrument models and their respective lists of supported optional attributes. This allows for selection of approximately 70 trillion models, significantly reducing storage and computational complexity. It should be noted that the number of optional values ​​K=4 for each parameter is strictly speaking the average of the number of optional values ​​for the 23 parameters, as the number of optional values ​​for each parameter is different. For example, the "nominal range" of the Bourdon tube pressure gauge has a total of 26 optional values. For the sake of discussion, the JSON document consisting of "basic model" and "attribute parameters" does not list all the optional values ​​for each attribute parameter.

[0210] To enable subsequent enhanced retrieval generation functions, the step of constructing and providing an expert knowledge base also includes loading unstructured or semi-structured documents such as definition documents of instrument parameters and their options, usage instructions, industry standards, expert knowledge, or historical cases into the expert knowledge base. In addition to being used to fine-tune the LLM in advance, this domain expert knowledge is also pre-vectorized and stored in a vector knowledge base for subsequent retrieval using RAG technology.

[0211] Subsequently, the system executes step S102, which involves interaction with the user through a user interface, to generate a user selection parameter table containing the user's selection requirements. In one specific embodiment, the system provides a Web UI interface that presents various parameters required to define the instrument model to the user in the form of a questionnaire or form for selection. During the interaction, the system can also perform parameter verification. As one possible implementation, when the user selects any parameter value, the system can perform real-time verification based on preset production rules and provide feedback. For example, when the user is unsure of the pressure gauge's "nominal range," they can input the "maximum system pressure" they need to measure. The system's internal production rules (such as "the nominal range should be greater than or equal to 1.5 times the maximum system pressure and rounded up to the standard specification") will be triggered, automatically calculating and recommending a suitable nominal range value to the user. As another example, if the user selects a corrosive medium and their chosen "casing material" is a non-corrosive "ferrous metal," the system will display a prompt and provide expert advice, such as "stainless steel." Optionally, after the user selection parameter table is generated, the system can also perform a comprehensive verification of the compatibility between the parameter values ​​in the table to ensure that the final submitted parameter combination is consistent and feasible in terms of technical specifications.

[0212] During the aforementioned interaction, the system also executes a step to respond to the user's natural language parameter query. When a user has questions about the definition, impact, or selection considerations of a parameter, they can input a natural language question at any time through the RAG system entry on the user interface. This step specifically includes the following process: First, the system uses a vectorization model to convert the user's natural language question (e.g., "What are the advantages of a liquid filling pressure gauge?") into a question vector. Typically, the system has pre-vectorized the knowledge documents in the expert knowledge base using a vectorization model (in this embodiment, the vectorization model is the BGE-M3 model) and stores the generated knowledge vectors in a vector database (e.g., ChromaDB). Next, the system performs a similarity retrieval (e.g., cosine similarity calculation, threshold) based on the question vector in the vector database. The system uses a 0.8-bit algorithm to retrieve several knowledge fragments most relevant to the question. Finally, these relevant knowledge fragments are used as context, combined with the user's original natural language question, to form a prompt. This prompt is then input into a Large Language Model (LLM), which generates a logically coherent and fact-based natural language response. This response is then fed back to the user through the user interface, effectively assisting the user in selecting parameters. The aforementioned Large Language Model can be selected from domestic open-source models such as DeepSeek, ChatGLM, and Qwen.

[0213] After the user confirms and submits the selection parameter table, the core parameters and attribute parameters are separated from the selection parameter table, and the system executes a two-stage matching process S103. When separating the core parameters and attribute parameters from the selection parameter table, the system first iterates through the list of core parameter names for the product (in this example, "Application Area," "Pressure Sensitive Element," "Pressure Type," "Dial Diameter," and "Accuracy Class" for the pressure gauge). In the selection parameter table, these core parameters are separated from the attribute parameter selection requirements. Specifically: an attribute parameter selection requirement dictionary (variable_params) is created, initially containing a copy of the selection parameter table. Then, a core parameter selection requirement dictionary (core_params) is created, initially empty, to store the separated core parameters. For each core parameter defined in the attribute file, if the selection requirements include that parameter, it is removed from variable_params and added to core_params. The two-stage matching process first performs core parameter matching. At this stage, the system compares the core parameters in the user's selection parameter table with the core parameter sets of each basic instrument model stored in the expert knowledge base. The goal is to select one or more candidate basic instrument models whose core parameter values ​​completely match the user's selection. Subsequently, for each selected candidate basic instrument model, the system performs attribute parameter verification. At this stage, the system checks whether each attribute parameter value in the user's selection parameter table exists in the list of possible values ​​defined in the attribute parameter set corresponding to that candidate basic instrument model. Only when all attribute parameters of a candidate basic instrument model pass verification will the system combine it with the attribute parameters selected by the user, determine and output the final instrument model, completing the entire intelligent selection process.

[0214] In one specific embodiment, the step of matching user selection parameters with model parameters can be implemented using an optimized algorithm combination. Considering that the constraints and compatibility issues between parameters have already been handled by the pre-processed expert system verification logic during the user interaction phase, the subsequent matching process can be simplified to a series of deterministic equality checks. Based on this premise, this embodiment employs efficient data structures and query algorithms for the different characteristics of core parameters and attribute parameters.

[0215] For matching core parameters, bitmap indexing can be used. The average time complexity of this step can be optimized to O(M), where M is the number of core parameters; its space complexity is O(M×V), where V is the average cardinality of the core parameters. For verifying attribute parameters, hash lookup can be used. Thanks to the near O(1) constant-time lookup characteristic of hash tables, the average time complexity of this step can be optimized to O(N), where N is the number of attribute parameters; its space complexity is O(N×P), where P is the average cardinality of the attribute parameters.

[0216] In a performance test instance based on a specific hardware environment (e.g., an i7-13700 processor and 32GB of RAM), when the core model library reaches a size of hundreds of thousands, the system using the above optimization algorithm exhibits the following technical effects: the system response time is approximately 1.3 microseconds (μs), compared to the original O(N)... The M) traversal matching algorithm improves performance by approximately 23,000 times; the system throughput can exceed 4 million queries per second (4M QPS); the memory footprint for indexing is approximately 2.7MB, plus the approximately 200MB of storage space required for the actual model files; furthermore, the algorithm supports linear expansion and can effectively support a model library of millions of users.

[0217] This embodiment significantly reduces the computational complexity of the selection and matching process by adopting an optimization algorithm based on the hierarchical representation of instrument model parameters, combined with bitmap indexing and hash lookup techniques. It transforms the theoretical infeasibility caused by the explosion of parameter combinations into a practically feasible technical solution in industrial applications, thereby ensuring that the system can provide end users with a real-time and smooth selection experience.

[0218] The schematic diagram of the RAG system of the present invention is as follows: Figure 2 As shown. The RAG system of this invention is developed based on the LangChain architecture. LangChain is a framework for developing applications driven by large language models. Developers use various tools and components provided by the LangChain framework to connect LLMs and external data. For the construction of the RAG system, the core code implements the following main functions:

[0219] 1. Loading Domain Expert Knowledge Documents: Expert knowledge in the industrial instrumentation field is characterized by its multi-source heterogeneity. The purpose of loading expert knowledge documents is to uniformly convert documents of different formats into Document objects containing text content and metadata, providing standardized input for subsequent processing.

[0220] The LangChain framework offers a rich set of document data loader options. For example, by building a mapping between file extensions and loaders, the DirectoryLoader in the LangChain framework can be used to load mixed-format (Word, TXT, PDF, CSV) documents in the same folder.

[0221] 2. Text Chunking: The amount of text data in the domain knowledge base being retrieved often far exceeds the input length that LLM can accept. Therefore, it is necessary to perform reasonable text chunking. The purpose is to compress external knowledge into searchable units through text chunking without exceeding the input length limit of LLM. Similarly, the LangChain framework also provides rich ways to implement text chunking functionality.

[0222] For example, recursive segmentation: text is recursively broken down into semantic units (paragraphs / sentences) by repeatedly applying segmentation rules. That is, during segmentation, it can first be segmented based on paragraph newline characters (\n\n). Then, the size of these blocks is checked; if the block size does not exceed a certain threshold, the block is retained. For blocks exceeding the threshold, a single newline character (\n) can be used for further segmentation. This process continues, continuously updating smaller segmentation rules (such as spaces, periods) based on the block size. This method allows for flexible adjustment of block size. For instance, densely packed information sections of text may require finer segmentation to capture details, while smaller blocks can be used for less information-rich sections.

[0223] 3. Text Vectorization After Segmentation: The essence of text vectorization is to transform unstructured text data into numerical vector forms that can be processed by computers. Text vectorization methods are mainly divided into two categories: traditional statistical methods and deep learning embedding methods. Considering the diversity of knowledge text sizes in industrial instrumentation (e.g., simple question-and-answer pairs, technical reports, research papers, or monographs) and the need for cross-language applications, we adopt the BGE-M3 embedding model, a typical representative of deep learning embedding methods.

[0224] 4. Vector Storage: Use a vector database (such as ChromaDB) to store text blocks and their corresponding vectors, and build an efficient index to support subsequent fast similarity searches. Approximate nearest neighbor algorithms such as HSW (Hierarchical Navigable SmallWorld) are typically used to optimize query speed.

[0225] 5. User Query Vectorization: The same BGE-M3 model used in the text chunking vectorization process is used to convert user queries into vectors, ensuring that the query and document chunks are similar to each other in the same vector space for similarity calculation.

[0226] 6: Similarity retrieval: Calculate the cosine similarity between the query vector and the stored vector, and return the Top-K (usually 3-5) most relevant text blocks, that is, filter out the knowledge fragments most relevant to the question, which serve as the context referenced by the LLM when generating answers to user questions.

[0227] 7. Construct a Prompt Template: Insert the text block retrieved in step 6 as context into the LLM prompt template. The format is usually: "Based on the following information: {context}, answer: {query}". This serves as an accurate reference for the LLM, reducing the illusion of generative answers and enhancing professionalism.

[0228] 8: LLM Generative Response: The locally deployed LLM generates a coherent and accurate response based on the Prompt from step 7. In other words, after comprehensively understanding the user's intent and the retrieved content, the LLM generates and outputs a natural language response that conforms to domain knowledge.

[0229] Figure 3 This diagram shows a system flowchart of an intelligent industrial instrument selection method that integrates RAG and an expert system, according to one embodiment of the present invention. See below for reference. Figure 3 An exemplary application process is described in detail.

[0230] In one specific embodiment, the method begins by acquiring the user's selection of all L possible values ​​for a single instrument selection parameter via a Web UI. During this interaction, if the user has questions about the meaning of any selection parameter or how to choose its possible value, a sub-process for intelligent Q&A with the RAG-LLM system can be initiated via a hyperlink to the RAG entry point on the Web UI. This sub-process receives the user's natural language question about the selection parameter and generates a RAG answer to explain and clarify it to the user. Multiple rounds of Q&A can be conducted for the same selection parameter if necessary, until the user resolves their doubts and makes a selection for that parameter on the Web UI, after which the selection of all other parameters can proceed.

[0231] Once the user inputs or selects parameters, the process enters a step of verifying instrument parameters using an expert system. In this step, the system can perform real-time verification of the parameters submitted by the user based on preset expert rules, and feed back the verification results to the Web UI in the form of answers or suggestions, thus forming a closed loop that allows users to iteratively modify the selected parameters.

[0232] After the user completes the selection of all parameters and the parameters undergo compatibility verification using preset expert rules, the system provides an option for the user to ask further questions. If the user chooses to ask questions, the process will again invoke the RAG-LLM system. In this case, the output of the RAG-LLM system, along with the user's original questions, will be displayed together with the selection parameter table verified by the system for compatibility, allowing the user to review the selected L parameters again before submitting the selection parameter table to the system. Optionally, in another embodiment, the user's interaction data with RAG-LLM (including questions, extracted context, and RAG answers) is stored in a temporary database. After data cleaning and other necessary processing, it can be used to update the domain knowledge base or as high-quality corpus for fine-tuning the Large Language Model (LLM), thereby achieving system self-optimization and continuous learning.

[0233] Subsequently, the expert system's inference engine will perform product model matching and selection operations based on the selection parameter table submitted by the user after final review.

[0234] Finally, after the inference engine completes the matching and selection, the system will generate a selection report as the final output, thus completing the entire intelligent selection process.

[0235] This invention also provides an intelligent selection device for industrial instruments that integrates RAG and expert systems, such as... Figure 4 As shown. In a specific embodiment, the device 400 may include: an expert knowledge base module 401, an interactive requirements acquisition module 402, and a two-stage matching module 403.

[0236] The expert knowledge base module 401 is the data and knowledge storage medium of the device, and its function is to store a preset set of instrument models for selection and matching. In one embodiment, the above-mentioned instrument model set is divided into two subsets;

[0237] The system comprises a basic instrument model set, consisting of multiple basic models uniquely determined by different combinations of M core parameters, each corresponding to a basic model identifier. An attribute parameter set associated with the basic model identifier contains N non-core parameters, each with a corresponding set of optional values. A complete pressure gauge model is defined by the basic model identifier and a specific value selected from each set of optional values ​​in the attribute parameter set. The sum of M and N is the total number of technical parameters L describing the pressure gauge model. The total number of technical parameters is equal to the total number of user-selected parameters. Furthermore, the expert knowledge base module stores definition documents, usage instructions, industry standards, and expert knowledge documents for the instrument parameters. These documents serve as the source for knowledge retrieval by the subsequent Retrieval Enhancement Generation (RAG) unit.

[0238] The interactive requirement acquisition module 402 serves as the interface for interaction between the device and the user. Its configuration provides a user interface for the user to select from the core parameters and attribute parameters, thereby generating a user selection parameter table. A key function of this module is responding to natural language questions input by the user on the user interface, specifically regarding any parameter. Upon receiving such a question, the module can invoke a locally deployed Search Enhancement Generation (RAG) unit either through an integrated API or via a hyperlink. The RAG unit retrieves knowledge related to the user's question from the expert knowledge base module, generates a natural language response based on the question, and ultimately provides feedback to the user through the user interface. In a specific embodiment, the RAG unit may further include: a vectorization model for converting the user's natural language question and the knowledge in the expert knowledge base into question vectors and knowledge vectors, respectively; a vector database for storing the knowledge vectors for efficient retrieval; and a Large Language Model (LLM) that receives relevant knowledge obtained through similarity retrieval from the vector database, combines it with the user's natural language question, and ultimately generates the natural language response.

[0239] Optionally, the device may also include a parameter verification module. This module can work in conjunction with the interactive requirements acquisition module, and its configuration is used to perform real-time verification based on preset production rules (e.g., "IF Corrosivity = THEN Pressure Gauge Material = Stainless Steel") when the user selects a parameter value. Optionally, the parameter verification module is also configured to perform a comprehensive verification of the compatibility between all parameter values ​​in the user selection parameter table after the user submits a complete user selection parameter table, to ensure the effectiveness of the final solution.

[0240] Below is an example of the final submitted selection parameter table:

[0241] Application Areas: Measurement and Control

[0242] "Varistorage element": "Bourdon tube"

[0243] Pressure type: "Gauge pressure"

[0244] "Dial diameter": "60",

[0245] "Tested system pressure": "0.5"

[0246] "Nominal range": "1"

[0247] "Precision class": "1.6"

[0248] Maximum permissible measurement error: 0.005

[0249] "Is liquid filling required?": "No"

[0250] "Filling type": "None"

[0251] "Is the medium prone to crystallization?": "No"

[0252] Is the medium viscous?: No

[0253] "Corrosive": "Yes"

[0254] "Ambient temperature": "Room temperature"

[0255] "Is a condenser coil required?": "No"

[0256] "Do you need a security feature?": "No"

[0257] "Crystal Material": "Jintong Glass"

[0258] "Outer shell material": "Stainless steel"

[0259] Material of wetted parts: Stainless steel

[0260] Is it a special gas?: "No"

[0261] "Connection Location": "Radial"

[0262] Connection method: "Threaded"

[0263] Thread size: M20

[0264] The two-stage matching module 403 is the core inference unit of the expert system in the device. It is configured to receive a user selection parameter table generated by the interactive requirements acquisition module. Upon receiving the table, the module first separates the core parameters and attribute parameters from the selection parameter table, and then performs a first-stage core parameter matching using bitmap indexing. This involves rigorously comparing the core parameters in the user selection parameter table with the core parameter set in the expert knowledge base module to filter out one or more candidate basic instrument models. Next, the module performs a second-stage attribute parameter verification using hash lookup. For each candidate basic instrument model, it verifies whether all attribute parameters in the user selection parameter table are supported by the attribute parameter set corresponding to that model. Finally, the module outputs the final instrument model that passes the two-stage verification.

[0265] Figure 5This is a more detailed module diagram of the intelligent industrial instrument selection system provided in a specific embodiment of the present invention. Specifically, the system aims to realize the functions of an interactive requirements acquisition module, an expert knowledge base module, and a two-stage matching module. In this embodiment, the interactive requirements acquisition module is the core of realizing intelligent human-computer interaction, and it mainly consists of a Web UI, an API interface, and a search-enhanced generation (RAG) unit.

[0266] The Web UI is the front-end graphical interface through which users interact with the system. Users can use the Web UI to browse the instrument parameters required for selection, choose parameter values, and enter questions in natural language when they encounter any issues.

[0267] As a standardized data channel connecting the front-end Web UI and the back-end system, the API interface is responsible for reliably receiving various requests from the Web UI (such as user-selected parameter values, submitted natural language questions, etc.), accurately forwarding them to the corresponding back-end service modules for processing, and returning the processing results of the back-end modules (such as parameter validation information, RAG-generated answers, etc.) to the Web UI for presentation.

[0268] The key to this interactive requirements gathering module lies in its built-in Retrieval Enhanced Generation (RAG) unit, which empowers the system to understand and answer users' natural language questions at an expert level. For example... Figure 5 As shown, the RAG unit specifically includes:

[0269] Domain knowledge base: As a collection of professional knowledge, it centrally stores a massive amount of multi-source, heterogeneous expert knowledge documents, such as detailed definitions and explanations of various technical parameters of instruments, national or industry design specifications, and summaries of field application experience from senior instrument experts. These documents constitute the original basis for generating accurate answers for users.

[0270] Vectorization model: This is a deep learning model responsible for performing semantic vectorization of text. Specifically, it converts unstructured text knowledge from the domain knowledge base, as well as natural language questions input by the user, into high-dimensional vectors that enable the computer to perform semantic understanding and similarity comparison.

[0271] Vector database: This is a database specifically designed for storing and efficiently retrieving high-dimensional vectors. All knowledge vectors generated by the domain knowledge base are stored here, thus constructing a semantic knowledge index that can be retrieved quickly.

[0272] Large Language Model (LLM): This is the core of natural language answer generation. The model receives the user's original question and combines it with the most semantically relevant knowledge context fragments retrieved from a vector database based on the question. Based on this comprehensive information, it generates a logically coherent, accurate, and easy-to-understand natural language answer.

[0273] In this embodiment, the expert system is the core carrying the business logic of the present invention, and its internal functional entities correspond to the expert knowledge base module and the two-stage matching module. The expert system integrates a structured expert knowledge base and an inference engine. The knowledge base is constructed according to the parameter decoupling scheme of the present invention, while the inference engine is responsible for performing real-time parameter verification and, after the user completes their selection, invoking an efficient two-stage matching algorithm, and finally generating a professional selection report. The following is an example of a final pressure gauge selection report obtained after two-stage matching based on the selection parameter table of the above example:

[0274] Pressure Gauge Selection Report

[0275] Matching / Recommended Model: PG60.1

[0276] Complete Model Parameter Table

[0277] 1. Application areas: Measurement and control

[0278] 2. Varistor: Bourdon tube

[0279] 3. Pressure type: Gauge pressure

[0280] 4. Dial diameter: 60mm

[0281] 5. Accuracy class: 1.6

[0282] 6. Pressure of the system under test: 0.5 MPa

[0283] 7. Nominal range: 1MPa

[0284] 8. Maximum permissible measurement error: 0.005MPa

[0285] 9. Filling with liquid: No

[0286] 10. Filling type: None

[0287] 11. Is the medium prone to crystallization? No

[0288] 12. Is the medium viscous? No

[0289] 13. Corrosive: Yes

[0290] 14. Ambient temperature: Room temperature

[0291] 15. Is a condenser coil required? No

[0292] 16. Is a security feature required? No

[0293] 17. Crystal material: Ordinary glass

[0294] 18. Casing material: Stainless steel

[0295] 19. Material of wetted parts: Stainless steel

[0296] 20. Is it a special gas: No

[0297] 21. Connection position: radial

[0298] 22. Connection method: Threaded

[0299] 23. Thread size: M20

[0300] In addition, this system may include a temporary database to cache temporary user action data during a single user interaction session, such as parameter values ​​that the user has selected but not yet submitted. This temporary database also stores all user-initiated questions and the generative answers provided by RAG. This saved data, after undergoing processes such as cleaning and annotation, will serve as new expert knowledge for subsequent LLM fine-tuning and vector knowledge base updates.

[0301] Combination Figure 5 The data stream shown in this embodiment illustrates the following exemplary workflow for handling user natural language issues:

[0302] When a user submits a question through the Web UI, the question is passed to the backend RAG unit via the API. First, the vectorization model converts the question into a question vector. Then, the system uses this question vector to perform an efficient similarity search in the vector database to find the most semantically relevant knowledge context fragments. Finally, the user's original question and these retrieved knowledge contexts are fed into the Large Language Model (LLM). After fully understanding the question and background knowledge, the LLM generates the final natural language answer, which is then returned to the Web UI via the API and presented to the user in real time. Notably, interactive data such as user questions and system responses can also be collected to continuously fine-tune the Large Language Model (LLM), thereby constantly optimizing the accuracy and professionalism of its responses.

[0303] Figure 6 This diagram illustrates the hardware structure of an electronic device 600 according to an embodiment of the present invention. The electronic device 600 may be a server or the like. The electronic device 600 includes a processor 601, a memory 602, and a communication interface (not shown) connected via a bus 603.

[0304] Memory 602 is used to store computer program instructions. Memory 602 can be high-speed RAM or non-volatile memory, such as at least one disk storage device.

[0305] The processor 601 is used to execute computer program instructions stored in the memory 602 to implement the various steps described in any of the above method embodiments. The processor 601 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or other programmable logic device.

[0306] Those skilled in the art will understand that the present invention also provides a computer-readable storage medium on which a computer program stored is executed by a processor to implement the steps of the above-described method embodiments. This storage medium may be a ROM, RAM, a magnetic disk, or an optical disk, etc.

[0307] In the detailed description above, reference has been made to the accompanying drawings, which form part of this document. In the drawings, similar symbols typically identify similar parts unless the context otherwise indicates otherwise. The illustrated embodiments described in the detailed specification, drawings, and claims are not intended to be limiting. Specific software / model names are used only to illustrate one possible implementation of the invention and are not intended to limit the scope of the invention. Other embodiments may be used and other changes may be made without departing from the spirit or scope of the subject matter presented herein.

[0308] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for intelligent selection of industrial instruments through collaboration between RAG and expert systems, characterized in that, Includes the following steps: An expert knowledge base for a hierarchical parameter model of an instrument is constructed. This hierarchical parameter model has L total parameters, which are hierarchically divided into a core parameter set with M core parameters and an attribute parameter set with N attribute parameters, where L ≥ 20, M ≤ 6, and N = LM. The core parameter set defines a basic instrument model, and the attribute parameter set defines optional parameters associated with the basic instrument model; the number of optional values ​​for each of the L parameters is K≤10; the basic instrument model is stored in a table structure, and each record contains a unique identifier; the attribute parameters are stored in a dictionary of parameter-parameter value pairs. Users interact with the RAG system through a graphical interface, allowing them to select a parameter value from the available options for L parameters based on their on-site usage requirements. This generates a user selection parameter table that meets the requirements of the application scenario. The level of detail in the application scenario requirements is measured by the number of selection parameters, L = M + N. The interaction includes: the user queries the selection parameters in natural language; the system receives the natural language question input by the user; the system uses the retrieval enhancement generation unit to retrieve relevant knowledge from the expert knowledge base; and the system combines the natural language question with the relevant knowledge to generate a natural language response to assist the user in making a selection. Perform a two-phase matching process, which consists of a first phase and a second phase: The first stage involves using a bitmap index to perform a full match of M core parameters on the instrument base model table based on the user selection parameter table, in order to filter out one or more candidate base instrument models; and The second stage involves performing a hash lookup verification on the N attribute parameters of the candidate basic instrument models to determine and output the final instrument model.

2. The method according to claim 1, characterized in that, The steps for users to query selection parameters in natural language specifically include: The knowledge documents in the expert knowledge base are pre-vectorized using the BGE-m3 vectorization model and stored in a vector database; The user's natural language question is converted into a question vector using the same vectorization model; The similarity search is performed on the question vector in the vector database to obtain relevant knowledge fragments. The relevant knowledge fragments and the natural language question are input together into a large language model to generate a natural language response to the natural language question.

3. The method according to claim 1 or 2, characterized in that, The interaction process also includes one or a combination of the following steps: When the user selects any parameter value, the system performs real-time validation based on preset production rules and provides feedback. After the user selection parameter table is generated, a comprehensive verification is performed on the compatibility between the parameter values ​​in the table.

4. The method according to claim 1, characterized in that, The step of constructing the expert knowledge base for the hierarchical parameter model of the instrument further includes: loading the definition documents, usage methods, industry standards or expert knowledge documents of the instrument parameters into the expert knowledge base for retrieval by the retrieval enhancement generation unit.

5. An intelligent selection device for industrial instruments that integrates RAG and expert systems, characterized in that, include: The expert knowledge base module stores a set of preset instrument parameter models. Each instrument parameter model has L total parameters, which are hierarchically divided into a core parameter set with M core parameters and an attribute parameter set with N attribute parameters, where L ≥ 20, M ≤ 6, and N = LM. The core parameter set defines a basic instrument model, and the attribute parameter set defines optional parameters associated with the basic instrument model. Each of the L parameters has K possible values. The basic instrument model is stored in a table structure, with each record containing a unique identifier. The attribute parameters are stored in a dictionary format of parameter-parameter value pairs. The interactive requirements gathering module is configured for: A graphical user interface is provided, through which users interact with the RAG system. Users can select a parameter value from the available options for L parameters based on the on-site usage requirements, thereby generating a user selection parameter table that meets the usage requirements of the application scenario. The level of detail of the usage requirements of the application scenario is measured by the number of selection parameters L=M+N. as well as In response to a natural language question input by the user on the user interface for any parameter, the system invokes the retrieval enhancement generation unit to retrieve knowledge related to the natural language question from the expert knowledge base, and combines the question with the knowledge to generate a natural language response to be fed back to the user. The two-stage matching module is configured for: Receive the user selection parameter table; The user selection parameter table is applied to a bitmap index for core parameter matching. The bitmap index uses fixed-length binary code to encode the core parameters, quickly identifying one or more candidate base instrument models. The candidate basic instrument models are verified by performing attribute parameter verification through hash lookup. The attribute hash table used for hash lookup adopts the key of the basic instrument model identifier and the value of the attribute dictionary in JSON format. Consistent hashing is used to ensure efficient retrieval, so as to determine and output the final instrument model.

6. The apparatus according to claim 5, characterized in that, The search enhancement generation unit in the interactive demand acquisition module includes: A vectorization model is used to convert the user's natural language question and the knowledge in the expert knowledge base into question vectors and knowledge vectors, respectively. A vector database is used to store the knowledge vectors; A large language model is used to receive relevant knowledge obtained through similarity retrieval from the vector database, and combine it with the natural language question to generate the natural language response.

7. The apparatus according to claim 5 or 6, characterized in that, Also includes: The parameter verification module is configured to perform real-time verification based on preset production rules when the user selects a parameter value, and / or to perform comprehensive verification of the compatibility between all parameter values ​​in the user selection parameter table after the table is generated.

8. The apparatus according to claim 5, characterized in that, The expert knowledge base also stores definition documents, usage instructions, industry standards, or expert knowledge documents for instrument parameters, and the retrieval enhancement generation unit retrieves relevant knowledge from the above documents.

9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer program instructions; When the processor executes the computer program instructions stored in the memory, it implements the method as described in any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Thermal control instrument automatic type selection analysis method, device and equipment

    CN117236896A

  • Shield intelligent auxiliary type selection system and method based on large language model

    CN120597882A