Enterprise knowledge and business data query method and system based on large model and enterprise knowledge base

CN123012147APending Publication Date: 2026-10-30HENAN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611247549.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

(1)知识库检索智能化程度低,关键词匹配易出现答非所问,传统关键词检索仅匹配文字字符,无法理解用户自然语言的语义;通用公有大模型未接入企业私有知识库,回答内容脱离企业内部专属业务规则,存在信息不准确、企业内部信息泄密的风险

Benefits of technology

[0022]相较于现有技术,本发明采用私有知识库向量检索和本地大模型结合的方案,不依赖公有大模型的外部数据,回答全部基于企业内部文档生成;用语义检索替代传统关键词检索,大幅减少无关文档推送,答案精准度提升60%以上,规避公有模型泄露企业内部资料的风险;依托数字字典自动映射业务名词与数据库字段,普通业务人员仅需用自然语言描述需求,系统即可自动生成SQL语句,无需掌握数据库语法、数据表结构,可减少80%技术人员协助取数的工作量;单一对话窗口同时支持知识咨询、数据查询、复合需求问答,无需切换多个系统,原本需3-5步切换、复制粘贴的操作简化为一次提问,整体查询效率提升70%以上;系统根据提问语义自动识别统计维度、指标,匹配最优图表类型,无需人工拖拽配置,查询数据后即时输出可视化图表,报表制作时间从十几分钟缩短至秒级;全流程绑定用户岗位权限,自动屏蔽无权限文档、敏感数据表与字段;完整留存操作审计日志,可追溯数据访问行为,杜绝内部敏感经营数据越权泄露的问题;无需替换企业现有知识库、数据中台、数字字典,仅通过标准API接口对接改造,改造成本低、部署周期短,兼容企业存量数字化系统;减少专职数据分析师、知识库运维人员的重复答疑、取数、制作报表工作,节约人力投入。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012147A_ABST
    Figure CN123012147A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of artificial intelligence large model and enterprise digital data service, more specifically to an enterprise knowledge and business data query method and system based on large model and enterprise knowledge base. Through a unified interactive front end, natural language questions input by a user are received, the question text is semantically analyzed to distinguish the demand type of the question; the post permission information of the currently logged-in user is read, permission verification is performed, and the knowledge base resources and business data resources that the user has no access to are filtered; task distribution and corresponding processing are performed according to the identified demand type; if it is a knowledge demand, a knowledge answer is generated; if it is a data demand, a structured data set is returned; if it is a knowledge and data composite demand, a comprehensive answer is generated; for the data query result, the visualization form is automatically matched according to the question semantics, and the corresponding visualization chart is generated; the knowledge answer, data details and visualization chart are uniformly integrated, and the result is returned to the user through the unified interactive front end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence large-scale models and enterprise digital data services, and more specifically to a method and system for querying enterprise knowledge and business data based on large-scale models and enterprise knowledge bases. Background Technology

[0002] In the current enterprise digital transformation, enterprise knowledge retrieval and business data retrieval are handled by two independently operating systems. The specific solutions and implementation processes are as follows: Enterprise knowledge base systems store documents such as rules and regulations, business processes, product information, and operation and maintenance manuals. They mostly use a keyword search mode, where employees enter keywords to match document titles or text, and the system returns the complete document, which employees then need to manually read and select the answers they need. Some lightweight knowledge base tools that integrate with general large models only support simple question and answer functions and cannot be linked to enterprise business data.

[0003] Enterprise data platform: Stores structured business data such as business orders, finance, production, and customers, and is equipped with a standard digital dictionary to define data tables, field meanings, and data relationships. Current data query methods are divided into two types: one is that technical personnel write SQL statements to execute queries, which ordinary business personnel cannot operate independently due to lack of coding skills; the other is through a low-code visual platform, which requires dragging and dropping components, configuring filter conditions, and generating reports, making the operation cumbersome and unable to directly complete queries using everyday natural language.

[0004] The two existing systems are independent of each other and lack a unified interaction interface. Employees need to log in to the knowledge base system to query business knowledge and switch to the data platform to query business data. After the query is completed, they need to manually copy the data to Excel and manually create charts in BI tools. The overall business process is fragmented.

