Professional text-oriented weak supervision knowledge graph automatic construction method

By converting professional text into a structured format and extracting entities, relationships, and attributes using a large language model, and dynamically updating the domain graph pattern, the problem of pattern rigidity in the construction of professional text knowledge graphs is solved, achieving low-cost and high-efficiency knowledge graph construction that meets the rigor and timeliness requirements of professional fields.

CN121390253AActive Publication Date: 2026-01-23STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511946994.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-01-23
Estimated Expiration
2045-12-23

AI Technical Summary

Technical Problem

Existing technologies for constructing professional text knowledge graphs suffer from rigid pre-defined domain graph patterns and a lack of effective quality assessment and iteration mechanisms, resulting in entity redundancy, relationship errors, and logical conflicts. This makes it difficult to meet the requirements of professional domains for the rigor, accuracy, and timeliness of knowledge expression.

Method used

Professional texts are converted into structured text formats. Entities, relationships, and attributes are extracted in a weakly supervised manner using a large language model. Pattern conflicts are identified, and the domain graph pattern is dynamically updated through a multi-dimensional confidence evaluation mechanism. The knowledge graph is then optimized and reconstructed until the quality indicators reach a preset threshold.

Benefits of technology

It enables the low-cost and high-efficiency construction of professional text knowledge graphs, with good adaptability to professional scenarios and stable accuracy, meeting the knowledge expression needs of fields such as law and medicine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121390253A_ABST
    Figure CN121390253A_ABST
Patent Text Reader

Abstract

The invention provides a professional text-oriented weak supervision knowledge graph automatic construction method, and relates to the technical field of knowledge graph construction, and the method comprises the following steps: converting a professional text into a structured text format, and generating a preprocessed text set; based on a preset domain graph mode, constructing a structured knowledge unit by using a large language model, identifying mode conflicts, and generating a candidate new mode description document; evaluating the comprehensive confidence of the candidate new mode description document through a multi-dimensional confidence evaluation mechanism, and dynamically updating the domain atlas mode; optimizing and reconstructing the structured knowledge unit, and calculating a quality index of the reconstructed weak supervision knowledge graph; and repeatedly constructing the weakly supervised knowledge graph until the quality index of the weakly supervised knowledge graph reaches a preset quality stability threshold, and obtaining the professional text weakly supervised knowledge graph. The technical problem that in weak supervision knowledge graph construction in the prior art, a preset domain graph mode is rigid and is difficult to adapt to emerging knowledge types is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of knowledge graph construction, in particular to a weakly supervised knowledge graph automatic construction method for professional text. BACKGROUND

[0002] In professional fields such as law, medicine, and finance, professional text carries a large amount of core knowledge with rigorous structure and complex semantics. These knowledge is an important basis for decision support and intelligent analysis in the field, and it is urgently needed to realize structured presentation and efficient utilization through knowledge graph.

[0003] However, traditional professional text knowledge graph construction relies on strong supervision learning method, which requires a large amount of manpower for data annotation and rule making, not only high cost, long cycle, but also difficult to adapt to the needs of professional knowledge dynamic updating with industry development. At the same time, although the existing weak supervision construction method reduces the dependence on annotation, it generally has the problems of rigid pre-set domain graph pattern, lack of effective quality guarantee and iteration mechanism, etc., resulting in the constructed knowledge graph prone to entity redundancy, relationship error, logical conflict and other defects, which is difficult to meet the requirements of professional field on knowledge expression rigor, accuracy and timeliness.

[0004] Therefore, it is urgent to develop a weakly supervised knowledge graph automatic construction method for professional text to solve the technical problems in the construction of professional text knowledge graph. SUMMARY

[0005] The present application provides a weakly supervised knowledge graph automatic construction method for professional text to solve the technical problems of rigid pre-set domain graph pattern in the prior art, which is difficult to adapt to emerging knowledge types, and lack of effective quality evaluation and iteration mechanism.

[0006] The technical solution of the present application to solve the above technical problems is as follows: The present application provides a weakly supervised knowledge graph automatic construction method for professional text, comprising: Converting professional text into structured text format and generating a preprocessed text set; Based on the pre-set domain graph pattern, using a large language model to extract entities, relationships and attributes from the preprocessed text in a weakly supervised manner, construct structured knowledge units, and identify pattern conflicts between the structured knowledge units and the domain graph pattern, and generate a candidate new pattern description document; Evaluate the comprehensive confidence of the candidate new pattern description document through a multi-dimensional confidence evaluation mechanism, and dynamically update the domain graph pattern; Based on the updated domain graph pattern, the structured knowledge units are optimized and reconstructed to construct a weakly supervised knowledge graph, and the quality indicators of the reconstructed weakly supervised knowledge graph are calculated; The weakly supervised knowledge graph is repeatedly constructed until a quality index of the weakly supervised knowledge graph reaches a preset quality stability threshold, and a final professional text weakly supervised knowledge graph is output.

[0007] The present application has the following advantages: Compared with the prior art, the professional text is first converted into a structured text format to generate a preprocessed text set. The generated preprocessed text set can accurately adapt to the text input requirements of the weakly supervised knowledge graph construction, improving the accuracy and processing efficiency of the subsequent entity, relationship and attribute extraction link. Secondly, based on the preset domain graph pattern, the large language model is used to extract entities, relationships and attributes from the preprocessed text in a weakly supervised manner to construct structured knowledge units, identify pattern conflicts between the structured knowledge units and the domain graph pattern, and generate candidate new pattern description documents. This effectively solves the problem of the prior art that it is difficult to automatically identify, evaluate and absorb new knowledge outside the domain graph pattern in professional text, ensuring the dynamic updating ability and professional scene adaptability of the knowledge graph. Thirdly, the comprehensive confidence of the candidate new pattern description document is evaluated through a multi-dimensional confidence evaluation mechanism, and the domain graph pattern is dynamically updated. This effectively balances the rigor of the domain graph pattern and the adaptability to emerging scenarios of professional text, solving the problem of inaccurate pattern updating caused by single-dimensional or manual evaluation in the prior art. Further, the structured knowledge units are optimized and reconstructed based on the updated domain graph pattern, and the quality index of the reconstructed weakly supervised knowledge graph is calculated, ensuring that the weakly supervised knowledge graph can meet the actual application requirements of professional text for knowledge expression. Finally, the weakly supervised knowledge graph is repeatedly constructed until the quality index of the weakly supervised knowledge graph reaches the preset quality stability threshold, and the final professional text weakly supervised knowledge graph is output. A professional text weakly supervised knowledge graph that can accurately and comprehensively carry the core knowledge of professional text is obtained, meeting the actual application requirements of the professional field for the knowledge graph.

[0008] By the technical solution, the application breaks away from the dependence of a large-scale artificial labeling on a strong supervision method, effectively solves the problems of high cost and low efficiency of a traditional construction mode, and simultaneously, through identifying conflicts between a structured knowledge unit and a preset domain graph pattern and generating a candidate new pattern description document, a multi-dimensional confidence evaluation mechanism is combined to realize dynamic updating of the domain graph pattern, and a pain point that a preset pattern in an existing weak supervision method is rigid and cannot adapt to emerging knowledge types of professional texts is broken through; then, the structured knowledge unit is optimized and reconstructed by using the updated domain graph pattern, and a quality index is calculated, through iteration construction until the quality index reaches a preset quality stability threshold, problems such as insufficient knowledge extraction precision, entity redundancy or relationship error of the graph are effectively avoided, and finally, the weak supervision knowledge graph of the professional text has the construction advantages of low cost and high efficiency and good professional scene adaptability, and has stable accuracy, integrity and low conflict rate, and meets the rigorousness and practicality requirements of the knowledge graph in the professional fields such as law and medicine. BRIEF DESCRIPTION OF DRAWINGS

[0009] Figure 1 A flowchart of a weak supervision knowledge graph automatic construction method for professional texts provided by the application is shown. Figure 2 A flowchart of generating a preprocessed text set in the weak supervision knowledge graph automatic construction method for professional texts provided by the application is shown. DETAILED DESCRIPTION

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

[0011] In the description of the application, the terms "first", "second" are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the application, the meaning of "multiple" is two or more, unless otherwise specifically limited.

[0012] In the description of this invention, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.

[0013] Examples, such as Figure 1 As shown, this embodiment of the invention provides an automated method for constructing weakly supervised knowledge graphs for specialized texts, including: S10: Convert professional text into structured text format and generate a preprocessed text collection.

[0014] Currently, professional texts, such as legal judgments and regulations, are mostly in unstructured or semi-structured formats such as PDF and DOCX. These formats are highly heterogeneous and contain redundant information, making it difficult to directly and accurately identify core content and semantic relationships during the knowledge graph construction process.

[0015] Meanwhile, traditional manual processing methods are inefficient and costly, while general text processing methods lack adaptability to the terminology and structural features of professional fields, and cannot meet the requirements of weakly supervised knowledge graph construction for the structuring and standardization of input text.

[0016] To address the aforementioned issues, this application converts professional text into a structured text format and generates a preprocessed text set.

[0017] Specifically, such as Figure 2 As shown, step S10 in the method includes: Professional texts are uniformly converted into standardized Markdown or XML formats to form intermediate structured text; The intermediate structured text is segmented using a semantic integrity segmentation algorithm. During the segmentation process, hierarchical structure information is extracted, including chapter path information, semantic type information, and reference relationship information. Based on the chapter path information, semantic type information, and reference relationship information, add chapter path markers, semantic type markers, and reference relationship markers to each text block, and assign a unique text block identifier to each text block; The text blocks added with chapter path markers, semantic type markers, reference relationship markers, and text block identifiers are organized into a preprocessed text set.

[0018] In the embodiments of the present application, the professional text is first uniformly converted into a standardized Markdown format or XML format to form an intermediate structured text. Specifically, the format type of the professional text is first identified, such as PDF, DOCX, TXT, OCR text converted from a scan, and the like, and then different formats of the professional text are uniformly converted into Markdown or XML format through a format conversion tool, such as a PDF-to-XML tool, a DOCX-to-Markdown tool, and the like. The structure characteristics of the professional text, such as chapter titles, paragraph separations, lists, and the like, are preserved in the conversion process to avoid loss of key format information, and finally a uniformly formatted and structure-parsable intermediate structured text is formed.

[0019] Among them, the Markdown format is adapted to lightweight text hierarchical expression, which can quickly represent the chapter hierarchy of the professional text, such as the information of cause of action, claim of the plaintiff, and the court believes, etc., of the legal text, and takes into account readability and structuring; the XML format is adapted to fine structured tag definition, which can accurately encapsulate the core semantic units of the professional text through custom semantic tags, and meet the fine needs of subsequent weakly supervised extraction for text structure analysis; uniformly converting the professional text into a standardized Markdown format or XML format can eliminate the heterogeneity problem brought by different source formats, and provide a uniformly formatted and structure-parsable intermediate structured text carrier for subsequent block processing and the like.

[0020] For example, if the professional text is a PDF format civil tort judgment document, the OCR character correction processing can be first performed on the scanned PDF text to correct the recognized errors of legal terms, clause numbers, or party information and the like; then the corrected text is uniformly converted into XML format through a format conversion tool, and the text content is structured and encapsulated using custom legal text semantic tags, and finally a uniformly formatted and accurately contented intermediate structured text is formed.

