Enterprise knowledge question answering system based on large language model

By using an enterprise knowledge question-and-answer system based on a large language model, the problems of fragmented knowledge and complex permissions within enterprises have been solved. This system enables semantically accurate and permission-compliant question-and-answer sessions, thereby improving the level of intelligent office work and the efficiency of knowledge utilization within enterprises.

CN120470096BActive Publication Date: 2025-12-26ZHEJIANG THIRDNET TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510722298.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-12-26
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

Existing enterprise knowledge question-answering systems cannot achieve accurate, compliant, and context-consistent question-answering in enterprise environments with complex semantics, strong contextual relevance, and poor permissions. In particular, in scenarios involving multiple departments, different permission levels, and inconsistent professional terminology, semantic drift and security risks exist.

Method used

An enterprise knowledge question-answering system based on a large language model is adopted, including a heterogeneous semantic embedding module, a permission mask calculation module, an enterprise terminology alignment module, and a candidate knowledge query module. Through multimodal unified embedding, semantic-level permission control, and terminology graph alignment, combined with the RAG retrieval enhancement mechanism, accurate and compliant question answers are generated.

Benefits of technology

It enables intelligent question answering across formats and multiple departments, avoiding semantic drift and unauthorized disclosure, and improving the accuracy and security of the question answering system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120470096B_ABST
    Figure CN120470096B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of large model knowledge question answering, and discloses an enterprise knowledge question answering system based on a large language model, which comprises a heterogeneous semantic embedding module, a permission mask calculation module, an enterprise terminology alignment module, a candidate knowledge query module and a question and answer generation output module; compared with an enterprise question answering mode realized by only relying on keyword matching or fixed FAQ rules in the prior art, especially under the conditions of internal enterprise knowledge distribution fragmentation, permission differentiation and terminology ambiguity, the technical problem that accurate, compliant and context-consistent semantic question answering cannot be realized is solved; since the application introduces a multi-modal unified embedding, a semantic-level permission control mechanism, a terminology graph alignment model and a RAG enhanced question and answer mechanism, cross-format and multi-department enterprise intelligent question answering is realized, thereby avoiding the problems of semantic drift and unauthorized disclosure, and the accuracy and safety of the question and answer system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of large model knowledge question answering, and in particular to an enterprise knowledge question answering system based on a large language model. BACKGROUND

[0002] At present, the knowledge question answering system in an enterprise mostly relies on keyword matching, FAQ preset templates or simple rule-based retrieval algorithms, and cannot handle problems with complex semantics and strong context relevance, especially in actual application scenarios of the enterprise involving multiple departments, different permission levels and inconsistent professional terms, which obviously shows obvious deficiencies. For example, when an employee of the enterprise proposes the question of "the payment approval process of the sales contract in the last quarter", the existing system cannot effectively understand the time range corresponding to "the last quarter" and the process nodes involved in "payment approval", and cannot determine whether the current user has the permission to access such information, resulting in an answer result that is either too general or exceeds the user's permission range, which has semantic drift or security risks. In addition, as the knowledge management of the enterprise becomes increasingly complex, the data sources in the enterprise are increasingly diverse, including PPT training materials, PDF technical specifications, Word system files and structured data (such as bills, approval records, etc.) in databases, and the existing technology generally lacks unified semantic representation and retrieval capabilities for multi-format heterogeneous documents, making it difficult to support high-quality, multi-scene, compliant and controllable question answering requirements. Therefore, there is an urgent need for an enterprise knowledge question answering system that can still achieve semantic accuracy, permission compliance, traceable and reliable enterprise knowledge question answering in the case of highly fragmented enterprise knowledge, complex permission levels and inconsistent term expressions, in order to improve the level of intelligent office work and the efficiency of knowledge utilization in the enterprise. SUMMARY