[0005] The existing technology has the following defects and shortcomings: (1) The knowledge base retrieval is not intelligent enough, and the keyword matching is prone to answering the wrong question. Traditional keyword retrieval only matches text characters and cannot understand the semantics of the user's natural language. The general public model is not connected to the enterprise's private knowledge base, and the answer content is deviating from the enterprise's internal exclusive business rules, which poses the risk of inaccurate information and leakage of internal information.

[0006] (2) Business data query threshold is high. Non-technical personnel cannot retrieve data independently. The use of the data platform depends on SQL code writing or complex visualization configuration. Business personnel are generally not familiar with the data table structure, field meaning, and association logic. The number dictionary is only stored separately as a backend document and cannot be linked with the query tool. Users do not know the business meaning of the fields. Natural language questions cannot be converted into executable query statements.

[0007] (3) The knowledge question and answer and data query scenarios are separated, and it is impossible to handle mixed question and answer needs. Employees' daily work needs often include business knowledge consultation and business data statistics at the same time. For example, querying the customer complaint process of last month and counting the number of complaints in each region and generating a bar chart. The existing system can only handle knowledge query or data query separately, and cannot respond to such composite needs in an integrated manner.

[0008] (4) Chart generation relies entirely on manual operation, which is inefficient. After obtaining the query data, employees need to export the dataset, manually select the chart type, configure the coordinate axis, and filter the statistical dimensions. The multiple rounds of operation take a long time and cannot automatically match the appropriate chart type and render the output according to the user's natural language instructions.

[0009] (5) Weak data security management capabilities; direct connection of public large models to enterprise data platforms can easily lead to leakage of internal business data; existing query tools lack a sound permission verification mechanism; there is no hierarchical control of data access for employees in different positions, which poses a security risk of unauthorized querying of sensitive business data.

[0010] Therefore, how to provide a method and system for querying enterprise knowledge and business data based on a large model and an enterprise knowledge base is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0011] In view of this, the present invention provides a method and system for querying enterprise knowledge and business data based on a large model and an enterprise knowledge base, aiming to solve the above-mentioned technical problems.

[0012] To achieve the above objectives, the present invention adopts the following technical solution: A method for querying enterprise knowledge and business data based on a large model and an enterprise knowledge base includes the following steps: S1. Receive natural language questions input by users through a unified interactive front end, perform semantic parsing on the question text, and distinguish the type of question requirement; S2. Read the job permission information of the currently logged-in user, perform permission verification, and filter out knowledge base resources and business data resources that the user does not have permission to access. S3. Distribute and process tasks according to the identified demand type; if it is a knowledge-based demand, perform a private knowledge base retrieval and generate a knowledge answer based on the retrieval results; if it is a data-based demand, perform a business data query and return a structured dataset; if it is a combined knowledge and data demand, perform knowledge retrieval processing and data query processing simultaneously, and combine the results of the two types of processing to generate a comprehensive answer. S4. Based on the data query results, automatically match the appropriate visualization format according to the semantics of the question and generate the corresponding visualization chart; S5. Unify and integrate knowledge answers, data details and visualization charts, return results to users through a unified interactive front end, and support result export; retain operation logs throughout the process for audit traceability.

[0013] Furthermore, in S2, the unified interactive front end connects to the enterprise's unified login system to synchronously transmit user identity and job permission information; permission verification is executed based on pre-configured enterprise hierarchical permission rules, intercepting unauthorized query commands and returning a permission insufficient prompt.

[0014] Furthermore, in S3, the processing of knowledge-related requirements specifically involves: The system calls the private knowledge base retrieval module and uses a large model semantic vector retrieval method to match internal enterprise documents. Based on the retrieved document fragments, the large model extracts and generates accurate answers without outputting irrelevant complete documents. The specific handling of data-related requirements is as follows: The system retrieves the enterprise's unified digital dictionary, parses the data tables, fields, and relationships corresponding to the business terms in the query, and automatically generates compliant and executable SQL query statements from the large model. These queries are then sent to the enterprise data platform for execution and to obtain a structured dataset.

[0015] Furthermore, in S4, the compatible visualization chart types include line charts, bar charts, pie charts, and tables; the various visualization templates built into the chart rendering module automatically match statistical dimensions and indicators to complete chart rendering, and output chart images or report files that support online preview and download.

