Enterprise knowledge graph construction method based on natural language processing

CN122507883APending Publication Date: 2026-08-04BEIJING KOLIDA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610645119.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-12
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

企业日常运营产生的海量数据呈现多源异构特征,大量信息存储于各类非结构化文档之中,常规处理方式无法完成多源文本数据的统一整合与标准化加工

Benefits of technology

[0070]Compared with the prior art, the advantages and positive effects of the present invention are as follows:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122507883A_ABST
    Figure CN122507883A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of natural language processing, in particular to an enterprise knowledge graph construction method based on natural language processing, comprising: collecting original texts and unstructured documents of a multi-source heterogeneous platform of an enterprise, generating a standardized enterprise text corpus through data cleaning and format unification processing; building a training data set after completing entity and relationship annotation, and optimizing a sequence labeling model in combination with enterprise domain entity naming rules and context co-occurrence patterns; automatically extracting entity triples relying on the completed model, carrying out logical verification and conflict resolution, fusing and aligning compliant triples with an enterprise structured business database, and supplementing entity attribute information; and building a knowledge graph using a graph structure and setting a dynamic updating mechanism. The method is suitable for enterprise exclusive text scenarios, strengthens heterogeneous data integration capability, improves the adaptability of entity and relationship extraction, enriches the data dimension of the graph, and stably realizes the systematic integration of enterprise knowledge resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a method for constructing enterprise knowledge graphs based on natural language processing. Background Technology

[0002] Current enterprise knowledge graph construction relies on conventional natural language processing (NLP) techniques for text parsing and information extraction, and commonly uses generalized sequence labeling models for entity recognition and relation extraction, resulting in a relatively limited data processing scope. The massive amounts of data generated by daily enterprise operations exhibit multi-source heterogeneous characteristics, with a large amount of information stored in various unstructured documents. Conventional processing methods cannot achieve unified integration and standardized processing of multi-source text data.

[0003] General sequence labeling models are designed for general text scenarios and have not been adapted to the text characteristics of enterprise domains. They cannot adapt to specific entity naming rules and contextual co-occurrence features, resulting in insufficient domain adaptability. The knowledge triples formed after text information extraction lack a standardized logical consistency verification process, which easily leads to factual conflicts and logical errors. Traditional knowledge graph construction relies solely on the unstructured text extraction results to build a framework, failing to integrate with existing structured business data, resulting in severe missing entity attribute information and weak data fusion. To address these existing technical shortcomings, it is necessary to optimize the model structure to adapt to enterprise-specific text scenarios, establish data interaction channels between different types of databases, improve knowledge data verification and fusion processes, and meet the usage requirements of standardized and complete enterprise knowledge graph construction. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a method for constructing enterprise knowledge graphs based on natural language processing.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for constructing an enterprise knowledge graph based on natural language processing, comprising:

[0006] Collect raw text data and unstructured documents from the enterprise's multi-source heterogeneous data platform. The raw text data and unstructured documents include enterprise technical documents, internal reports, project records, product manuals, and industry standard documents.

[0007] The collected raw text data and unstructured documents are cleaned and formatted to generate a standard-format enterprise text corpus.

[0008] Entity and relation annotations were performed on a standard-format enterprise text corpus to construct a labeled training dataset;

[0009] An improved sequence labeling model is trained using the labeled training dataset. The improved sequence labeling model is optimized based on the naming rules of enterprise domain entities and contextual co-occurrence patterns.

[0010] Using the improved sequence labeling model that has been trained, we can automatically identify entities and extract relations from new enterprise text corpora, and extract a set of entity triples.

[0011] Logical consistency verification and factual conflict resolution are performed on the extracted entity triple set to generate verified candidate knowledge triples;

[0012] The verified candidate knowledge triples are integrated and aligned with the enterprise's existing structured business database to supplement entity attribute information;

[0013] Based on the merged and aligned entities and relationships, an enterprise knowledge graph is constructed using a graph structure storage model, and a dynamic update mechanism for graph nodes is established.

[0014] As a further aspect of the present invention, the step of cleaning and format standardization of the collected raw text data and unstructured documents to generate a standard-format enterprise text corpus includes:

[0015] It identifies and converts the encoding formats of raw text data and unstructured documents, and converts all text into plain text data with a specified encoding format.

[0016] Redundant information is removed from the uniformly encoded plain text data. The redundant information includes headers, footers, document watermarks, and repeated copyright statement text.

[0017] Identify and extract chapter titles, project numbers, table titles, and chart titles from plain text data, and add structured tags to the extracted content according to preset metadata annotation specifications;

[0018] Sentence boundary detection and sentence segmentation are performed on text with added structured tags to ensure that each sentence is an independent processing unit;

[0019] All sentences after sentence segmentation are subjected to terminology standardization, which maps different expressions of the same concept to standard terms in the enterprise standard terminology library, and finally generates an enterprise text corpus in the standard format composed of standardized sentences.

[0020] As a further aspect of the present invention, the step of performing entity and relation annotation on a standard-format enterprise text corpus to construct a labeled training dataset includes:

[0021] Extract the core entity names of the enterprise from the enterprise standard terminology library, product model list, and personnel organizational structure table to construct an initial entity name seed dictionary;

[0022] Based on the initial entity name seed dictionary, pattern matching is used in a standard format enterprise text corpus for preliminary entity localization and type labeling.

[0023] Enterprise domain experts were invited to review and revise the initially labeled entities, and to manually annotate the semantic relationships between entities, including hierarchical relationships, upstream and downstream relationships, participation relationships, and attribute relationships.

[0024] The corpus annotated by experts was divided into a training subset, a validation subset, and a test subset;

[0025] The segmented corpus is vectorized, and the text sentences are converted into a sequence of feature vectors containing word vectors, position vectors and entity category vectors, forming the labeled training dataset.

[0026] As a further aspect of the present invention, the improved sequence labeling model is optimized based on the naming rules of enterprise domain entities and the contextual co-occurrence pattern, and its working principle includes:

[0027] A bidirectional long short-term memory network is used as the basic feature extractor to encode the contextual semantic information of the input sentence;

[0028] An attention mechanism targeting enterprise naming patterns is introduced on top of the feature sequence output by the bidirectional long short-term memory network. The weight calculation of the attention mechanism is dynamically generated based on common affix combinations, abbreviation patterns and product model coding rules in entity names.

[0029] In the decoding layer, contextual features from the bidirectional long short-term memory network and enterprise naming pattern features from the attention mechanism are integrated and jointly decoded through a conditional random field model to predict the entity label of each word in the input sequence.

[0030] During model training, an additional loss term is introduced to target the co-occurrence patterns of enterprise entities in the context. This additional loss term penalizes the model's prediction of incorrect segmentation of entity pairs that frequently co-occur in enterprise text.

[0031] The model containing the components is trained end-to-end using a labeled training dataset until the model’s performance metrics on the validation subset stabilize, resulting in an improved sequence labeling model that has been trained.

[0032] As a further aspect of the present invention, the introduction of an attention mechanism targeting enterprise naming patterns, wherein the weight calculation of the attention mechanism is dynamically generated based on common affix combinations, abbreviation patterns, and product model coding rules in entity names, including:

[0033] A predefined list of common entity affixes within the enterprise domain is provided, including department name suffixes, job title suffixes, and product series prefixes.

