A method and apparatus for high-precision ontology entity recognition and verification for heterogeneous documents
By converting heterogeneous documents into standardized text and combining them with a pre-trained language model and a triple verification mechanism, the problem of insufficient entity recognition accuracy in heterogeneous documents is solved, achieving high-precision ontology entity recognition and verification, and improving processing efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2026-03-10
AI Technical Summary
Existing entity recognition methods suffer from insufficient accuracy and recognition results that do not conform to ontology constraints when processing heterogeneous documents, making it difficult to obtain the data that users want with high accuracy from the massive amount of data on the Internet.
By converting heterogeneous documents into standardized text, pre-trained language models are used to extract candidate entities. An improved hierarchical K-nearest neighbor algorithm and a triple verification mechanism, including common sense reasoning, semantic relevance filtering and logical consistency verification, are combined to map the data to a unified high-dimensional semantic space for multi-granularity similarity matching, and finally output a set of high-confidence candidate entities.
It significantly improves the recognition accuracy and precision of ontology entities in heterogeneous documents, reduces noise interference, improves processing efficiency, supports cross-modal entity association analysis, and reduces false positives and false negatives.
Smart Images

Figure CN120805909B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of computer science, natural language processing and ontology data standardization technology. Specifically, it relates to a high-precision identification and verification method for ontology entities in heterogeneous documents, which can be applied to smart cities, map services, data navigation and government address standardization scenarios. Background Technology
[0002] With the massive amount of data on the Internet, it has become particularly important to obtain accurate data with high precision. However, in reality, the massive amount of data on the Internet is often non-standardized and incomplete. Existing entity recognition methods suffer from insufficient accuracy and recognition results that do not conform to ontology constraints when processing heterogeneous documents. Traditional computing methods are unable to cope with complex situations in order to accurately obtain the data that users want from a large amount of data.
[0003] To address the aforementioned issues, there is an urgent need for a high-precision ontology entity recognition and verification method for heterogeneous documents. This method should be able to significantly improve the accuracy and precision of entity recognition by leveraging internet data, standardized text, and multi-step collaborative processing. Summary of the Invention
[0004] The purpose of this invention is to provide a high-precision ontology entity recognition and verification method for heterogeneous documents, so as to improve the accuracy and precision of entity recognition.
[0005] To achieve the above-mentioned objectives, the specific steps of the technical solution adopted by this invention include:
[0006] S1. Convert heterogeneous documents (PDF, DOC / DOCX, TXT, etc.) into standardized text. Let the set of heterogeneous documents be D = {d1, d2, ..., dn}. n The standardized text set is T = {t1, t2, ..., t}. n}, the conversion function is The conversion formula is: D is a collection of heterogeneous documents, d1 represents the first heterogeneous document, and d n Let t represent the nth heterogeneous document, T represent the set of standard documents, t1 represent the first transformed standard document, and t n This represents the nth converted standard document. This is the conversion method.
[0007] S2. Extract the candidate entity set E from the standardized text set T. i ={e1,e2,...,e n}, the extraction function is The extracted formula is: E iIt is a collection of entity classes, where e1 is the first entity, e n Represents the nth entity. This refers to the extraction method.
[0008] S3. The ontology and candidate entity set need to be mapped to a unified high-dimensional semantic space. The local library set is O = {o1, o2, ..., o}. n The candidate entity set is E. i The function for joint embedding is The mapping formula is: Embed O For vectors in the ontology library, Embed E For entity set E i The space vector, O is the local library, o1 is the first local library, o n This is the nth local library.
[0009] S4. Perform multi-granularity similarity matching using the improved hierarchical K-nearest neighbors (H-KNN) algorithm to generate a preliminary candidate entity set. Set the vector in the joint embedding space to Embed. O and Embed E The hierarchical K-nearest neighbor function is The mapping formula is: S i This is the initial set of candidate entities.
[0010] S5. Filter the candidate entity set through a triple verification mechanism to ensure it conforms to ontology constraints. Preliminary candidate set results S i ={s1,s2,...,s p The set of high-confidence candidate entities after triple verification is H. i ={h1,h2,...,h q The verification functions are respectively The calculation formula is: Where S i For the candidate result set, H i This is the set of high-confidence candidate entities for computation. The triple verification primarily involves common-sense reasoning verification. Semantic Relevance Filtering Logical consistency verification The specific mapping formula is as follows:
[0011]
[0012] s j For S i A subset of LLM, which is the large language model GTP-3.
[0013]
[0014] o k Let τ be a subset of the local library O, and let τ be the threshold for cosine similarity.
[0015]
[0016] LogicCheck is a logic reasoning tool called Prolog.
[0017] S6. Output the set of high-confidence candidate entities that meet the ontology constraints. The calculation formula is as follows: h j For S that has passed triple verification i A subset of.
[0018] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to perform a method for high-precision identification and verification of ontological entities for heterogeneous documents.
[0019] This application also provides a computer system, including:
[0020] A processor is used to execute instructions stored in a storage medium to implement a method for high-precision identification and verification of ontological entities in heterogeneous documents;
[0021] The memory is used to store the network text and intermediate results generated during the calculation process of the high-precision ontology entity recognition and verification method for heterogeneous documents;
[0022] The input / output interface is used to receive specified text or recognition information and output the recognized ontology elements.
[0023] This application also provides a device for high-precision identification and verification of ontology entities for heterogeneous documents. The device is configured to: acquire standardized text content; extract candidate entity sets; perform joint embedding space calculation; perform multi-granularity similarity matching; implement a triple verification mechanism: large language model inference verification, semantic relevance filtering, and logical consistency verification; and output a high-confidence candidate entity set.
[0024] The method and apparatus for high-precision identification and verification of ontological entities in heterogeneous documents presented in this application have the following advantages:
[0025] 1. This method eliminates differences in heterogeneous document formats, builds a unified semantic baseline, accurately locates candidate entities, reduces noise interference, and improves the efficiency of subsequent processing.
[0026] 2. This method achieves semantic alignment of modalities such as text, images, and tables, supports cross-modal entity association analysis, and dynamically adjusts matching weights through multi-granular semantic comparison at the character, word, and sentence levels, thereby improving robustness to synonyms, abbreviations, and misspellings.
[0027] 3. This method is based on knowledge graphs or ontology libraries to verify predefined semantic relationships between entities, ensuring that the entity recognition results meet the requirements at the logical, semantic, and domain rule levels, thereby reducing false positive and false negative rates. Attached Figure Description
[0028] Figure 1 This is the overall flowchart of the method;
[0029] Figure 2 This is an example diagram for spatial calculation. Detailed Implementation
[0030] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0031] The following example, "Identifying the Wuyi Mountain range from multiple source documents within the mountain range itself," illustrates the specific implementation steps of this invention in detail.
[0032] 1. Obtain standardized text content:
[0033] Suppose we have the following multi-source documents:
[0034] A PDF document states: "Wuyishan is located in Fujian Province and is one of China's famous mountain ranges."
[0035] A DOCX document states: "Wuyishan in Fujian Province is a tourist destination."
[0036] A TXT document states: "Wuyishan is famous for its unique natural landscape."
[0037] Use a document parsing tool (such as PDFPlumber, Docx2txt, TxtParser) to convert the above document into standardized text:
[0038] Text 1: Wuyi Mountain is located in Fujian Province and is one of China's famous mountain ranges.
[0039] Text 2: Wuyishan in Fujian Province is a tourist destination.
[0040] Text 3: Wuyi Mountain is famous for its unique natural landscape.
[0041] 2. Use the pre-trained language model BERT to perform entity recognition on standardized text and extract a candidate entity set:
[0042] Candidate entities for text 1: {"Wuyishan", "Fujian Province", "China", "Mountain Range"}
[0043] Candidate entities for text 2: {“Fujian Province”, “Wuyishan”, “Tourist Destination”}
[0044] Candidate entities for text 3: {"Wuyishan", "natural landscape"}
[0045] By merging all candidate entities, we obtain a candidate entity set:
[0046] Candidate entity set: {"Wuyishan", "Fujian Province", "China", "Mountain Range", "Tourist Destination", "Natural Landscape"}
[0047] 3. Joint Embedded Spatial Computation:
[0048] Let the ontology be (O = {"Wuyishan Mountains", "Himalayan Mountains", "Taishan Mountains"}), and the candidate entity set be (E = {"Wuyishan", "Fujian Province", "China", "Mountains", "Tourist Destination", "Natural Landscape"}).
[0049] Embedding models are trained using contrastive learning algorithms (such as SimCLR) to map ontology and candidate entities to a high-dimensional semantic space:
[0050] Ontology embedding: Wuyi Mountains: [[0.85,0.12,-0.45,...]] Himalayas: [[0.92,0.08,-0.38,...]] Taishan Mountains: [[0.88,0.15,-0.42,...]]
[0051] Candidate entity embeddings: Wuyishan: [[0.86,0.11,-0.44,...]] Fujian Province: [[0.10,0.75,-0.20,...]] China: [[0.15,0.80,-0.25,...]] Mountain range: [[0.81,0.13,-0.43,...]] Tourist destination: [[0.30,0.70,-0.15,...]] Natural landscape: [[0.35,0.65,-0.18,...]]
[0052] 4. Multi-granularity similarity matching:
[0053] The H-KNN algorithm is used to calculate the similarity between candidate entities and the ontology database:
[0054] Wuyishan: The similarity to "Wuyishan Mountain Range" is 0.95.
[0055] Fujian Province: The similarity to the "Wuyishan Mountain Range" is 0.20.
[0056] China: Similarity to the "Wuyishan Mountain Range" is 0.25.
[0057] Mountain Range: Similarity to "Wuyi Mountain Range" is 0.85
[0058] Tourist destination: Similarity to "Wuyishan Mountain Range" is 0.35.
[0059] Natural landscape: Similarity to "Wuyi Mountain Range" is 0.40
[0060] Candidate entities with similarity higher than the threshold (0.5) are selected to obtain a preliminary candidate entity set:
[0061] Preliminary candidate entity set: {"Wuyishan", "mountain range"}
[0062] 5. Triple verification mechanism:
[0063] Common sense reasoning verification: Using the large language model GPT-3 to perform common sense reasoning on "Wuyishan" and "mountain range":
[0064] The inference that "Wuyishan" refers to a mountain range is consistent with common sense.
[0065] The term "mountain range" is logically inferred to be a geographical concept, which aligns with common sense. Filter results: {"Wuyishan", "mountain range"}
[0066] Semantic relevance filtering: Calculate the cosine similarity between candidate entities and concepts in the ontology library, and filter out entities with low semantic relevance (threshold set to 0.8):
[0067] The similarity between "Wuyishan" and "Wuyishan mountain range" is 0.95.
[0068] The similarity between "mountain range" and "Wuyishan mountain range" is 0.85. Filtering result: {"Wuyishan", "mountain range"}
[0069] Logical consistency verification: Use logical reasoning tools to verify the logical consistency between candidate entities and the ontology.
[0070] The logic of "Wuyishan" and "Wuyishan mountain range" is consistent.
[0071] Logically, "mountain range" is a higher-level concept than "Wuyishan Mountain Range," but it doesn't directly match. Filter result: {"Wuyishan"}
[0072] 6. Output the set of high-confidence candidate entities:
[0073] High-confidence candidate entity set: {"Wuyishan"}
[0074] The results analysis shows that, through the above steps, the present invention successfully identified the entity "Wuyishan" from multiple source documents and accurately matched it with "Wuyishan mountain range" in the ontology database, verifying the effectiveness and high accuracy of the method.
[0075] In summary, the purpose of this invention is to provide a high-precision ontology entity recognition and verification method for heterogeneous documents. By combining formal expression and precise calculation with a pre-trained language model, contrastive learning algorithm, improved hierarchical K-nearest neighbor algorithm and triple verification mechanism, the accuracy and reliability of ontology entity recognition in heterogeneous documents are significantly improved, providing reliable support for the needs of smart cities, map services, data navigation and government address standardization scenarios.
Claims
1. A method for high-precision recognition and verification of ontology entities for heterogeneous documents, characterized in that, The method comprises the following steps: S1 : Obtain the standardized text content, convert the heterogeneous document set D through a conversion function to the standardized text set T; S2: Extracting a candidate entity set, extracting a function in a standardized text set T extracting a candidate entity set E i ; S3: Joint embedding space computation, mapping the ontology O and the set of candidate entities E i by the joint embedding function to a unified high-dimensional semantic space, resulting in S4: Multi-granularity similarity matching, then multi-granularity similarity matching is performed through an improved hierarchical K nearest neighbor algorithm, and the vector Embed O and Embed E are set, and a hierarchical K nearest neighbor function is calculated as S5: Triple verification mechanism: use large language model reasoning verification Semantic correlation degree filtering Logical consistency verification To the candidate set S i After triple verification, get high confidence candidate entity set result H i ; S6: output a high-confidence candidate entity set, output a high-confidence candidate entity set H that meets the ontology constraint i .
2. The method of claim 1, wherein, In step S1, the heterogeneous documents are converted into normalized texts. Let the set of heterogeneous documents be D = {d1, d2,..., d n}, the set of normalized texts be T = {t1, t2,..., t n}, and the conversion function be The conversion formula is: D is a set of heterogeneous documents, di represents the first heterogeneous document, d n represents the nth heterogeneous document, T is a set of standard documents, ti represents the first converted standard document, t n represents the nth converted standard document, is a conversion method.
3. The method of claim 1, wherein, In step S2, a candidate entity set E is extracted from the normalized text set T i = {e1, e2,..., en}, the extraction function is n The extraction formula is: E i is a collection of entity classes, e1 is the first entity, e n denotes the n-th entity, is the extraction method.
4. The method of claim 1, wherein, In step S3, the ontology library and the candidate entity set need to be mapped to a unified high-dimensional semantic space. The set of local libraries is O = {o1, o2,..., o n}, the candidate entity set is E i , and the function of joint embedding is The mapping formula is: Embed O is a vector of ontologies, Embed E is a spatial vector of the set of entities E i , O is a local library, o1 is the first local library, o n is the n-th local library.
5. The method of claim 1, wherein, In step S4, multi-granularity similarity matching is performed by the improved hierarchical K-nearest neighbor algorithm to generate a preliminary candidate entity set, and the vector in the joint embedding space is set as Embed O and Embed E The hierarchical K-nearest neighbor function is The mapping formula is: S i is a preliminary set of candidate entities.
6. The method of claim 1, wherein, In step S5, the triple verification mechanism is used to filter the candidate entity set to ensure that it meets the ontology constraints; the preliminary candidate set result S i = {s1, s2,..., s p} The high-confidence candidate entity set after triple verification H i = {h1, h2,..., h q} The verification functions are respectively The calculation formula is: where S i is the candidate result set, H i is the computed high-confidence candidate entity set, where triple verification includes common sense reasoning verification semantic correlation filtering logical consistency verification The specific mapping formula is: s j For some subset of S i LLM is the language large model GTP-3; o k is a subset of the local library O, and τ is a threshold for cosine similarity. LogicCheck is a logic inference tool Prolog.
7. The method of claim 1, wherein, In step S6, a high-confidence candidate entity set conforming to the ontology constraint is output, and the calculation formula is: h j To pass the triple-validated S i subset of the S 8. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, causes the processor to perform the ontology entity high-precision identification and verification method for heterogeneous documents according to claim 1.
9. A computer system comprising: a processor for executing instructions stored in a storage medium to implement the ontology entity high-precision identification and verification method for heterogeneous documents according to claim 1; a memory for storing network texts of the ontology entity high-precision identification and verification method for heterogeneous documents and intermediate results generated in the calculation process; an input / output interface for receiving specified texts or identification information and outputting identified ontology elements.
10. An apparatus for high-precision recognition and verification of ontology entities for heterogeneous documents, characterized in that, The device comprises: a standardized text acquisition module configured to convert the set of heterogeneous documents D into a set of standardized texts T by means of a conversion function T = f(D) a candidate entity extraction module configured to extract a set of candidate entities E in the set of normalized texts T by an extraction function extracting a set of candidate entities E i , the extracted formula is a joint embedding computation module configured to map the ontology library O and the set of candidate entities E i by a joint embedding function to a unified high-dimensional semantic space, resulting in A multi-granularity matching module performs multi-granularity similarity matching through an improved hierarchical K-nearest neighbor algorithm, and calculates a hierarchical K-nearest neighbor function based on Embed O and Embed E in a joint embedding space to generate a preliminary candidate entity set S i ; Triple verification module, verified by common sense reasoning Semantic correlation degree filtering Logical consistency verification Filter the candidate entity set S i Wherein Common sense reasoning based on GPT-3, Based on cosine similarity threshold τ Semantic filtering, Logical verification based on Prolog; a result output module configured to output a high-confidence candidate entity set H that conforms to the ontology constraints i .
Citation Information
Patent Citations
Entity alignment method based on attribute and relation perception heterogeneous graph converter
CN116467395A
Semantic matching and retrieval of standardized entities
US20210303638A1