[0016] Furthermore, in S5, the retained operation log includes the question content, the range of accessed data, the operator information, and the operation time, and is permanently stored for traceability.

[0017] An enterprise knowledge and business data query system based on a large model and enterprise knowledge base includes a unified interactive front-end module, a semantic parsing and task distribution module, a permission security verification module, an enterprise private knowledge base retrieval module, a data middle platform linkage module, and an intelligent chart rendering module. These modules are interconnected through internal enterprise API interfaces. The unified interactive front-end module connects to the semantic parsing and task distribution module; the semantic parsing and task distribution module is bidirectionally connected to the permission security verification module; the permission security verification module connects to both the enterprise private knowledge base retrieval module and the data middle platform linkage module; the data middle platform linkage module interacts with the semantic parsing and task distribution module; and the semantic parsing and task distribution module connects to the intelligent chart rendering module. The unified interactive front-end module is the unified interactive entry point of the system, used to receive users' natural language input and display the integrated question and answer results; The semantic parsing and task distribution module is based on a privately deployed large language model as its core, used to parse the semantics of the question, identify the type of requirement, and distribute the processing task to the corresponding module. The permission security verification module is used to verify the user's job permissions, filter resources that the user does not have permission to access, and store the full-process operation audit log. The enterprise private knowledge base retrieval module is used to connect to the enterprise knowledge base document library and retrieve matching knowledge content according to task instructions. The data platform linkage module is used to connect with the enterprise business data platform and execute structured data queries according to task instructions; The intelligent chart rendering module is used to automatically generate visual charts based on task instructions and query datasets.

[0018] Furthermore, the semantic parsing and task distribution module has built-in semantic classification, entity recognition, and intent extraction capabilities; after receiving a question from the front end, the semantic parsing and task distribution module breaks down and distinguishes knowledge intent, data query intent, and composite intent, and generates knowledge base retrieval instructions, SQL query statements, and chart generation instructions, and sends them to the corresponding modules. The enterprise private knowledge base retrieval module has a built-in vector database that pre-stores the enterprise's existing business documents in vector form. After receiving a retrieval command, it matches relevant document fragments based on semantic similarity and returns the reference materials to the large model, which then extracts and generates accurate answers.

[0019] Furthermore, the data platform linkage module includes a digital dictionary parsing subunit and an SQL execution subunit. The digital dictionary pre-stores all enterprise data tables, fields, business definitions, and data association rules. Upon receiving a data query intent, the digital dictionary parsing subunit maps natural language business terms to standard database fields. The large model generates an SQL query statement that conforms to the data platform specifications based on the mapping results. The SQL execution subunit then initiates a query to the data platform and receives the returned structured dataset.

[0020] Furthermore, the intelligent chart rendering module has a variety of built-in visualization templates. After receiving the dataset and chart type instructions, it automatically matches the statistical dimensions and indicators to complete the chart rendering and outputs chart images or report files that can be previewed and downloaded online. The permission security verification module stores the enterprise's hierarchical permission configuration, which is used to verify the range of documents that users can view, the data tables and fields that they can access, intercept unauthorized query commands and return a permission insufficient prompt, and summarize the operation logs of all modules and store them uniformly.

[0021] Furthermore, the system also includes a unified enterprise login system, an enterprise private document knowledge base, and an enterprise business data middleware repository; The enterprise unified login system is connected to a unified interactive front-end module for user identity authentication and the transmission of job permission information. The enterprise private document knowledge base is connected to the enterprise private knowledge base retrieval module and is used to store enterprise internal rules and regulations, business processes, product information, operation and maintenance manuals and other documents. The enterprise business data middle platform repository is connected to the data middle platform linkage module and is used to store structured business data such as enterprise business orders, finance, production, and customers.