[0021] Secondly, the intermediate structured text is processed by a semantic integrity segmentation algorithm to extract hierarchical structure information, including chapter path information, semantic type information and reference relationship information. Specifically, a semantic integrity segmentation algorithm model optimized for professional text is first loaded. When the semantic integrity segmentation algorithm is executed, the intermediate structured text is first split into initial text segments based on basic split points such as periods, semicolons and line breaks. Then, the topic word similarity of each initial text segment is calculated, such as the semantic vector similarity of the words in the segment based on the LawBERT model. Adjacent segments with a topic word similarity greater than a preset similarity threshold are merged to ensure that each final text block contains only one core semantic topic, such as evidence collection description or legal clause application analysis, to avoid semantic fragmentation. During the segmentation process, hierarchical structure information is extracted from the context and structured labels of each text block, including chapter path information, semantic type information and reference relationship information, to ensure that the location, semantic properties and associated information of each text block are traceable. The preset similarity threshold can be dynamically set according to the specific application scenario and actual needs. Preferably, the preset similarity threshold is set to 0.85, taking into account the filtering accuracy and efficiency.

[0022] The semantic integrity segmentation algorithm refers to a segmentation algorithm optimized for the semantic features of professional text. Its core logic is to avoid splitting core semantic units by fusing specialized domain knowledge such as professional term dictionaries and domain text structure templates, ensuring the semantic integrity of each text block. The chapter path information refers to the hierarchical location path of the text block in the original professional text, such as the legal scenario of civil judgment documents - the court believes - legal application part - analysis of the reference of article 1194 of the Civil Code. The semantic type information refers to the core semantic category of the text block, such as case description, party information, evidence collection description, legal clause reference analysis and judgment result determination in the legal scenario. The reference relationship information refers to the association identifier of the external resource information or other text blocks in the text block, such as the reference of article 1194 of the Civil Code and the reference of the evidence description text block in the legal scenario.

[0023] Exemplarily, for the intermediate structured text converted into the XML format, the semantic integrity segmentation algorithm first locates to the chapter of the court's opinion and splits it into three initial text segments of fact finding, legal application, and responsibility division; then calculates the semantic similarity of the keywords among the segments, and obtains the keyword similarity between fact finding and legal application as 0.7 and the similarity between legal application and responsibility division as 0.68, both of which are lower than the preset similarity threshold 0.85; therefore, it is determined that the core semantics of the three segments are independent, and the three independent text blocks are retained. At the same time, the hierarchical structure information of each text block is extracted synchronously in the segmentation process. Taking the legal application text block as an example, the extracted chapter path information is civil judgment document-court's opinion-legal application, the semantic type information is legal clause reference, and the reference relationship information is reference to Article 1194 of the Civil Code.

[0024] Exemplarily, a semantic integrity segmentation algorithm model adapted to a professional scene can be constructed based on the semantic features of professional texts. Taking the legal scene as an example: first, a large number of diversified legal professional texts are collected as sample training data sets, and the sample training data are finely annotated, such as using a combination of manual annotation and machine pre-annotation to accurately mark semantic separation features such as the landmark semantic boundary sentences of the court's opinion, the above-mentioned, in accordance with the provisions of the preceding paragraph, and the implicit separation features such as the paragraph break after the legal clause reference, the end of evidence listing, and the beginning of responsibility division, to form a sample supervised label set. Second, a semantic integrity segmentation algorithm model is constructed based on the legal domain pre-training model LawBERT as the basic framework, and the semantic encoding layer of the model is optimized by embedding the legal terminology dictionary to enable it to accurately recognize the professional semantic association of legal texts. Then, the sample training data set and the corresponding sample supervised label set are divided into a training set and a validation set in a ratio of 8:2, the training set is input into the semantic integrity segmentation algorithm model for iterative training, the semantic similarity threshold of the model is dynamically adjusted during the training process, and the segmentation effect is checked in real time and the model parameters are corrected through the validation set. Finally, a semantic integrity segmentation algorithm model for legal texts is trained, which can accurately identify the semantic boundaries of evidence description, legal application, fact finding, and responsibility division, and avoid splitting complete legal semantic units.

[0025] Thirdly, according to the chapter path information, the semantic type information, and the reference relationship information, chapter path markers, semantic type markers, and reference relationship markers are added to each text block, and each text block is assigned a unique text block identifier. Among them, the chapter path marker refers to converting the chapter path information into standardized coding; the semantic type marker refers to converting the semantic type information into standardized coding; and the reference relationship marker refers to converting the reference relationship information into standardized coding.

[0026] Exemplarily, the marking coding rules of the professional text can be formulated first. For example, in the legal scenario, the chapter path marking can adopt the coding format of domain identification, document type, chapter level, and serial number, the semantic type marking can adopt the coding of legal semantic category abbreviation, and the reference relationship marking can adopt the coding format of reference type and reference object; based on the marking coding rules, the extracted chapter path information, semantic type information, and reference relationship information are respectively converted into corresponding chapter path marking, semantic type marking, and reference relationship marking, and embedded into the non-text area of each text block. At the same time, a unique text block identifier is assigned to each text block, which can adopt the globally unique format of text block type, timestamp, and random number, to ensure that the text blocks of different professional texts and different batches of processing do not have repeated identifiers, and the identifier can be associated with all the marking information of the text block.

[0027] Exemplarily, in the legal scenario, based on the marking coding rules, the chapter path information: civil judgment document - the court believes - legal application can be converted into the corresponding chapter path marking: FL-MSPJ-BYSR-FLYS-001, FL = legal field, MSPJ = civil judgment document, BYSR = the court believes, FLYS = legal application, 001 = serial number; the semantic type information: legal provision reference can be converted into the corresponding semantic type marking: FLTKYY; the reference relationship information: reference to Article 1194 of the Civil Code can be converted into the corresponding REF-FLTF-MF-1194; at the same time, a unique text block identifier is assigned to the text block, such as TB-20250520-897654; finally, the chapter path marking, semantic type marking, and reference relationship marking are embedded into the non-text area of each text block.

[0028] Finally, the text blocks with added chapter path marking, semantic type marking, reference relationship marking, and text block identifier are organized into a preprocessed text collection. Specifically, each text block can be stored in the order of text block identifier, chapter path marking, semantic type marking, reference relationship marking, and text content, to ensure that the data is decoupled from the text content and can be associated, and then multiple text blocks are integrated into a unified preprocessed text collection, which can be stored in a serializable format such as JSONL, CSV, etc.

[0029] In summary, compared with the prior art, the present application converts the professional text into a structured text format and generates a preprocessed text collection. In this way, the format heterogeneity of the professional text can be effectively eliminated, and the original unstructured / semi-structured text is converted into a standardized, semantically complete, and analyzable structured text form, and the generated preprocessed text collection can accurately adapt to the text input requirements of the weakly supervised knowledge graph construction, and improve the accuracy and processing efficiency of the subsequent entity, relationship, and attribute extraction links.

[0030] S20: Based on the preset domain graph pattern, utilize the large language model to extract entities, relationships and attributes from the preprocessed text in a weakly supervised manner, construct structured knowledge units, and identify pattern conflicts between the structured knowledge units and the domain graph pattern, and generate a candidate new pattern description document.

[0031] In the field of professional texts such as law and medicine, the knowledge system is rigorous and continuously updated with the development of the industry. A large number of new knowledge generated by emerging scenarios often exceeds the coverage of the preset domain graph pattern.

[0032] However, in dealing with such problems, the existing technology either relies on manual identification of out-of-pattern knowledge one by one, which is inefficient and prone to bias due to subjective judgment; or lacks standardized automated mechanisms, and cannot accurately complete the process of identifying new out-of-pattern knowledge and updating the knowledge graph, resulting in that valuable new knowledge in professional texts is difficult to be efficiently and normatively absorbed into the existing knowledge graph, restricting the dynamic updating ability of the graph and failing to meet the demand for timeliness and completeness of knowledge in professional fields.

[0033] To solve the above problems, the present application is based on the preset domain graph pattern, and utilizes the large language model to extract entities, relationships and attributes from the preprocessed text in a weakly supervised manner, constructs structured knowledge units, and identifies pattern conflicts between the structured knowledge units and the domain graph pattern, and generates a candidate new pattern description document.

[0034] Specifically, step S20 in the method comprises: constructing a weakly supervised prompt template based on the preset domain graph pattern, wherein the weakly supervised prompt template comprises an entity type definition set, a relationship type definition set and an attribute definition set; inputting the preprocessed text set and the weakly supervised prompt template into a large language model to obtain an entity extraction result set, a relationship extraction result set and an attribute extraction result set, and recording the extraction confidence score of each extraction result in the entity extraction result set and the relationship extraction result set; performing attribute value format verification on the attribute extraction result set to generate an attribute validity score; filtering extraction results with extraction confidence scores lower than a preset extraction confidence threshold and attribute validity scores lower than a preset attribute validity threshold; based on the filtered entity extraction results, relationship extraction results and attribute extraction results, constructing a structured knowledge unit comprising a qualified entity set, a qualified relationship set and a qualified attribute set; identify the pattern conflict between the structured knowledge unit and the domain graph pattern, and generate a candidate new pattern description document.

[0035] In the embodiments of the present application, first, a weak supervision prompt template is constructed based on a preset domain graph schema, wherein the weak supervision prompt template includes an entity type definition set, a relationship type definition set, and an attribute definition set. The domain graph schema refers to a knowledge graph structured specification framework defined for a specific professional field. For example, in a legal scenario, the domain graph schema can include a systematized mode composed of pre-defined legal field entity types, entity relationship types, and entity / relationship attribute rules.

[0036] The weak supervision prompt template refers to a prompt word set that does not rely on large-scale human-labeled samples, but only uses domain-specific type definitions and a small number of typical extraction examples to guide a large language model to complete a knowledge extraction task. The weak supervision prompt template includes an entity type definition set, a relationship type definition set, and an attribute definition set. The entity type definition set refers to the classification and characteristics of core entities in the domain, such as case, party, and legal provisions in a legal scenario. The relationship type definition set refers to the clear definition of core semantic associations between entities in the domain, such as the association between party, claim, and case in a legal scenario. The attribute definition set refers to the definition of core attributes and format requirements of entities or relationships, such as the format requirements of case, court, legal provisions, and party information in a legal scenario.

[0037] For example, in a legal scenario, the weak supervision prompt template constructed based on the preset domain graph schema includes the following: the entity type definition set includes case, party, and legal provisions; the relationship type definition set includes the association between case and legal provisions, such as case-applicable-legal provisions; the association between party and case, such as party-claim-case; and the association between party and evidence, such as party-submit-evidence; and the attribute definition set includes case, party, and legal provisions.

[0038] Second, the preprocessed text set and the weak supervision prompt template are input into the large language model to obtain an entity extraction result set, a relationship extraction result set, and an attribute extraction result set, and the extraction confidence scores of each extraction result in the entity extraction result set and the relationship extraction result set are recorded. Specifically, first, the preprocessed text set is split by batch size, such as 50 text blocks per batch, to avoid overloading the large language model. Then, the weak supervision prompt template is concatenated before each batch of text blocks, and the large language model is input into the large language model adapted to the professional scenario. The large language model refers to the weak supervision prompt template, analyzes the semantics of the text blocks one by one, identifies matching knowledge elements, and classifies them by category. Finally, the entity extraction result set, the relationship extraction result set, and the attribute extraction result set are output. At the same time, the large language model generates extraction confidence scores for the entity and relationship extraction results.

