Intelligent question and answer method and system for enterprise private knowledge base based on large model
By using named entity recognition and graph neural network models to perform semantic processing and integration on enterprise private knowledge bases, the problem of poor logical coherence in existing technologies is solved, and efficient semantic processing and integration of enterprise private knowledge bases is achieved to generate logically coherent question-and-answer responses.
Patent Information
- Application Number
- CN202611684618.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-29
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies are unable to semantically process and integrate interrelated business information scattered across different documents based on an accurate understanding of the meaning of natural language questions, making it difficult to form logically coherent question-and-answer responses for enterprise private knowledge bases.
The named entity recognition model performs semantic processing on the question wording to obtain the first semantic features of entity type and intent. The target business concept is queried in a pre-established knowledge network, and penetrating queries are performed along entity relationships. The graph neural network model is used for feature aggregation and weight allocation, deduplication and noise filtering. Finally, the text is reorganized and context is spliced through a large language model to generate logically coherent response content.
It enables the orderly integration of business information scattered across different documents, forming logically coherent and complete question-and-answer responses, improving the accuracy of cross-document data integration, and eliminating the need for manual sorting and splicing.
Smart Images

Figure CN123178585A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent question answering technology, specifically to an intelligent question answering method and system based on a large-scale enterprise private knowledge base. Background Technology
[0002] In enterprise digital operations, regulations, business manuals, project files, and technical documents are stored in private knowledge bases. Employees can quickly and accurately access this knowledge, profoundly impacting operational efficiency. Currently, enterprise private knowledge base question-and-answer systems often employ retrieval-enhanced generation technology, where document fragments are retrieved based on semantic similarity using vector retrieval and then fed into a large language model to generate responses.
[0003] The recall unit of this technology is an independent document fragment, and the business relationship between the fragments is not modeled. Although its knowledge graph-enhanced retrieval branch introduces structured relationships, the retrieval stops at the surface nodes and relationships of the graph and does not penetrate to the original records of the heterogeneous documents at the bottom. The integration of cross-document fragments depends on the generation model to splice them together by itself. It lacks deduplication and filtering anchored by concept associations, and employees still need to sort them out manually.
[0004] Therefore, existing technologies cannot perform semantic processing and integration of interrelated business information scattered across different documents based on an accurate understanding of the meaning of natural language questions, resulting in difficulties in forming logically coherent question-and-answer responses for enterprise private knowledge bases. Summary of the Invention
[0005] This invention provides an intelligent question-answering method and system for enterprise private knowledge bases based on a large model, in order to solve the problem that existing technologies cannot perform semantic processing and integration of business information that is scattered across different documents and is related to each other based on an accurate understanding of the meaning of natural language questions, which makes it difficult to form logically coherent question-answering responses for enterprise private knowledge bases.
[0006] Firstly, to address the aforementioned technical problems, this invention provides an intelligent question-answering method based on a large-scale enterprise private knowledge base, comprising:
[0007] The query wording input by the user is obtained, and the query wording is semantically processed by the named entity recognition model to obtain a first semantic feature containing entity type and intent.
[0008] Based on the first semantic feature, node traversal and similarity calculation are performed in a pre-established knowledge network to determine the target business concept corresponding to the first semantic feature. Adjacent nodes and edge attributes are queried in the knowledge network to obtain at least one entity relationship corresponding to the target business concept.
[0009] A penetrating query is performed in multiple underlying document libraries along the entity relationships to obtain the first cross-file data containing multi-source heterogeneous information;
[0010] By using a graph neural network model to perform feature aggregation and weight allocation on the first cross-level data, the connectivity between each data node in the first cross-level data is determined, and the target concept association is obtained.
[0011] Based on the target concept association, the first cross-level data is deduplicated and noise filtered to extract the second cross-level data that conforms to the target concept association. The second cross-level data and the first semantic features are then recombined and contextualized using a large language model to obtain logically coherent target response content.
[0012] Secondly, the present invention provides an intelligent question-answering system for an enterprise private knowledge base based on a large model, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the intelligent question-answering method for an enterprise private knowledge base based on a large model as described above.
[0013] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the intelligent question-answering method for an enterprise private knowledge base based on a large model as described above.
[0014] Compared with the prior art, the present invention has the following beneficial effects:
[0015] (1) The present invention obtains the first semantic feature by semantically processing the question wording through the named entity recognition model. The initial feature vector integrates part-of-speech tags and contextual semantic representation. When the same question is asked in different wording or colloquial expressions, the feature values remain similar. Then, the target business concept is determined by node traversal and similarity calculation in the pre-established knowledge network, so that the understanding of the question meaning is based on structured semantics rather than literal keywords. At the same time, the first cross-file data is obtained by penetrating the document library stored in multiple underlying storages along the entity relationship, and the business information that is scattered in different documents and related to each other is integrated in an orderly manner to form a logically coherent and complete question and answer response.
[0016] (2) The present invention constructs the initial node features by combining the value encoding of the data nodes with the first semantic features, so that the node weight values obtained by feature aggregation and weight allocation through the graph neural network model change with different questions, and the connectivity between data nodes is judged to obtain the target concept association. When deduplicating, the inclusion relationship of the field name set and the semantic similarity value are used together to determine that data nodes with similar expressions and complementary content are retained, thereby improving the accuracy of cross-level data integration.
[0017] (3) The present invention uses a large language model to reorganize the second cross-level data and the first semantic features into text and splice the context, so that the output content corresponds to the entity and intent of the question. The spliced text strings with a coherence score lower than the preset coherence threshold are smoothed, so that the first information fragments from different documents are reorganized into target response content with logical coherence, without the need for manual sorting and splicing. Attached Figure Description
[0018] Figure 1 A flowchart illustrating the intelligent question-answering method for an enterprise private knowledge base based on a large model, provided in the first embodiment of the present invention;
[0019] Figure 2 This is a schematic diagram illustrating the semantic processing effect of the question wording provided in the first embodiment of the present invention;
[0020] Figure 3 This is a schematic diagram illustrating the data node weight allocation effect provided in the first embodiment of the present invention;
[0021] Figure 4 This is a schematic diagram illustrating the coherence effect of the target response content provided in the first embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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.
[0023] like Figure 1 As shown, an embodiment of the present invention provides an intelligent question-answering method for an enterprise private knowledge base based on a large model, including steps S11 to S15:
[0024] S11, Obtain the question wording input by the user, and perform semantic processing on the question wording through the named entity recognition model to obtain a first semantic feature containing entity type and intent direction;
[0025] S12, based on the first semantic feature, perform node traversal and similarity calculation in a pre-established knowledge network to determine the target business concept corresponding to the first semantic feature, and query adjacent nodes and edge attributes in the knowledge network to obtain at least one entity relationship corresponding to the target business concept.
[0026] S13, perform a penetrating query along the entity relationship in multiple underlying document libraries to obtain the first cross-file data containing multi-source heterogeneous information;
[0027] S14, use a graph neural network model to perform feature aggregation and weight allocation on the first cross-level data, determine the connectivity between each data node in the first cross-level data, and obtain the target concept association;
[0028] S15, based on the target concept association, the first cross-level data is deduplicated and noise filtered to extract the second cross-level data that conforms to the target concept association. The second cross-level data and the first semantic features are recombined and contextualized using a large language model to obtain the target response content with logical coherence.
[0029] In step S11, the user-inputted question wording is obtained, and semantic processing of the question wording is performed using a named entity recognition model to obtain a first semantic feature containing entity type and intent, including:
[0030] The question wording is denoised to obtain a standard text sequence;
[0031] The standard text sequence is segmented and labeled with parts of speech, and the segmentation results are encoded word by word according to the context through a preset semantic coding model to obtain an initial feature vector that integrates part-of-speech tags and contextual semantic representation.
[0032] Entity recognition is performed on the initial feature vector to obtain the target named entity;
[0033] When the confidence score of the target named entity is greater than a preset score threshold, the target named entity is semantically mapped to obtain a first semantic feature containing entity type and intent.
[0034] Specifically, users type their questions in natural language at the enterprise's private knowledge base Q&A portal, which typically includes interjections, titles, and repeated characters. The noise reduction process performs stop word filtering and redundant character folding on the question wording, comparing each character with the stop word list one by one. Matched titles and interjections are removed, and consecutive repeated interjections are folded into one, outputting a standard text sequence.
[0035] The stop word list is generated by statistically analyzing the most frequent non-business terms recorded in the company's historical Q&A logs over the past year. It includes the top 200 terms based on their cumulative frequency of 95% of the total frequency of non-business terms. Further expansion would result in the accidental deletion of business terms. The one-year period is based on the fact that business terms are replaced approximately every year. Longer windows will include obsolete expressions. The list is updated monthly with the logs.
[0036] The process involves word segmentation and part-of-speech tagging, which segments the standard text sequence word by word and tags each word with a part-of-speech label. The part-of-speech labels are a closed set of five categories: nouns, verbs, time words, proper nouns, and others. Function words and interrogative words not belonging to the first four categories are classified as "other." The segmentation results are organized into a word-by-word feature sequence, with each item concatenated in the same format and having the same dimensions: the first dimension is the word's sequence number in the business thesaurus (0 for words not included); the second dimension is the word's part-of-speech label code; the third and fourth dimensions are the part-of-speech label codes of the preceding and following words, respectively (0 for words missing at the beginning or end of a sentence), for a total of four part-of-speech label components.
[0037] Subsequently, the pre-defined semantic encoding model encodes each segmentation result word by word according to its context, taking the context semantic vector of each word as 512 dimensions. This is then concatenated with the aforementioned 4-dimensional part-of-speech tag component, resulting in a total dimension of 516 for each item, thus obtaining the initial feature vector that integrates part-of-speech tags and context semantic representation. The part-of-speech tag component takes values from 1 to 512, and the absolute values of each dimension of the context semantic vector are normalized to 1.0. Therefore, before concatenation, the index code is divided by the business vocabulary size of 512, and the tag code is divided by the number of part-of-speech classes of 5, to ensure that the two components are of the same magnitude.
[0038] The contextual semantic component makes different wordings with the same business meaning take similar values: In the example, the cosine distance between the contextual semantic vectors of the two wordings "whether there is a delay in delivery" and "whether there is a delivery delay" is 0.06, while the 4-dimensional component encoded by only the word list number and part-of-speech tag takes completely different values under the two wordings.
[0039] It should be noted that the preset semantic encoding model is a pre-trained self-attention encoder containing 6 self-attention layers, each with 8 attention heads and 512 hidden dimensions. It outputs a 512-dimensional context semantic vector word by word, and the mean of the absolute value of each dimension is normalized to 1.0. The training data consists of 80,000 sentence samples obtained by segmenting the full set of business documents and historical question-and-answer logs from the enterprise's private knowledge base. Sentences with at least 4 words after segmentation are included, while table excerpts and fragmented sentences are excluded. The sample size of 80,000 sentences ensures that each term in the business thesaurus has at least 100 occurrences, meeting the requirements for parameter estimation.
[0040] Training aims to minimize the model's predicted cross-entropy of the masked words by randomly masking 15% of the words in the sentence, and then back-updates the weights of each layer. The process terminates when the cross-entropy on the validation set no longer decreases for two consecutive rounds or when the preset maximum number of training iterations is reached. The preset maximum number of training iterations is rounded up to 40, which is one-fold wider than the upper bound of the number of rounds required for convergence in the same batch of training. The choice of 6 layers and 512 hidden dimensions is based on the fact that these values result in the lowest cross-entropy on the validation set; increasing the number of layers further would result in a cross-entropy decrease of less than 1% while increasing the single-encoding latency by approximately 0.5 times.
[0041] When using it, the segmentation results are input into the preset semantic encoding model in word order. The model calculates the weighted sum of the associations between each word and the other words in the same sentence according to the self-attention weights, and outputs the context semantic vector word by word. The output value of the same word changes in different neighboring word environments. Polysemy and colloquial rewriting are distinguished by this vector.
[0042] The business terminology list is generated by statistically analyzing nouns and business action phrases from all business documents in the enterprise's private knowledge base. Entries with a frequency of at least 5 times and verified are included. The threshold of 5 times is based on the fact that less than 10% of terms with a frequency below 5 times are verified as business terms, as inclusion would introduce noise. A total of 512 terms are included, and additions are made quarterly as the document library is updated. Part-of-speech tagging is performed according to five parts of speech, with values ranging from 1 to 5. The number of feature sequence items per word equals the number of segmented words.
[0043] It should be noted that entity recognition is performed by a named entity recognition model, which is a pre-trained encoder-decoder structure model. The encoding part is the aforementioned preset semantic encoding model, and the decoding part is a conditional random field layer. Both parts are jointly trained on the same batch of labeled samples. The training data consists of 3,000 initial feature vector samples obtained from the enterprise's historical question-and-answer logs and business document annotations. Samples with complete annotations and entity boundaries that have been cross-checked by two people are included, while those with disputed boundaries or entities spanning sentences are excluded. The sample size of 3,000 samples ensures that each of the four types of entities has no less than 500 positive samples, which meets the requirements for parameter estimation. The contextual semantic components in this 516-dimensional observation input ensure that different expressions of the same entity fall within similar value ranges, and synonymous rewriting and colloquial questions yield consistent entity boundary labels.
[0044] Each sample is labeled with entity boundaries and entity types. The entity types cover four categories: supplier entities, project events, time constraints, and business actions. These four types of names are the entity type names output by the downstream semantic mapping, and are consistent across the entire chain.
[0045] Training aims to maximize the conditional probability of labeled samples. It iteratively updates the transition parameters of the conditional random field layer and the weights of each layer in the encoding part. Iteration terminates when the target change between two consecutive training iterations is less than a preset convergence value or the number of iterations reaches a preset maximum number of training iterations. The preset convergence value is the inflection point value of the target change when the entity recognition accuracy on the validation set no longer improves, and is set to 0.001. The preset maximum number of training iterations is rounded up by 1 times the upper bound of the number of rounds required for convergence in the same batch of training, and is set to 200, as a fallback termination.
[0046] When used, the initial feature vector is input into the Conditional Random Field (CRF) layer of the named entity recognition model. This layer determines the entity boundary label word by word based on the contextual dependencies between adjacent terms in the initial feature vector, and outputs the target named entity and the confidence score of each target named entity. The confidence score is obtained by the model calculating the probability of each target named entity belonging to one of the four entity types, taking the highest probability, multiplying it by 100, and converting it to a percentage.
[0047] The preset scoring threshold was determined based on entity recognition results samples from the company's historical Q&A logs, which were manually verified. Those with clear verification conclusions were included, while those with differing opinions were excluded. The threshold included 1500 correctly identified entries and 400 incorrectly identified entries. The sample size of 1500 ensured that the 5th percentile fell at the 75th ranking value, stabilizing the tail of the ranking. The confidence scores of correctly identified samples were sorted in ascending order, and the 5th percentile was used as the lower bound (76). The upper bound for incorrectly identified samples was 74. The 2-point difference between the two thresholds was added to the lower bound with a 4-point safety margin, resulting in a score of 80.
[0048] The enterprise business ontology is a pre-built dictionary of business concepts, generated by summarizing the concept definition entries from the business specification documents of each department. Each entry registers the concept name, the entity type to which it belongs, synonyms and superior concepts, and is maintained as the specification documents are revised. It contains 1800 entries.
[0049] When the confidence score of the target named entity exceeds a preset score threshold, the semantic mapping retrieves synonyms and superordinate concepts of the target named entity in the enterprise business ontology, reads the entity type registered in the hit entries, and then filters out false hits according to historical entity constraints. Historical entities are target named entities previously output within the same session. The filtering action involves comparing the entity types of the hit entries with those of historical entities, removing those that are inconsistent and do not constitute a superordinate relationship, and outputting a first semantic feature containing the entity type and intent. This feature also carries the concept name of the hit entry as the entity name; the intent is determined by the combination of interrogative words and business actions in the question wording.
[0050] For example, Figure 2 This is a schematic diagram of the semantic processing effect of question wording. The cosine distance of the initial feature vector is significantly smaller than the cosine distance of the part-of-speech tag component, indicating that after fusing the contextual semantic representation, different question wordings with the same business meaning can maintain similar feature values, providing a stable foundation for target named entity recognition and the generation of the first semantic feature.
[0051] In step S12, based on the first semantic feature, node traversal and similarity calculation are performed in a pre-established knowledge network to determine the target business concept corresponding to the first semantic feature. Neighboring nodes and edge attributes are queried in the knowledge network to obtain at least one entity relationship corresponding to the target business concept, including:
[0052] The first semantic feature is encoded to obtain an initial semantic vector;
[0053] Calculate the distance between the initial semantic vector and the node feature vectors of each node in the knowledge network to obtain the node matching score;
[0054] When the node matching score is greater than the preset matching threshold, the traversal path of the corresponding node in the knowledge network is recorded.
[0055] The traversal path is parsed to determine the target business concept corresponding to the first semantic feature.
[0056] Specifically, the knowledge network is a pre-established graph structure data. The nodes are enterprise business entities such as suppliers, products, projects, contracts, rectification documents, and departments. The edges are the business relationships between entities. The edge attributes record the relationship type and co-occurrence frequency. The relationship types cover four categories: triggering, attribution, rectification relationship, and record evidence. Among them, the attribution relationship edge represents the hierarchical relationship of the business. The knowledge network is constructed from the full set of documents in the enterprise's private knowledge base through entity extraction and relationship extraction, and is incrementally updated as the documents are updated.
[0057] The encoding is performed by word vector lookup and mean pooling. The word vector table is pre-encoded by the preset semantic encoding model in step S11, which encodes the entire document of the enterprise private knowledge base sentence by sentence. The vocabulary is constructed by removing stop words from the entire document and includes 20,000 words. For each word, the context semantic vector of each sentence in the entire document is collected. The vectors of each word are hierarchically clustered according to the cosine distance. The lower limit of the cosine distance between classes is 0.3. The mean of the vectors within each class is taken as the 512-dimensional word vector of a sense of the word and solidified into a word vector table.
[0058] When the same term clusters into two or more categories, the word vector table is registered separately according to the meaning. The lower limit of the cosine distance between categories is set to 0.3, based on the fact that, as confirmed by business personnel, 95% of the cosine distances between word pairs belonging to different meanings are not less than 0.3. Those with a value lower than this are mostly synonymous expressions after review. The word vector dimension is set to 512, consistent with the hidden dimension of the preset semantic coding model; each dimension retains the sign and does not take the absolute value, but is only normalized to 1.0 by the mean of the absolute values of each dimension, so that directional information is preserved in the cosine distance calculation.
[0059] During encoding, the entity name, entity type, and intent direction in the first semantic feature are split into terms. Each term is looked up in the table to obtain the word vector, and the mean is calculated according to the dimension to obtain an initial semantic vector of 512 dimensions. When two or more word vectors are registered for the same term, the one with the smallest cosine distance to the mean vector of the other terms of the same feature is selected. Terms not registered in the word vector table do not participate in the mean pooling. When all terms are not registered, all dimensions are set to 0. If the vector obtained by looking up the word vector table and performing mean pooling has all dimensions of 0, the vector does not indicate the semantic direction, and its cosine similarity with any vector is counted as 0 and its cosine distance is counted as 1.
[0060] The node matching score is calculated as follows: an index is established for the pre-calculated node feature vectors of all nodes in the knowledge network; the cosine distance between the initial semantic vector and the node feature vector of each node is calculated; the difference between 1 and the cosine distance is multiplied by 100 to obtain the node matching score. Both the node matching score and the cosine distance are dimensionless. The sign of each dimension of the word vector is retained. The cosine similarity ranges from -1 to 1, the cosine distance ranges from 0 to 2, and the node matching score ranges from -100 to 100. The smaller the cosine distance, the higher the node matching score. Nodes with negative scores are naturally excluded in the subsequent threshold comparison. When all dimensions of the initial semantic vector are 0, the node matching score of each node is 0. When the node matching score of a node with no node is greater than the preset matching threshold, neither the traversal path nor the target business concept is generated, and the question-and-answer process ends.
[0061] To narrow the downstream comparison range, the top 50 nodes with the highest matching scores are selected to form a candidate node set. Comparisons are only made with the preset matching threshold within this candidate node set. The selection of the top 50 nodes is based on the fact that 98% of the 1200 node matching score samples confirmed by business personnel in the company's historical Q&A logs fall within the top 50 in the ranking. These 1200 samples include those confirmed by business personnel and exclude those that repeatedly match the same question wording. They also serve as the calibration samples for the preset matching threshold described below.
[0062] The node feature vector is obtained by splitting the entity name, entity description and associated edge text of each node into words in the knowledge network construction stage, looking up the same word vector table and pooling the mean. It is in the same 512-dimensional semantic space as the initial semantic vector. It is the static feature of the existing nodes of the knowledge network and is recalculated as the increment is updated. In contrast, the initial node feature of step S14 is the dynamic feature of the data node and is extracted on-site in this step. The two belong to different graph structures.
[0063] The preset matching threshold is determined based on the above 1200 samples. The sample size of 1200 ensures that the 5th percentile falls on the 60th sorted value, stabilizing the tail. The samples are sorted in ascending order, and the 5th percentile is taken as the lower bound of 82. The upper bound for false hits is 80. The interval is 2 points, and the guard band of 3 points is added to the lower bound, resulting in 85.
[0064] When the node matching score is greater than the preset matching threshold, the traversal path is a sequence of nodes consisting of the node and each of its parent nodes that point to the node along the association edge of the class, arranged in a top-to-bottom order.
[0065] When parsing and traversing the path, the node names of each level are read in the order of the path. The node names of each level are concatenated from top to bottom into a phrase. The phrase is then split into entries and the path semantic vector is obtained by looking up the word vector table and pooling the mean. During the construction phase, the semantic vectors of each concept entry in the enterprise business ontology have been calculated and stored in the same word vector table. The cosine distance between the two is calculated for each entry, and the entry with the smallest cosine distance is selected as the target business concept.
[0066] This method does not require the concatenated phrase and the wording of the entry to be identical word to word: when there are differences in wording between the node name and the entry wording, the path semantic vector and the semantic vector of the concept entry are still judged to be the minimum distance because the semantic components of the context are similar.
[0067] In one implementation, the step of querying adjacent nodes and edge attributes in the knowledge network to obtain at least one entity relationship corresponding to the target business concept includes:
[0068] Based on the target business concept, query neighboring nodes in the knowledge network and extract the feature matrix and edge attributes of the neighboring nodes;
[0069] The feature matrix is weighted according to the edge attributes to obtain the attribute weights;
[0070] When the attribute weight is greater than the preset attribute weight threshold, the relationship type and association strength of the adjacent nodes are extracted;
[0071] Aggregate the adjacent nodes according to the relationship type and the association strength to obtain at least one entity relationship corresponding to the target business concept.
[0072] Specifically, using the target business concept "supplier performance risk verification" as the anchor point, the first-order adjacent nodes of this concept are queried in the knowledge network, and four adjacent nodes are found: "delayed delivery event", "rectification document", "quality assessment report" and "cooperative project". The feature matrix is composed of the node feature vectors of each adjacent node stacked in rows, with 4 rows and 512 dimensions.
[0073] The edge attribute records the co-occurrence frequency of the target business concept node and each adjacent node. The co-occurrence frequency is obtained by counting the number of times the two entities co-occur in the same sentence in the document set during the construction phase, and then dividing it by the maximum number of times the two entities co-occur in the same sentence in any entity pair in the set. The value ranges from 0 to 1.
[0074] The weighted calculation uses the co-occurrence frequency of the edge attributes as the weight. First, the co-occurrence frequency is multiplied dimension by dimension by the feature vector of the corresponding node in the feature matrix. Then, the absolute values of each dimension are taken and the arithmetic mean is calculated. Finally, the result is multiplied by 100 to convert it to a percentage, which yields the attribute weight. This weight is dimensionless and ranges from 0 to 100. The values of each dimension of the node feature vector inherit the normalization caliber of the word vector table, and the mean of the absolute values of each dimension is 1.0, so the conversion magnitude is consistent with the percentage system.
[0075] The preset attribute weight threshold is determined based on 900 valid related edge samples confirmed by the enterprise's historical Q&A logs. Related edges confirmed by business personnel are included, while occasional edges appearing only in a single document are excluded. The sample size of 900 ensures that the 30th percentile falls on the 270th ranking value, which is in the middle of the distribution. The co-occurrence frequency distribution of this sample is calculated, and the 30th percentile yields 0.70. Using the conversion relationship of multiplying by 100 as described above, this is converted to a lower bound of 70 for the attribute weight, which is then set to 70.
[0076] When the attribute weight is greater than the preset attribute weight threshold, the relationship type and association strength between the corresponding adjacent nodes and the target business concept are extracted. The relationship type is read from the association type of the edge attribute record, and the value is one of the four types mentioned above. The association strength is calculated by dividing the number of times the associated edge appears in the historical document by the maximum number of times the same type of associated edge appears, multiplying by 100, converting to a percentage, and rounding to the nearest integer. The value range is 0 to 100.
[0077] Among them, attribute weight and association strength cannot be substituted for each other: attribute weight is obtained by weighting the entire feature matrix by the co-occurrence frequency, and its value is uniquely determined by the co-occurrence frequency. It reflects the degree of co-occurrence association between adjacent nodes and the target business concept and is used to filter out weakly related neighbors; association strength only counts the sufficiency of historical evidence for a single association edge and is used for selection within the group during the aggregation stage. Therefore, each retains an independent threshold.
[0078] During aggregation, nodes are grouped by relation type. Within each group, the features of adjacent nodes with a correlation strength greater than a preset fusion strength threshold are averaged and fused. The relation type and correlation strength of each group are combined and output to obtain at least one entity relation corresponding to the target business concept. The preset fusion strength threshold is the 25th percentile value after the correlation strength of the above 900 valid relation edge samples is sorted in ascending order. This percentile falls on the 225th sorted value and is estimated to be stable, so it is set to 90.
[0079] Each of the four adjacent nodes generates two entity relationships according to its own association type, for a total of eight: "Delayed delivery event" generates induced relationship 92 and attribution relationship 91; "Rectification document" generates rectification relationship 95 and record verification relationship 93; "Quality assessment report" generates record verification relationship 94 and attribution relationship 92; "Cooperative project" generates attribution relationship 96 and induced relationship 91. The strength of all eight relationships is greater than the preset fusion strength threshold of 90.
[0080] The preset matching threshold of 85, preset attribute weight threshold of 70, and preset fusion strength threshold of 90 on the same processing chain have different objectives. The matching threshold controls the positioning accuracy of the target business concept; deviations will amplify downstream along the traversal path, so it is set to strict. The attribute weight threshold controls the retention of adjacent nodes; missed neighbors cannot be recalled, and extra-retained nodes will be aggregated and filtered out, so it is set to lenient. The fusion strength threshold controls the sufficiency of evidence for edges entering fusion; after fusion, the features of each edge are inseparable, and extra-retained edges cannot be removed after fusion; its quantile is similar to that of the attribute weight threshold. The differences in leniency and strictness among the three are weighed according to whether the consequences of misjudgment can be corrected downstream.
[0081] In step S13, a penetrating query is performed along the entity relationship in multiple underlying document libraries to obtain first cross-file data containing multi-source heterogeneous information, including:
[0082] When the number of at least one entity relationship is greater than a preset number threshold, the underlying storage path corresponding to each entity relationship is extracted; when the number of at least one entity relationship is not greater than the preset number threshold, the underlying storage path corresponding to the entity relationship with the highest association strength is extracted.
[0083] Based on the underlying storage path, a penetration query is performed in the document library to obtain the original heterogeneous documents;
[0084] The first information fragment corresponding to the original heterogeneous document is read from the preset structured fragment library. If the fragment is not read, the original heterogeneous document is parsed in a structured manner to obtain the first information fragment.
[0085] The first information fragments are spliced and fused according to the association identifier of the entity relationship to obtain the first cross-file data containing multi-source heterogeneous information.
[0086] Specifically, the document library is the underlying storage medium collection of the enterprise's private knowledge base. It is divided into sub-libraries according to business departments and stored in a distributed file system. The documents in the library include scanned rectification documents in image scan format, inspection log sheets in Extensible Markup Language (XML) format, and project weekly reports in plain text format. The underlying storage path is the Uniform Resource Locator (URL) address of the documents pointed to by each entity relationship. During the construction phase, the URL addresses of each document appearing in each entity node attribute have been registered. During retrieval, the URL addresses are read from the node attributes of each associated entity.
[0087] Among them, the total number of entity relationships associated with the target business concept "supplier performance risk verification" is counted in the quantity judgment and path extraction statistics, and a total of 8 entity relationships are counted in the output of step S12, including inducing, attributing, rectification association, and record supporting entity relationships.
[0088] The preset threshold is determined based on 600 query samples from the company's historical Q&A logs that have been confirmed by business personnel to require cross-document integration. Queries involving two or more documents in the response are included, while those requiring only a single document for a response are excluded. The sample size of 600 ensures that the lower quartile falls on the 150th ranking value, which is in the middle of the distribution. The number of entity relationships corresponding to each sample is counted, and the lower quartile of this distribution is taken and rounded down. In this example, the lower quartile is 5.4, so it is rounded to 5.
[0089] This threshold does not determine whether a penetration query is executed, but only determines the scope of entity relationships covered by the penetration query: when the number is greater than the threshold, all paths are taken for each entity relationship; when the number is not greater than the threshold, only the path of the entity relationship with the highest association strength is taken. In both cases, the penetration query and the first information fragment reading proceed downstream. Therefore, questions that can be answered with a single document also complete the document query process.
[0090] Questions that can be answered with a single document are executed in the next branch. In the example, the question "What is the inspection conclusion of last month's inspection log?" only yields 2 record supporting entity relationships in step S12, with the number not exceeding the preset quantity threshold of 5. The entity relationship with the highest association strength, "Inspection Log - Inspection Conclusion", is selected, and the Uniform Resource Locator address of the associated entity is extracted. A penetration query is then performed to obtain 1 inspection log.
[0091] The first data in this branch is a single data record. In step S14, all elements of the adjacency matrix are 0, and the node connection path is a sequence of nodes formed by this single data node. In step S15, the pairwise parsing comparison has no matching node pairs, so no nodes are removed. The abnormal distribution detection is still performed on this record. After that, the target response content is output according to the prompt template.
[0092] It should be noted that the penetration query is executed by directly connecting to the document library sub-database based on the underlying storage path. The query request bypasses the knowledge network surface index and locates the document file in the underlying storage medium one by one according to the Uniform Resource Locator address and reads it to obtain the original heterogeneous document.
[0093] The pre-built structured fragment library is a pre-established storage table for parsing results. It uses the Uniform Resource Locator (URL) address and document timestamp of each document as the primary key, registering all the first information fragments obtained from parsing that document. The library is created when a document is added to the library, triggered by a write event in the storage system. This is asynchronous with the question-and-answer process; therefore, during the query phase, only the primary key is used for reading, and parsing is not performed. If a document is modified, the write event is triggered again, and the document is re-parsed using the new document timestamp, overwriting the document's registered entries.
[0094] During reading, the system searches in a pre-defined structured fragment library using the Uniform Resource Locator (URL) address and document timestamp of the original heterogeneous document as keys. If a match is found and the document timestamps are consistent, the first information fragment is retrieved. If no match is found, the system performs the following structured parsing on the original heterogeneous document to obtain the first information fragment. The parsed fragment is then registered in the library with the same primary key for retrieval when a subsequent query matches the same document.
[0095] Structured parsing is performed according to the format. Optical character recognition is performed on the scanned image, and then the recognized text lines are matched according to the line pattern of field name + full-width colon + value. The matched lines are split into field names and values by colons. Mismatched characters are corrected according to the entry with the smallest edit distance in the business thesaurus, and the structured fields are output.
[0096] For Extensible Markup Language (XML) documents, node text is extracted according to predefined field paths. These field paths are pre-registered in the parsing configuration table according to the inspection log structure, registering "Inspection Log / Conclusion" and "Inspection Log / Pass Rate". For plain text documents, key-value pairs are extracted by segmenting by paragraph and matching preset field patterns. The preset field patterns are the aforementioned line patterns, and the field names are taken from the business thesaurus. All parsing outputs are uniformly presented as a first information fragment, which is a text entry with field names. Examples include entries such as "Corrective Measures: Replace Packaging Production Line and Re-inspect", "Delivery Delay Days: 12 days", "Inspection Conclusion: Pass", and "Project Delay Record: Delivery Delay".
[0097] The same document will not be parsed repeatedly when it is hit by different questions.
[0098] Among them, the association identifier is a unique identifier string registered by the entity relationship during the knowledge network construction stage. It is generated by concatenating the entity identifiers at both ends of the relationship with the relationship type code. The first information fragment of each document pointed to by the same entity relationship carries the same association identifier. The document timestamp is the writing time automatically registered by the storage system when each document is entered into the document library. It cannot be modified after entry and serves as the sorting basis for concatenation within the group.
[0099] The splicing and merging process uses the association identifier as the primary key. First information fragments with the same association identifier are grouped together. Within each group, fragments are concatenated in ascending order of document timestamp. The concatenation of fragments within the same group results in one data record. The collection of all data records in each group constitutes the first cross-file data. In the example, 8 documents are merged into 8 data records.
[0100] In step S14, feature aggregation and weight allocation are performed on the first cross-level data using a graph neural network model to determine the connectivity between data nodes in the first cross-level data, thereby obtaining the target concept association, including:
[0101] Extract data nodes from the first cross-level data, and construct initial node features based on the value encoding of the data nodes and the first semantic features;
[0102] The initial node features are aggregated and weighted using a graph convolutional neural network to obtain node weight values.
[0103] When the node weight value is greater than the preset node weight threshold, the connectivity between the data nodes is determined to obtain the node connection path.
[0104] Conceptual entities are extracted based on the node connectivity paths, and target concept associations are determined based on the conceptual entities.
[0105] Specifically, data nodes are entries from the first cross-data segment grouped by the same business entity. During extraction, initial feature vectors are constructed for each first information fragment according to the word segmentation and part-of-speech tagging method in step S11, and then input into the named entity recognition model in step S11 to perform entity recognition. Fragments with the same entity are grouped into one data node, and the node name is taken from the entity name. Four data nodes were extracted: "Delivery Delay Days", "Rectification Measures", "Inspection Conclusion", and "Project Delay Record".
[0106] The initial node features are constructed by combining the value encoding of each data node with the first semantic feature. All data nodes are constructed in the same format and have the same dimensions to ensure that weighted summation by adjacency matrix is executable. Dimensions 1 to 7 are the normalized values of seven numerical fields: delivery delay days, rectification hours, rectification costs, number of inspection batches, number of returned items, acceptance score, and performance score. Items without carriers are set to 0. Dimensions 8 to 71 are the 64-dimensional text encoding of node names and value text. Dimensions 72 to 135 are the 64-dimensional semantic encoding of the first semantic feature. The total number of dimensions is 135.
[0107] The query semantic encoding process splits the entity name, entity type, and intent direction from the first semantic feature into terms, then looks up the term vector in step S12 and performs mean pooling. The first 64 dimensions of the mean vector are then selected, sharing the same value caliber as the text encoding. The values of dimensions 72 to 135 differ for the same data node under different queries. Therefore, the node weight values obtained through graph convolution vary with the query, representing the node's importance relative to the current query, rather than a static importance unrelated to the query.
[0108] Normalization of numerical fields uses the upper limit of historical values for each field as the divisor. The upper limit of historical values for each field is the 99th percentile of the 5000 historical records over the past 3 years, rounded up, excluding manually added records that were not reviewed. With a sample size of 5000 records, the 99th percentile falls on the 4950th ranked value, ensuring stability at the tail. In the example, the upper limit of the delivery delay days is 50 days, and the value of this node is 12 days, so after normalization, it is 12 ÷ 50 = 0.24. Text encoding follows the word vector table from step S12. After splitting the node name and the value text into words, the word vector is retrieved from the table, and the mean is calculated according to the dimension. Then, the first 64 dimensions of the mean vector are selected. The reason for selecting 64 dimensions is that this type of value is generally a phrase, and 64 dimensions are sufficient to distinguish the 1800 concept entries in the text. Adding more dimensions would increase the computational load without improving the distinguishability.
[0109] Graph Convolutional Neural Network (GCNN) is a lower-level implementation of the graph neural network model. It contains two graph convolutional layers and one fully connected output layer. It is a pre-trained model. The training data consists of 800 sets of historical cross-level data samples from the enterprise, the first semantic features of the questions corresponding to each set, and the manually labeled node weight values of each data node. Complete responses were included, while those with fewer than 3 nodes were excluded. The 800 sets of samples ensured that each business scenario had at least 100 sets to meet the parameter estimation requirements. The node weight label value is the degree of necessity of the node labeled by the business personnel for the questions in that set, taken as an integer from 0 to 100 percentile, and scaled the same as the output node weight value.
[0110] During training, the weights of each layer are updated in reverse with the goal of minimizing the mean squared error between the node weight values output by the graph convolutional neural network and the node weight labels. The iteration terminates when the mean squared error is less than a preset convergence value or the number of iterations reaches a preset maximum number of training iterations. The preset convergence value is the inflection point value when the mean squared error of the validation set no longer decreases, which is set to 0.01. The preset maximum number of training iterations is set to 300, which is the upper bound of the number of rounds required for convergence in the same batch of training, expanded by 1. The number of graph convolutional layers is set to 2, based on the fact that the diameter of the adjacency relationship of data nodes is generally 2, and 2 layers can cover the second-order neighborhood. Adding more layers would cause the features to become oversmoothed.
[0111] The hidden layer dimension is set to 64, based on the lowest mean squared error in the validation set after training with 32, 64, and 128 dimensions on the aforementioned 800 sets of historical cross-level data. The error was approximately 12% higher with 32 dimensions, and the difference between the error and 64 dimensions with 128 dimensions was less than 1%, while the computational cost per forward pass increased by approximately 100%. This dimension and the 64 dimensions of the initial node feature text encoding are independently calibrated design quantities. The former is determined based on the aforementioned mean squared error of the validation set, while the latter is determined based on the dimension required to distinguish the 1800 concept entries within the entity. The fact that both have the same value indicates consistent calibration results, rather than being bound together.
[0112] Feature aggregation is performed according to the graph structure, and an adjacency matrix is constructed according to the association relationship of each data node: when the first information fragment of two nodes belongs to the same data record, the corresponding matrix element is set to 1; when two nodes belong to different data records, but the names of the two nodes belong to the same superordinate concept or form a superordinate relationship in the enterprise business ontology, the corresponding matrix element is also set to 1; otherwise, it is set to 0.
[0113] Each layer first uses the trainable weight matrix of that layer to linearly transform the node features to the hidden layer dimension. The first layer transforms from 135 dimensions to 64 dimensions, and the second layer transforms from 64 dimensions to 64 dimensions. Then, the transformation results of the node and its neighboring nodes are weighted and summed according to the adjacency matrix. After the output is activated by the modified linear unit, the output of the second layer is the aggregated feature vector of the node, with the same dimension as the hidden layer.
[0114] Step S13, the splicing and fusion, only groups the first information fragments into data records according to the association identifier. It neither distinguishes the importance of each data node within a record relative to the current query, nor establishes cross-record node associations. This step overlays cross-record association edges established according to the enterprise business ontology on top of this grouping, and calculates the node weight values of each node relative to the current query using the initial node features carrying the first semantic features. Therefore, the output node connectivity path can span two or more data records, a result that cannot be provided by the grouping in step S13.
[0115] The weight allocation is performed by the fully connected layer of the output layer of the graph convolutional neural network. After linear transformation of the aggregated feature vector, it is mapped to the 0 to 1 range through sigmoid activation, and then multiplied by 100 to convert it to a percentage. The output node weight value is dimensionless and ranges from 0 to 100, representing the importance of the node.
[0116] It should be noted that the node weight values and the attribute weights in step S12 are both percentage weights, but they are applied to different objects: the attribute weights are obtained by weighting the feature matrices of adjacent nodes by the edge attributes and are used to filter adjacent nodes in the knowledge network; the node weight values are calculated by the graph neural network model on the aggregated feature vectors and are used to filter data nodes participating in connectivity judgment; the aggregated feature vectors are the dynamic features obtained by the data nodes through two layers of graph convolution.
[0117] The preset node weight threshold was determined based on 2400 confirmed key data node samples from the aforementioned 800 sets of historical cross-data sets. Those confirmed as essential for response were included, while those with conflicting annotations were excluded. The sample size of 2400 ensured that the 10th percentile fell on the 240th ranked value, stabilizing the tail. The sample weight values were sorted in ascending order, and the 10th percentile was used to obtain a lower bound of 77. The upper bound for noisy nodes was 74, with an interval of 3. A guard band of 3 was superimposed on the lower bound, resulting in a value of 80.
[0118] When the node weight value is greater than the preset node weight threshold, a connectivity judgment is triggered. A depth-first search is performed on the above adjacency matrix starting from the data node exceeding the threshold. The search is expanded layer by layer along the edges with a matrix element of 1. The upper limit of the search depth is 2 layers. The search is terminated when the upper limit of the depth is reached or there are no unvisited adjacent nodes. The sequence of nodes traversed is output as the node connectivity path. The intermediate nodes of the path are not restricted by the threshold.
[0119] The search depth limit of 2 layers is based on the fact that, in the 800 sets of historical cross-data sets confirmed by business personnel, 95% of the node connectivity paths relied upon by the conceptual entity have no more than 3 nodes, i.e., no more than 2 layers of edges. Increasing the depth further would include nodes that are weakly related to the target concept in the path. This limit and the number of graph convolution layers are independently calibrated design quantities. The former is determined by the path length quantiles mentioned above, and the latter is determined by the adjacency diameter. The fact that both values are the same indicates that the calibration results are consistent, rather than that they are bound together.
[0120] When extracting conceptual entities based on node connectivity paths, the values and field names of each node on the connectivity path are concatenated in sequence to form a phrase, and then the higher-level concept obtained from the enterprise business ontology for this phrase is used as the conceptual entity.
[0121] When determining the target concept association, the concept entity name is looked up in the word vector table in step S12 and pooled into a semantic vector of the concept entity. The cosine distance between this vector and the semantic vector of each concept entry that has been fixed and stored in the enterprise business ontology is calculated one by one. The concept entry with the smallest cosine distance is taken as the mapping result, and the target concept association is output.
[0122] For example, Figure 3 This is a schematic diagram illustrating the effect of data node weight allocation. The node weight values for delivery delay days, rectification measures, inspection conclusions, and project delay records change with the query samples and form a differentiated distribution. Data nodes exceeding the preset node weight threshold can trigger connectivity judgment, ensuring that the node connection path remains associated with the first semantic feature corresponding to this query.
[0123] In step S15, based on the target concept association, the first cross-level data is deduplicated and noise filtered to extract the second cross-level data that conforms to the target concept association. Then, using a large language model, the second cross-level data and the first semantic features are reconstructed and context-concatenated to obtain logically coherent target response content, including:
[0124] Perform pairwise parsing and comparison on each data node in the first cross-level data to obtain semantic similarity values;
[0125] When the semantic similarity value is greater than the preset filtering threshold, and the field name set of one of the two data nodes contains the field name set of the other data node, redundant nodes in the first cross-level data are removed to obtain preliminary deduplicated data.
[0126] Anomaly detection is performed on the preliminary deduplicated data to identify noise features. Data records that do not conform to the target concept are removed based on the noise features to obtain a clean dataset.
[0127] Extract the second cross-level data that matches the target concept from the clean dataset.
[0128] Specifically, pairwise parsing and comparison are performed to look up the text representation of each data node in the word vector table according to step S12 and perform mean pooling to obtain the node semantic vector of each node. The node semantic vector is the text vector of the data node in the first cross-level data, and belongs to a different graph structure from the node feature vector used for knowledge network node matching in step S12. The cosine similarity of each node semantic vector is calculated pairwise, multiplied by 100 to convert it to a percentage, and then used as the semantic similarity value. The higher the value, the greater the possibility that the two nodes represent the same business meaning.
[0129] The preset filtering thresholds were determined based on 1000 pairs each of confirmed synonym and anisotropic node pairs from historical cross-data sets. Pairs whose similarity was verified by two people were included, while those with incomplete descriptions were excluded. The sample size was 1000 for each pair, ensuring that the 5th and 95th percentiles fell at the 50th and 950th ranking values respectively, with stable values at both ends. The lower bound of 86 was obtained from the 5th percentile of similarity for synonym pairs, and the upper bound of 94 was obtained from the 95th percentile of similarity for anisotropic pairs. The median value was then set to 90.
[0130] When the semantic similarity value is greater than the preset filtering threshold, and the field name set of one of the two data nodes contains the field name set of the other data node, it is determined that the two data nodes express the same business meaning. The fragment information measurement values of the two nodes are compared, and redundant nodes with smaller measurement values are removed. When the measurement values are equal, the one with the newer document timestamp is retained. The first information fragment merged by the removed node is synchronously removed from its respective data record, and the preliminary deduplicated data is output.
[0131] The set of field names is the set obtained after deduplicating the field names of the first information segments merged by the data node. The inclusion criterion separates duplicate information from complementary information: among two truly duplicate nodes, the field names carried by one are a subset of the other, and there is no information loss after removal; two nodes with similar expressions and complementary content each have field names that the other does not have, they do not contain each other, and both are retained.
[0132] The fragment information metric is the sum of the number of non-empty fields in the first information fragment merged by this node and the total length of the value characters.
[0133] In contrast, when a numeric field node and its corresponding record field node are similar in textual description but their field name sets do not contain each other, they are considered complementary and both are retained, and are not discarded as redundancy due to superficial semantic similarity.
[0134] The anomaly detection process involves verifying the distribution of numerical fields in the initial deduplication data. It calculates the mean and standard deviation of historical normal values for each field, using 5000 historical records from the past three years. The three-year period is chosen because the adjustment cycle for business standards is approximately three years; longer windows would include values from before changes. Records verified by the business system are included, while manually entered records that haven't been reviewed are excluded. This 5000-record sample size ensures the relative fluctuation of the mean and standard deviation estimates is below 2%. Data records deviating from the mean by more than three times the standard deviation and lacking supporting data from other fields are identified as carrying noise characteristics; a single match indicates that the data record carries noise characteristics.
[0135] The deviation factor is taken as 3 times the standard deviation, based on the assumption that the probability of deviation is about 0.3% under the normality assumption, and the false alarm rate is negligible with 5,000 samples. The lack of other field evidence means that none of the related fields in the same group of data records support this abnormal value.
[0136] When extracting the second-tier data from the clean dataset, pattern matching is performed using the target concept association as the retrieval condition. Each data record is traversed, and records that match at least one of the fields "delivery delay days," "rectification measures," or "inspection conclusion," and whose cosine distance between the record's semantic vector and the target concept association semantic vector is less than 0.2, are extracted to obtain the second-tier data. The record's semantic vector is obtained by looking up the word vector table from the record text and then performing mean pooling. The target concept association semantic vector is the concept entry semantic vector obtained from step S14. The upper limit of the cosine distance is set to 0.2 because 95% of the cosine distances in synonym pairs fall within 0.14. Considering the longer record text and the dilution of semantics by irrelevant fields, the 0.06 guard band is relaxed to 0.2.
[0137] In one implementation, the step of performing text recombination and context splicing on the second cross-data set and the first semantic features using a large language model to obtain logically coherent target response content includes:
[0138] The second cross-segment data is decomposed into long sentences and its references are restored to obtain a set of candidate texts;
[0139] The candidate text set and the first semantic feature are recombined and contextualized using the large language model to obtain a concatenated text string.
[0140] When the coherence score of the concatenated text string is lower than the preset coherence threshold, the concatenated text string is smoothed by the large language model to obtain the target response content with logical coherence.
[0141] Specifically, the long sentence decomposition process breaks down complex long sentences exceeding a preset length threshold in the second data segment into independent short sentences based on dependency syntax. The preset length threshold is 40 characters (based on periods and semicolons), and is based on statistics of sentence lengths in the company's private knowledge base documents. The sample consists of 3,000 sentences confirmed as standard expressions by business personnel, excluding table excerpts and fragmented sentences. This sample size of 3,000 ensures that at least 300 sentences are obtained in each length range around 40 characters, with a relative fluctuation of less than 3% in the estimated proportion. Among these, 90% of sentences exceeding 40 characters contain two or more parallel predicates. The segmentation point is taken at the connecting element of the parallel predicates, ensuring that each short sentence contains one predicate.
[0142] The reference restoration is performed by backfilling according to the preset reference mapping table. This mapping table pre-registers the correspondence between pronouns and business entity types, registers the supplier entity corresponding to "this supplier", the business action corresponding to "this time" and "this time", and the nearest preceding entity corresponding to single-character pronouns.
[0143] During backfilling, the system searches for the business entity with the same type and the closest position to the entity corresponding to the pronoun within the short sentence and the preceding context window, and replaces the pronoun with the name of that business entity. The context window takes the two short sentences preceding the short sentence, based on statistics of 1200 sentences containing pronouns out of the aforementioned 3000 sentences, excluding samples where pronouns span paragraphs. The sample size of 1200 sentences ensures that 95% of the percentiles fall at the 1140th ranking value, with stable tails, and the interval between the pronoun and the entity it refers to is no more than 2 sentences in 95% of cases.
[0144] Among them, the large language model is a generative model that has been fine-tuned in advance on the enterprise's private knowledge base corpus. The main body is a decoder with a self-attention structure. The decoder has 32 layers, 4096 hidden dimensions, and 32 attention heads, with a parameter scale of about 7 billion. The basis is that this scale has the lowest loss on the validation set with 12,000 fine-tuned samples. When the number of parameters is increased to 13 billion, the loss decreases by less than 1%, while the latency of a single inference increases by about 100%.
[0145] The capability boundaries of this scale model for multi-document fragment reassembly tasks are given by the context window and the number of fragments: the context window is set to 8192 words, and the total length of candidate text that can be accommodated in a single batch is capped at 8192 words; when the total length of candidate text exceeds this limit, it is divided into batches according to the business timeline, with each batch having a total length not exceeding 8192 words, and is input sequentially. Each batch outputs a concatenated text string, and then the concatenated text strings of each batch are fed back to the model in batch order for secondary concatenation.
[0146] On the validation set of the aforementioned 12,000 fine-tuned samples, the model of this scale output content that hit all the necessary fragments in 96% of the samples whose answers were reconstructed from two or more document fragments, and the fragment temporal arrangement that was consistent with the annotations of business personnel was 93%. Therefore, those skilled in the art can judge that this scale supports the ability to reconstruct multiple document fragments.
[0147] The fine-tuning data consisted of 12,000 document question-answer pairs. Answers were included only if they were reconstructed from two or more document fragments, while those from a single document were excluded. This 12,000-pair sample size ensured at least 1,500 pairs for each business scenario. The answers in the fine-tuned samples were similar to the candidate text set input during the usage phase, consisting of reconstructed text from multiple document fragments, differing only in timing. Fine-tuning aimed to minimize the cross-entropy loss by updating parameters. Training terminated when the validation set loss stopped decreasing for two consecutive rounds or after five iterations. These two values were determined by the loss bottoming out in the third to fourth rounds of fine-tuning within the same batch; widening the observation window by one round confirmed that the loss had bottomed out and was not overfitting.
[0148] When using this tool, assemble the candidate text set and the first semantic feature according to the prompt template and input them into the large language model. The prompt template contains 5 slots in sequence: the role description slot is filled with the enterprise private knowledge base question and answer assistant, the question semantic slot is filled with the entity name and intent of the first semantic feature, the candidate text list slot is filled with each candidate text and the source document name in rows, the sorting requirements slot is filled with candidate texts arranged in chronological order according to business timeline and only retaining the candidate texts corresponding to the entities and intents in the question semantic slot, and the output format slot is filled with a single continuous text with the source document name indicated by full-width brackets at the end of each sentence.
[0149] The model captures the semantic dependencies between the question semantic slots and each candidate text according to the self-attention structure, eliminates candidate texts that have no corresponding relationship with the entity and intent, and then reassembles and splices the spliced text string according to the business timeline. The project weekly report's delay description, rectification measures of the rectification document, and inspection conclusion of the inspection log are strung together in chronological order, and the source document name is marked at the end of each sentence.
[0150] The question semantic slots ensure that the output content corresponds to the entities and intents of the question item by item, rather than being determined solely by the temporal relationship of the candidate texts themselves; the source document name in the output format slots allows each sentence in the response to be traced back to the document it is based on, so that business personnel can verify it in the document library by the document name.
[0151] It should be noted that the coherence score is a measure of the discourse cohesion of the concatenated text string, calculated based on the pass rate of cohesion determination for adjacent sentence pairs. The concatenated text string is divided into sentences by periods and semicolons, and the cohesion of each adjacent sentence pair is determined: the cohesion is established when the following sentence contains a cohesive word from the pre-set cohesive word list; the cohesion is established when the subject entity of the following sentence refers to the same business entity that has appeared in the preceding sentence; and the cohesion is established when the business time markers carried by the two sentences are progressively chronological.
[0152] If any one of the above three conditions is met, the adjacent sentences are considered to be connected. The pre-registered list of connecting words is a pre-registered list of connecting words for four types of relationships: cause and effect, sequence, comparison, and summary. It includes 48 words such as "therefore", "subsequently", "but", and "in summary". These words are generated by statistically analyzing the reply texts in the company's historical Q&A logs that have been evaluated as usable by business personnel and have been included at least 10 times.
[0153] The same reference determination compares the entity type and entity name output in step S11. The comparison granularity is at the entity type level: if the entity types of the business entities contained in the two sentences are the same, or if there is core referential overlap between the entity names (including hierarchical relationships and part-whole relationships), they are judged as the same reference. It is not required that the entity names be identical word by word. The business time marker is taken from the time words in each sentence.
[0154] The coherence score is calculated by dividing the number of adjacent sentence pairs that are coherent by the total number of adjacent sentence pairs, and then multiplying by 100. It is dimensionless and ranges from 0 to 100. This metric only checks whether there is explicit coherence, referential continuation, or temporal progression between adjacent sentences. If the real-life response of the story progresses sequentially along two or more facts and the themes of adjacent sentences are different, it is not considered as lacking coherence.
[0155] The preset coherence threshold was determined based on a sample of 2000 historically verified, manually coherent responses. Responses deemed acceptable by business personnel were included, while those with differing assessments were excluded. The sample size of 2000 ensured that the 10th percentile fell at the 200th ranking value, stabilizing the tail of the response. The coherence score distribution of this sample was statistically analyzed, with the 10th percentile yielding a lower bound of 82. The upper bound for incoherent responses was 79, with a 3-point interval between the two. A 3-point guard band was added to the lower bound, resulting in a score of 85.
[0156] When the coherence score is lower than the preset coherence threshold, smoothing is triggered. The concatenated text string and the adjacent sentence pairs that do not connect are sent back to the large language model according to the above prompt template. The model only inserts a transitional short sentence that describes the business relationship between the two sentences between the adjacent sentence pairs that do not connect. The original expression of each sentence and the sentence order of the whole string remain unchanged, and the target response content with logical coherence is output.
[0157] The target response after smoothing is: "The supplier's collaborative project last year had a delayed delivery (project weekly report). The delivery delay was 12 days (project weekly report). The rectification phase then began. The supplier implemented rectification measures by replacing the packaging production line and re-inspecting (rectification document scan). The inspection conclusion was qualified (inspection log)."
[0158] The preset filtering threshold of 90, the upper limit of cosine distance of 0.2, the three-times standard deviation for anomaly detection, the preset coherence threshold of 85, and the preset length threshold of 40 are all different in this step.
[0159] The filtering threshold controls the granularity of deduplication merging. False merging causes nodes with different business meanings to be treated as duplicates, resulting in information loss that is irrecoverable. Therefore, the strictest threshold is adopted, and a second constraint is applied based on the inclusion relationship of the field name set. Only when both conditions are met will a record be removed. The upper limit of cosine distance is 0.2, which corresponds to a similarity of 80, which is more lenient than the 90 for synonym judgment. This upper limit controls the relevance recall of data records and target concepts. Missed recalls cannot be recovered, and multiple recalls will still be screened out during the splicing stage. The consequences of false rejection in anomaly judgment are slightly lenient due to the lack of secondary constraints from other fields. The coherence threshold only determines whether to perform another smoothing process, and the length threshold only performs sentence splitting preprocessing. False judgments do not affect information integrity, so both are the most lenient.
[0160] All preset thresholds across the entire process are determined using the same calibration procedure: samples confirmed by business personnel are extracted from the company's historical Q&A logs or historical cross-data sets; values are taken at the quantiles corresponding to the threshold; and then compared with the boundary values of the samples on the opposite side, with a guard band added and rounded down. The calibration samples for each threshold are all taken from the same batch of historical Q&A logs and the same batch of historical cross-data sets. A single sampling is sufficient to support the quantile taking for each threshold, and the calibration workload does not increase linearly with the number of thresholds.
[0161] When no historical Q&A logs are available for a company, the following default values are used based on the cold start path: preset score threshold 80, preset matching threshold 85, preset attribute weight threshold 70, preset fusion strength threshold 90, preset quantity threshold 5, preset node weight threshold 80, preset filtering threshold 90, preset coherence threshold 85, preset length threshold 40 characters, upper limit of cosine distance 0.2, and deviation multiple of anomaly detection 3 times the standard deviation. These default values are obtained by taking the median of each threshold after calibration using the above process from the historical Q&A logs of three companies in the same industry. The value fluctuation of each threshold among the three companies does not exceed 5%.
[0162] After the system goes live, the system accumulates monthly Q&A logs and records of business personnel's adoption or rejection of responses. When the number of confirmed samples corresponding to a certain threshold reaches the number required for the above calibration, the threshold is recalibrated using the company's logs according to the above process and its default value is overwritten. The other thresholds continue to use the default value until their respective sample sizes reach the target. Therefore, the thresholds are switched in batches without waiting for all samples to be available.
[0163] For example, Figure 4 This is a diagram illustrating the coherence of the target response content. The average coherence score of the concatenated text strings is 81.31. After smoothing the concatenated text strings that are below the preset coherence threshold, the average coherence score of the target response content increases to 99.17. The first information fragments from different documents can form logically coherent response content according to business relationships.
[0164] In summary, this invention discloses an intelligent question-answering method for enterprise private knowledge bases based on a large model. Through a chain-like fusion of semantic processing, knowledge network traversal, cross-document penetration query, graph neural network association, and large language model reorganization, it achieves semantic processing and integration of business information that is scattered across different documents and is related to each other, based on an accurate understanding of the meaning of natural language questions, to form a logically coherent and complete question-answering response.
[0165] The second embodiment of the present invention provides an intelligent question-answering system for an enterprise private knowledge base based on a large model, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the intelligent question-answering method for an enterprise private knowledge base based on a large model as described above.
[0166] It should be noted that the intelligent question-answering system for enterprise private knowledge base based on a large model provided in this embodiment of the invention is used to execute all the process steps of the intelligent question-answering method for enterprise private knowledge base based on a large model in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0167] The specific embodiments described above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the technical scope disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention and are not intended to limit the scope of protection of the present invention.
Claims
1. A method for intelligent question answering based on a large-scale enterprise private knowledge base, characterized in that: include: The user inputs the wording of the question, and the wording of the question is semantically processed by the named entity recognition model to obtain a first semantic feature containing entity type and intent. Based on the first semantic feature, node traversal and similarity calculation are performed in a pre-established knowledge network to determine the target business concept corresponding to the first semantic feature. Adjacent nodes and edge attributes are queried in the knowledge network to obtain at least one entity relationship corresponding to the target business concept. A penetrating query is performed in multiple underlying document libraries along the entity relationships to obtain the first cross-file data containing multi-source heterogeneous information; By using a graph neural network model to perform feature aggregation and weight allocation on the first cross-level data, the connectivity between each data node in the first cross-level data is determined, and the target concept association is obtained. Based on the target concept association, the first cross-level data is deduplicated and noise filtered to extract the second cross-level data that conforms to the target concept association. The second cross-level data and the first semantic features are then recombined and contextualized using a large language model to obtain logically coherent target response content.
2. The intelligent question-answering method for enterprise private knowledge base based on a large model according to claim 1, characterized in that, The semantic processing of the question wording using a named entity recognition model to obtain a first semantic feature containing entity type and intent includes: The question wording is denoised to obtain a standard text sequence; The standard text sequence is segmented and labeled with parts of speech, and the segmentation results are encoded word by word according to the context through a preset semantic coding model to obtain an initial feature vector that integrates part-of-speech tags and contextual semantic representation. Entity recognition is performed on the initial feature vector to obtain the target named entity; When the confidence score of the target named entity is greater than a preset score threshold, the target named entity is semantically mapped to obtain a first semantic feature containing entity type and intent.
3. The intelligent question-answering method based on a large-scale enterprise private knowledge base according to claim 1, characterized in that, The step of determining the target business concept corresponding to the first semantic feature by performing node traversal and similarity calculation in a pre-established knowledge network based on the first semantic feature includes: The first semantic feature is encoded to obtain an initial semantic vector; Calculate the distance between the initial semantic vector and the node feature vectors of each node in the knowledge network to obtain the node matching score; When the node matching score is greater than the preset matching threshold, the traversal path of the corresponding node in the knowledge network is recorded. The traversal path is parsed to determine the target business concept corresponding to the first semantic feature.
4. The intelligent question-answering method based on a large-scale enterprise private knowledge base according to claim 1, characterized in that, The step of querying adjacent nodes and edge attributes in the knowledge network to obtain at least one entity relationship corresponding to the target business concept includes: Based on the target business concept, query neighboring nodes in the knowledge network and extract the feature matrix and edge attributes of the neighboring nodes; The feature matrix is weighted according to the edge attributes to obtain the attribute weights; When the attribute weight is greater than the preset attribute weight threshold, the relationship type and association strength of the adjacent nodes are extracted; Aggregate the adjacent nodes according to the relationship type and the association strength to obtain at least one entity relationship corresponding to the target business concept.
5. The intelligent question-answering method for enterprise private knowledge base based on a large model according to claim 4, characterized in that, The step of performing a penetrating query along the entity relationships in multiple underlying document libraries to obtain first cross-file data containing multi-source heterogeneous information includes: When the number of at least one entity relationship is greater than a preset number threshold, the underlying storage path corresponding to each entity relationship is extracted; when the number of at least one entity relationship is not greater than the preset number threshold, the underlying storage path corresponding to the entity relationship with the highest association strength is extracted. Based on the underlying storage path, a penetration query is performed in the document library to obtain the original heterogeneous documents; The first information fragment corresponding to the original heterogeneous document is read from the preset structured fragment library. If the fragment is not read, the original heterogeneous document is parsed in a structured manner to obtain the first information fragment. The first information fragments are spliced and fused according to the association identifier of the entity relationship to obtain the first cross-file data containing multi-source heterogeneous information.
6. The intelligent question-answering method for enterprise private knowledge base based on a large model according to claim 1, characterized in that, The step of performing feature aggregation and weight allocation on the first cross-level data using a graph neural network model, determining the connectivity between data nodes in the first cross-level data, and obtaining the target concept association includes: Extract data nodes from the first cross-level data, and construct initial node features based on the value encoding of the data nodes and the first semantic features; The initial node features are aggregated and weighted using a graph convolutional neural network to obtain node weight values. When the node weight value is greater than the preset node weight threshold, the connectivity between the data nodes is determined to obtain the node connection path. Conceptual entities are extracted based on the node connectivity paths, and target concept associations are determined based on the conceptual entities.
7. The intelligent question-answering method for enterprise private knowledge base based on a large model according to claim 1, characterized in that, The step of deduplicating and filtering noise in the first cross-level data according to the target concept association, and extracting the second cross-level data that conforms to the target concept association, includes: Perform pairwise parsing and comparison on each data node in the first cross-level data to obtain semantic similarity values; When the semantic similarity value is greater than the preset filtering threshold, and the field name set of one of the two data nodes contains the field name set of the other data node, redundant nodes in the first cross-level data are removed to obtain preliminary deduplicated data. Anomaly detection is performed on the preliminary deduplicated data to identify noise features. Data records that do not conform to the target concept are removed based on the noise features to obtain a clean dataset. Extract the second cross-level data that matches the target concept from the clean dataset.
8. The intelligent question-answering method for enterprise private knowledge base based on a large model according to claim 1, characterized in that, The step of using a large language model to perform text recombination and context splicing on the second cross-data set and the first semantic features to obtain logically coherent target response content includes: The second cross-segment data is decomposed into long sentences and its references are restored to obtain a set of candidate texts; The candidate text set and the first semantic feature are recombined and contextualized using the large language model to obtain a concatenated text string. When the coherence score of the concatenated text string is lower than the preset coherence threshold, the concatenated text string is smoothed by the large language model to obtain the target response content with logical coherence.
9. A smart question-answering system for an enterprise private knowledge base based on a large model, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the intelligent question-answering method for an enterprise private knowledge base based on a large model, as described in any one of claims 1 to 8.
10. 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 intelligent question-answering method for enterprise private knowledge base based on a large model, as described in any one of claims 1 to 8.