[0022] Compared to existing technologies, this invention employs a solution combining private knowledge base vector retrieval and a local large-scale model. It does not rely on external data from public large-scale models, and all answers are generated based on internal enterprise documents. Semantic retrieval replaces traditional keyword retrieval, significantly reducing irrelevant document pushes and improving answer accuracy by over 60%, thus mitigating the risk of leaking internal enterprise information through public models. Utilizing a digital dictionary to automatically map business terms to database fields, ordinary business personnel only need to describe their needs in natural language, and the system can automatically generate SQL statements, eliminating the need to master database syntax and table structures, reducing the workload of technical personnel assisting with data retrieval by 80%. A single dialog window simultaneously supports knowledge consultation, data query, and multi-requirement Q&A, eliminating the need to switch between multiple systems and simplifying operations that previously required 3-5 steps of switching and copying / pasting. Transforming queries into a single inquiry improves overall query efficiency by over 70%. The system automatically identifies statistical dimensions and indicators based on the query's semantics, matching the optimal chart type without requiring manual drag-and-drop configuration. Visual charts are instantly generated after data querying, reducing report creation time from tens of minutes to seconds. The entire process is bound to user job permissions, automatically blocking unauthorized documents, sensitive data tables, and fields. Complete operation audit logs are retained, allowing for traceability of data access behavior and preventing unauthorized leakage of sensitive internal business data. No replacement of the enterprise's existing knowledge base, data platform, or digital dictionary is required; only standard API interfaces are used for integration and modification, resulting in low transformation costs, short deployment cycles, and compatibility with existing enterprise digital systems. This reduces the repetitive work of dedicated data analysts and knowledge base maintenance personnel in answering questions, retrieving data, and creating reports, saving manpower. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0024] Figure 1 This is the overall architecture of the enterprise knowledge and business data query system described in this invention. Detailed Implementation

[0025] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] The present invention will be further described in detail with reference to the accompanying drawings and specific embodiments. This embodiment takes the private deployment of this system by a manufacturing enterprise as a scenario. The enterprise's existing digital assets include: an internal production process knowledge base (more than 3,000 PDF and Word business manuals), a production data platform (storing data tables of orders, production capacity, defective products, and workshop personnel), and a complete business digital dictionary (recording 20+ business tables and 200+ field definitions).

[0027] During the system deployment phase, the 7B-parameter open-source large language model is deployed on a local private server within the enterprise. The deployment environment requirements are as follows: server configuration no less than dual Intel Xeon Gold 6248R processors, 256GB of RAM, two NVIDIA A100 40GB GPUs, and 2TB NVMe SSD storage; operating system support for Ubuntu 22.04 LTS and above or CentOS 7.9 and above; middleware including Python 3.10 runtime environment, Redis 7.x caching service, and Elasticsearch 8.x vector search engine; the system supports at least 50 concurrent users asking questions online simultaneously, with a single question-and-answer response time not exceeding 10 seconds; a vector database is built to store the vector data of knowledge base documents; and standard HTTPS API interfaces are used to connect the following modules: front-end and large model, large model and permission module, permission module and knowledge base / data platform, and large model and chart rendering module. A vector database is built to store the vector data of knowledge base documents; and standard HTTP API interfaces are used to connect the front end with the main model, the main model with the permission module, the permission module with the knowledge base / data platform, and the main model with the chart rendering module.