[0039] Among them, the large language model can dynamically select a general large language model such as GPT-4, Wenxin Yiyang, Tongyi Qianwen according to the professional scene demand, or can be based on the general large language model to fine-tune the domain data according to the semantic characteristics of a specific field, to obtain a more adaptive domain-specific large language model. For example, in the legal field, in addition to the general model fine-tuned for the legal field, a legal pre-training model LawBERT can also be directly used, which has natural advantages in legal terminology recognition and semantic association analysis, and can improve the accuracy of knowledge extraction.

[0040] Among them, the extraction confidence score refers to the quantitative probability value representing the reliability of the result output by the large language model. The value range is 0-1. The closer the extraction confidence score is to 1, the higher the trust degree of the large language model for the result. The calculation logic is that the large language model calculates the matching degree of the extraction result and the weak supervision prompt template, the semantic support strength of the result in the text, and other multi-dimensional indicators, and then obtains the result through internal algorithm fusion.

[0041] Exemplarily, taking the pre-processed text set of the legal field as an example, the content of a pre-processed text block is: The plaintiff Zhang Mou claims that the defendant certain e-commerce company infringes his information network dissemination right, this case should apply Article 1194 of the Civil Code, through the weak supervision prompt template, it can be clearly seen that the entity type includes the case as an information network dissemination right dispute, the parties are the plaintiff and the defendant, and the legal clause is the Civil Code clause; the relationship type includes the parties-claim-case, and the case-applicable-law clause; after inputting the two into the large language model, the output entity extraction result set contains: information network dissemination right dispute, extraction confidence score 0.98, Zhang Mou, extraction confidence score 0.99, certain e-commerce company, extraction confidence score 0.97, Article 1194 of the Civil Code, extraction confidence score 0.99; the relationship extraction result set contains: Zhang Mou-claims-information network dissemination right dispute, extraction confidence score 0.96, information network dissemination right dispute-applicable-Civil Code Article 1194, extraction confidence score 0.95; the attribute extraction result set contains: Civil Code Article 1194-clause number: 1194, Zhang Mou-identity type: plaintiff.

[0042] Again, the attribute value format verification is performed on the attribute extraction result set to generate attribute validity scores. Specifically, based on the pre-set domain graph schema and weak supervision prompt template, an attribute value format verification rule library is constructed. The rule library needs to specify format standards, value range and compliance judgment conditions for different attribute types. For example, in the legal scenario, special rules can be developed for core attributes such as legal clause-clause number, case- case filing time, and party-identity card number. Then, each attribute item in the attribute extraction result set is traversed, and the attribute value is compared with the corresponding verification rule to complete the verification from three dimensions of format compliance, value range rationality and semantic adaptability. Finally, the attribute validity score is generated by a quantitative algorithm according to the verification result, and the attribute validity score is bound to the attribute item.

[0043] The attribute validity score refers to the quantitative evaluation of the format compliance and value range rationality of the attribute extraction result. The value range is 0-1, and the higher the attribute validity score, the more the attribute value meets the use requirements of the professional scenario. For example, the calculation logic of the attribute validity score is: 1 point for attributes with completely compliant format and reasonable value range, 0.6-0.9 points for attributes with minor format flaws but complete core information, 0.1-0.5 points for attributes with serious format errors, and 0 points for attributes with completely unmatched attribute values and attribute types.

[0044] For example, in the legal scenario, the attribute extraction result set is taken as an example, and the weak supervision prompt template has defined the attribute definition set as: the format of legal clause-clause number is number+clause, such as 1194 clause; the format of case-case filing time is YYYY-MM-DD; and the format of party-identity card number is 18 digits. The verification process of the attribute extraction result set and the generation of the attribute validity score are as follows: Article 1194 of the Civil Code-clause number: 1194 clause, the attribute value 1194 clause completely matches the format of number+clause, and has strong association with the legal clause entity and high semantic adaptability, the attribute validity score is 0.99; Zhang-identity type: plaintiff, the attribute value plaintiff belongs to the legal subject type preset in the template, without format deviation, and consistent with the text semantics that Zhang is the claimant, the attribute validity score is 0.98.

[0045] Further, the extraction result with the extraction confidence score lower than the preset extraction confidence threshold and the attribute validity score lower than the preset attribute validity threshold is filtered. Specifically, for the entity extraction result set and the relation extraction result set, it is compared whether the extraction confidence score is lower than the preset extraction confidence threshold, and for the attribute extraction result set, it is compared whether the attribute validity score is lower than the preset attribute validity threshold. The preset extraction confidence threshold refers to a critical value preset for judging the credibility of the entity / relation extraction result, and the value range is 0-1, which can be dynamically set based on professional field characteristics, semantic complexity of field text and business requirements, such as setting the preset extraction confidence threshold to 0.9 in a legal scenario; the preset attribute validity threshold refers to a critical value preset for judging the attribute value format compliance, and the value is 0-1, which can be dynamically set based on professional field characteristics and business requirements, such as setting the preset attribute validity threshold to 0.8 in a legal scenario.

[0046] Exemplarily, taking the legal scenario as an example, if the preset extraction confidence threshold is 0.9 and the preset attribute validity threshold is 0.8, it is compared whether the extraction confidence score of the entity extraction result in the entity extraction result set is lower than the preset extraction confidence threshold, such as the extraction confidence score of the information network dissemination right dispute being 0.98, which is not lower than the preset extraction confidence threshold, and is retained; at the same time, it is compared whether the extraction confidence score of the relation extraction result in the relation extraction result set is lower than the preset extraction confidence threshold, such as the extraction confidence score of Zhang-claims-information network dissemination right dispute being 0.96, which is not lower than the preset extraction confidence threshold, and is retained; then, it is compared whether the attribute validity score of the attribute extraction result in the attribute extraction result set is lower than the preset attribute validity threshold, such as the attribute validity score of Article 1194 of the Civil Code-article number: 1194 being 0.99, which is not lower than the preset attribute validity threshold, and is retained.

[0047] In this way, by filtering the extraction result with the extraction confidence score lower than the preset extraction confidence threshold and the attribute validity score lower than the preset attribute validity threshold, low-quality knowledge elements generated in the weakly supervised extraction process can be eliminated, including low-credibility entities / relations with insufficient model trustworthiness, and invalid attributes with format violation and semantic mismatch, thereby improving the data quality of subsequent construction of structured knowledge units.

[0048] Further, based on the filtered entity extraction result, relation extraction result and attribute extraction result, a structured knowledge unit containing a qualified entity set, a qualified relation set and a qualified attribute set is constructed. In this way, the filtered high-credibility and high-compliance entity, relation and attribute extraction results can be integrated into a structured knowledge unit with clear ownership and traceability, providing standardized basic data for subsequent precise construction of a knowledge graph.

[0049] Finally, the pattern conflicts between the structured knowledge unit and the domain graph pattern are identified, and a candidate new pattern description document is generated. In this way, new entities and new relationship types that exceed the domain graph pattern in the structured knowledge unit can be accurately identified, providing standardized candidate solutions for dynamic updating of the graph pattern, effectively adapting to emerging scenarios of professional text, and ensuring the expansibility and adaptability of the knowledge graph.

[0050] Specifically, the "constructing a structured knowledge unit containing a qualified entity set, a qualified relationship set and a qualified attribute set based on the filtered entity extraction result, relationship extraction result and attribute extraction result" comprises: allocating a unique entity identifier to each filtered entity extraction result, recording the entity type and entity name, and forming a qualified entity set; allocating a unique relationship identifier to each filtered relationship extraction result, recording the relationship type and relationship name, and forming a qualified relationship set; associating the filtered attribute extraction result to the corresponding entity identifier or relationship identifier to form a qualified attribute set; constructing an entity-relationship topology based on the entity identifier, relationship identifier and corresponding attribute extraction result; based on the qualified attribute set, recording the text block identifier and extraction confidence score corresponding to each qualified entity and qualified relationship, and integrating to form a structured knowledge unit.

[0051] In the embodiments of the application, first, a unique entity identifier is allocated to each filtered entity extraction result, and the entity type and entity name are recorded to form a qualified entity set. Specifically, the entity identifier coding rules can be formulated based on the characteristics of the professional field, and then the filtered entity extraction result set is traversed, and an identifier is allocated to each entity one by one, and the entity type and entity name of the entity are recorded synchronously, and finally the triple of entity identifier, entity type and entity name is classified and sorted according to the entity type to form a qualified entity set without duplication and searchable.

[0052] The entity identifier is a globally unique string identifier allocated to the entity, and the format example is: XX-entity type abbreviation-number, XX is the abbreviation of the professional field name, such as FL representing law, and the entity identifier can be directly associated with all attributes and associated relationships of the entity to realize full-link tracing of the entity.

[0053] Exemplarily, for the information network dissemination right dispute in the filtered entity extraction result, a unique entity identifier FL-AY-0001 can be assigned, where FL represents law, AY represents case, and 0001 represents the serial number. The entity type is recorded as case, and the entity name is information network dissemination right dispute. According to the same logic and method, the qualified entity set is formed by traversing the filtered entity extraction result set.

[0054] Secondly, a unique relationship identifier is assigned to each filtered relationship extraction result, and the relationship type and relationship name are recorded to form a qualified relationship set. Exemplarily, a unique relationship identifier can be assigned to the relationship according to the construction process of the qualified entity set, and the format example is: XX-relation type abbreviation-serial number, XX is the abbreviation of the professional field name, such as FL representing law, and the relationship identifier is directly associated with all attributes of the relationship and the associated relationship, realizing the full-link traceability of the relationship.

[0055] For example, for the Zhang-claim-information network dissemination right dispute in the filtered relationship extraction result, a unique relationship identifier FL-ZZ-0001 can be assigned, where FL represents law, ZZ represents claim, and 0001 represents the serial number. The relationship type is recorded as claim, the relationship name is claim, the associated head entity is Zhang, and the associated tail entity is information network dissemination right dispute. According to the same logic and method, the qualified relationship set is formed by traversing the filtered relationship extraction result set.

[0056] Thirdly, the filtered attribute extraction result is associated with the corresponding entity identifier or relationship identifier to form a qualified attribute set.

[0057] Specifically, first, the attribute ownership rules are determined according to the specific professional field characteristics. Taking the legal scene as an example, the identity card number, identity type, etc. in the attribute extraction result belong to the party entity, the clause number, validity state, etc. belong to the legal clause entity, the trial court, filing time, etc. belong to the case entity, and the associated evidence number belongs to the party-claim-case relationship; then the filtered attribute extraction result is traversed, and the corresponding entity or relationship is matched based on the attribute name and the ownership rules; and then the qualified attribute set with clear ownership is formed by associating the entity / relationship name with the corresponding entity identifier or relationship identifier.

[0058] Exemplarily, the attribute extraction result after filtering is <Civil Law> Article 1194-clause number: 1194, and Zhang-identity type: plaintiff. According to the attribute ownership rules, the clause number: 1194 matches the legal clause entity, and is associated with the entity identifier FL-TK-0001 representing <Civil Law> Article 1194.