[0034] Predefine common abbreviation rules within the enterprise domain, including abbreviations of long technical terms using the first letter or connecting multiple words with specific symbols;

[0035] A predefined coding rule pattern for product models, the coding rule pattern including a specific format consisting of letter segments and number segments in a fixed order;

[0036] When the model processes the input sentence, it matches each word in the sentence with a predefined list of affixes, abbreviation rules, and encoding rule patterns;

[0037] Based on the matching results, a pattern conformity score is generated for each word, which represents the degree to which the word conforms to the naming pattern of the enterprise.

[0038] In the attention weight calculation, the rule conformity score is added as an additional bias term to the weight calculation function.

[0039] As a further aspect of the present invention, the improved sequence labeling model, after training, is used to automatically identify entities and extract relations from new enterprise text corpora, extracting a set of entity triples, including:

[0040] The new corporate text corpus is fed into the improved sequence labeling model that has been trained.

[0041] We utilize bidirectional long short-term memory networks in an improved sequence labeling model to extract contextual semantic features from text corpora, and combine this with an attention mechanism targeting enterprise naming patterns to enhance feature focus on specific entity patterns.

[0042] The enhanced feature sequence is decoded by a conditional random field decoding layer to predict the entity label and relation category of each word in the text corpus.

[0043] Based on the predicted entity labels and relation category labels, continuous entity segments in the text corpus are identified and merged to form candidate entities;

[0044] Based on the predicted relation category labels, locate and associate entity pairs with semantic relations to form an initial triple consisting of head entity, relation, and tail entity;

[0045] The generated initial set of triples is deduplicated and filtered to remove redundant or erroneous triples with a confidence level below a preset threshold, thus obtaining the final set of entity triples.

[0046] As a further aspect of the present invention, the step of performing logical consistency verification and factual conflict resolution on the extracted entity triple set to generate verified candidate knowledge triples includes:

[0047] Define ontology constraint rules for enterprise knowledge graphs, including domain and range constraints for entity types, symmetry and transitivity constraints for relations, and numerical range constraints for attribute values.

[0048] The extracted set of entity triples is compared with the ontology constraint rules to detect triple instances that violate the constraint rules.

[0049] For triples that violate the constraint rules, the fact source is traced back to locate the original text statement that generated the triples;

[0050] The credibility of conflicting triples is assessed based on the confidence score output by the improved sequence labeling model, the clarity of the relational statements in the original text, and the consistency of the statements of facts from different sources.

[0051] Based on the credibility assessment results, a voting mechanism or the selection of the source with the highest credibility is used to resolve conflicting facts, retaining triples that conform to ontology constraints and have high credibility, forming the verified candidate knowledge triples.

[0052] As a further aspect of the present invention, the step of merging and aligning the verified candidate knowledge triples with the enterprise's existing structured business database to supplement entity attribute information includes:

[0053] Extract key entity tables from the enterprise's existing structured business database. These key entity tables include employee information tables, product information tables, customer information tables, and project information tables.

[0054] A similarity matching model is established between entity names in candidate knowledge triples and record names in the key entity table. The similarity matching model is calculated by comprehensively considering edit distance, pinyin similarity, and word vector cosine similarity.

[0055] Based on the output of the similarity matching model, the entities in the candidate knowledge triples are linked with the records in the key entity table to identify entity-record pairs that are the same real-world object;

[0056] For successfully linked entity-record pairs, the attribute fields of the corresponding records in the structured business database are used as attribute knowledge triples and added to the knowledge graph.

[0057] For entities in candidate knowledge triples that fail to link successfully, create new graph nodes for them and record their source text information.

[0058] As a further aspect of the present invention, the step of constructing an enterprise knowledge graph based on the fused and aligned entities and relationships using a graph structure storage model, and establishing a dynamic update mechanism for graph nodes, includes:

[0059] Using entities as graph nodes, relationships as graph edges, and attributes as auxiliary fields of nodes, we construct the initial graph structure of the enterprise knowledge graph.

[0060] Define a core attribute set and an extended attribute set for each entity type in the graph, and define a weight attribute for each relation type;

[0061] Import the initial graph structure into the graph database and build corresponding graph indexes based on entity type and relation type to support efficient multi-hop queries and relation reasoning;

[0062] Set dynamic update trigger conditions for graph nodes, including timed triggering, new data source import triggering, and user manual triggering;

[0063] When the dynamic update trigger conditions are met, the incremental information processing flow is started.

[0064] As a further aspect of the present invention, the initiation of the incremental information processing flow includes:

[0065] By comparing the incremental processing results with the existing graphs in the graph database, newly added entity nodes, newly added relation edges, and attribute changes of existing nodes or edges are identified.

[0066] For newly added entity nodes, create new nodes in the graph database and establish associations with existing graphs;

[0067] For newly added relation edges, verify whether their first and last nodes exist. If they exist, create a new edge; otherwise, cache it temporarily and create it when the node it points to is created.

[0068] For changes to the attributes of existing nodes, a version management mechanism is used to record the attribute change history and update the latest attribute values ​​to the current view of the node;

[0069] After all update operations are completed, the centrality index of the nodes in the affected region is recalculated, and the corresponding graph index is updated.

[0070] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0071] By combining the naming conventions and contextual co-occurrence patterns of entities in the enterprise domain, the sequence labeling model structure and training logic are modified to align with the textual expression characteristics and entity association habits of various enterprise office documents and technical materials, as well as the semantic association logic in the enterprise's specific language environment. This narrows the adaptation gap between general algorithm models and enterprise vertical domain texts, aligns with the customized naming characteristics of entity names in enterprise scenarios, and matches the occurrence patterns of entity associations in enterprise text statements. This allows the model to deeply fit the specific textual context features in sequence labeling tasks on enterprise text corpora, adapting to the differentiated textual content expression forms within enterprises.

[0072] Candidate knowledge triples that have undergone logical consistency verification and factual conflict resolution will be integrated with the enterprise's existing structured business database to achieve data fusion and content alignment, broadening the channels for acquiring knowledge data. The isolation between unstructured document extraction data and structured business storage data will be broken down, and the diverse attribute content corresponding to various entities will be supplemented based on existing business data, expanding the information dimensions carried by knowledge graph nodes. Enterprise data resources in different storage formats will be integrated to enrich the entity relationship information within the graph, balancing the information limitations brought by a single unstructured data source, enriching the overall data content hierarchy of the knowledge graph, and improving the form of multi-dimensional data association and integration for the enterprise. Attached Figure Description

[0073] Figure 1 This is a flowchart of the enterprise knowledge graph construction method based on natural language processing described in this invention;

[0074] Figure 2 A flowchart for generating a standard-format enterprise text corpus through data cleaning and format standardization;

[0075] Figure 3 The flowchart shows the optimization process for the improved sequence labeling model based on enterprise domain entity naming rules and context co-occurrence patterns. Detailed Implementation