[0028] Specifically, HTTPS is used for encrypted communication between modules. Request parameters are encapsulated in JSON format, including module identifier, operation type, business payload, and timestamp fields. Response data uniformly adopts a JSON structure containing status code, prompt message, and business data. Each interface call carries authentication information based on a JWT token, which is issued by the enterprise's unified login system and has a 2-hour validity period. The interface timeout is set to 30 seconds, after which it automatically retryes twice with a 5-second interval. If the retry still fails, a service exception message is returned. The unified interactive front-end module connects to the semantic parsing and task distribution module; the semantic parsing and task distribution module is bidirectionally connected to the permission security verification module; the permission security verification module is connected to the enterprise private knowledge base retrieval module and the data platform linkage module respectively; the data platform linkage module interacts with the semantic parsing and task distribution module; the semantic parsing and task distribution module is connected to the intelligent chart rendering module. The unified interactive front-end module serves as the system's unified interactive entry point, used to receive users' natural language input and display the integrated question-and-answer results; The semantic parsing and task distribution module incorporates semantic classification, entity recognition, and intent extraction capabilities. Specifically, the module guides the large model to structurally decompose user questions through preset prompt word templates. The prompt word templates include three parts: system role definitions, requirement classification rules, and output format constraints. The classification rules determine the question into three types: knowledge-based, data-based, or composite. The criteria are as follows: questions containing only non-quantitative requirements such as business concept consultation and system process query are classified as knowledge-based; questions containing quantitative requirements such as numerical statistics, trend analysis, and data comparison are classified as data-based; and questions containing both types of features are classified as composite. When the large model outputs the classification results, it simultaneously outputs a confidence score. The confidence threshold is set at 0.75. When the confidence score is lower than the threshold, a secondary confirmation mechanism is triggered. The large model re-parses the question based on the context and asks the user to supplement and clarify the question's intent to avoid misjudgment leading to incorrect task distribution. After receiving the front-end question, the semantic parsing and task distribution module decomposes and distinguishes between knowledge intent, data query intent, and composite intent, and generates knowledge base retrieval instructions, SQL query statements, and chart generation instructions, which are then distributed to the corresponding modules. The permission security verification module stores enterprise-level permission configurations to verify the scope of documents a user can view, the data tables and fields they can access, intercept unauthorized query commands and return permission insufficient prompts, and summarize and store operation logs from all modules in a unified manner. Permission verification is performed at three key nodes: before semantic parsing, the scope of the knowledge base and the list of data tables accessible to the user are pre-filtered; before query execution, field-level permission verification is performed on the generated SQL statement and fields without permissions are automatically removed; and before the results are returned, sensitive fields in the query results are anonymized. Field-level permission control is achieved by automatically injecting permission filtering conditions into the SQL statement, and a masking de-identification strategy is used for fields marked as sensitive, retaining only partial information. After permission configuration changes, they are pushed to the cache of each module in real time through a message queue to ensure that permission updates take effect throughout the system within 5 seconds.

[0029] The enterprise private knowledge base retrieval module has a built-in vector database that pre-stores the enterprise's existing business documents in vector form. Specifically, it uses the BGE-large-zh Chinese embedding model to vectorize the documents, and the documents are segmented according to the semantic boundaries of paragraphs. The maximum length of a single segment is 512 tokens, and an overlap of 50 tokens is maintained between adjacent segments to ensure semantic coherence. After receiving the retrieval command, it calculates the similarity between the query vector and the document segment vector based on the cosine similarity algorithm, recalls the top 10 document segments with the highest similarity, and each segment has a length of no more than 512 tokens. The recalled segments are then re-ranked using a cross-coding re-ranking model, and the top 5 segments after re-ranking are selected as the final reference materials. Based on semantic similarity, relevant document segments are matched, and the reference materials are returned to the large model, which then extracts and generates accurate answers.

[0030] The data platform linkage module includes a digital dictionary parsing subunit and an SQL execution subunit. The digital dictionary pre-stores all enterprise data tables, fields, business definitions, and data association rules. Upon receiving a data query intent, the digital dictionary parsing subunit maps natural language business terms to standard database fields. Specifically, the large model reads the digital dictionary content, performs entity recognition and field matching on the business terms in the user's query, and associates the matched business terms with the corresponding data tables and fields in the digital dictionary. When multiple candidate matches exist, polysemous word disambiguation is performed based on the query context, selecting the field definition that best matches the query context. When no field is matched, a fallback mechanism is triggered, returning a field mapping failure message and guiding the user to re-ask using standard business terminology. The large model then performs the mapping based on the data. The system generates SQL query statements that conform to the data platform specifications. Before execution, the generated SQL statements undergo three checks: syntax verification, permission verification, and security verification. Syntax verification verifies the completeness of the statement structure and the legality of field references through the SQL parser. Permission verification checks whether the current user has the necessary access permissions to the queried data tables and fields, automatically removing fields without permissions. Security verification uses regular expression matching to intercept SQL statements containing dangerous operations such as deletion, modification, and injection. If any verification step fails, the system records the error information and triggers a retry mechanism. The large model corrects the SQL statement based on the error feedback and resubmits it for verification, with a maximum of 3 retries. If the retries still fail, a query failure message is returned to the user, and the SQL execution subunit initiates a query to the data platform and receives the returned structured dataset.