[0059] Further, based on the entity identifier, the relationship identifier and the corresponding attribute extraction result, an entity-relationship topology structure is constructed. Specifically, the entity-relationship topology structure can be constructed by using a directed graph structure of nodes and edges: the entity corresponding to the entity identifier is taken as a node, each node is labeled with an entity name, an entity type and an attribute, the relationship corresponding to the relationship identifier is taken as a directed edge, the direction of the edge is from the head entity to the tail entity, and the label of the edge includes a relationship name, a relationship type and an associated attribute. Among them, the head entity refers to an entity that is the starting end of the semantic relationship between entities, is the starting point of the head entity-relationship-tail entity association link, and is the initiator or subject of the relationship; the tail entity refers to an entity that is the target end of the semantic relationship between entities, and is the receiver or object of the relationship. For example, in the relationship: Zhang-claims-information network dissemination right dispute, Zhang is the head entity, representing the initiating subject of the claim relationship, and the information network dissemination right dispute is the tail entity, representing the target object of the claim relationship.

[0060] Exemplarily, when constructing the entity-relationship topology structure, the basic link of the head entity node, the relationship edge and the tail entity node is first established, and then the corresponding attributes are mounted on the node or the edge, so as to finally form an entity-relationship topology structure that can directly reflect the association relationship between knowledge elements.

[0061] Finally, based on the qualified attribute set, the text block identifier and the extraction confidence score corresponding to each qualified entity and qualified relationship are recorded, and the structured knowledge unit is integrated. Specifically, according to the association of the qualified attribute set, the corresponding text block identifier and the extraction confidence score of each qualified entity and qualified relationship are supplemented, and then the qualified entity and the qualified relationship with the complete information are integrated to form the structured knowledge unit.

[0062] Exemplarily, if the qualified attribute set includes identity type-plaintiff-0.98-FL-DSR-001, the qualified entity is FL-DSR-001 (representing: Zhang, party), the qualified relationship is FL-ZZ-001 (representing: claim, Zhang-information network dissemination right dispute), and it is known that Zhang and the claim relationship are both from the text block identifier FL-20250601-001, the extraction confidence score of Zhang is 0.99, and the extraction confidence score of the claim relationship is 0.96, then the integrated structured knowledge unit includes: FL-DSR-001[Zhang, party, FL-20250601-001, 0.99], FL-ZZ-001[claim, FL-20250601-001, 0.96], and the attribute: identity type-plaintiff-0.98-FL-DSR-001.

[0063] Specifically, the "identifying a pattern conflict between the structured knowledge unit and the domain graph pattern, and generating a candidate new pattern description document" includes: based on the qualified entity set, calculating semantic similarity of entity types in the qualified entity set and predefined entity types in the domain graph schema, and taking the maximum semantic similarity as the entity type semantic similarity; When the entity type semantic similarity is lower than the preset entity type conflict threshold, it is identified as an entity-level schema conflict, and an entity-level schema conflict instance is generated. based on the qualified relationship set, calculating semantic similarity of relationship types in the qualified relationship set and predefined relationship types in the domain graph schema, and taking the maximum semantic similarity as the relationship type semantic similarity; When the relationship type semantic similarity is lower than the preset relationship type conflict threshold, it is identified as a relationship-level schema conflict, and a relationship-level schema conflict instance is generated. based on the entity-level schema conflict instance and the relationship-level schema conflict instance, analyzing the schema conflict context semantics through a large language model; According to the schema conflict context semantic analysis result, through the large language model adapted to the professional scene, a candidate new schema description document containing candidate new entity type definition and candidate new relationship type definition is generated.

[0064] In the embodiments of the application, first, based on the qualified entity set, the semantic similarity of the entity types in the qualified entity set and the predefined entity types in the domain graph schema is calculated, and the maximum semantic similarity is taken as the entity type semantic similarity. When the entity type semantic similarity is lower than the preset entity type conflict threshold, it is identified as an entity-level schema conflict, and an entity-level schema conflict instance is generated. Specifically, first, the types of all entities are extracted from the qualified entity set, and the predefined entity types are extracted from the domain graph schema. Then, using a semantic model adapted to the professional field, the extracted entity types and each predefined entity type are respectively converted into computer recognizable semantic vectors. The cosine similarity between the vectors is calculated to obtain the semantic similarity of the two, and the maximum semantic similarity is taken as the entity type semantic similarity. Then, the entity type semantic similarity is compared with the preset entity type conflict threshold. If it is lower than the preset entity type conflict threshold, it means that the core semantic association of the extracted entity type and the predefined entity type in the domain graph schema is weak, and its scene characteristics and semantic connotation have exceeded the coverage of the preset schema. It cannot be effectively adapted to the existing schema, so it is determined that the entity type and the domain graph schema exist conflict, and the corresponding entity-level schema conflict instance is generated.

[0065] The entity type semantic similarity is an index quantifying the closeness of the semantic association between the entity type and the pre-defined entity type, with a value range of 0-1. The closer the entity type semantic similarity is to 1, the higher the semantic compatibility of the two types of entities in core connotation and scene attribute. To ensure accurate calculation, the semantic model needs to be adapted to the characteristics of the professional field. Different general semantic models can be selected according to the characteristics of the field, for example, the legal scene can select a semantic model LawBERT pre-trained for legal text.

[0066] The pre-set entity type conflict threshold can be dynamically set based on the semantic characteristics of the professional field. The setting process needs to balance the normative and new type inclusiveness of the model. It cannot be set too low to cause model generalization and lose the normative value, nor can it be set too high to miss valuable new types. Taking the legal scene as an example, due to the strictness of legal terminology, the entity type needs to be defined accurately, and semantic deviation may cause legal logic errors. The pre-set entity type conflict threshold can be set to 0.7.

[0067] For example, taking the legal scene as an example, if the pre-set entity type conflict threshold is 0.7, the entity type extracted from the qualified entity set: live streaming goods false advertising dispute, the entity type semantic similarity between the pre-defined entity type false advertising dispute in the domain graph pattern is 0.65, which is less than the pre-set entity type conflict threshold 0.7, indicating that the semantic association may not meet the pre-set entity type conflict threshold requirement because the live streaming goods scene attribute of the extracted entity type is not covered by the pre-defined type. It is determined that there is an entity-level pattern conflict, and an entity-level pattern conflict instance is generated: entity-level pattern conflict instance-002: extracted entity type: live streaming goods false advertising dispute, pre-defined comparison type: false advertising dispute, entity type semantic similarity 0.65, conflict reason: extracted type contains live streaming goods scene limitation, exceeding the semantic range of the pre-defined type.

[0068] Secondly, based on the qualified relation set, the semantic similarity of the relation type in the qualified relation set and the pre-defined relation type in the domain graph schema is calculated, and the maximum semantic similarity is taken as the relation type semantic similarity. When the relation type semantic similarity is lower than the preset relation type conflict threshold, it is identified as a relation-level schema conflict, and a relation-level schema conflict instance is generated. Specifically, all relation types are extracted from the qualified relation set, and pre-defined relation types are extracted from the domain graph schema. Similarly, a semantic model of a professional field is used to convert the extracted relation types and each pre-defined relation type into a semantic vector, calculate the semantic similarity through cosine similarity, and select the maximum value as the relation type semantic similarity. Then, the preset relation type conflict threshold is compared. If the relation type semantic similarity is lower than the preset relation type conflict threshold, it means that the core semantic association of the extracted relation type and the pre-defined relation type in the domain graph schema is loose, the scene pointing and association logic it carries has exceeded the coverage of the preset schema, and it cannot be effectively adapted to the existing relation type specification. Therefore, it is identified as a relation-level schema conflict, and a relation-level schema conflict instance is generated.

[0069] wherein the relation type semantic similarity is an index for quantifying the semantic association closeness of the relation type and the pre-defined relation type, and the value range is 0-1. The closer the relation type semantic similarity is to 1, the higher the semantic fit degree of the two types of relations. To ensure accurate calculation, the semantic model needs to adapt to the characteristics of the professional field. Different general semantic models can be selected according to the characteristics of the field, for example, the semantic model LawBERT pre-trained for legal text can be selected for the legal field.

[0070] wherein the preset relation type conflict threshold can be dynamically set based on the semantic characteristics of the professional field. The setting process needs to balance the schema specification and the new type inclusiveness. It cannot be set too low to cause schema generalization and lose the specification value, nor can it be set too high to miss valuable new types. For example, in the legal field, the preset relation type conflict threshold can be set to 0.7.

[0071] Exemplarily, if the preset relationship type conflict threshold is 0.7, the relationship type of live streaming e-commerce association is extracted from the qualified relationship set, the pre-defined relationship type in the domain graph schema is association, subject-action, and commodity-sales, the relationship type semantic similarity between live streaming e-commerce association and association is 0.62, the relationship type semantic similarity between live streaming e-commerce association and subject-action is 0.58, and the relationship type semantic similarity between live streaming e-commerce association and commodity-sales is 0.61, and finally the relationship type semantic similarity is determined to be 0.62, which is less than the preset relationship type conflict threshold 0.7, and it is determined that there is a relationship-level schema conflict, and the relationship-level schema conflict instance is generated as: relationship-level schema conflict instance-001: extracted relationship type: live streaming e-commerce association, most relevant pre-defined relationship type: association, relationship type semantic similarity 0.62, conflict reason: the extracted relationship type contains the live streaming e-commerce scene attribute.

[0072] Again, based on the entity-level schema conflict instance and the relationship-level schema conflict instance, the schema conflict context semantics are analyzed by a large language model. Specifically, all entity-level schema conflict instances and relationship-level schema conflict instances can be sorted into a conflict set, and each conflict instance can be supplemented with corresponding context information, such as the original text block content where the conflict entity / relationship is located, and the associated other entity / attribute information; then the conflict set and the context information are input into a large language model adapted to a professional scene; the large language model outputs the schema conflict context semantics by deep semantic analysis, and clearly defines the conflict reason, the core features of the conflict entity / relationship, and the applicable professional scene range. Among them, the large language model can be dynamically selected according to the domain characteristics, and a general-purpose large model can be selected for general scenarios, such as GPT-4, Wenxin Yiyang, Tongyi Qianwen, and Xunfei Xinghuo, and a legal domain pre-training model can be selected for legal scenarios, such as LawGPT or Wenxin Yiyang.

[0073] Exemplarily, after inputting the foregoing entity-level schema conflict instance and relationship-level schema conflict instance and corresponding context information into the large language model, the schema conflict context semantics are analyzed and output: the conflict nature is that live streaming e-commerce as a new industry format, the related dispute types and association relationships exceed the coverage range of traditional legal graph schema; the conflict entity features are that live streaming e-commerce is a scene prefix of false advertising disputes, and needs to be associated with new subjects such as live streaming platforms and anchors; the conflict relationship features are that the live streaming e-commerce association clearly binds the subject and the live streaming scene, which is different from the general association relationship; and the applicable scene is the live streaming e-commerce field of false advertising and commodity quality dispute judgment documents.

[0074] Finally, according to the mode conflict context semantic analysis result, a candidate new mode description document containing candidate new entity type definitions and candidate new relationship type definitions is generated by adapting a large language model of a professional scene. Specifically, the mode conflict context semantic analysis result has explicitly defined the essence of the conflict, the core features of the conflicting entities / relationships, and the large language model of the professional scene, such as LawGPT, GPT-4, etc., is called to standardize the definition of entity types and relationship types that exceed the preset range of the domain graph mode, generate candidate new entity type definitions containing type names, core features, parent types, etc., and candidate new relationship type definitions containing type names, head / tail entity type restrictions, core semantics, etc., and integrate the two types of definitions into a structured candidate new mode description document.