[0076] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0077] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0078] See Figure 1 The implementation method for constructing an enterprise knowledge graph based on natural language processing is as follows: Raw text data and unstructured documents, including enterprise technical documents, internal reports, project records, product manuals, and industry standard documents, are collected from multi-source heterogeneous data platforms. The collected raw text data and unstructured documents are cleaned and formatted to generate a standard-format enterprise text corpus. Entity and relation annotations are performed on the standard-format enterprise text corpus to construct a labeled training dataset. An improved sequence labeling model is trained using the labeled training dataset, optimized based on the naming rules and contextual co-occurrence patterns of enterprise domain entities. The trained improved sequence labeling model is used to automatically identify entities and extract relations from new enterprise text corpora, obtaining a set of entity triples. Logical consistency verification and factual conflict resolution are performed on the extracted entity triples set to generate verified candidate knowledge triples. The verified candidate knowledge triples are then integrated and aligned with the enterprise's existing structured business database to supplement entity attribute information. Based on the merged and aligned entities and relationships, an enterprise knowledge graph is constructed using a graph structure storage model, and a dynamic update mechanism for graph nodes is established.

[0079] In one embodiment of the present invention, the collected raw text data and unstructured documents are cleaned and formatted to generate a standard-format enterprise text corpus. See also... Figure 2The process involves identifying and converting the encoding formats of raw text data and unstructured documents, transforming all text into plain text data with a specified encoding format. Redundant information, including headers, footers, document watermarks, and duplicate copyright notices, is removed from the unified encoded plain text data. Chapter titles, project numbers, table titles, and chart titles are identified and extracted from the plain text data, and structured tags are added to the extracted content according to preset metadata annotation specifications. The text with added structured tags undergoes sentence boundary detection and sentence segmentation to ensure that each sentence is an independent processing unit. All sentences after sentence segmentation undergo terminology standardization, mapping different expressions of the same concept to standard terms in the enterprise standard terminology library, ultimately generating a standard-format enterprise text corpus composed of standardized sentences.

[0080] Entity and relationship annotations were performed on a standard-format enterprise text corpus to construct a labeled training dataset. Core entity names were extracted from the enterprise standard terminology database, product model list, and personnel organizational structure table to construct an initial entity name seed dictionary. Based on this initial entity name seed dictionary, pattern matching was used to perform preliminary entity localization and type labeling in the standard-format enterprise text corpus. Enterprise domain experts were invited to review and correct the initially labeled entities and manually annotate the semantic relationships between entities, including hierarchical relationships, upstream / downstream relationships, participation relationships, and attribute relationships. The expert-annotated corpus was divided into training, validation, and test subsets. The segmented corpus was vectorized, converting text sentences into feature vector sequences containing word vectors, position vectors, and entity category vectors, forming the labeled training dataset.

[0081] In practical implementation, the encoding format identification and conversion of raw text data and unstructured documents can be achieved based on the mapping relationship between the characteristic byte sequence of the file header and common character encodings. The encoding format identification and conversion process probes all input documents using a predefined encoding feature signature library. During encoding format identification, the system parses the byte stream of the document and compares it with patterns in the feature signature library, which stores feature information such as UTF-8 sequence patterns, GBK double-byte ranges, and UTF-16 byte order markers. After identifying the encoding type of the input document, the conversion process decodes all text content into a unified Unicode internal representation and then re-encodes it using a preset specified encoding format to generate plain text data in the specified encoding format. In some embodiments, the specified encoding format is UTF-8, and the conversion process ensures the consistency of documents obtained from different data platforms at the character level. Optionally, for documents that cannot be identified or fail to be converted, the system records their path and error type in a log file and excludes them from subsequent processing to ensure the basic data quality of the enterprise text corpus.

[0082] In practice, the process of removing redundant information from uniformly encoded plain text data needs to be designed based on the structural characteristics of different types of unstructured documents. Redundancy removal involves scanning the plain text data, converted to a specified encoding format, line by line. This scanning process follows a predefined set of regular expression rules. Redundant information includes headers, footers, document watermarks, and repeated copyright notices. Removal is achieved by matching line text patterns at specific locations within the document, or by matching repeated string patterns containing specific keywords. For example, for headers and footers, the rule set might match fixed-number lines of text at the beginning and end of the document that contain page numbers or date formats; for document watermarks, the rule set might match periodically appearing words with low transparency in the text background; and for repeated copyright notices, the rule set identifies and removes the same legal notice string appearing at the end of multiple paragraphs or chapters. After this removal process, the information density of the text is increased, creating conditions for subsequent structured annotation.

[0083] In practice, identifying and extracting chapter titles, item numbers, table titles, and figure titles from plain text data requires adherence to predefined metadata annotation specifications. These specifications define a structured tag system that maps the logical elements of a document to specific XML tags or JSON fields. The identification and extraction process analyzes the redundant text, combining pattern recognition and rule inference. Chapter title identification typically relies on bolding, underlining, or specific numbering patterns in the text, such as "Chapter X" or "Section 1.1". Item number identification targets the starting number or symbol list of text lines, such as "1." or "●". Table and figure titles are identified by locating short text lines above or below the table that begin with words like "Table", "Figure", or similar words. Adding structured tags to the extracted content involves inserting start and end tags into the text stream to enclose the content, creating semi-structured data with a hierarchical structure. For example, a chapter title might be labeled as... <section> 1.2 Background Introduction< / section> .

[0084] In practice, text with added structured tags undergoes sentence boundary detection and sentence segmentation to ensure each sentence is an independent processing unit. Sentence boundary detection does not rely on simple punctuation segmentation because the period "." may appear in abbreviations, such as "Dr." or "Inc." Sentence boundary detection and segmentation employ a hybrid strategy combining rule-based and statistical models. This strategy utilizes an abbreviation dictionary to filter potential pseudo-sentence boundaries, containing commonly used technical abbreviations within the company. The hybrid strategy applies a pre-trained sentence boundary detection model, which determines whether a "." represents a true sentence end based on contextual part-of-speech and lexical features. The processing divides the text stream into a continuous sequence of sentences, each sentence as an independent string unit, accompanied by its position in the original document and its associated structured tag information. This sentence segmentation is fundamental to subsequent steps such as terminology normalization and entity recognition, as the model accepts input at the sentence level.

[0085] In practice, all sentences after sentence segmentation undergo terminology standardization. The core of this process is mapping different expressions of the same concept to standard terms in the enterprise's standard terminology database. The terminology standardization process establishes a mapping dictionary from terminology variants to standard terms. This dictionary is constructed by combining the enterprise's standard terminology database with automatically discovered synonym pairs from the corpus. The process segments each sentence and searches the mapping dictionary for each word or phrase composed of consecutive words after segmentation. If a matching terminology variant is found, the corresponding standard term replaces the word or phrase in the original text. For example, "cloud server" and "cloud server host" appearing in a sentence might be uniformly replaced with the standard term "cloud server". The terminology standardization process can use a similarity-based replacement decision function. Replacement is performed when the similarity between a sentence fragment and the standard term is higher than a threshold. The similarity calculation function is as follows:

[0086]

[0087] in: This represents the final similarity score. This represents a sentence fragment to be processed. This refers to a standard term in the enterprise standard terminology library. and These are weighting coefficients, satisfying... , This represents the string similarity calculated based on edit distance. This represents the semantic cosine similarity calculated based on pre-trained word vectors. In some embodiments, the weight coefficients... Set it to 0.3. The value is set to 0.7 to place greater emphasis on semantic similarity. All sentences that have undergone terminology normalization constitute a standard-format enterprise text corpus. It can be understood that the conceptual expressions in the enterprise text corpus are consistent, which reduces the possibility of ambiguity in subsequent entity recognition.