[0003] In view of the above technical deficiencies, the purpose of the present application is to provide an enterprise knowledge question answering system and method based on a large language model, aiming to solve the technical problem that the existing enterprise question answering mode only relies on keyword matching or fixed FAQ rules, especially under the conditions of fragmented internal knowledge distribution, differentiated permissions and term ambiguity in the enterprise, which cannot achieve accurate, compliant and context-consistent semantic question answering.

[0004] To solve the above technical problems, the present application adopts the following technical solution: the present application provides an enterprise knowledge question answering system based on a large language model,

[0005] The enterprise knowledge question answering system based on a large language model comprises:

[0006] The heterogeneous semantic embedding module is configured to obtain heterogeneous knowledge data sources in the enterprise, including unstructured document data sources and structured ticket data sources, sequentially perform OCR recognition processing, structure analysis processing and paragraph segmentation processing on the heterogeneous knowledge data sources, and extract information triplets; the information triplets are input into a preset multi-modal embedding function to obtain a unified knowledge semantic vector;

[0007] The permission mask calculation module is configured to obtain a current user role identifier , generate a corresponding permission mask vector , perform semantic permission filtering processing on the unified knowledge semantic vector through the permission mask vector , and obtain a permission constraint vector; a semantic subspace projection matrix is introduced to perform vector transformation on the permission constraint vector to obtain a low-dimensional semantic vector .

[0008] The enterprise terminology alignment module is configured to obtain a current question text vector , extract professional terms in the question text vector , construct a terminology phrase set , map the terminology phrase set to a preset enterprise terminology ontology graph , perform graph neural network embedding calculation on each terminology node in the terminology phrase set to obtain a terminology semantic vector, and fuse the terminology semantic vector and the question text vector to construct a query semantic vector .

[0009] The candidate knowledge query module is configured to calculate a similarity score according to the low-dimensional semantic vector and the query semantic vector using a cosine similarity method, and select K candidate knowledge vectors in descending order of the score.

[0010] The question and answer generation output module is configured to generate an answer based on a RAG retrieval enhancement mechanism combined with a language model DeepSeek and output the answer.

[0011] Preferably, in the heterogeneous semantic embedding module, the unstructured document data sources include slide format documents, Word text documents, PDF text documents and XML text documents; the structured ticket data sources include invoice information and ticket information; and the information triplets include text content, image visual embedding features and structure levels composed of page numbers and paragraph numbers.

[0012] Preferably, in the permission mask calculation module, the permission mask vector Used to control dimensional access permissions corresponding to the current user's role identifier; low-dimensional semantic vectors are used for content retrieval; semantic subspace projection matrix. Used to compress enterprise knowledge content into the current user role identifier in vector space. The corresponding semantic region that has access permissions.

[0013] Preferably, in the enterprise terminology alignment module, the terminology semantic vector is matched with the question text vector. By merging the data, a query semantic vector can be constructed. The steps and formula used are as follows: , where n is the total number of term nodes; The influence weight of the j-th term node is used to represent the semantic contribution of the j-th term node to the current problem; Let j be the j-th term in the semantic vector of the term.

[0014] Preferably, in the candidate knowledge query module, the K candidate knowledge vectors are all authorized semantic content within the current user's permission scope, and also carry their original document path, structural location information and permission level identifier, which are used for subsequent question and answer generation and traceability output.

[0015] Preferably, in the question-and-answer generation output module, answers are generated based on the RAG retrieval enhancement mechanism combined with the DeepSeek language model. The output steps specifically include: concatenating the K candidate knowledge vectors into the prompt template input Prompt. Input the prompt template into the Prompt via a pre-defined API interface into the DeepSeek language model, and receive the generated answer. And output it.

[0016] Preferably, in the question-and-answer generation output module, ,in, This is a JSON-formatted text field specified in the predefined API interface, used to specify a text range; This is the Kth candidate knowledge vector; This is a JSON-formatted question field specified in the predefined API interface, used to specify the question content; q is the current question text vector.

[0017] This invention also provides an enterprise knowledge question-answering method based on a large language model, including:

[0018] Step S10: Obtain heterogeneous knowledge data sources within the enterprise, including unstructured document data sources and structured invoice data sources. Perform OCR recognition processing, structure parsing processing, and paragraph segmentation processing sequentially on the heterogeneous knowledge data sources to extract information triples. Input the information triples into a preset multimodal embedding function to obtain a unified knowledge semantic vector.

[0019] Step S20: Obtain the current user role identifier Generate the corresponding permission mask vector The unified knowledge semantic vector is passed through the permission mask vector. Semantic permission filtering is performed to obtain the permission constraint vector; a semantic subspace projection matrix is ​​then introduced. Perform vector transformation on the permission constraint vector to obtain a low-dimensional semantic vector. ;

[0020] Step S30: Obtain the current question text vector For the question text vector Extract professional terms from the text and construct a term phrase set. Set of terms and phrases Mapped to a pre-defined enterprise terminology ontology graph For the set of terms and phrases Each term node in the graph neural network is embedded to obtain a term semantic vector; the term semantic vector is then compared with the question text vector. By merging the data, a query semantic vector can be constructed. ;

[0021] Step S40: Based on the low-dimensional semantic vector and query semantic vector The cosine similarity method is used to calculate the similarity score, and K candidate knowledge vectors are selected from high to low scores.

[0022] Step S50: Generate answers based on RAG retrieval enhancement mechanism combined with DeepSeek language model. And output it.

[0023] The present invention also provides a computer program product, including an enterprise knowledge question-answering program based on a large language model, wherein the enterprise knowledge question-answering program based on a large language model implements the enterprise knowledge question-answering method based on a large language model when executed by a processor.

[0024] The beneficial effects of the present application are that, compared with the enterprise question answering mode in the prior art which only relies on keyword matching or fixed FAQ rules, under the conditions of internal knowledge distribution fragmentation, permission differentiation and term ambiguity, the technical problem of accurate, compliant and context consistent semantic question answering cannot be realized. By introducing a multi-modal unified embedding, a semantic level permission control mechanism, a term graph alignment model and a RAG enhanced question answering mechanism, the present application realizes cross-format and multi-department enterprise intelligent question answering, thereby avoiding semantic drift and unauthorized disclosure, and improving the accuracy and security of the question answering system. BRIEF DESCRIPTION OF DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0026] Figure 1 The system schematic diagram of the first embodiment of the enterprise knowledge question answering system based on a large language model of the present application.

[0027] Figure 2 The device schematic diagram of the enterprise knowledge question answering system based on a large language model of the present application. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0029] Embodiment one: as shown in the flowchart of the first embodiment of the enterprise knowledge question answering system based on a large language model of the present application, the first embodiment of the enterprise knowledge question answering system based on a large language model of the present application is proposed. Figure 1

[0030] In the first embodiment, the enterprise knowledge question answering system based on a large language model comprises:

[0031] The heterogeneous semantic embedding module is configured to obtain heterogeneous knowledge data sources in the enterprise, including unstructured document data sources and structured ticket data sources, and sequentially perform OCR recognition processing, structure analysis processing and paragraph segmentation processing on the heterogeneous knowledge data sources to extract information triples; and input the information triples into a preset multi-modal embedding function to obtain unified knowledge semantic vectors;​

[0032] It should be noted that in the heterogeneous semantic embedding module, the unstructured document data source includes a slide format document, a Word text document, a PDF text document, and an XML text document; the structured ticket data source includes invoice information and ticket information; the information triplets include text content, image visual embedding features, and structural levels composed of page numbers and paragraph numbers. The OCR recognition processing includes optical character recognition of image-type documents using Tesseract, PaddleOCR, or Baidu general text recognition model, outputting text content and its position information on the image; the structure analysis processing includes using a model based on document layout analysis such as LayoutLMv3 to analyze the structural relationship of paragraphs, tables, titles, and main text, obtaining structured document objects; the paragraph segmentation processing includes dividing according to text block boundaries, title levels, and semantic pauses such as periods and paragraph marks, obtaining logically coherent minimum semantic units for subsequent embedding modeling.