[0031] The intelligent chart rendering module is used to automatically generate visual charts based on task instructions and query datasets.

[0032] Overall working principle and complete workflow: This intelligent software assistant uses a large language model deployed locally / privately as its core foundation, building a unified interactive front end that connects to the enterprise's private knowledge base engine, enterprise data platform, digital dictionary parsing module, permission verification module, and visualization chart rendering module. The complete workflow is as follows: Step 1: Users input natural language questions on the unified interactive front end. The system performs semantic analysis on the question text and distinguishes the question type: pure knowledge question and answer, pure data query, and knowledge + data composite question; Step 2: The permission verification module reads the current logged-in user's job permissions and filters out knowledge base documents, data tables, and sensitive fields that the user does not have permission to access; Step 3: Semantic dispatch processing: For knowledge-related questions: the private knowledge base retrieval module is invoked, and the semantic vector retrieval of the large model is combined with the internal documents of the enterprise to retrieve and match the search results. The large model then extracts the accurate answer based on the retrieval results, without outputting irrelevant or incomplete documents. For data-related issues: retrieve the enterprise's unified digital dictionary, parse the data tables, fields, and relationships corresponding to the business terms in the question, automatically generate compliant and executable SQL query statements from the large model, and send them to the data platform for execution; For compound questions: first, retrieve the business rules from the knowledge base, then execute a data query to obtain the dataset, and finally combine the two types of information to provide a unified answer; Step 4: After the data query is completed, the large model automatically determines the appropriate chart type (line chart, bar chart, pie chart, table, etc.) based on the semantics of the user's query, and calls the chart rendering module to automatically generate a visual chart; Step 5: Unify and integrate knowledge text answers, data details, and visualization charts, and return them to the user on a unified front-end page, supporting the export of documents and image reports; Step 6: The entire process log retains the question content, access data, and operator information for audit traceability.

[0033] Example 1: Complete Implementation Case of Private Deployment of Smart Software Assistant in a Manufacturing Enterprise 1. Preliminary deployment and coordination preparation The company's existing assets include: an internal production process knowledge base (3000+ PDF and Word business manuals), a production data platform (storing data tables for orders, production capacity, defective products, and workshop personnel), and a complete business digital dictionary (recording 20+ business tables and 200+ field definitions); a local private deployment of a 7B-parameter open-source large language model, and the construction of a vector database to store knowledge base document vectors.

[0034] The following connections are established via standard HTTP APIs: front-end and main model, main model and permissions module, permissions module and knowledge base / data platform, and main model and chart rendering module. The permissions module records enterprise job levels: general salesperson, workshop supervisor, finance, and administrator, with different access permissions configured for each data table and document.

[0035] 2. Complete operation process of composite requirements Enter the enterprise's job level classification rules in the permissions module, set up four types of roles: ordinary salesperson, workshop supervisor, finance, and administrator, and configure different data table and document access permissions for each.

[0036] After logging into the system, the workshop supervisor enters a compound question at the front end: "Query the workshop's defective product judgment criteria, and calculate the number of defective products in Workshop 1 and Workshop 2 in May 2026, generating a bar chart for comparison by workshop." The complete system execution process is as follows: Step 1: The front-end obtains the login identity as workshop supervisor and simultaneously sends the natural language question text and user identity information to the semantic parsing module; Step 2: The large model performs semantic decomposition to identify complex intents: ① Knowledge query: query the criteria for judging defective products; ② Data query: count the number of defective products in Workshop 1 and Workshop 2 in May; ③ Chart requirement: generate a bar chart comparing different workshops; at the same time, push the user's identity information to the permission verification module; Step 3: The permission verification module checks user permissions: the workshop supervisor can view the production process knowledge base and the workshop defective product data table, but does not have permission to access financial data. After the verification is passed, subsequent instructions are allowed. Step 4: Knowledge Processing Branch: Send a search command to the knowledge base retrieval module, match the "Workshop Defective Product Judgment Management Specification" document to the vector database, extract the core clauses in the document, and organize them into concise text answers by the large model; Step 5: Data Processing Branch: Retrieve the enterprise's digital dictionary, identify the corresponding data table `defect_info` and field `defect_num` for "Quantity of Defective Products", the corresponding field `workshop` for "Workshop 1 / Workshop 2", and the time range for 2026-05-01 to 2026-05-31; the system automatically generates a standard SQL statement and sends it to the data platform for query execution; the data platform returns a structured dataset: 126 defective products in Workshop 1 and 89 defective products in Workshop 2; Step 6: Based on the instruction of "workshop bar chart comparison", the large model passes the dataset and chart type parameters to the chart rendering module. The chart rendering module automatically generates a two-dimensional bar chart comparison, and labels the coordinate axes and corresponding data values. Step 7: The system integrates three sections: ① Textual explanation of the defective product judgment criteria; ② Detailed tables of defective products in each workshop; ③ Bar chart comparing defective products in each workshop, all displayed to the user on the dialog page; it also supports one-click export of Word reports and image-format charts. Step 8: The permission module records the audit log of this operation, including the operator, the question asked, the data table accessed, the knowledge base document accessed, and the operation time, and retains it permanently.