[0088] In one embodiment of the present invention, the improved sequence labeling model is optimized based on the naming rules of enterprise domain entities and the contextual co-occurrence pattern. Its working principle includes: (See reference) Figure 3A bidirectional long short-term memory (BSSM) network is used as the basic feature extractor to encode the contextual semantic information of the input sentence. An attention mechanism targeting enterprise naming patterns is introduced on top of the feature sequence output by the BSSM network. The weights of this attention mechanism are dynamically generated based on common affix combinations, abbreviation patterns, and product model encoding rules in entity names. In the decoding layer, the contextual features from the BSSM network and the enterprise naming pattern features from the attention mechanism are integrated and jointly decoded using a conditional random field (CRF) model to predict the entity label for each word in the input sequence. During model training, an additional loss term targeting the co-occurrence patterns of enterprise entities is introduced. This additional loss term penalizes the model's predictions of incorrect segmentation of frequently co-occurring entity pairs in enterprise text. The model, including components, is trained end-to-end using a labeled training dataset until its performance on the validation subset stabilizes, resulting in a trained and improved sequence labeling model.

[0089] An attention mechanism targeting enterprise naming patterns is introduced. The weight calculation of this attention mechanism is dynamically generated based on common affix combinations, abbreviation patterns, and product model coding rules in entity names. A predefined list of common entity affixes within the enterprise domain is used, including department name suffixes, job name suffixes, and product series prefixes. Predefined abbreviation rules within the enterprise domain include abbreviating long technical terms with their first letters or connecting multiple words with specific symbols. Predefined product model coding rules include specific formats composed of letter and number segments in a fixed order. When the model processes an input sentence, each word in the sentence is matched against the predefined affix list, abbreviation rules, and coding rule patterns. Based on the matching results, a pattern conformance score is generated for each word, representing the degree to which the word conforms to the enterprise naming pattern. In the attention weight calculation, this pattern conformance score is added as an additional bias term to the weight calculation function.

[0090] In its implementation, the improved sequence labeling model is optimized based on the naming patterns and contextual co-occurrence patterns of enterprise entities. Its working principle involves using a bidirectional long short-term memory (BSSM) network as the basic feature extractor. The BSSM network consists of a forward BSSM network and a backward BSSM network, used to encode the contextual semantic information of the input sentence. The forward BSSM network processes the sentence word order forward, capturing the contextual dependency features of the current word; the backward BSSM network processes the sentence word order backward, capturing the contextual dependency features of the current word. The BSSM network concatenates the forward and backward hidden state vectors at corresponding time steps to form a feature vector sequence representing the complete contextual information of each word. Above the feature sequence output by the BSSM network, an attention mechanism targeting enterprise naming patterns is introduced. The weights of the attention mechanism are dynamically generated based on common affix combinations, abbreviation patterns, and product model encoding rules in entity names. In the decoding layer, the contextual features from the BSSM network and the enterprise naming pattern features from the attention mechanism are integrated and jointly decoded using a conditional random field model to predict the entity label for each word in the input sequence. During model training, an additional loss term is introduced to address the co-occurrence patterns of enterprise entities within their context. This additional loss term penalizes the model for mis-segmenting entity pairs that frequently co-occur in enterprise text. The model, which includes components, is trained end-to-end using a labeled training dataset until its performance on the validation subset stabilizes, resulting in a fully trained and improved sequence labeling model.

[0091] In its implementation, an attention mechanism targeting corporate naming patterns is introduced. The weights of this attention mechanism are dynamically generated based on common affix combinations, abbreviation patterns, and product model coding rules in entity names. The attention mechanism operates on the feature vectors at each time step of the bidirectional long short-term memory network output, calculating the attention weight of the current word relative to all words in the sentence. A predefined list of common entity affixes within the corporate domain is used, including department name suffixes, job name suffixes, and product series prefixes. Department name suffixes include, for example, "department," "center," or "section"; job name suffixes include, for example, "director," "manager," or "engineer"; and product series prefixes include, for example, "Pro," "Max," or "flagship." Common abbreviation rules within the corporate domain are also predefined, including abbreviations of long technical terms using the first letter or connecting multiple words with specific symbols, such as "artificial intelligence" abbreviated as "AI" and "research and development" abbreviated as "R&D." Product model coding rules are predefined, including specific formats composed of letter and number segments in a fixed order, such as "ABC-1000" or "X200-Pro." When processing the input sentence, the model matches each word in the sentence against a predefined list of affixes, abbreviation rules, and encoding rule patterns. Based on the matching results, a pattern conformance score is generated for each word, representing the degree to which the word conforms to the naming pattern of the company. In the attention weight calculation, the pattern conformance score is added as an additional bias term to the weight calculation function. This allows the attention mechanism to dynamically adjust the intensity of attention given to words that conform to the naming pattern.

[0092] In practical implementation, the specific process of attention weight calculation can be formally described. Suppose that after the input sentence is encoded by a bidirectional long short-term memory network, a context feature matrix is ​​obtained. ,in It is the first Feature vectors of each word It refers to the sentence length. The attention mechanism is based on the current computation position. Calculate a value for all positions The weight distribution for vocabulary. Its regularity score By matching function The matching function is calculated. Check vocabulary Whether it matches any entry in the predefined list of entity affixes, abbreviation rules, and product model number coding rule pattern set. If it matches, return a preset positive score; otherwise, return zero. Vocabulary Relative to the current calculation position Attention weights Calculated by the following formula:

[0093]

[0094] in: and It is a learnable weight matrix used to project feature vectors into the query space and the key space. It is the dimension of the key vector. The square root is used as a scaling factor. It is a learnable or pre-defined scalar coefficient used to control the strength of the influence of the regularity score on the attention weight. Representing vectors transpose, Words The regularity score Words The regularity score Indicates the first Feature vectors of each word Indicates the first Feature vectors of each word. Finally, position... Enhanced feature vectors It is a weighted sum of all location feature vectors: ,in It is a learnable weight matrix used for projection onto the value space. In some embodiments, scalar coefficients It is initialized to 0.1. This formula integrates the degree to which words conform to corporate naming patterns into the attention weight calculation as a bias, enabling the model to pay more attention to words with regular characteristics such as "Cloud Computing Department," "AI-Lab," and "XT-8000" when processing corporate domain text, thereby enhancing the model's ability to perceive entities in specific domains.

[0095] In one embodiment of the present invention, an improved sequence labeling model, after training, is used to automatically identify entities and extract relations from new enterprise text corpora, obtaining a set of entity triples. The new enterprise text corpora are input into the improved sequence labeling model. The bidirectional long short-term memory network in the improved sequence labeling model is used to extract the contextual semantic features of the text corpora, and an attention mechanism targeting enterprise naming patterns is combined to enhance feature focus on specific entity patterns. The enhanced feature sequence is decoded through a conditional random field decoding layer to predict the entity label and relation category for each word in the text corpus. Based on the predicted entity labels and relation category labels, continuous entity segments in the text corpus are identified and merged to form candidate entities. Based on the predicted relation category labels, entity pairs with semantic relationships are located and associated to form an initial triple consisting of a head entity, relation, and tail entity. The generated initial triple set is deduplicated and filtered, removing redundant or erroneous triples with confidence levels below a preset threshold, to obtain the entity triple set.