[0075] Among them, the candidate new entity type definition refers to the standardized definition formulated for the entity-level mode conflict instance, which is in the same format as the pre-defined relationship type in the domain graph mode, ensuring that the new entity type is adapted to emerging scenarios and is logically compatible with the original mode; the candidate new relationship type definition is a standardized definition formulated for the relationship-level mode conflict instance, which is in the same format as the pre-defined relationship type in the domain graph mode, ensuring that the new relationship can accurately carry the scenario-based association logic between entities; the candidate new mode description document is a carrier that records the candidate new entity type definition and the candidate new relationship type definition in a structured format, such as XML / JSON.

[0076] In summary, compared with the prior art, the present application is based on the preset domain graph mode, and uses a large language model to extract entities, relationships and attributes from the preprocessed text in a weakly supervised manner, constructs structured knowledge units, and identifies mode conflicts between the structured knowledge units and the domain graph mode, and generates a candidate new mode description document. In this way, valuable knowledge can be efficiently extracted from professional text and structured knowledge units can be constructed without large-scale manual annotation, and mode conflicts that exceed the preset domain graph mode can be automatically identified to generate a candidate new mode description document, effectively solving the problem that the prior art cannot automatically identify, evaluate and absorb new knowledge outside the domain graph mode in professional text, and ensuring the dynamic updating ability and professional scene adaptability of the knowledge graph.

[0077] S30: Evaluate the comprehensive confidence of the candidate new mode description document through a multi-dimensional confidence evaluation mechanism, and dynamically update the domain graph mode.

[0078] In the construction of knowledge graphs in professional texts such as law and medicine, the values of candidate new pattern description documents differ significantly, such as some being high-value types that adapt to emerging scenarios, and some being invalid types that are isolated cases or semantically ambiguous. Existing technologies lack standardized multi-dimensional quantitative evaluation mechanisms and can only evaluate the value of candidate new patterns in a single dimension or through artificial subjective judgment, which can easily lead to low-value types being included in the knowledge graph, causing redundancy, and high-value emerging types being missed. They also lack hierarchical dynamic updating rules and cannot balance the rigor of the field knowledge graph and the adaptability to emerging professional scenarios.

[0079] To solve the above problems, the application evaluates the comprehensive confidence of the candidate new pattern description document through a multi-dimensional confidence evaluation mechanism and dynamically updates the field knowledge graph pattern.

[0080] Specifically, step S30 in the method comprises: Based on the candidate new pattern description document, a candidate new entity type definition and a candidate new relationship type definition are parsed out. The logarithmic normalized value of the frequency of the candidate new entity type definition in all text blocks of the preprocessed text set is calculated as the frequency confidence of the candidate new entity type definition. The maximum cosine similarity between the semantic vector of the candidate new entity type definition and all pre-defined entity type definitions in the field knowledge graph pattern is calculated as the semantic consistency confidence of the candidate new entity type definition. The relationship structure rationality confidence of the candidate new relationship type definition is calculated. The frequency confidence, semantic consistency confidence, and relationship structure rationality confidence are weighted and fused according to the preset weights to obtain the comprehensive confidence of the candidate new pattern description document.

[0081] In the embodiments of the application, first, based on the candidate new pattern description document, a candidate new entity type definition and a candidate new relationship type definition are parsed out. Specifically, based on the candidate new pattern description document, the type name, core features, and other information are extracted from the candidate new entity type definition, and the type name, head / tail entity type restrictions, and other information are extracted from the candidate new relationship type definition.

[0082] For example, from the candidate new pattern description document, the candidate new entity type definition is parsed out: type name: live streaming goods false propaganda dispute, parent type: false propaganda dispute; and the candidate new relationship type definition is parsed out: type name: live streaming scenario association, head entity type restriction: live streaming subject, tail entity type restriction: live streaming platform.

[0083] Secondly, the logarithmic normalized value of the frequency of the candidate new entity type definition in all text blocks of the preprocessed text set is calculated as the frequency confidence of the candidate new entity type definition. Specifically, all text blocks of the preprocessed text set are traversed to obtain the total number of text blocks, and the frequency of the occurrence of the type name or core feature description of the candidate new entity type definition in the text is counted, such as the live streaming goods false propaganda dispute appearing 45 times in 1000 legal text blocks; then the frequency is logarithmically normalized, and through the formula: frequency confidence = ln(1 + occurrence frequency) / ln(1 + total number of text blocks), the occurrence frequency is converted into a standardized value of 0-1, eliminating the interference of the total amount of text. The frequency confidence is an index for quantifying the universality of the new entity type in the professional text, and the closer the value is to 1, the more common it is in the scene.

[0084] For example, if the live streaming goods false propaganda dispute appears 45 times in 1000 legal text blocks, the frequency confidence = ln(1 + 45) / ln(1 + 1000) ≈ 0.55 is calculated.

[0085] Thirdly, the maximum cosine similarity between the semantic vector of the candidate new entity type definition and the semantic vector of all pre-defined entity type definitions in the domain graph schema is calculated as the semantic consistency confidence of the candidate new entity type definition. Specifically, the core feature text of the candidate new entity type definition and the text of all pre-defined entity type definitions in the domain graph schema are respectively converted into semantic vectors by using a professional domain pre-trained semantic model, and then the cosine similarity of each pair of vectors is calculated. The maximum value of the cosine similarity is taken as the semantic consistency confidence. The higher the semantic consistency confidence is, the closer the semantic association between the new entity type and the original schema is, and the better the compatibility is. The semantic model can be dynamically selected according to the characteristics of the domain, and a general-purpose large model can be selected in a general scenario, such as GPT-4, Wenxin Yiyang, Tongyi Qianwen, and Xunfei Xinghuo.

[0086] For example, the core features of the live streaming goods false propaganda dispute in the candidate new entity type definition are compared with all pre-defined entity type definitions in the domain graph schema: false propaganda dispute, network shopping dispute, and infringement liability dispute, and the cosine similarity is calculated by LawBERT to be 0.72, 0.58, and 0.45 respectively. The maximum value 0.72 is taken as the semantic consistency confidence.

[0087] Further, the relationship structure rationality confidence of the candidate new relationship type definition is calculated. The rationality of the relationship structure is quantified in combination with the extraction confidence of the entities connected by the relationship and the type specification. The higher the entity confidence and the more consistent the type with the pre-set schema, the greater the relationship structure rationality confidence.

[0088] Finally, the frequency confidence, the semantic consistency confidence and the relationship structure rationality confidence are fused by weighting according to preset weights to obtain a comprehensive confidence of the candidate new schema description document. The preset weights of the frequency confidence, the semantic consistency confidence and the relationship structure rationality confidence are 1, and the preset weights need to be dynamically determined according to the field requirements. For example, for the rigorous fields such as law and medicine, the weight of the semantic consistency confidence can be set to the highest, such as 0.4, to ensure that the new type does not violate the field logic, the weight of the relationship structure rationality confidence is the second, such as 0.35, to ensure the relationship logic is rigorous, and the weight of the frequency confidence is the lowest, such as 0.25, to avoid missing the rare but important new type.

[0089] For example, if the frequency confidence is 0.55, the semantic consistency confidence is 0.72, and the relationship structure rationality confidence is 0.7, the preset weights of the frequency confidence, the semantic consistency confidence and the relationship structure rationality confidence are 0.25, 0.4 and 0.35 respectively, and the comprehensive confidence of the candidate new schema description document is calculated as 0.6705. The comprehensive confidence can reflect the comprehensive value and compliance of the candidate new entity type definition and the candidate new relationship type definition in the candidate new schema description document, covering three dimensions: first, the frequency confidence reflects the universality of the candidate new entity type in the professional text scene, second, the semantic consistency confidence reflects the semantic compatibility of the new entity type with the pre-defined entity type in the domain schema, and third, the relationship structure rationality confidence reflects the reliability of the new relationship type connecting the entities and the standardization of the type combination; essentially, it is a quantitative indicator for measuring whether the candidate new schema meets the requirements of being included in the domain schema and adapting to the dynamic updating needs of the professional text knowledge graph.

[0090] Specifically, the "calculating the relationship structure rationality confidence of the candidate new relationship type definition" comprises: extracting the head entity identifier and the tail entity identifier connected by the candidate new relationship type definition from the relationship-level schema conflict instance on which the candidate new schema description document is generated; querying the head entity type corresponding to the head entity identifier, the head entity extraction confidence score, the tail entity type corresponding to the tail entity identifier, and the tail entity extraction confidence score in the qualified entity set of the structured knowledge unit; calculating the geometric mean of the head entity extraction confidence score and the tail entity extraction confidence score as the basic relationship confidence; calculating the semantic similarity between the head entity type and all entity types in the pre-defined entity type set of the domain schema, and taking the maximum value as the head entity type support degree; The semantic similarity between the tail entity type and all entity types in the predefined entity type set of the domain graph schema is calculated, and the maximum value is taken as the tail entity type support degree; The geometric mean of the head entity type support degree and the tail entity type support degree is calculated as a type support degree coefficient; The relationship structure rationality confidence is obtained by multiplying the basic relationship confidence and the type support degree coefficient.

[0091] In the embodiments of the present application, first, the head entity identifier and the tail entity identifier connected by the candidate new relationship type definition are extracted from the relationship-level schema conflict instance according to which the candidate new schema description document is generated. Specifically, in the relationship-level schema conflict instance according to which the candidate new schema description document is generated, the association information of the candidate new relationship type, the head entity and the tail entity has been recorded, such as in the information network dissemination right dispute of Zhang, Zhang is the head entity and the information network dissemination right dispute is the tail entity. The corresponding head entity identifier and tail entity identifier are extracted by matching the qualified entity set through the head / tail entity name, to realize accurate binding of the relationship and the entity.

[0092] Secondly, the head entity type corresponding to the head entity identifier, the head entity extraction confidence score, and the tail entity type corresponding to the tail entity identifier, the tail entity extraction confidence score are queried in the qualified entity set of the structured knowledge unit. Specifically, the entity type and the extraction confidence score are extracted by locating the corresponding entity entry in the qualified entity set according to the head entity identifier and the tail entity identifier.

[0093] Thirdly, the geometric mean of the head entity extraction confidence score and the tail entity extraction confidence score is calculated as a basic relationship confidence. Specifically, the geometric mean which is good at processing product type indicators is used to calculate the average of the head entity and the tail entity extraction confidence score, and the calculation formula is: basic relationship confidence = , to ensure that the result can accurately reflect the reliability of the entity combination.

[0094] Exemplarily, if the head entity extraction confidence score is 0.98 and the tail entity extraction confidence score is 0.95, then the basic relationship confidence = ≈0.965, the basic relationship confidence can reflect the comprehensive reliability of the extraction result of the head entity and the tail entity connected by the candidate new relationship type definition. The higher the basic relationship confidence is, the more reliable the entity basis attached by the candidate new relationship is; otherwise, it means that there is a credibility flaw in the extraction result of the entity connected by the relationship, which will directly weaken the rationality of the relationship structure.

[0095] Further, the semantic similarity of the head entity type and all entity types in the predefined entity type set of the domain graph schema is calculated, and the maximum value is taken as the head entity type support degree. Illustratively, the semantic similarity of the head entity type and all predefined entity types in the domain graph schema can be calculated by a semantic model, and the maximum value is taken as the head entity type support degree. The higher the head entity type support degree, the better the compatibility of the head entity type with the existing schema. The semantic model can be dynamically selected according to the field characteristics. In general scenarios, a general large model such as GPT-4, Wenxin Yiyang, Tongyi Qianwen, and Xunfei Xinghuo can be selected.