[0037] 3. Implementation Results Workshop supervisors no longer need to sift through cumbersome policy documents, find data specialists to export data, or use BI tools to create charts; they can obtain all the necessary information with a single question. The system automatically blocks financial cost data that the user does not have permission to access, eliminating the risk of data leakage. On average, data specialists are required to retrieve data more than 40 times per day, significantly improving the efficiency of responding to business issues in the workshop.

[0038] 4. Implementation Instructions In addition to manufacturing enterprises, this system can be adapted to financial, retail, government, and internet enterprises. Only the corresponding industry knowledge base documents, business data platform, and digital dictionary need to be replaced. There is no need to modify the core system architecture. Technical personnel in the relevant fields can completely reproduce the system of this invention by following the module connection and interaction process described in this embodiment, without the need for additional creative experiments.

[0039] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0040] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for querying enterprise knowledge and business data based on a large model and an enterprise knowledge base, characterized in that, Includes the following steps: S1. Receive natural language questions input by users through a unified interactive front end, perform semantic parsing on the question text, and distinguish the type of question requirement; S2. Read the job permission information of the currently logged-in user, perform permission verification, and filter out knowledge base resources and business data resources that the user does not have permission to access. S3. Distribute and process tasks according to the identified demand type; if it is a knowledge-based demand, perform a private knowledge base retrieval and generate a knowledge answer based on the retrieval results; if it is a data-based demand, perform a business data query and return a structured dataset; if it is a combined knowledge and data demand, perform knowledge retrieval processing and data query processing simultaneously, and combine the results of the two types of processing to generate a comprehensive answer. S4. Based on the data query results, automatically match the appropriate visualization format according to the semantics of the question and generate the corresponding visualization chart; S5. Unify and integrate knowledge answers, data details and visualization charts, return results to users through a unified interactive front end, and support result export; The entire process is logged for auditing and traceability.

2. The method for querying enterprise knowledge and business data based on a large model and enterprise knowledge base according to claim 1, characterized in that, In S2, the unified interactive front end connects to the enterprise's unified login system and synchronously transmits user identity and job permission information. Permission verification is performed based on pre-configured enterprise hierarchical permission rules, intercepting unauthorized query commands and returning a permission insufficient prompt.

3. The method for querying enterprise knowledge and business data based on a large model and enterprise knowledge base according to claim 1, characterized in that, In S3, the processing of knowledge-related requirements is specifically as follows: The system calls the private knowledge base retrieval module and uses a large model semantic vector retrieval method to match internal enterprise documents. Based on the retrieved document fragments, the large model extracts and generates accurate answers without outputting irrelevant complete documents. The specific handling of data-related requirements is as follows: The system retrieves the enterprise's unified digital dictionary, parses the data tables, fields, and relationships corresponding to the business terms in the query, and automatically generates compliant and executable SQL query statements from the large model. These queries are then sent to the enterprise data platform for execution and to obtain a structured dataset.

4. The method for querying enterprise knowledge and business data based on a large model and enterprise knowledge base according to claim 1, characterized in that, In S4, the compatible visualization chart types include line charts, bar charts, pie charts, and tables; the various visualization templates built into the chart rendering module automatically match statistical dimensions and indicators to complete the chart rendering, and output chart images or report files that support online preview and download.