[0096] In practice, an improved sequence labeling model, after being trained, is used to automatically identify entities and extract relations from new corporate text corpora, extracting a set of entity triples. This new corporate text corpus is then input into the improved sequence labeling model. The new corporate text corpus consists of standard-formatted text that has undergone preprocessing such as data cleaning, sentence segmentation, and terminology normalization, with each sentence serving as an independent input sequence. In practice, the bidirectional long short-term memory (LSTM) network in the improved sequence labeling model extracts the contextual semantic features of the text corpus. The LSM network encodes the input sentences forward and backward, generating a contextual semantic feature vector for each word. These contextual semantic feature vectors capture the grammatical and semantic dependencies of words within the sentences. An attention mechanism targeting corporate naming patterns enhances the focus on features specific to these patterns. Based on the degree of matching between words and predefined corporate naming rules, the attention mechanism generates a pattern compliance score for each word, incorporating this score as a bias term into the calculation of attention weights. This allows the model to assign higher attention weights when processing words containing specific affixes, abbreviations, or encoding rules, thereby strengthening the representation of relevant features. The enhanced feature sequence is decoded through a Conditional Random Field (CRF) decoding layer. This layer receives a feature vector sequence fused from a bidirectional long short-term memory network and an attention mechanism. Based on the learned label transition probabilities, it predicts the entity label and relation category for each word in the text corpus. The entity label category system is predefined in the enterprise training dataset, and the relation category label indicates the semantic relationship type between entities represented by the word's location.

[0097] In practice, based on the predicted entity labels and relation category labels, continuous entity segments in the text corpus are identified and merged to form candidate entities. The predicted entity label sequence adopts the BIO annotation system, which labels each word as the beginning of an entity, inside an entity, or a non-entity. The system scans the label sequence, merging consecutive "B-" and "I-" segments with the same entity type label into a complete entity, and records the entity type and its start and end positions in the original text. The relation category label is associated with the entity label and is used to indicate the semantic relationship between the word or entity pair. Based on the predicted relation category label, entity pairs with semantic relationships are located and associated to form an initial triple consisting of a head entity, relation, and tail entity. The location process is usually based on predefined rules or relation boundaries predicted by the model. For example, if the relation category label labels the word "belongs to", and its context contains entities of the types "personnel" and "department", then an initial triple of "head entity-belongs to-tail entity" can be formed. In practice, the generated initial set of triples undergoes deduplication and filtering to remove redundant or erroneous triples with confidence scores below a preset threshold, ultimately yielding the entity triple set. Deduplication is performed on triples extracted from the same or different sentences that have the same head entity, relation, and tail entity; only the instance with the highest confidence score is retained. Filtering is based on the confidence score output by the improved sequence labeling model, typically calculated by the conditional random field decoding layer. Optionally, independent confidence filtering thresholds can be set for each relation type. Table 1 shows an initial set of triples extracted from an example text and the results after deduplication and filtering.

[0098] Table 1: Initial Triple Set Deduplication and Filtering Table

[0099] Text fragment The initial triples extracted (head entity, relation, tail entity) Model confidence Processing results "Engineer Zhang is in charge of the testing work for the XT-8000 project." (Engineer Zhang is in charge of the XT-8000 project) 0.95 reserve "Engineer Zhang was in charge of testing the XT-8000 project." (XT-8000 project, in charge: Engineer Zhang) 0.88 The relational mapping rules are used to convert (Engineer Zhang, responsible for the XT-8000 project) and combined with the above ternary combination to remove duplicates. "The testing work is part of the XT-8000 project." (Testing work, belonging to the XT-8000 project) 0.90 reserve "Manager Li is Engineer Zhang's supervisor." (Manager Li, Supervisor, Engineer Zhang) 0.75 If the preset threshold is 0.8, then filter out...

[0100] In some embodiments, the process of merging consecutive entity fragments to form candidate entities can be implemented through a post-processing function. This function scans the entity label sequence and combines adjacent words with labels "BX" and "IX" (where X is the entity type) into a single entity. Relationship localization and association typically rely on a relation classification sub-model or pattern matching rule. This module takes a sentence fragment containing candidate entities or the entire sentence as input and predicts the relationship type between entity pairs. It is understood that the relation classification sub-model can be jointly trained with a sequence labeling model or trained on multiple tasks, or it can function as a standalone module. The confidence threshold setting for filtering redundant or erroneous triples can be adjusted based on evaluation results on a validation subset. For example, by evaluating the precision and recall of triples retained at different confidence thresholds on the test set, a suitable threshold is selected by weighing precision and recall. After the above series of processing steps, a high-quality, deduplicated set of entity triples is automatically extracted from the re-examined enterprise text corpus, providing a data foundation for subsequent knowledge graph construction.

[0101] In one embodiment of the present invention, the extracted entity triple set is subjected to logical consistency verification and factual conflict resolution to generate verified candidate knowledge triples. Ontology constraint rules for the enterprise knowledge graph are defined, including entity type domain and value range constraints, relation symmetry and transitivity constraints, and attribute value range constraints. The extracted entity triple set is compared with the ontology constraint rules to detect triple instances that violate the constraints. For detected triples that violate the constraints, factual source tracing is performed to locate the original text statement that generated the triple. Conflicting triples are evaluated for credibility, based on the confidence score output by the improved sequence labeling model, the clarity of relational descriptions in the original text, and the consistency of factual statements from different source texts. Based on the credibility evaluation results, a voting mechanism or selection of the highest credibility source is used to resolve conflicting facts, retaining triples that conform to the ontology constraints and have high credibility, forming the verified candidate knowledge triples.

[0102] The validated candidate knowledge triples are integrated and aligned with the enterprise's existing structured business database to supplement entity attribute information. Key entity tables, including employee information, product information, customer information, and project information tables, are extracted from the existing structured business database. A similarity matching model is established between entity names in the candidate knowledge triples and record names in the key entity tables. This model calculates similarity based on edit distance, pinyin similarity, and word vector cosine similarity. Based on the output of the similarity matching model, entities in the candidate knowledge triples are linked to records in the key entity tables to identify entity-record pairs that are the same real-world object. For successfully linked entity-record pairs, the attribute fields of the corresponding records in the structured business database are used as attribute knowledge triples and added to the knowledge graph. For entities in candidate knowledge triples that fail to link successfully, new graph nodes are created for them, and their source text information is recorded.

[0103] In practical implementation, the extracted entity triple set undergoes logical consistency verification and factual conflict resolution to generate verified candidate knowledge triples, defining the ontology constraint rules for the enterprise knowledge graph. These ontology constraint rules are formally expressed using descriptive logic or graph patterns. They include domain and range constraints for entity types, symmetry and transitivity constraints for relationships, and numerical range constraints for attribute values. The domain and range constraints for entity types specify which types the entities connected by a particular relationship must belong to; for example, the domain of the "belong to" relationship is "employee," and the range is "department." Symmetry constraints indicate whether the relationship is bidirectionally equivalent; for example, the "colleague" relationship is symmetric. Transitivity constraints indicate whether the relationship is transitive; for example, the "superior" relationship is transitive.