[0096] Illustratively, if the semantic similarity of the head entity type and all entity types in the predefined entity type set of the domain graph schema is 0.78, 0.65, …, respectively, the maximum value 0.78 is selected as the head entity type support degree.

[0097] Further, the semantic similarity of the tail entity type and all entity types in the predefined entity type set of the domain graph schema is calculated, and the maximum value is taken as the tail entity type support degree. Specifically, the calculation logic and method of the tail entity type support degree are the same as those of the head entity type support degree. For example, the tail entity type support degree is calculated and filtered to be 0.82. The higher the tail entity type support degree, the better the compatibility of the tail entity type with the existing schema.

[0098] Further, the geometric mean of the head entity type support degree and the tail entity type support degree is calculated as the type support degree coefficient. Specifically, according to the same calculation logic of the basic relationship confidence, the geometric mean is used to calculate the average of the head entity type support degree and the tail entity type support degree, and the calculation formula is: type support degree coefficient = , which ensures that the result can reflect the overall standard degree of the entity type combination.

[0099] Illustratively, if the head entity type support degree is 0.78 and the tail entity type support degree is 0.82, the type support degree coefficient is calculated as ≈0.8, which can reflect the overall semantic adaptability and standardization of the head entity type and the tail entity type connected by the candidate new relationship type definition and the predefined entity type set in the domain graph schema, and is a key dimension for evaluating the rationality of the new relationship type structure.

[0100] Finally, the basic relationship confidence and the type support degree coefficient are multiplied to obtain the relationship structure rationality confidence. The relationship structure rationality confidence = basic relationship confidence × type support degree coefficient. The relationship structure rationality confidence reflects not only the reliability of the entity itself but also the standardization of the type combination, and can comprehensively reflect the rationality of the relationship structure.

[0101] Exemplarily, if the basic relationship confidence is 0.965 and the type support coefficient is 0.8, then the relationship structure rationality confidence = 0.965 x 0.8 = 0.772.

[0102] Further, the "dynamic update domain graph schema mode" includes: The mode adoption threshold and the mode temporary storage threshold are set, wherein the mode adoption threshold is greater than the mode temporary storage threshold. The comprehensive confidence of the candidate new schema description document is compared with the mode adoption threshold and the mode temporary storage threshold. When the comprehensive confidence is greater than the mode adoption threshold, the candidate new entity type definition in the candidate new schema description document is added to the entity type definition set of the domain graph schema, and the candidate new relationship type definition is added to the relationship type definition set of the domain graph schema, to form an updated domain graph schema. When the comprehensive confidence is less than or equal to the mode adoption threshold and greater than the mode temporary storage threshold, the candidate new entity type definition and the candidate new relationship type definition of the candidate new schema description document are added to the weak supervision prompt template as supplementary information. When the comprehensive confidence is less than or equal to the mode temporary storage threshold, the candidate new schema description document is discarded.

[0103] In the embodiments of the present application, the mode adoption threshold and the mode temporary storage threshold are first set, wherein the mode adoption threshold is greater than the mode temporary storage threshold. Specifically, the mode adoption threshold is the minimum confidence requirement for being directly included in the domain graph schema, which needs to be set relatively high, such as 0.8, to ensure that the new type included is completely consistent with the domain logic; the mode temporary storage threshold is the minimum requirement for reservation observation, which can be set relatively low, such as 0.5, to leave enough space for new types that have potential but are not yet popular, and must satisfy the mode adoption threshold greater than the mode temporary storage threshold. The mode adoption threshold and the mode temporary storage threshold can be dynamically adjusted according to the characteristics of the professional field, for example, in the legal scenario, the mode adoption threshold can be set to 0.8 and the mode temporary storage threshold can be set to 0.5.

[0104] Secondly, the comprehensive confidence of the candidate new schema description document is compared with the mode adoption threshold and the mode temporary storage threshold, when the comprehensive confidence is greater than the mode adoption threshold, the candidate new entity type definition in the candidate new schema description document is added to the entity type definition set of the domain graph schema, and the candidate new relationship type definition is added to the relationship type definition set of the domain graph schema, to form an updated domain graph schema. Specifically, the candidate new entity type definition is extracted from the candidate new schema description document, added to the entity type definition set of the domain graph schema, and its parent type association is updated, such as taking the live goods promotion false advertising dispute as a sub-type of the false advertising dispute; and the candidate new relationship type definition is extracted and added to the relationship type definition set, to clearly define its head / tail entity type restriction.

[0105] Exemplarily, if the comprehensive confidence of the candidate new schema description document is 0.85, which is greater than the schema adoption threshold 0.8, the candidate new entity type definition in the candidate new schema description document is added to the entity type definition set of the domain schema, and the candidate new relationship type definition is added to the relationship type definition set of the domain schema, to form an updated domain schema.

[0106] Conversely, when the comprehensive confidence is less than or equal to the schema adoption threshold and greater than the schema temporary storage threshold, the candidate new entity type definition and the candidate new relationship type definition of the candidate new schema description document are added to the weak supervision prompt template as supplementary information. Specifically, the candidate new entity type definition and the candidate new relationship type definition of the candidate new schema description document are converted into a natural language description and added to the weak supervision prompt template. In subsequent knowledge extraction by the large language model, the weak supervision prompt template is referred to. If the frequency of the new type continues to rise, the confidence will be improved in the next evaluation, and eventually the schema adoption threshold may be reached.

[0107] Exemplarily, if the comprehensive confidence of the candidate new schema description document is 0.772, which is between the schema adoption threshold and the schema temporary storage threshold, the candidate new entity type definition and the candidate new relationship type definition of the candidate new schema description document are added to the weak supervision prompt template as supplementary information.

[0108] Conversely, when the comprehensive confidence is less than or equal to the schema temporary storage threshold, the candidate new schema description document is discarded. Specifically, if the comprehensive confidence is less than or equal to the schema temporary storage threshold, it indicates that the new type may be a single instance scenario or a semantic ambiguity, and the candidate new schema description document is directly discarded, and the reason for discarding is recorded, such as semantic ambiguity and low frequency of occurrence, to ensure traceability of the processing process.

[0109] In summary, compared with the prior art, the present application evaluates the comprehensive confidence of the candidate new schema description document through a multi-dimensional confidence evaluation mechanism, and dynamically updates the domain schema. In this way, the comprehensive value and compliance of the candidate new schema description document are accurately determined through multi-dimensional quantitative evaluation, and the dynamic hierarchical update of the domain schema is realized in combination with hierarchical thresholds, which not only filters low-value and invalid new schemas to avoid schema redundancy, but also absorbs high-value emerging types and temporarily stores potential types, effectively balancing the rigor of the domain schema and the adaptability to emerging scenarios of professional text, and solving the problem of inaccurate schema update caused by single dimension or manual evaluation in the prior art.

[0110] S40: based on the updated domain schema, the structured knowledge unit is optimized and reconstructed, a weak supervision knowledge graph is constructed, and a quality indicator of the reconstructed weak supervision knowledge graph is calculated.

[0111] In the foregoing step, the structured knowledge units are extracted from professional texts by weak supervision, and the conflicts with the domain graph schema are identified and candidate new schemas are generated, and the dynamic update of the domain graph schema is realized through multi-dimensional confidence evaluation.

[0112] Therefore, the structured knowledge units can be optimized and reconstructed based on the updated domain graph schema, such as type identification update and entity fusion, and then a weakly supervised knowledge graph is constructed, and quality indicators are calculated from the accuracy, conflict rate, and completeness, thereby ensuring that the weakly supervised knowledge graph of professional texts is adapted to actual applications.

[0113] To solve the above problems, the structured knowledge units are optimized and reconstructed based on the updated domain graph schema, a weakly supervised knowledge graph is constructed, and the quality indicators of the reconstructed weakly supervised knowledge graph are calculated.

[0114] Specifically, step S40 in the method comprises: Based on the updated domain graph schema, the qualified entity set and the qualified relationship set in the structured knowledge unit are updated for type identification, and the entity type of the qualified entity and the relationship type of the qualified relationship are mapped to the standard type definition in the updated domain graph schema; The qualified entity set after the type identification update is processed for entity fusion, and multiple qualified entities pointing to the same real-world object are merged, and the associated qualified relationship set and qualified attribute set are updated synchronously; Based on the qualified entity set, the qualified relationship set, and the qualified attribute set after the entity fusion processing, a weakly supervised knowledge graph is constructed; The quality indicators of the reconstructed weakly supervised knowledge graph are calculated.

[0115] In the embodiments of the present application, first, based on the updated domain graph schema, the qualified entity set and the qualified relationship set in the structured knowledge unit are updated for type identification, and the entity type of the qualified entity and the relationship type of the qualified relationship are mapped to the standard type definition in the updated domain graph schema. Specifically, the updated domain graph schema has included the high-confidence candidate new types, and the qualified entity set of the structured knowledge unit needs to be traversed first, and the original type identification of each entity is replaced with the standard type name in the updated schema: if the entity type is a new candidate type, the new type definition is directly adopted; if it is still the original predefined type, the identification is confirmed to be consistent with the schema. For the qualified relationship set, the relationship type is also mapped to the standard relationship definition in the updated schema, ensuring that the type identification of the entity and the relationship conforms to the latest specification.

[0116] Exemplarily, in the legal scenario, the updated domain graph pattern adds a live streaming goods false propaganda dispute entity type, and the original type identifier of a certain entity in the structured knowledge unit is live false propaganda dispute (temporary). Through type mapping, it is updated to the standard type live streaming goods false propaganda dispute, and is mapped to the standard type: live streaming scenario association.

[0117] Secondly, the qualified entity set after updating the type identifier is subjected to entity fusion processing, and multiple qualified entities pointing to the same real world object are merged, and the associated qualified relationship set and qualified attribute set are updated synchronously. Specifically, entity fusion needs to be based on the dual logic of attribute matching and semantic association: first, extract the core attributes of the entity after updating the type identifier, such as the subject name of a legal entity, and then calculate the attribute similarity and semantic similarity between entities through a semantic model. If both are higher than a preset fusion threshold (such as 0.9), it is determined that they are the same entity and are merged. When merging, the attribute information with the highest extraction confidence in each entity needs to be retained, and all associated qualified relationship sets and qualified attribute sets are uniformly associated to the fused unique entity to avoid loss of relationships and attributes. Among them, the semantic model can be dynamically selected according to the domain characteristics. In general scenarios, general large models such as GPT-4, Wenxin Yiyang, Tongyi Qianwen, and Xunfei Xinghuo can be selected. The preset fusion threshold can be dynamically determined according to the actual application scenario and requirements.

[0118] Thirdly, based on the qualified entity set, the qualified relationship set and the qualified attribute set after the entity fusion processing, a weakly supervised knowledge graph is constructed. Specifically, the fused qualified entity set is taken as the node, the association link between entities is established through the qualified relationship set, and the attribute information in the qualified attribute set is taken as the attribute label of the entity. In the construction process, a graph database such as the standard format of Neo4j can be used to ensure that each entity, relationship has a unique identifier, and the attribute information is accurately bound with the entity and relationship, forming a weakly supervised knowledge graph that is machine interpretable and human understandable.

[0119] Finally, the quality indicators of the reconstructed weakly supervised knowledge graph are calculated. By calculating the quality indicators in multiple dimensions, the accuracy, standardization and completeness of the reconstructed weakly supervised knowledge graph can be evaluated.