[0033] It can be understood that the goal of the heterogeneous semantic embedding module is to uniformly convert enterprise knowledge fragments of multiple source heterogeneous formats (text, image, structured form) into vectorized semantic representations that can be used by large language models; the "multi-modal embedding function" in the module is based on the combination of the large language model DeepSeek and the multi-modal pre-training model BERT-LayoutLM fusion model, supporting joint modeling of text, image, and structure levels, and generating unified knowledge semantic vectors.

[0034] For example, for a certain enterprise's "Sales Contract Management Process Manual.pdf", the system can recognize the keywords "payment node" and "approval role" in the scanned page through OCR, then extract the chapter "Chapter 3 Approval Process" it belongs to through structure analysis, and finally generate embedding vectors in units of "payment node: Chapter 3 content section" for subsequent knowledge retrieval.

[0035] The permission mask calculation module is configured to obtain the current user role identifier , generate a corresponding permission mask vector , perform semantic permission filtering processing on the unified knowledge semantic vector through the permission mask vector , and obtain a permission constraint vector; introduce a semantic subspace projection matrix to perform vector transformation on the permission constraint vector, and obtain a low-dimensional semantic vector

[0036] It should be noted that in the permission mask calculation module, the permission mask vector is used to control the dimension-level access permission corresponding to the current user role identifier; the unified knowledge semantic vector is filtered through the permission mask vector The semantic permission filtering process is performed, and the filtering operation includes an element-by-element multiplication operation; a low-dimensional semantic vector is used for content retrieval; and a semantic subspace projection matrix For compressing enterprise knowledge content in a vector space to a current user role identifier Corresponding to the semantic area with permission access.

[0037] It can be understood that the permission mask calculation module not only realizes fine control of user permissions from the vector level, but also provides a calculation basis for high-dimensional compression to a low-dimensional semantic subspace in the subsequent knowledge retrieval stage, significantly reducing the security risks caused by permission leakage; the design of the semantic subspace projection matrix can be generated based on the local structure of the knowledge graph or the permission clustering result, for example, by constructing a low-dimensional projection matrix through Laplace eigenvalue decomposition or a principal component extraction method based on permission roles;

[0038] For example, if a user is a "financial officer", the mask vector will shield the personnel, management, and other category dimensions; and the semantic projection matrix will only cover the semantic areas related to finance such as contract approval and invoice circulation, so as to avoid involving unauthorized information when generating answers.

[0039] An enterprise term alignment module is configured to obtain a current question text vector , extract professional terms in the question text vector , and construct a term phrase set , map the term phrase set to a preset enterprise term ontology graph, perform graph neural network embedding calculation on each term node in the term phrase set , obtain a term semantic vector, and fuse the term semantic vector with the question text vector to construct a query semantic vector .

[0040] It should be noted that in the enterprise term alignment module, the step of fusing the term semantic vector with the question text vector to construct a query semantic vector uses the following formula: , wherein n is the total number of term nodes; is the influence weight of the jth term node, which represents the semantic contribution degree of the jth term node in the current question; is the jth item in the term semantic vector.

[0041] ​It can be understood that the enterprise term alignment module is used to solve the problem that the same term has different meanings in different departments or the same term has diversified expressions, thereby improving the understanding accuracy of the question and answer system for the enterprise internal semantics; the term ontology graph can be constructed in advance by the enterprise knowledge engineering team and stored in the standard format such as RDF / OWL; and the parameter training of the graph neural network can be weakly supervised and optimized based on the term co-occurrence relationship between historical question and answer records or department documents.