[0104] Numerical range constraints on attribute values ​​limit the value range of specific attribute fields; for example, the "age" attribute value for employees must be between 18 and 65. The extracted set of entity triples is compared with the ontology constraint rules to detect triple instances that violate these rules. This comparison process can be viewed as a rule-based reasoning or graph pattern matching process. For example, it checks for triples like "project-belongs to-department," because entities of the "project" type typically do not directly "belong to" "department," violating the predefined domain constraint of the "belongs to" relationship. For detected triples that violate the constraint rules, fact source tracing is performed to locate the original text statement that generated the triple. Fact source tracing relies on metadata retained during the entity identification and relation extraction stages. This metadata includes which document, which specific sentence, and its position within the sentence the triple originates from. Locating the original text statement helps understand the context in which the conflict arises. A credibility assessment is performed on conflicting triples, based on the confidence score output by the improved sequence labeling model, the explicitness of the relation statements in the original text, and the consistency of factual statements across different source texts. The confidence score output by the improved sequence labeling model reflects the model's certainty regarding the extraction results. The clarity of relational statements in the original text can be assessed by analyzing the clarity of the relational vocabulary and the directness of the syntactic structure. The consistency of factual statements across different source texts is determined by comparing relational statements about the same pair of entities extracted from multiple documents.

[0105] Based on the credibility assessment results, a voting mechanism or the selection of the highest credibility source is used to resolve conflicting facts, retaining triples that conform to ontology constraints and have high credibility, forming validated candidate knowledge triples. The voting mechanism is suitable for situations where the same pair of entities is extracted from multiple sources but with different relationships or conflicting attribute values, selecting the statement with the highest frequency. The method of selecting the highest credibility source directly compares the credibility scores of conflicting statements extracted from different sources, retaining the one with the highest score. See Table 2, which illustrates a process for resolving factual conflicts.

[0106] Table 2: Factual Conflict Resolution Process Table

[0107] Entity pairs Extraction Relationship Source text fragment Model confidence Clarity rating Dissolving decision-making and basis (Zhang Ming, Wang Wei) colleague Zhang Ming and Wang Wei worked in the same project team. 0.85 0.8 Reserved. The statement is direct, highly confident, and supported by another source. (Zhang Ming, Wang Wei) subordinate According to available information, Wang Wei was Zhang Ming's subordinate. 0.70 0.6 Conflict. Tracing the source, this excerpt originates from an informal communication record, thus its credibility is relatively low. (XT-8000, Project Status) in progress "The XT-8000 project is currently undergoing system testing." 0.92 0.9 Reservation. The statement is clear and of high confidence. (XT-8000, Project Status) Completed "Last year's report mentioned that the XT-8000 project had been accepted." 0.88 0.7 Conflict. Based on the timestamp information, "Completed" is a historical state, and the current state is based on the latest description.

[0108] In practical implementation, the validated candidate knowledge triples are integrated and aligned with the enterprise's existing structured business database to supplement entity attribute information. Key entity tables are then extracted from the existing structured business database. The structured business database includes various business tables in a relational database management system. Key entity tables typically include employee information tables, product information tables, customer information tables, and project information tables. These tables contain entity identifiers, names, descriptive attribute fields, and related foreign keys. A similarity matching model is established between entity names in the candidate knowledge triples and record names in the key entity tables. This similarity matching model calculates the similarity using a combination of edit distance, pinyin similarity, and word vector cosine similarity. Edit distance measures the minimum number of steps required to convert two strings to each other through insertion, deletion, and replacement operations. Pinyin similarity is suitable for Chinese scenarios; it converts Chinese entity names to their pinyin form and then calculates the edit distance between the pinyin strings or the similarity based on the pinyin sequence. Word vector cosine similarity utilizes pre-trained word vectors or entity name embeddings to calculate the cosine similarity of entity names in the semantic vector space. The similarity matching model can be a weighted combination model that calculates the final overall similarity score:

[0109]

[0110] in: Represents the entity names in the candidate knowledge triples. Record names in the key entity table The overall similarity score between them Represents a string and Edit distance between and These represent the lengths of the strings, Indicates the similarity of pinyin. Word vectors and Cosine similarity between them , , These are the weight coefficients of each similarity component, and satisfy... In some embodiments, the weighting coefficient may be set to , , Based on the output of the similarity matching model, entities in candidate knowledge triples are linked to records in the key entity table to identify entity-record pairs that are the same real-world object. A similarity threshold is set for the linking process; when the overall similarity score exceeds this threshold, the names are considered to point to the same entity. For successfully linked entity-record pairs, the attribute fields of the corresponding records in the structured business database are added to the knowledge graph as attribute knowledge triples. For example, after linking from the employee information table to the "Zhang Ming" entity, fields such as "employee ID," "date of employment," and "position" can be added as triples in the form of "entity-attribute-value." For entities in candidate knowledge triples that fail to link successfully, new graph nodes are created for them, and their source text information is recorded. In essence, the fusion alignment process enriches the attribute information of entities in the knowledge graph, organically integrating semantic relationships extracted from unstructured text with record attributes in the structured database.

[0111] In one embodiment of the present invention, an enterprise knowledge graph is constructed using a graph structure storage model based on the fused and aligned entities and relationships, and a dynamic update mechanism for graph nodes is established. Entities are used as graph nodes, relationships as graph edges, and attributes as auxiliary fields of nodes to construct the initial graph structure of the enterprise knowledge graph. A core attribute set and an extended attribute set are defined for each entity type in the graph, and a weight attribute is defined for each relationship type. The initial graph structure is imported into a graph database, and corresponding graph indexes are established based on entity types and relationship types to support efficient multi-hop queries and relationship reasoning. Dynamic update triggering conditions for graph nodes are set, including timed triggering, new data source import triggering, and user manual triggering. When the dynamic update triggering conditions are met, the incremental information processing flow is initiated.

[0112] The incremental information processing flow is initiated, including: comparing the incremental processing results with the existing graph in the graph database to identify newly added entity nodes, newly added relation edges, and attribute changes of existing nodes or edges. For newly added entity nodes, a new node is created in the graph database, and its association with the existing graph is established. For newly added relation edges, the existence of their starting and ending nodes is verified. If they exist, a new edge is created; otherwise, it is temporarily cached and created when the node it points to is created. For attribute changes of existing nodes, a version management mechanism is used to record the attribute change history, and the latest attribute values ​​are updated to the node's current view. After all update operations are completed, the centrality index of the nodes in the affected region is recalculated, and the corresponding graph index is updated.

[0113] In practical implementation, based on the fused and aligned entities and relationships, a graph structure storage model is used to construct an enterprise knowledge graph, and a dynamic update mechanism for graph nodes is established. Entities serve as graph nodes, relationships as graph edges, and attributes as auxiliary fields of nodes, constructing the initial graph structure of the enterprise knowledge graph. The fusion and alignment process provides an entity set, a relationship set, and an attribute set supplemented from the structured business database; these elements constitute the basic components of the graph. For each entity type in the graph, a core attribute set and an extended attribute set are defined. The core attribute set contains descriptive fields that the entity must possess; for example, the core attributes of the "employee" entity type may include "employee ID" and "name." The extended attribute set contains optional descriptive fields; for example, the extended attributes of "employee" may include "English name" and "personal profile." For each relationship type, a weight attribute is defined. The weight attribute can represent the strength, confidence, or other metrics of the relationship; for example, the "cooperation" relationship may have "number of collaborations" or "closeness of cooperation" as weight attributes. The initial graph structure is imported into a graph database, a database system specifically designed for storing and querying graph structure data. It establishes corresponding graph indexes based on entity and relation types to support efficient multi-hop queries and relation reasoning. Graph indexes can accelerate node and edge retrieval operations based on entity type, relation type, or specific attribute values. Multi-hop queries allow finding paths between entities connected by multiple edges in the graph database. Relation reasoning can deduce implicit relationships based on existing relationships and rules.