[0120] Further, the "calculating the quality indicators of the reconstructed weakly supervised knowledge graph" comprises: A predetermined number of relationship samples are randomly extracted from the qualified relationship set of the reconstructed weakly supervised knowledge graph, the number of correct relationship samples is obtained through sampling evaluation, and the ratio of the number of correct relationship samples to the total number of extracted relationship samples is calculated as the graph accuracy. The total number of all pattern conflict instances generated during the process of generating the reconstructed weakly supervised knowledge graph is counted. The ratio of the total number of pattern conflict instances to the sum of the total number of qualified entities and qualified relations in the weakly supervised knowledge graph is calculated as the graph conflict rate. The number of entities whose entity types belong to the predefined entity type set of the domain graph pattern in the qualified entity set of the reconstructed weakly supervised knowledge graph is counted, and the ratio of this number to the total number of entities in the qualified entity set is calculated as the graph completeness. The graph accuracy, graph conflict rate, and graph completeness are weighted and fused according to preset weights to obtain the graph quality index of the reconstructed weakly supervised knowledge graph.

[0121] In this embodiment, a predetermined number of relation samples are first randomly selected from the qualified relation set of the reconstructed weakly supervised knowledge graph. The number of correct relation samples is obtained through sampling evaluation, and the ratio of the number of correct relation samples to the total number of extracted relation samples is calculated as the graph accuracy. Specifically, a predetermined number of relation samples, such as 5% of the total number of relations, are extracted from the qualified relation set of the reconstructed graph using stratified random sampling, covering all relation types. During sampling, it is necessary to ensure a balanced sample ratio between newly added relation types and existing relation types. Subsequently, the correctness of the samples is evaluated through manual review and professional text tracing: if the entities connected by the relation have clear association evidence in the original professional text and conform to domain logic, they are determined to be correct relation samples; otherwise, they are determined to be incorrect relation samples. Finally, the graph accuracy is calculated using the formula: Graph Accuracy = Number of Correct Relation Samples / Total Number of Extracted Relation Samples. The closer the graph accuracy is to 1, the higher the accuracy of the graph relations.

[0122] For example, if the reconstructed weakly supervised knowledge graph has a set of 2000 qualified relations, and 100 samples are extracted, and after manual review and text tracing, 92 sample relations are confirmed to be true and valid, then the graph accuracy = 92 / 100 = 0.92.

[0123] Secondly, the total number of all pattern conflict instances generated during the generation of the reconstructed weakly supervised knowledge graph is counted. The ratio of this total number of pattern conflict instances to the sum of the total number of qualified entities and qualified relations in the weakly supervised knowledge graph is calculated as the graph conflict rate. Specifically, the graph conflict rate is calculated as follows: Graph Conflict Rate = Total Number of Pattern Conflict Instances / (Total Number of Qualified Entities + Total Number of Qualified Relations). The closer the graph conflict rate is to 0, the fewer logical conflicts there are in the reconstructed weakly supervised knowledge graph, and the stronger its standardization.

[0124] The total number of all pattern conflict instances generated in the process of generating the reconstructed weakly supervised knowledge graph refers to the total number of all entity-level and relationship-level conflict instances that are not effectively solved in the pattern updating whole process.

[0125] For example, if the total number of qualified entities in the weakly supervised knowledge graph is 800, the total number of qualified relationships is 2000, and the total number of all pattern conflict instances generated in the process of generating the reconstructed weakly supervised knowledge graph is 14, then the graph conflict rate = 14 / (800+2000) = 0.005.

[0126] Again, the number of entities in the qualified entity set of the reconstructed weakly supervised knowledge graph whose entity types belong to the predefined entity type set of the domain graph pattern is counted, and the ratio to the total number of entities in the qualified entity set is calculated as the graph completeness. The higher the graph completeness, the more core entities in the domain covered by the reconstructed weakly supervised knowledge graph, and the better the knowledge integrity.

[0127] For example, the total number of entities in the qualified entity set is 800, and the number of entities in the qualified entity set of the reconstructed weakly supervised knowledge graph whose entity types belong to the predefined entity type set of the domain graph pattern is 720, then the graph completeness = 720 / 800 = 0.9.

[0128] Finally, the graph accuracy, graph conflict rate and graph completeness are weighted and fused according to the preset weights to obtain the graph quality index of the reconstructed weakly supervised knowledge graph. The preset weights can be dynamically determined according to the actual professional field, for example, for strict fields such as law and medicine, the weight of the graph accuracy can be set to the highest, such as 0.5, to prioritize correct relationships, the weight of the graph conflict rate can be set to 0.3, to strictly control logical conflicts, and the weight of the graph completeness can be set to 0.2, to balance coverage and precision. The graph quality index = w1 x graph accuracy + w2 x (1-graph conflict rate) + w3 x graph completeness, w1, w2, w3 are the preset weights of the graph accuracy, the graph conflict rate and the graph completeness.

[0129] For example, if the graph accuracy, graph conflict rate and graph completeness are 0.92, 0.005 and 0.9 respectively, and the preset weights of the graph accuracy, graph conflict rate and graph completeness are 0.5, 0.3 and 0.2 respectively, then the graph quality index = 0.92 x 0.5 + (1-0.005) x 0.3 + 0.9 x 0.2 = 0.9385, which represents that the quality of the reconstructed weakly supervised knowledge graph is relatively good.

[0130] In summary, compared with the prior art, the structured knowledge unit is optimized and reconstructed based on the updated domain graph pattern, a weakly supervised knowledge graph is constructed, and a quality index of the reconstructed weakly supervised knowledge graph is calculated. In this way, the type identification and entity fusion of the structured knowledge unit are optimized and reconstructed based on the updated domain graph pattern, the constructed weakly supervised knowledge graph effectively solves the problems of non-uniform types, entity redundancy, and relationship logic confusion, and quantifies the graph quality through the quality index to accurately evaluate the standardization, accuracy, and completeness, thereby ensuring that the weakly supervised knowledge graph can meet the actual application requirements of professional text knowledge expression.

[0131] S50: repeatedly constructing the weakly supervised knowledge graph until the quality index of the weakly supervised knowledge graph reaches a preset quality stability threshold, and outputting a final professional text weakly supervised knowledge graph.

[0132] In the embodiment of the application, the iterative reconstruction process is started, and after completing a complete link of weakly supervised knowledge graph construction each time, the obtained graph quality index is compared with the preset quality stability threshold: if the preset quality stability threshold is not reached, the optimization and reconstruction of the structured knowledge unit, the construction of the weakly supervised knowledge graph, and the calculation of the quality index are redeveloped from the type identification update link, and the above iterative process is repeated until the quality index of the weakly supervised knowledge graph after reconstruction reaches or exceeds the preset quality stability threshold, and then the iteration is stopped and the final professional text weakly supervised knowledge graph is output.

[0133] The preset quality stability threshold is a quantitative standard dynamically set in combination with the knowledge application requirements of a specific professional field, and is the minimum value for determining whether the graph quality meets the actual use requirements. For example, the preset quality stability threshold can be set to 0.9 in a legal scenario. The preset quality stability threshold sets a clear benchmark for the graph quality, avoiding the output of low-quality graphs, and the execution mode of iterative reconstruction effectively solves the problems of incomplete type alignment, inaccurate entity fusion, and substandard quality in a single reconstruction, and finally outputs a weakly supervised knowledge graph that is highly adapted to the updated domain graph pattern and has stable accuracy, low conflict rate, and high completeness.

[0134] In this way, a professional text weakly supervised knowledge graph that can accurately and comprehensively carry the core knowledge of professional text can be obtained, meeting the actual application requirements of the professional field for the knowledge graph.

[0135] In summary, the embodiments of the application have at least the following technical effects: Compared with the prior art, the application first converts professional text into a structured text format and generates a preprocessed text set. In this way, the format heterogeneity of professional text can be effectively eliminated, and the original unstructured / semi-structured text can be converted into a standardized, semantically complete and analyzable structured text form. The generated preprocessed text set can accurately adapt to the text input requirements of weakly supervised knowledge graph construction, and improve the accuracy and processing efficiency of subsequent entity, relationship and attribute extraction.

[0136] Secondly, based on the preset domain graph pattern, the application uses a large language model to extract entities, relationships and attributes from the preprocessed text in a weakly supervised manner, constructs structured knowledge units, and identifies pattern conflicts between the structured knowledge units and the domain graph pattern to generate a candidate new pattern description document. In this way, valuable knowledge can be efficiently extracted from professional text and structured knowledge units can be constructed without large-scale manual annotation. At the same time, pattern conflicts that exceed the preset domain graph pattern can be automatically identified, and a candidate new pattern description document can be generated. This effectively solves the problem of existing technologies that cannot automatically identify, evaluate and absorb new knowledge outside the domain graph pattern in professional text, ensuring the dynamic updating ability and professional scene adaptability of the knowledge graph.

[0137] Thirdly, the application evaluates the comprehensive confidence of the candidate new pattern description document through a multi-dimensional confidence evaluation mechanism and dynamically updates the domain graph pattern. In this way, the comprehensive value and compliance of the candidate new pattern description document are accurately determined through multi-dimensional quantitative evaluation, and the domain graph pattern is dynamically updated in layers combined with hierarchical thresholds. This not only filters low-value and invalid new patterns to avoid graph redundancy, but also absorbs high-value emerging types and temporarily stores potential types, effectively balancing the rigor of the domain graph pattern and its adaptability to emerging scenarios of professional text, and solving the problem of inaccurate pattern updating caused by single dimension or manual evaluation in existing technologies.

[0138] Further, the application optimizes and reconstructs the structured knowledge units based on the updated domain graph pattern, constructs a weakly supervised knowledge graph, and calculates the quality indicators of the reconstructed weakly supervised knowledge graph. In this way, the structured knowledge units are optimized and reconstructed for type identification and entity fusion based on the updated domain graph pattern. The constructed weakly supervised knowledge graph effectively solves problems such as type inconsistency, entity redundancy and relationship logic confusion. At the same time, the quality of the graph is quantified through quality indicators to accurately evaluate its standardization, accuracy and completeness, ensuring that the weakly supervised knowledge graph can meet the actual application requirements of professional text for knowledge expression.

[0139] Finally, the weakly supervised knowledge graph of the professional text is repeatedly constructed until the quality index of the weakly supervised knowledge graph reaches a preset quality stability threshold, and a final weakly supervised knowledge graph of the professional text is output. In this way, the weakly supervised knowledge graph of the professional text that can accurately and comprehensively carry the core knowledge of the professional text can be obtained, and the practical application requirements of the knowledge graph in the professional field can be met.

[0140] By the technical solution, the application breaks away from the dependence of the strong supervision method on large-scale manual annotation, effectively solves the problems of high cost and low efficiency of the traditional construction mode, and breaks through the pain points of the preset mode rigidity and the inability to adapt to new knowledge types of the professional text in the existing weak supervision method by identifying the conflicts between the structured knowledge units and the preset field graph pattern, generating a candidate new pattern description document, and combining a multi-dimensional confidence evaluation mechanism to realize dynamic updating of the field graph pattern. The knowledge extraction precision is insufficient, and the problems of entity redundancy or relationship errors in the graph are effectively avoided by reconstructing and calculating the quality index of the structured knowledge unit based on the updated field graph pattern, iteratively constructing until the quality index reaches the preset quality stability threshold, and finally outputting the weakly supervised knowledge graph of the professional text. The professional text has the construction advantages of low cost and high efficiency and good professional scene adaptability, and has stable accuracy, integrity and low conflict rate, and meets the rigorousness and practicality requirements of the knowledge graph in the legal, medical and other professional fields.

