A method for constructing an intelligent question and answer system based on a lightweight large model
By constructing a lightweight scenario adaptation model using a lightweight BERT model and adapter parameter blocks, the system addresses the issues of insufficient understanding of business indicator relationships and real-time performance in vertical domain intelligent question answering systems, achieving efficient business knowledge representation and interpretable analysis.
Patent Information
- Application Number
- CN202511153021.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-08-18
AI Technical Summary
Traditional intelligent question-answering systems based on large models suffer from insufficient understanding of the deep correlation between business metrics and low real-time reasoning efficiency in professional question-answering scenarios in vertical fields.
A lightweight BERT model is used for vector encoding to generate a structured semantic graph. A lightweight scene adaptation model is built through adapter parameter blocks. The structured multimodal response is obtained by combining real-time data interfaces. The follow-up question strategy engine is used for in-depth analysis to generate a deep question answering report.
It enables structured representation and interpretable reasoning of business knowledge, improving adaptive processing capabilities and real-time performance in multiple business scenarios.
Smart Images

Figure CN120705279B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of natural language processing, and in particular to a construction method of an intelligent question answering system based on a lightweight large model. BACKGROUND
[0002] In the field of intelligent question answering systems, natural language processing technology based on large models has become a current research hotspot. Traditional methods usually directly process user queries using general pre-trained language models (such as BERT, GPT, etc.), and generate answers through an end-to-end approach. This type of method relies on large-scale pre-training and fine-tuning techniques, and language models trained on vast amounts of data have strong semantic understanding capabilities and can handle diverse natural language questions. In actual business scenarios, structured business data is obtained by interfacing with enterprise databases, and responses are generated by combining keyword matching or simple template technology. Existing technical solutions perform well in general domain question answering tasks, and some commercial systems have implemented basic functions such as business process query and data report generation.
[0003] However, traditional methods have certain limitations in professional question answering scenarios for vertical fields. On the one hand, general language models have difficulty in deeply understanding the complex relationships between business indicators, resulting in a lack of professionalism and explainability in the generated answers; on the other hand, the large number of model parameters results in high reasoning delays, making it difficult to meet the needs of business scenarios that require real-time performance. SUMMARY
[0004] In view of the above existing problems, the present application is proposed.
[0005] Therefore, the present application provides a construction method of an intelligent question answering system based on a lightweight large model to solve the problems of insufficient understanding of deep relationships between business indicators and low real-time reasoning efficiency.
[0006] To solve the above technical problems, the present application provides the following technical solutions:
[0007] In a first aspect, the present application provides a construction method of an intelligent question answering system based on a lightweight large model, which includes receiving a user natural language question, using a lightweight BERT model for vector encoding, and calculating the cosine similarity between the natural language question and the business indicator vector to generate a structured semantic graph;
[0008] The structured semantic graph is converted into a scene feature vector, and an adapter parameter block is injected to construct a lightweight scene adaptation model;
[0009] The lightweight scene adaptation model combines a real-time data interface to obtain a structured multi-modal response and construct an indicator tracking tree;
[0010] Based on the index tracking tree, the unexpanded node initiates the scene migration type question through the inquisition strategy engine, obtains the target scene feature vector and performs deep analysis, and generates a deep question and answer analysis report.
[0011] As a preferred scheme of the construction method of the intelligent question and answer system based on the lightweight large model, the vector coding is performed by using the lightweight BERT model, and the steps are as follows,
[0012] The knowledge compression is performed on the BERT-bas through soft target distillation and intermediate layer supervision, the distilled lightweight BERT model is generated, and the training is performed through historical business data;
[0013] The trained lightweight BERT model is used for coding the user natural language question, and a business semantic embedding vector is generated.
[0014] As a preferred scheme of the construction method of the intelligent question and answer system based on the lightweight large model, the cosine similarity of the natural language question and the business index vector is calculated, and a structured semantic graph is generated, and the steps are as follows,
[0015] The business index vector is extracted from the enterprise structured data table, the cosine similarity of the natural language question and the business index vector is calculated, and the first L business index vectors with the highest similarity are selected as high correlation indexes;
[0016] The semantic association rules among the high correlation indexes are fitted and generated through the gradient boosting decision tree, and a structured semantic graph is constructed.
[0017] As a preferred scheme of the construction method of the intelligent question and answer system based on the lightweight large model, the structured semantic graph is converted into a scene feature vector, and an adapter parameter block is injected to construct a lightweight scene adaptation model, and the steps are as follows,
[0018] A scene vector encoder is constructed based on a three-layer Transformer, and the structured semantic graph is converted into a scene feature vector;
[0019] Training samples are extracted from historical business data, and an adapter parameter block structure is initialized;
[0020] According to the training samples, the initialized adapter parameter block structure is trained by using a contrastive learning loss function to generate an adapter parameter block.
[0021] Based on the scene feature vector, the adapter parameter block is integrated with the LiteBERT architecture through a parameter plug-in interface to generate a lightweight scene adaptation model.
[0022] As a preferred scheme of the construction method of the intelligent question and answer system based on the lightweight large model, the structured multi-modal response is obtained in the following steps,
[0023] Separate the spatial dimension weight and the time dimension identifier in the scene feature vector.
[0024] According to the spatial dimension weight and the time dimension identifier, the RPC protocol interface is set.
[0025] The lightweight scene adaptation model receives the business data matched with the current scene feature vector in real time through the RPC protocol interface, and obtains the structured multi-modal response combined with the semantic association rule.
[0026] As a preferred scheme of the construction method of the intelligent question and answer system based on the lightweight large model, the structured multi-modal response is obtained in the following steps,
[0027] As a preferred scheme of the construction method of the intelligent question and answer system based on the lightweight large model, the structured multi-modal response is obtained in the following steps,
[0028] The coverage rate of the business index association path in the leaf node is identified by using the depth-first search algorithm to traverse the index tracking tree.
[0029] The coverage rate threshold is defined and compared with the coverage rate of the business index association path to identify the unexpanded nodes of the index tracking tree.
[0030] As a preferred scheme of the construction method of the intelligent question and answer system based on the lightweight large model, the structured multi-modal response is obtained in the following steps,
[0031] The scene migration type question is actively initiated to the unexpanded nodes of the index tracking tree by the follow-up question strategy engine, the natural language follow-up question suggestion with target scene annotation is obtained and re-encoded to generate the target scene feature vector.
[0032] Based on the target scene feature vector, the lightweight scene adaptation model loads the adapter parameter block, and generates the depth question and answer analysis report combined with the business data matched with the target scene feature vector.
[0033] In a second aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the computer program is executed by the processor to implement any step of the construction method of the intelligent question and answer system based on the lightweight large model according to the first aspect of the present application.
[0034] In a third aspect, the present application provides a computer readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements any step of the method for constructing an intelligent question answering system based on a lightweight large model according to the first aspect of the present application.
[0035] The present application has the following beneficial effects: by using gradient boosting decision trees, non-linear association rules are automatically mined from business indicator data, discrete business indicators are converted into graph structures with clear semantic relationships, and structured representation and interpretable reasoning of business knowledge are achieved; by constructing a lightweight scene adaptation model, the computing logic is flexibly adjusted according to different business scene characteristics, and the self-adaptive processing capability of a single model for multiple business scenes is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0037] Fig. 1 The flowchart of the method for constructing an intelligent question answering system based on a lightweight large model.
[0038] Fig. 2 The flowchart of the lightweight BERT model training.
[0039] Fig. 3 The flowchart of the structured semantic graph construction.
[0040] Fig. 4 The flowchart of the lightweight scene adaptation model construction. DETAILED DESCRIPTION
[0041] In order to make the above-mentioned purposes, features and advantages of the present application more apparent and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0042] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the scope of the present application, therefore the present application is not limited to the specific embodiments disclosed below.
[0043] Second, the "one embodiment" or "an embodiment" referred to herein means a specific feature, structure, characteristic, or combination of features and / or characteristics described herein that can be included in at least one implementation of the present application. The various appearances of "in one embodiment" or "an embodiment" in the specification are not necessarily all referring to the same embodiment.
[0044] Referring to Figs. 1-4 For one embodiment of the present application, the embodiment provides a construction method of an intelligent question and answer system based on a lightweight large model, comprising the following steps:
[0045] S1, receiving a user natural language question, using a lightweight BERT model for vector coding, and calculating the cosine similarity between the natural language question and the business index vector to generate a structured semantic graph;
[0046] The user natural language question refers to the request expressed by the business personnel in unstructured language, including index query, scene analysis, root cause tracing and other diversified business intent data.
[0047] The BERT-base is compressed by soft target distillation and intermediate layer supervision to generate a distilled lightweight BERT model, and the model is trained through historical business data;
[0048] Further, the knowledge transfer process adopts two methods of soft target distillation and intermediate layer supervision. Soft target distillation uses the probability distribution generated by BERT-base for input text to guide the lightweight BERT model to learn the semantic representation ability of BERT-base through KL divergence loss, so that the probability distribution output by the lightweight BERT model is as close as possible to BERT-base. The intermediate layer supervision requires the intermediate layer output of the lightweight BERT model to maintain similarity with the hidden state of the corresponding layer of BERT-base, and the L2 loss is used to constrain the feature representation of each layer of the lightweight BERT model to align with BERT-base.
[0049] In a specific implementation, first, BERT-base is used to process the retail domain corpus to obtain the probability distribution and hidden state as a supervision signal. The lightweight BERT model optimizes the KL divergence loss and L2 loss at the same time during training, so that the lightweight BERT model learns both the output distribution of BERT-base and matches the intermediate layer representation of BERT-base. Combined with the annotation information of the historical business data, the downstream task loss and the distillation loss are optimized together, so that the lightweight BERT model can maintain the processing ability for the retail domain tasks while compressing the parameter amount. The finally generated lightweight BERT model greatly improves the inference efficiency on the basis of retaining the core functions of BERT-base.
[0050] The historical business data includes structured business records (such as a sales order table, an inventory turnover table, a customer transaction table, etc.) and business indicator data (such as "GMV growth" and "inventory turnover rate" indicator vectors) extracted and vectorized by an ETL tool.
[0051] The user natural language question is encoded using the trained lightweight BERT model to generate a business semantic embedding vector.
[0052] Further, the user natural language question is first processed by word segmentation and tokenization, and converted into a word sequence to input the lightweight BERT model. The lightweight BERT model encodes the context of the word sequence through a multi-layer Transformer structure to generate a context-related representation of each word. The context-related representation of each word output by the lightweight BERT model is converted into a fixed-dimensional business semantic embedding vector.
[0053] It should be noted that the business semantic embedding vector refers to the business semantic embedding vector generated by the lightweight BERT model encoding the user natural language question. For example, the store sales situation is encoded as a business semantic embedding vector containing region, store type, and business indicators.
[0054] The business indicator vector is extracted from the enterprise structured data table by the ETL tool, and the cosine similarity between the natural language question and the business indicator vector is calculated by the semantic space alignment algorithm. The top L business indicator vectors with the highest similarity are selected by the K nearest neighbor algorithm as the high correlation indicators.
[0055] Further, the ETL tool extracts the business indicator vector from the specified field of the enterprise structured data table. The business indicator vector is stored in the vector database after standardization processing. The business semantic embedding vector generated by the lightweight BERT model and the business indicator vector extracted by the ETL tool are calculated for similarity by the semantic space alignment algorithm. The semantic space alignment algorithm uses cosine similarity measurement and utilizes approximate nearest neighbor search technology for acceleration. The K nearest neighbor algorithm selects the top L business indicator vectors with the highest similarity to the business semantic embedding vector as high correlation indicators according to the similarity results calculated by the semantic space alignment algorithm.
[0056] It should be noted that the enterprise structured data is obtained from the normalized tables of ERP, CRM, and SCM databases, including numerical indicator fields in the sales fact table, store dimension table, and commodity dimension table.
[0057] The cosine similarity between the natural language question and the business indicator vector is calculated, and the expression is:
[0058] ;
[0059] wherein, is a business indicator vector set, is a business semantic embedding vector, is the first business indicator vector, is the cosine similarity between the natural language question and the business indicator vector;
[0060] The semantic association rules between the high correlation indicators are generated by fitting the gradient boosting decision tree, and a structured semantic graph is constructed.
[0061] Further, the gradient boosting decision tree takes high correlation indicators as input features, and constructs a decision tree set through multiple rounds of iterative training, with each gradient boosting decision tree learning the non-linear relationship between indicators; During training, the gradient boosting decision tree uses a logarithmic loss function to optimize node splitting rules to capture conditional dependence relationships between indicators; After training, the frequently occurring indicator combination patterns (for example, "the path proportion of GMV growth rate and inventory turnover rate appearing at the same time is >60%") are extracted from the decision path of the gradient boosting decision tree, and are converted into semantic association rules through rule induction algorithms; Based on the extracted semantic association rules, a structured semantic graph in JSON-LD format is constructed with core business indicators as root nodes and associated indicators as child nodes, and edge weights determined by rule coefficients, and the structured semantic graph nodes contain indicator metadata (definition, unit of measurement), and the edges store association types (derivation / dependence).
[0062] S2, convert the structured semantic graph into a scene feature vector, and inject an adapter parameter block to build a lightweight scene adaptation model;
[0063] A three-layer Transformer is constructed to build a scene vector encoder, and the structured semantic graph is converted into a scene feature vector;
[0064] Further, the three-layer Transformer architecture receives the JSON-LD format input of the structured semantic graph, the first layer converts the structured semantic graph (business indicator vector) and edge (semantic association rule) into Token sequence; The second layer maps each node and edge to an initial vector representation while adding position encoding to preserve the structural information of the structured semantic graph; The third layer identifies the dependency relationship between nodes through the multi-head attention mechanism of the Transformer, and generates a scene feature vector through linear transformation of the output vector of the [CLS] marker after three-layer encoding;
[0065] It should be noted that the scene feature vector includes four types of semantic features: subject type weight (such as "store = 0.7"), spatial dimension intensity (such as "Hangzhou = 0.8"), time decay factor (such as "this month = -0.2"), and core indicator association degree (such as "GMV growth rate = 0.82").
[0066] extract training samples from historical business data by approximate nearest neighbor search based on locality sensitive hashing, and initialize the adapter parameter block structure;
[0067] Further, first convert each record in the historical business data into a scene encoding vector containing a timestamp, a numerical indicator and a classification indicator; use the locality sensitive hashing algorithm to bucket process the scene encoding vector, extract the training sample; construct a hash index, quickly retrieve the historical business data with high correlation indicator similarity from the hash index through approximate nearest neighbor search, and initialize the adapter parameter block structure containing the attention head correction matrix, the feedforward network bias item and the layer normalization parameter according to the hash index retrieval of the numerical field and the classification field in the historical business data.
[0068] According to the training sample, the initialized adapter parameter block structure is trained by using a contrastive learning loss function to generate an adapter parameter block;
[0069] Further, based on the business scene data in the training sample, the initialized adapter parameter block structure is trained by using a contrastive learning loss function. During the training process, the positive sample pair narrows the distance between the scene feature vectors through the contrastive learning loss function, and the negative sample pair widens the distance between the scene feature vectors, while an optimization algorithm is used to iteratively optimize the adapter parameter block structure, and finally an adapter parameter block that meets the business scene adaptation requirements is generated. Wherein, the positive sample refers to the scene encoding vector from the same business scene (such as dynamic sales diagnosis), and the negative sample refers to the scene encoding vector from different business scenes (such as dynamic sales diagnosis and channel optimization).
[0070] Based on the scene feature vector, the adapter parameter block is integrated with the LiteBERT architecture through a parameter plug-in interface to generate a lightweight scene adaptation model.
[0071] Further, the scene feature vector matches the corresponding adapter parameter block through the parameter plug-in interface, the attention head correction matrix in the adapter parameter block is inserted into the multi-head attention layer of the LiteBERT architecture in the form of a low-rank matrix, the feedforward network bias item is added to the feedforward network layer bias of the LiteBERT in an element-by-element manner, and the layer normalization parameter replaces the original parameter of the corresponding layer of the LiteBERT, finally generating a lightweight scene adaptation model.
[0072] S3, the lightweight scene adaptation model combines a real-time data interface to obtain a structured multi-modal response and construct an indicator tracking tree;
[0073] A semantic dimension parser is used to separate the spatial dimension weight and the time dimension identifier in the scene feature vector;
[0074] Furthermore, the semantic dimension parser receives scene feature vectors as input and extracts spatial dimension weights and temporal dimension identifiers through a dimension mask matrix (the spatial dimension mask covers dimensions 32-63, and the temporal dimension mask covers dimensions 64-95). The spatial dimension weights are normalized by Softmax to generate a regional importance distribution (e.g., "Hangzhou = 0.7, Shanghai = 0.3"). The temporal dimension identifiers are mapped to temporal granular labels through a classifier.
[0075] It should be noted that the dimension mask matrix is a binary matrix defined by business scenario analysis requirements (the spatial dimension positions are set to 1, and the rest are set to 0).
[0076] Set up the RPC protocol interface based on the spatial dimension weight and the time dimension identifier;
[0077] The lightweight scenario adaptation model receives business data that matches the feature vector of the current scenario in real time through the RPC protocol interface, and obtains a structured multimodal response containing textual conclusions and business indicator association paths by combining semantic association rules.
[0078] Furthermore, the lightweight scenario adaptation model takes the scenario feature vector as input parameter and initiates gRPC calls to the business data service through the RPC protocol interface. The RPC protocol interface generates query conditions based on the spatial dimension weights and time dimension identifiers in the scenario feature vector, retrieves matching business indicator values from the enterprise data warehouse (such as "GMV growth rate in Hangzhou region this month = 18%"), and logically combines them with the semantic association rules generated by the gradient boosting decision tree (such as "GMV growth rate → SKU sales rate") to generate a structured multimodal response containing natural language text conclusions (such as "sales growth mainly comes from SKU12345") and business indicator association paths (such as "GMV growth rate 18% → SKU sales rate increased by 25%).
[0079] By using the textual conclusions in the structured multimodal response as the root node, and expanding layer by layer according to the business indicator association path, an indicator tracking tree is constructed.
[0080] Furthermore, the textual conclusions in the structured multimodal response are used as the root node, and then branches are expanded layer by layer according to the semantic association rules generated by the gradient boosting decision tree. Each branch node contains the business indicator name, specific value, and calculation basis, and the connecting edges between nodes are labeled with the weight coefficients of the semantic association rules. For nodes that have not reached the expansion threshold (such as "distribution cycle 7 days"), they are marked as pending expansion and the missing association indicators are recorded. Finally, a complete tree structure is constructed through breadth-first traversal.
[0081] It should be noted that the expansion threshold is defined based on the business scenario analysis requirements, and the value range is 0.2-0.5.
[0082] S4, based on the index tracking tree, the unexpanded node initiates a scene migration type question through the follow-up strategy engine, obtains the target scene feature vector and performs deep analysis, and generates a deep question and answer analysis report.
[0083] The depth-first search algorithm is used to traverse the index tracking tree, and the coverage rate of the business index association path in the leaf node is identified;
[0084] Further, the depth-first search algorithm starts from the root node of the index tracking tree and recursively visits each leaf node. In the process of visiting, the number of business index association paths that have been expanded in the leaf node is counted (by querying the complete semantic association rule set generated by the gradient boosting decision tree, the total number of business index association paths that can be expanded in theory is obtained. Leaf node (such as "inventory turnover rate" can be associated with 3 paths), and the coverage rate of the business index association path in the leaf node is identified by calculating the proportion of the number of expanded paths in the leaf node to the total number of expandable paths.
[0085] Based on historical interaction data analysis, define the coverage threshold and compare it with the coverage rate of the business index association path, and identify the unexpanded nodes of the index tracking tree;
[0086] Further, the historical interaction data analysis counts the average expansion depth of users to the index tracking tree nodes under different business scenarios, and defines the coverage threshold (value range: 0.15-0.6) combined with business priority. When traversing the index tracking tree with the depth-first search algorithm, query the complete business index association path set generated by the gradient boosting decision tree for each leaf node, and calculate the ratio of the number of currently expanded paths to the total number of expandable paths. When the coverage rate of the business index association path in the leaf node is lower than the coverage threshold, the current node is marked as an unexpanded node.
[0087] It should be noted that the historical interaction data includes complete conversation records (such as question texts, follow-up paths) between users and the question and answer system, scene feature vector call logs, adapter parameter block loading records, and user feedback data (explicit ratings / implicit behaviors).
[0088] Through the follow-up strategy engine, the unexpanded nodes of the index tracking tree are actively initiated to the scene migration type question, and the natural language follow-up suggestions with target scene annotations are obtained, and are re-encoded through the scene vector encoder to generate the target scene feature vector;
[0089] Further, the follow-up strategy engine initiates a scene migration question proactively, analyzes the leaf nodes marked as not expanded in the index tracking tree, generates natural language follow-up suggestions with target scene annotations (such as "whether to analyze the impact of the procurement cycle on inventory turnover? [Target scene: supply chain efficiency analysis] ") in combination with gradient boosting decision trees, maps the natural language follow-up suggestions to word sequence input scene vector encoders through word segmentation processing and word vectors for re-encoding, and generates target scene feature vectors.
[0090] It should be noted that the target scene refers to the next stage of analysis scene triggered by the user follow-up behavior (for example, migrating from "dynamic sales diagnosis" to "supply chain efficiency analysis").
[0091] Based on the target scene feature vector, the lightweight scene adaptation model loads the adapter parameter block, combines the business data matched with the target scene feature vector, and generates a deep question and answer analysis report.
[0092] Further, the target scene feature vector matches the corresponding adapter parameter block through the parameter plug-in interface, the attention head correction matrix in the adapter parameter block adjusts the multi-head attention mechanism weight of the lightweight scene adaptation model, so that the model focuses on the key fields of the target scene; the feedforward network bias item corrects the activation function output, enhances the representation ability of the target scene feature; the lightweight scene adaptation model obtains the business data matched with the target scene feature vector through the RPC protocol interface, combines the business logic rules in the adapter parameter block for multi-round reasoning, and generates a structured report containing text conclusions, data evidence and index association paths.
[0093] The embodiment also provides a computer device suitable for the construction method of the intelligent question and answer system based on a lightweight large model, which comprises a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the construction method of the intelligent question and answer system based on a lightweight large model proposed in the above embodiment.
[0094] The computer device can be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected by a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved by WIFI, an operator network, NFC (Near Field Communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0095] The embodiment also provides a storage medium having a computer program stored thereon, the program being executed by a processor to implement the construction method of the intelligent question and answer system based on a lightweight large model proposed in the above embodiment. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk.
[0096] To sum up, the present application realizes the structured representation and interpretable reasoning of business knowledge by: gradient boosting decision trees, automatically mining non-linear association rules from business indicator data, and converting discrete business indicators into graph structures with explicit semantic relationships; and by constructing a lightweight scene adaptation model, flexibly adjusting the calculation logic according to different business scene characteristics, and realizing the self-adaptive processing capability of a single model for multiple business scenes.
[0097] It should be noted that the above examples are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced, without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
Claims
1. A method for constructing an intelligent question-answering system based on a lightweight large model, characterized in that: include, It receives natural language questions from users, uses a lightweight BERT model for vector encoding, calculates the cosine similarity between the natural language questions and business indicator vectors, and generates a structured semantic graph. The structured semantic graph is converted into scene feature vectors and injected into the adapter parameter block to build a lightweight scene adaptation model. A lightweight scenario adaptation model is combined with a real-time data interface to obtain structured multimodal responses and build an indicator tracking tree; Based on the unexpanded nodes of the indicator tracking tree, the system proactively initiates scenario-transitional questions through the follow-up questioning strategy engine, obtains the target scenario feature vector, performs in-depth analysis, and generates an in-depth question-and-answer analysis report. The steps for calculating the cosine similarity between natural language questions and business indicator vectors to generate a structured semantic graph are as follows: Extract business indicator vectors from the enterprise's structured data table, calculate the cosine similarity between natural language questions and business indicator vectors, and select the top L business indicator vectors with the highest similarity as highly relevant indicators. Semantic association rules between highly correlated indicators are generated by gradient boosting decision tree fitting, and a structured semantic graph is constructed. The steps for obtaining the structured multimodal response are as follows: Separate the spatial dimension weights and temporal dimension identifiers from the scene feature vectors; Set up the RPC protocol interface based on the spatial dimension weight and the time dimension identifier; The lightweight scenario adaptation model receives business data that matches the feature vector of the current scenario in real time through the RPC protocol interface, and obtains structured multimodal responses by combining semantic association rules. The construction of the indicator tracking tree refers to taking the text conclusion in the structured multimodal response as the root node and expanding it layer by layer according to the business indicator association path; The process for identifying the unexpanded nodes of the indicator tracking tree is as follows. A depth-first search algorithm is used to traverse the metric tracking tree and identify the coverage of business metric association paths in the leaf nodes; Define a coverage threshold and compare it with the coverage of the path associated with the business metrics to identify unexpanded nodes in the metric tracking tree.
2. The method for constructing an intelligent question-answering system based on a lightweight large model as described in claim 1, characterized in that: The steps for using a lightweight BERT model for vector encoding are as follows. Knowledge compression is performed on BERT-bas through soft target distillation and intermediate layer supervision to generate a lightweight BERT model after distillation, which is then trained using historical business data. The trained lightweight BERT model is used to encode the user's natural language questions and generate business semantic embedding vectors.
3. The method for constructing an intelligent question-answering system based on a lightweight large model as described in claim 1, characterized in that: The steps for converting the structured semantic graph into scene feature vectors and injecting them into the adapter parameter block to build a lightweight scene adaptation model are as follows. A scene vector encoder is built based on a three-layer Transformer, and the structured semantic graph is converted into scene feature vectors; Extract training samples from historical business data and initialize the adapter parameter block structure; Based on the training samples, the initial adapter parameter block structure is trained using a contrastive learning loss function to generate the adapter parameter block; Based on scene feature vectors, the adapter parameter block is integrated with the LiteBERT architecture through a parameter plug-in interface to generate a lightweight scene adaptation model.
4. The method for constructing an intelligent question-answering system based on a lightweight large model as described in claim 1, characterized in that: The steps involved in proactively initiating scenario-transferring questions through a follow-up questioning strategy engine, obtaining target scenario feature vectors, performing in-depth analysis, and generating an in-depth question-answering analysis report are as follows: Through the follow-up questioning strategy engine, scenario-transferring questions are proactively initiated to the unexpanded nodes of the indicator tracking tree to obtain natural language follow-up question suggestions with target scenario annotations and re-encode them to generate target scenario feature vectors. Based on the target scene feature vector, a lightweight scene adaptation model loads adapter parameter blocks and combines them with business data that matches the target scene feature vector to generate a deep question-answering analysis report.
5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the method for constructing an intelligent question-answering system based on a lightweight large model as described in any one of claims 1 to 4.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for constructing an intelligent question-answering system based on a lightweight large model as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Intelligent data query method and device based on large model and medium
CN120296126A
Intelligent question and answer method based on knowledge graph
CN120297415A