[0114] In implementation, dynamic update trigger conditions are set for graph nodes. These conditions include scheduled triggers, new data source import triggers, and user-manual triggers. Scheduled triggers can execute according to a preset time cycle, such as automatically starting an update process once a day at midnight. New data source import triggers are activated when the system detects that new enterprise text corpora or structured data tables have been added to a specified data directory. User-manual triggers are initiated by the knowledge graph administrator or authorized users through function buttons provided in the management interface. When the dynamic update trigger conditions are met, the incremental information processing process is started. This process performs the same processing steps on newly added data sources as when building the initial graph, including data preprocessing, entity and relation extraction, logical consistency verification, and fusion alignment. However, the input is limited to the data that has been added or changed since the last update. The incremental information processing process aims to minimize computational overhead and avoid redundant processing of the entire dataset.

[0115] In practice, an incremental information processing flow is initiated, including comparing the incremental processing results with the existing graph in the graph database to identify newly added entity nodes, newly added relation edges, and attribute changes of existing nodes or edges. The comparison process is based on the unique identifiers of entities, relations, and attribute version information. Newly added entity nodes are those whose corresponding identifiers cannot be found in the existing graph's node set. Newly added relation edges are those whose corresponding identifiers cannot be found in the existing graph's edge set, or whose first and last nodes are at least newly added nodes. Attribute changes of existing nodes or edges refer to the addition, deletion, or modification of the core or extended attribute values ​​of the entity. For newly added entity nodes, a new node is created in the graph database, and an association is established with the existing graph. The association operation includes connecting the new node to existing related nodes according to its relation. For newly added relation edges, the existence of their first and last nodes is verified. If they exist, a new edge is created; otherwise, it is temporarily cached and created when the node it points to is created. The caching mechanism maintains a queue of edges to be processed. The edge is only actually created after the first and last nodes of the edge in the queue have been created in the graph database. For attribute changes to existing nodes, a version management mechanism is used to record the attribute change history and update the latest attribute value to the node's current view. This mechanism can maintain a timestamped version chain for each attribute, recording the value, timestamp, and source of each change. After all update operations are completed, the centrality index of the nodes in the affected region is recalculated, and the corresponding graph index is updated. The centrality index can include degree centrality, proximity centrality, or betweenness centrality. Recalculation can be limited to subgraphs of nodes connected to the newly added or changed nodes within a specific hop count range, rather than the entire graph, to improve computational efficiency. Updating the corresponding graph index ensures that the index structure reflects the latest state of the graph, supporting the performance of subsequent query operations.

[0116] In practical implementation, recalculating the centrality index of nodes in the updated region can be based on an incremental update algorithm. The core idea of ​​this algorithm is to leverage the locality of graph structure changes to identify the set of nodes whose centrality values ​​may change due to the current update, and then recalculate the centrality only on this local subgraph to avoid the computational overhead of a global recalculation. The key to the algorithm is determining the set of affected nodes. This set includes not only newly added or deleted nodes, but also existing nodes connected to these nodes within a specific distance, as changes in paths may affect the centrality values ​​of these nodes. The formula for calculating the centrality index can be defined as:

[0117]

[0118] in: Represents a node The centrality of the middle, It is the set of all nodes in the graph. and It refers to any two distinct nodes in the graph. Indicates from node To the node The total number of shortest paths, This indicates that these are slave nodes To the node In the shortest path, the nodes are... The number of paths. In incremental update scenarios, the calculation can be limited to the affected local subgraph. Let the changes in nodes and edges introduced by the update be... ,in It is a set of newly added nodes. This is the set of newly added edges. The set of affected nodes. It can be defined as ,in In the diagram Middle node To the node The shortest path distance, This is a preset influence radius threshold, representing the maximum number of hops considered in the centrality calculation. The algorithm in the induced subgraph... Recalculated set The centrality of all nodes in the middle Meanwhile, the centrality values ​​of other nodes in the graph remain unchanged. Optionally, the radius threshold is affected. It can be set to 2. In some embodiments, the centrality metric can be calculated asynchronously with the main update process; that is, after completing the addition, deletion, and modification operations of nodes and edges, the calculation task of the affected region is submitted to the background calculation queue. It can be understood that through a dynamic update mechanism, the enterprise knowledge graph can continuously absorb new knowledge and maintain consistency with the latest business data state, thus becoming a living, constantly evolving enterprise knowledge base.

[0119] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for constructing enterprise knowledge graphs based on natural language processing, characterized in that, The method includes: Collect raw text data and unstructured documents from the enterprise's multi-source heterogeneous data platform. The raw text data and unstructured documents include enterprise technical documents, internal reports, project records, product manuals, and industry standard documents. The collected raw text data and unstructured documents are cleaned and formatted to generate a standard-format enterprise text corpus. Entity and relation annotations were performed on a standard-format enterprise text corpus to construct a labeled training dataset; An improved sequence labeling model is trained using the labeled training dataset. The improved sequence labeling model is optimized based on the naming rules of enterprise domain entities and contextual co-occurrence patterns. Using the improved sequence labeling model that has been trained, we can automatically identify entities and extract relations from new enterprise text corpora, and extract a set of entity triples. Logical consistency verification and factual conflict resolution are performed on the extracted entity triple set to generate verified candidate knowledge triples; The verified candidate knowledge triples are integrated and aligned with the enterprise's existing structured business database to supplement entity attribute information; Based on the merged and aligned entities and relationships, an enterprise knowledge graph is constructed using a graph structure storage model, and a dynamic update mechanism for graph nodes is established.

2. The method for constructing an enterprise knowledge graph based on natural language processing according to claim 1, characterized in that, The process of cleaning and formatting the collected raw text data and unstructured documents to generate a standard-format enterprise text corpus includes: It identifies and converts the encoding formats of raw text data and unstructured documents, and converts all text into plain text data with a specified encoding format. Redundant information is removed from the uniformly encoded plain text data. The redundant information includes headers, footers, document watermarks, and repeated copyright statement text. Identify and extract chapter titles, project numbers, table titles, and chart titles from plain text data, and add structured tags to the extracted content according to preset metadata annotation specifications; Sentence boundary detection and sentence segmentation are performed on text with added structured tags to ensure that each sentence is an independent processing unit; All sentences after sentence segmentation are subjected to terminology standardization, which maps different expressions of the same concept to standard terms in the enterprise standard terminology library, and finally generates an enterprise text corpus in the standard format composed of standardized sentences.