[0141] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0142] Those skilled in the art will understand that embodiments of the present application can be provided as a method, system, or computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0143] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices produce a machine that implements the functions described in the flowcharts and / or block diagrams. Figure 1 one flow or multiple flows and / or blocksFigure 1 means for performing the function specified in the block or blocks.

[0144] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flow Figure 1 flow or flows and / or blocks Figure 1 means for performing the function specified in the block or blocks.

[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow Figure 1 flow or flows and / or blocks Figure 1 steps for performing the function specified in the block or blocks.

[0146] Although preferred embodiments of the application have been described, those skilled in the art will recognize that additional modifications and variations may be possible in light of the above teachings.

[0147] It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application cover the modifications and variations of this application and its equivalent.

Claims

1. A weakly supervised knowledge graph automatic construction method for professional text, characterized in that, The method comprises: Converting professional text into a structured text format and generating a preprocessed text set; based on a preset domain graph pattern, using a large language model to extract entities, relationships and attributes from the preprocessed text in a weakly supervised manner, constructing a structured knowledge unit, and identifying pattern conflicts between the structured knowledge unit and the domain graph pattern to generate a candidate new pattern description document; evaluating the comprehensive confidence of the candidate new pattern description document through a multi-dimensional confidence evaluation mechanism, and dynamically updating the domain graph pattern; Based on the updated domain graph pattern, the structured knowledge unit is optimized and reconstructed to construct a weakly supervised knowledge graph, and the quality index of the reconstructed weakly supervised knowledge graph is calculated; Repeat the construction of the weakly supervised knowledge graph until the quality index of the weakly supervised knowledge graph reaches the preset quality stability threshold, and output the final professional text weakly supervised knowledge graph. 2.The professional text oriented weakly supervised knowledge graph automatic construction method according to claim 1, characterized in that, Converting professional text into a structured text format and generating a preprocessed text set, comprising: Convert professional text into standardized Markdown format or XML format to form intermediate structured text; The intermediate structured text is processed by a semantic integrity blocking algorithm, and hierarchical structure information is extracted during the blocking process, wherein the hierarchical structure information includes chapter path information, semantic type information and reference relationship information; According to the chapter path information, semantic type information and reference relationship information, add chapter path markers, semantic type markers, reference relationship markers to each text block, and assign a unique text block identifier to each text block; The text blocks with chapter path markers, semantic type markers, reference relationship markers and text block identifiers are organized into a preprocessed text set. 3.The professional text oriented weakly supervised knowledge graph automatic construction method of claim 1, wherein, Based on the preset domain graph pattern, a large language model is used to extract entities, relationships and attributes from the preprocessed text in a weakly supervised manner, construct a structured knowledge unit, and identify pattern conflicts between the structured knowledge unit and the domain graph pattern to generate a candidate new pattern description document, comprising: Based on the preset domain graph pattern, a weakly supervised prompt template is constructed, wherein the weakly supervised prompt template includes an entity type definition set, a relationship type definition set and an attribute definition set; The preprocessed text set and the weakly supervised prompt template are input into a large language model to obtain an entity extraction result set, a relationship extraction result set and an attribute extraction result set, and the extraction confidence score of each extraction result in the entity extraction result set and the relationship extraction result set is recorded; The attribute extraction result set is verified for attribute value format to generate an attribute validity score; Filtering extraction results with extraction confidence scores below a preset extraction confidence threshold and attribute validity scores below a preset attribute validity threshold; Based on the filtered entity extraction results, relationship extraction results and attribute extraction results, a structured knowledge unit containing a set of qualified entities, a set of qualified relationships and a set of qualified attributes is constructed; Identify pattern conflicts between the structured knowledge unit and the domain graph pattern to generate a candidate new pattern description document. 4.The professional text oriented weakly supervised knowledge graph automatic construction method of claim 3, wherein, Based on the filtered entity extraction results, relationship extraction results and attribute extraction results, a structured knowledge unit containing a set of qualified entities, a set of qualified relationships and a set of qualified attributes is constructed, including: Assign a unique entity identifier to each filtered entity extraction result, and record the entity type and entity name to form a set of qualified entities; Assign a unique relationship identifier to each filtered relationship extraction result, and record the relationship type and relationship name to form a set of qualified relationships; Associate the filtered attribute extraction results to the corresponding entity identifier or relationship identifier to form a set of qualified attributes; Based on the entity identifier, relationship identifier and corresponding attribute extraction result, an entity-relationship topology structure is constructed; Based on the set of qualified attributes, record the text block identifier and extraction confidence score corresponding to each qualified entity and qualified relationship, and integrate to form a structured knowledge unit. 5.The professional text oriented weakly supervised knowledge graph automatic construction method of claim 3, wherein, Identify the pattern conflict between the structured knowledge unit and the domain graph pattern, and generate a candidate new pattern description document, including: Based on the set of qualified entities, calculate the semantic similarity between the entity types in the set of qualified entities and the pre-defined entity types in the domain graph pattern, and take the maximum semantic similarity as the semantic similarity of the entity type; When the semantic similarity of the entity type is lower than the preset entity type conflict threshold, it is identified as an entity-level pattern conflict, and an entity-level pattern conflict instance is generated; Based on the set of qualified relationships, calculate the semantic similarity between the relationship types in the set of qualified relationships and the pre-defined relationship types in the domain graph pattern, and take the maximum semantic similarity as the semantic similarity of the relationship type; When the semantic similarity of the relationship type is lower than the preset relationship type conflict threshold, it is identified as a relationship-level pattern conflict, and a relationship-level pattern conflict instance is generated; Based on the entity-level pattern conflict instance and the relationship-level pattern conflict instance, analyze the context semantics of the pattern conflict through a large language model; According to the analysis result of the context semantics of the pattern conflict, a candidate new pattern description document containing candidate new entity type definition and candidate new relationship type definition is generated through a large language model adapted to the professional scene. 6.The professional text oriented weakly supervised knowledge graph automatic construction method according to claim 1, characterized in that, Evaluate the comprehensive confidence of the candidate new pattern description document through a multi-dimensional confidence evaluation mechanism, including: Based on the candidate new pattern description document, parse the candidate new entity type definition and the candidate new relationship type definition; Calculate the logarithmic normalized value of the frequency of the candidate new entity type definition in all text blocks of the preprocessed text set as the frequency confidence of the candidate new entity type definition; Calculate the maximum cosine similarity between the semantic vector of the candidate new entity type definition and all pre-defined entity type definitions in the domain graph pattern as the semantic consistency confidence of the candidate new entity type definition; Calculate the relationship structure rationality confidence of the candidate new relationship type definition; Weight and fuse the frequency confidence, semantic consistency confidence and relationship structure rationality confidence according to the preset weight to obtain the comprehensive confidence of the candidate new pattern description document. 7.The professional text oriented weakly supervised knowledge graph automatic construction method of claim 6, wherein, Calculate the relationship structure rationality confidence of the candidate new relationship type definition, including: extracting, from the relation-level schema conflict instances on which the candidate new schema description document is generated, a head entity identifier and a tail entity identifier connected by the candidate new relation type definition; querying, in the qualified entity set of the structured knowledge unit, a head entity type corresponding to the head entity identifier, a head entity extraction confidence score, a tail entity type corresponding to the tail entity identifier, and a tail entity extraction confidence score; calculating a geometric mean of the head entity extraction confidence score and the tail entity extraction confidence score as a base relation confidence; calculating semantic similarities between the head entity type and all entity types in a predefined entity type set of the domain graph schema, and taking a maximum value as a head entity type support degree; calculating semantic similarities between the tail entity type and all entity types in the predefined entity type set of the domain graph schema, and taking a maximum value as a tail entity type support degree; calculating a geometric mean of the head entity type support degree and the tail entity type support degree as a type support degree coefficient; multiplying the base relation confidence by the type support degree coefficient to obtain a relation structure rationality confidence. 8.The professional text oriented weakly supervised knowledge graph automatic construction method of claim 6, wherein, dynamically updating the domain graph schema, comprising: setting a schema adoption threshold and a schema temporary storage threshold, wherein the schema adoption threshold is greater than the schema temporary storage threshold; comparing the comprehensive confidence of the candidate new schema description document with the schema adoption threshold and the schema temporary storage threshold; when the comprehensive confidence is greater than the schema adoption threshold, adding the candidate new entity type definition in the candidate new schema description document to an entity type definition set of the domain graph schema, and adding the candidate new relation type definition to a relation type definition set of the domain graph schema to form an updated domain graph schema; when the comprehensive confidence is less than or equal to the schema adoption threshold and greater than the schema temporary storage threshold, adding the candidate new entity type definition and the candidate new relation type definition of the candidate new schema description document as supplementary information to a weak supervision prompt template; when the comprehensive confidence is less than or equal to the schema temporary storage threshold, discarding the candidate new schema description document. 9.The professional text oriented weakly supervised knowledge graph automatic construction method of claim 1, wherein, based on the updated domain graph schema, optimizing and reconstructing the structured knowledge unit to construct a weak supervision knowledge graph, and calculating a quality indicator of the reconstructed weak supervision knowledge graph, comprising: based on the updated domain graph schema, updating type identification of a qualified entity set and a qualified relation set in the structured knowledge unit, mapping entity types of qualified entities and relation types of qualified relations to standard type definitions in the updated domain graph schema; performing entity fusion processing on the qualified entity set after the type identification is updated, merging multiple qualified entities pointing to the same real-world object, and synchronously updating associated qualified relation sets and qualified attribute sets; based on the qualified entity set, the qualified relation set, and the qualified attribute set after the entity fusion processing, constructing a weak supervision knowledge graph; calculating a quality indicator of the reconstructed weak supervision knowledge graph. 10.The professional text oriented weakly supervised knowledge graph automatic construction method of claim 9, wherein, calculating a quality indicator of the reconstructed weak supervision knowledge graph, comprising: Randomly extracting a preset number of relationship samples from the qualified relationship set of the reconstructed weakly supervised knowledge graph, obtaining the number of correct relationship samples through sampling evaluation, and calculating the ratio of the number of correct relationship samples to the total number of extracted relationship samples as the graph accuracy; Counting the total number of all pattern conflict instances generated in the process of generating the reconstructed weakly supervised knowledge graph, calculating the ratio of the total number of pattern conflict instances to the sum of the total number of qualified entities and the total number of qualified relationships in the weakly supervised knowledge graph as the graph conflict rate; Counting the number of entities in the qualified entity set of the reconstructed weakly supervised knowledge graph whose entity types belong to the pre-defined entity type set of the domain graph pattern, and calculating the ratio to the total number of entities in the qualified entity set as the graph completeness; The graph accuracy, graph conflict rate and graph completeness are weighted and fused according to the preset weight to obtain the graph quality index of the reconstructed weakly supervised knowledge graph.

Citation Information

Patent Citations

  • Domain knowledge graph ontology and data construction method, device and system

    CN111930856A

  • Power industry knowledge graph construction method fused with large-scale language model

    CN118627604A

  • Power equipment fault diagnosis method and system based on dynamic knowledge graph and large model collaborative reasoning

    CN120996202A

  • Structured knowledge unit generation method and system based on semantic prediction

    CN121029783A

  • Knowledge graph generation method and system based on large model

    CN121146021A