[0042] For example, when the user asks "when will this product go online?", if the department of the user is "R&D", the term "go online" may correspond to the code deployment process node; and in the "marketing department", it may correspond to the time of the first launch conference. The enterprise term alignment module can automatically map the "go online" term to the semantically correct node in the ontology graph based on the question context and the user role, ensuring the accuracy and consistency of vector retrieval and question and answer generation.

[0043] The candidate knowledge query module is configured to query the semantic vector of the candidate knowledge according to the low-dimensional semantic vector of the question and the user role and the query semantic vector The cosine similarity method is used to calculate the similarity score, and K candidate knowledge vectors are selected from high to low according to the score;

[0044] It should be noted that in the candidate knowledge query module, the K candidate knowledge vectors are all authorized semantic contents within the current user's authority range, and also carry the original document path, structural position information and permission level identifier, which are used for subsequent question and answer generation and traceability output.

[0045] It can be understood that the original document path and the structural position information carried in the candidate knowledge vector can be used for provenance annotation and traceability control in the subsequent answer generation process, ensuring that the question and answer results are explainable, auditable and accountable; at the same time, the permission level identifier will be used in the question and answer generation output module to further enhance the permission filtering.

[0046] It should be understood that this module realizes a high-precision knowledge recall mechanism that meets the enterprise security specifications through the fusion of "semantic space retrieval and permission constraint vectors" (low-dimensional semantic vector with permission constraints); without accessing the complete original document, it can effectively support document tracing and structural positioning.

[0047] The question and answer generation output module is configured to generate an answer based on the RAG retrieval enhancement mechanism combined with the language model DeepSeek and output.

[0048] It should be noted that in the question and answer generation output module, the answer is generated based on the RAG retrieval enhancement mechanism combined with the language model DeepSeek The step of outputting specifically includes splicing the K candidate knowledge vectors to the prompt template input Prompt The prompt template input Prompt is input into the large language model DeepSeek through a preset API interface, and a generated answer is received and output. In the question and answer generation output module, wherein, is a text field in the Json format specified in the preset API interface, used to specify the text range of the RAG retrieval enhancement mechanism; is the Kth candidate knowledge vector; is a question field in the Json format specified in the preset API interface, used to specify the question content; q is the current question text vector.

[0049] It can be understood that the introduction of the RAG mechanism not only improves the response ability of the language model to the context knowledge, but also significantly reduces the probability of "hallucination" questions; compared with traditional retrieval type question and answer or pure generation type question and answer, the scheme is more practical and stable in complex enterprise knowledge scenarios. The advantage of the RAG mechanism is to combine "query relevance" and "language generation ability": the retrieval part provides knowledge basis, and the generation part enhances the expression ability, so as to realize intelligent question and answer with higher quality, more pertinence and context matching degree.

[0050] For example, when the user asks "Is the office supplies reimbursement of the sales department in 2023 over budget?", the system first retrieves the budget table and reimbursement list paragraph related to "sales department", "office supplies" and "2023", inputs it into the DeepSeek model as Prompt, and the model output result will include "The sales department has a total of 35,000 yuan of office supplies reimbursement, which exceeds the budget upper limit of 30,000 yuan, and it is recommended to submit the approval remarks", etc., and marks "Information source: / department budget / 2023 / Q4 budget report.pdf page 3 paragraph 5" below, realizing the semantic output of knowledge verifiable.