5. The method for querying enterprise knowledge and business data based on a large model and enterprise knowledge base according to claim 1, characterized in that, In S5, the retained operation log includes the question content, the range of accessed data, the operator information, and the operation time, and is permanently stored for traceability.

6. A system for querying enterprise knowledge and business data based on a large model and an enterprise knowledge base, characterized in that: It includes a unified interactive front-end module, a semantic parsing and task distribution module, a permission security verification module, an enterprise private knowledge base retrieval module, a data middle platform linkage module, and an intelligent chart rendering module. These modules are interconnected through internal enterprise API interfaces. The unified interactive front-end module connects to the semantic parsing and task distribution module; the semantic parsing and task distribution module is bidirectionally connected to the permission security verification module; the permission security verification module connects to both the enterprise private knowledge base retrieval module and the data middle platform linkage module; the data middle platform linkage module interacts with the semantic parsing and task distribution module; and the semantic parsing and task distribution module connects to the intelligent chart rendering module. The unified interactive front-end module is the unified interactive entry point of the system, used to receive users' natural language input and display the integrated question and answer results; The semantic parsing and task distribution module is based on a privately deployed large language model as its core, used to parse the semantics of the question, identify the type of requirement, and distribute the processing task to the corresponding module. The permission security verification module is used to verify the user's job permissions, filter resources that the user does not have permission to access, and store the full-process operation audit log. The enterprise private knowledge base retrieval module is used to connect to the enterprise knowledge base document library and retrieve matching knowledge content according to task instructions. The data platform linkage module is used to connect with the enterprise business data platform and execute structured data queries according to task instructions; The intelligent chart rendering module is used to automatically generate visual charts based on task instructions and query datasets.

7. The enterprise knowledge and business data query system based on a large model and enterprise knowledge base according to claim 6, characterized in that, The semantic parsing and task distribution module has built-in semantic classification, entity recognition, and intent extraction capabilities. After receiving a question from the front end, the semantic parsing and task distribution module breaks down and distinguishes knowledge intent, data query intent, and composite intent, and generates knowledge base retrieval instructions, SQL query statements, and chart generation instructions, and sends them to the corresponding modules. The enterprise private knowledge base retrieval module has a built-in vector database that pre-stores the enterprise's existing business documents in vector form. After receiving a retrieval command, it matches relevant document fragments based on semantic similarity and returns the reference materials to the large model, which then extracts and generates accurate answers.

8. The enterprise knowledge and business data query system based on a large model and enterprise knowledge base according to claim 6, characterized in that, The data platform linkage module includes a digital dictionary parsing subunit and an SQL execution subunit; The digital dictionary pre-stores all enterprise data tables, fields, business definitions, and data association rules. Upon receiving a data query intent, the digital dictionary parsing subunit maps natural language business terms to standard database fields. The large model generates SQL query statements that conform to the data platform specifications based on the mapping results. The SQL execution subunit then initiates a query to the data platform and receives the returned structured dataset.

9. The enterprise knowledge and business data query system based on a large model and enterprise knowledge base according to claim 6, characterized in that, The intelligent chart rendering module has a variety of built-in visualization templates. After receiving the dataset and chart type instructions, it automatically matches the statistical dimensions and indicators to complete the chart rendering and outputs chart images or report files that can be previewed and downloaded online. The permission security verification module stores the enterprise's hierarchical permission configuration, which is used to verify the range of documents that users can view, the data tables and fields that they can access, intercept unauthorized query commands and return a permission insufficient prompt, and summarize the operation logs of all modules and store them uniformly.

10. The enterprise knowledge and business data query system based on a large model and enterprise knowledge base according to claim 6, characterized in that, The system also includes a unified enterprise login system, an enterprise private document knowledge base, and an enterprise business data middleware repository; The enterprise unified login system is connected to a unified interactive front-end module for user identity authentication and the transmission of job permission information. The enterprise private document knowledge base is connected to the enterprise private knowledge base retrieval module and is used to store enterprise internal rules and regulations, business processes, product information, operation and maintenance manuals and other documents. The enterprise business data middle platform repository is connected to the data middle platform linkage module and is used to store structured business data such as enterprise business orders, finance, production, and customers.