3. The method for constructing an enterprise knowledge graph based on natural language processing according to claim 1, characterized in that, The process of performing entity and relation annotation on a standard-format enterprise text corpus to construct a labeled training dataset includes: Extract the core entity names of the enterprise from the enterprise standard terminology library, product model list, and personnel organizational structure table to construct an initial entity name seed dictionary; Based on the initial entity name seed dictionary, pattern matching is used in a standard format enterprise text corpus for preliminary entity localization and type labeling. Enterprise domain experts were invited to review and revise the initially labeled entities, and to manually annotate the semantic relationships between entities, including hierarchical relationships, upstream and downstream relationships, participation relationships, and attribute relationships. The corpus annotated by experts was divided into a training subset, a validation subset, and a test subset; The segmented corpus is vectorized, and the text sentences are converted into a sequence of feature vectors containing word vectors, position vectors and entity category vectors, forming the labeled training dataset.

4. The method for constructing an enterprise knowledge graph based on natural language processing according to claim 1, characterized in that, The improved sequence labeling model is optimized based on the naming rules of enterprise domain entities and contextual co-occurrence patterns. Its working principle includes: A bidirectional long short-term memory network is used as the basic feature extractor to encode the contextual semantic information of the input sentence; An attention mechanism targeting enterprise naming patterns is introduced on top of the feature sequence output by the bidirectional long short-term memory network. The weight calculation of the attention mechanism is dynamically generated based on common affix combinations, abbreviation patterns and product model coding rules in entity names. In the decoding layer, contextual features from the bidirectional long short-term memory network and enterprise naming pattern features from the attention mechanism are integrated and jointly decoded through a conditional random field model to predict the entity label of each word in the input sequence. During model training, an additional loss term is introduced to target the co-occurrence patterns of enterprise entities in the context. This additional loss term penalizes the model's prediction of incorrect segmentation of entity pairs that frequently co-occur in enterprise text. The model containing the components is trained end-to-end using a labeled training dataset until the model’s performance metrics on the validation subset stabilize, resulting in an improved sequence labeling model that has been trained.

5. The method for constructing an enterprise knowledge graph based on natural language processing according to claim 4, characterized in that, The introduced attention mechanism, which targets enterprise naming patterns, dynamically generates its weights based on common affix combinations, abbreviation patterns, and product model coding rules in entity names. This includes: A predefined list of common entity affixes within the enterprise domain is provided, including department name suffixes, job title suffixes, and product series prefixes. Predefine common abbreviation rules within the enterprise domain, including abbreviations of long technical terms using the first letter or connecting multiple words with specific symbols; A predefined coding rule pattern for product models, the coding rule pattern including a specific format consisting of letter segments and number segments in a fixed order; When the model processes the input sentence, it matches each word in the sentence with a predefined list of affixes, abbreviation rules, and encoding rule patterns; Based on the matching results, a pattern conformity score is generated for each word, which represents the degree to which the word conforms to the naming pattern of the enterprise. In the attention weight calculation, the rule conformity score is added as an additional bias term to the weight calculation function.

6. The method for constructing an enterprise knowledge graph based on natural language processing according to claim 1, characterized in that, The improved sequence labeling model, after training, is used to automatically identify entities and extract relations from new enterprise text corpora, extracting a set of entity triples, including: The new corporate text corpus is fed into the improved sequence labeling model that has been trained. We utilize bidirectional long short-term memory networks in an improved sequence labeling model to extract contextual semantic features from text corpora, and combine this with an attention mechanism targeting enterprise naming patterns to enhance feature focus on specific entity patterns. The enhanced feature sequence is decoded by a conditional random field decoding layer to predict the entity label and relation category of each word in the text corpus. Based on the predicted entity labels and relation category labels, continuous entity segments in the text corpus are identified and merged to form candidate entities; Based on the predicted relation category labels, locate and associate entity pairs with semantic relations to form an initial triple consisting of head entity, relation, and tail entity; The generated initial set of triples is deduplicated and filtered to remove redundant or erroneous triples with a confidence level below a preset threshold, thus obtaining the final set of entity triples.

7. The method for constructing an enterprise knowledge graph based on natural language processing according to claim 1, characterized in that, The step of performing logical consistency verification and fact conflict resolution on the extracted entity triple set to generate verified candidate knowledge triples includes: Define ontology constraint rules for enterprise knowledge graphs, including domain and range constraints for entity types, symmetry and transitivity constraints for relations, and numerical range constraints for attribute values. The extracted set of entity triples is compared with the ontology constraint rules to detect triple instances that violate the constraint rules. For triples that violate the constraint rules, the fact source is traced back to locate the original text statement that generated the triples; The credibility of conflicting triples is assessed based on the confidence score output by the improved sequence labeling model, the clarity of the relational statements in the original text, and the consistency of the statements of facts from different sources. Based on the credibility assessment results, a voting mechanism or the selection of the source with the highest credibility is used to resolve conflicting facts, retaining triples that conform to ontology constraints and have high credibility, forming the verified candidate knowledge triples.

8. The method for constructing an enterprise knowledge graph based on natural language processing according to claim 1, characterized in that, The process of merging and aligning the verified candidate knowledge triples with the enterprise's existing structured business database to supplement entity attribute information includes: Extract key entity tables from the enterprise's existing structured business database. These key entity tables include employee information tables, product information tables, customer information tables, and project information tables. A similarity matching model is established between entity names in candidate knowledge triples and record names in the key entity table. The similarity matching model is calculated by comprehensively considering edit distance, pinyin similarity, and word vector cosine similarity. Based on the output of the similarity matching model, the entities in the candidate knowledge triples are linked with the records in the key entity table to identify entity-record pairs that are the same real-world object; For successfully linked entity-record pairs, the attribute fields of the corresponding records in the structured business database are used as attribute knowledge triples and added to the knowledge graph. For entities in candidate knowledge triples that fail to link successfully, create new graph nodes for them and record their source text information.

9. The method for constructing an enterprise knowledge graph based on natural language processing according to claim 8, characterized in that, The aforementioned method, based on the fused and aligned entities and relationships, employs a graph structure storage model to construct an enterprise knowledge graph and establishes a dynamic update mechanism for graph nodes, including: Using entities as graph nodes, relationships as graph edges, and attributes as auxiliary fields of nodes, we construct the initial graph structure of the enterprise knowledge graph. Define a core attribute set and an extended attribute set for each entity type in the graph, and define a weight attribute for each relation type; Import the initial graph structure into the graph database and build corresponding graph indexes based on entity type and relation type to support efficient multi-hop queries and relation reasoning; Set dynamic update trigger conditions for graph nodes, including timed triggering, new data source import triggering, and user manual triggering; When the dynamic update trigger conditions are met, the incremental information processing flow is started.

10. The method for constructing an enterprise knowledge graph based on natural language processing according to claim 9, characterized in that, The process of initiating incremental information processing includes: By comparing the incremental processing results with the existing graphs in the graph database, newly added entity nodes, newly added relation edges, and attribute changes of existing nodes or edges are identified. For newly added entity nodes, create new nodes in the graph database and establish associations with existing graphs; For newly added relation edges, verify whether their first and last nodes exist. If they exist, create a new edge; otherwise, cache it temporarily and create it when the node it points to is created. For changes to the attributes of existing nodes, a version management mechanism is used to record the attribute change history and update the latest attribute values ​​to the current view of the node; After all update operations are completed, the centrality index of the nodes in the affected region is recalculated, and the corresponding graph index is updated.