[0051] Embodiment two: In addition, the enterprise knowledge question and answer method based on the large language model provided by the application adopts one of the enterprise knowledge question and answer systems based on the large language model in the above embodiments, and can solve the technical problem of an enterprise knowledge question and answer method based on the large language model. Compared with the prior art, the enterprise knowledge question and answer method based on the large language model provided by the application has the same beneficial effects as the enterprise knowledge question and answer system based on the large language model provided by the above embodiments, and other technical features in the enterprise knowledge question and answer method based on the large language model are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0052] Embodiment three: the present application provides a large language model-based enterprise knowledge question answering device, please refer to Figure 2 A large language model-based enterprise knowledge question answering device includes at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a large language model-based enterprise knowledge question answering method as described in embodiment one above. A large language model-based enterprise knowledge question answering device in an embodiment of the present application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), car terminals (such as car navigation terminals), and the like, as well as fixed terminals such as digital TVs, desktop computers, and the like. A large language model-based enterprise knowledge question answering device is merely an example and should not limit the functionality and scope of use of embodiments of the present application. A large language model-based enterprise knowledge question answering device can include a processing device 1001 (such as a central processor, a graphics processor, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1002 or loaded from a storage device 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of a large language model-based enterprise knowledge question answering device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. In general, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touch screens, touch pads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, and the like; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, and the like; storage devices 1003 including, for example, magnetic tapes, hard disks, and the like; and communication devices 1009. The communication devices 1009 can allow a large language model-based enterprise knowledge question answering device to communicate wirelessly or wiredly with other devices to exchange data. Although a large language model-based enterprise knowledge question answering device with various systems is shown in the figure, it should be understood that all of the shown systems are not required to be implemented or provided. More or fewer systems can be alternatively implemented or provided.

[0053] Embodiment Four: The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a method for enterprise knowledge question answering based on a large language model as described above. The computer program product provided by the present application can solve the technical problem of a method for enterprise knowledge question answering based on a large language model. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the method for enterprise knowledge question answering based on a large language model provided by the above-described embodiments, and are not described here in detail.

[0054] In particular, according to the embodiments disclosed by the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments disclosed by the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by a processing device 1001, the above-mentioned functions defined in the method of the embodiments disclosed by the present application are executed.

[0055] It should be understood that various parts of the present application can be realized with hardware, software, firmware, or a combination thereof. In the description of the above-described embodiments, specific features, structures, materials or characteristics can be combined in any appropriate manner in any one or more embodiments or examples.

[0056] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.

Claims

1. A large language model-based enterprise knowledge question answering system, characterized in that, The system comprises: The heterogeneous semantic embedding module is used to acquire heterogeneous knowledge data sources in an enterprise, including unstructured document data sources and structured bill data sources, sequentially performs OCR recognition processing, structure analysis processing and paragraph segmentation processing on the heterogeneous knowledge data sources, and extracts information triples; the information triples are input into a preset multi-modal embedding function to obtain unified knowledge semantic vectors; The permission mask calculation module is configured to obtain a current user role identifier , generate a corresponding permission mask vector , perform semantic permission filtering processing on the unified knowledge semantic vector through the permission mask vector , and obtain a permission constraint vector; and introduce a semantic subspace projection matrix to perform vector transformation on the permission constraint vector to obtain a low-dimensional semantic vector . The enterprise terminology alignment module is used to obtain the current question text vector. For the question text vector Extract the professional terms from the text and construct a term phrase set. Set of terms and phrases Mapped to a pre-defined enterprise terminology ontology graph For the set of terms and phrases Each term node in the graph neural network is embedded to obtain a term semantic vector; the term semantic vector is then compared with the question text vector. By merging the data, a query semantic vector can be constructed. ; The candidate knowledge query module is configured to calculate a similarity score according to the low-dimensional semantic vector and the query semantic vector and the query semantic vector The similarity score is calculated by using a cosine similarity method, and K candidate knowledge vectors are selected in descending order of the score. A question and answer generation output module is configured to generate an answer based on a RAG retrieval enhancement mechanism combined with a language model DeepSeek and output.

2. The enterprise knowledge Q&A system based on a large language model of claim 1, wherein, In the heterogeneous semantic embedding module, the unstructured document data sources include slide format documents, Word text documents, PDF text documents and XML text documents; the structured bill data sources include invoice information and bill information; the information triples include text content, image visual embedding features and structure levels composed of page numbers and paragraph numbers.

3. The enterprise knowledge Q&A system based on a large language model of claim 1, wherein, In the permission mask calculation module, the permission mask vector For controlling the dimension level access permission corresponding to the current user role identifier; the low-dimensional semantic vector is used for content retrieval; the semantic subspace projection matrix For compressing enterprise knowledge content in a vector space to the current user role identifier Corresponding to the semantic area with permission access.

4. The enterprise knowledge Q&A system based on a large language model of claim 1, wherein, In the enterprise terminology alignment module, the term semantic vector is aligned with the question text vector Fusion is performed to construct a query semantic vector The formula used in the step is: Wherein, n is the total number of term nodes; is the influence weight of the jth term node, which is used to represent the semantic contribution degree of the jth term node in the current question; is the jth item in the term semantic vector.

5. The enterprise knowledge Q&A system based on a large language model of claim 1, wherein, In the candidate knowledge query module, the K candidate knowledge vectors are authorized semantic contents within the current user's authority range, and simultaneously carry original document paths, structure position information and permission level identifiers, which are used for subsequent question and answer generation and traceable output.

6. The enterprise knowledge Q&A system based on a large language model of claim 1, wherein, In the question and answer generation output module, the answer is generated based on the RAG retrieval enhancement mechanism and the language model DeepSeek The step of outputting specifically includes splicing the K candidate knowledge vectors to the prompt template input Prompt The prompt template input Prompt is input into the large language model DeepSeek through a preset API interface, and the generated answer is received And output.

7. The enterprise knowledge Q&A system based on a large language model of claim 6, wherein, In the question and answer generation output module, the prompt template input wherein, is a text field in a Json format defined in a preset API interface, used to specify a text range; is the Kth candidate knowledge vector; is a question field in a Json format defined in a preset API interface, used to specify question content; q is a current question text vector.

8. A large language model-based enterprise knowledge question answering method applied to the large language model-based enterprise knowledge question answering system of any one of claims 1-7, characterized in that, The method comprises: Step S10: acquiring heterogeneous knowledge data sources in an enterprise, including unstructured document data sources and structured bill data sources, sequentially performing OCR recognition processing, structure analysis processing and paragraph segmentation processing on the heterogeneous knowledge data sources, and extracting information triples; and inputting the information triples into a preset multi-modal embedding function to obtain unified knowledge semantic vectors; Step S20: Obtain the current user role identifier , generate the corresponding permission mask vector , pass the unified knowledge semantic vector through the permission mask vector , perform semantic permission filtering processing to obtain a permission constraint vector; introduce a semantic subspace projection matrix , perform vector transformation on the permission constraint vector to obtain a low-dimensional semantic vector ; Step S30: Obtain the current question text vector , extract the professional terms in the question text vector , construct a term phrase set , map the term phrase set to the preset enterprise term ontology graph , perform graph neural network embedding calculation on each term node in the term phrase set to obtain a term semantic vector; and fuse the term semantic vector with the question text vector to construct a query semantic vector ; Step S40: according to the low-dimensional semantic vector and the query semantic vector The cosine similarity method is used to calculate the similarity score, and K candidate knowledge vectors are selected from high to low according to the score; Step S50: generating an answer based on the RAG retrieval-augmented mechanism combined with the language model DeepSeek and output. 9.A large language model-based enterprise knowledge question answering device, characterized in that, The enterprise knowledge question and answer device based on the large language model comprises a memory, a processor and an enterprise knowledge question and answer program based on the large language model stored on the memory and executable on the processor, and the enterprise knowledge question and answer program based on the large language model realizes the enterprise knowledge question and answer system based on the large language model in any one of claims 1 to 7 when executed by the processor.

10. A computer program product, characterised in that, The computer program product comprises an enterprise knowledge question and answer program based on the large language model, and the enterprise knowledge question and answer program based on the large language model realizes the enterprise knowledge question and answer system based on the large language model in any one of claims 1 to 7 when executed by the processor.

Citation Information

Patent Citations

  • Enterprise-level knowledge management system based on large language model

    CN119476460A

  • Digital base fusion system and electronic equipment

    CN119760007A