Map updating method and device based on large model, electronic equipment and medium

By using entity and relation extraction combined with similarity matching in graph updates, the limitations of computational resources and time in existing technologies are solved, achieving efficient and real-time graph updates.

CN121189437APending Publication Date: 2025-12-23GLOBAL ENERGY INTERCONNECTION RES INST CO LTD +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410790610.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2025-12-23

AI Technical Summary

Technical Problem

Existing graph update methods based on large models require a lot of computational resources and time, which limits the update frequency and makes it difficult to reflect changes in knowledge in the real world in a timely manner.

Method used

By acquiring new text data to extract entities and relationships, and using similarity matching to add incremental entities and relationships to the existing graph, incremental updates are achieved by combining automated crawling, pre-trained models, and graph neural network technologies.

Benefits of technology

It improves the efficiency and real-time performance of map updates, reduces computational resource requirements, and ensures that the map is synchronized with the real world.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121189437A_ABST
    Figure CN121189437A_ABST
Patent Text Reader

Abstract

The invention provides an atlas updating method and device based on a large model, electronic equipment and a medium, information is extracted from large-scale text data by utilizing a natural language processing model, and the method mainly comprises the steps of data collection and preprocessing, entity extraction, relation extraction, atlas updating, model evaluation and iteration and the like. According to the method, an automatic crawler technology, multi-language text processing, transfer learning, visual data auxiliary entity extraction, relation extraction based on a pre-training language model and other technologies are comprehensively applied, and multiple beneficial effects of graph timeliness, multi-language adaptability, model generalization ability improvement, extraction accuracy improvement and the like are achieved. The atlas updating and continuous optimization process is optimized by means of an incremental updating strategy, a dynamic learning system, user feedback data, a conflict resolution strategy and the like. In conclusion, according to the method, the accuracy, the integrity and the user friendliness of the atlas are remarkably improved, meanwhile, the dependence on the annotation data is reduced, and the overall calculation efficiency and the model generalization ability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a graph updating method, in particular to a graph updating method based on a large model, a device, an electronic equipment and a medium. BACKGROUND

[0002] In the modern information age, a knowledge graph is a structured data model used to represent the relationships between entities. It is a semantic network designed to capture rich semantic information and the associations between entities. A knowledge graph is usually composed of nodes (representing entities) and edges (representing the relationships between entities).

[0003] Large model-based extraction refers to the process of using deep learning models to extract information from raw text. These models learn semantic information from large-scale text data through pre-training, and then fine-tune or adjust them on specific tasks to achieve natural language processing tasks such as information extraction, named entity recognition, and relationship extraction.

[0004] Graph updating refers to the addition, deletion, and modification of entity relationships in a knowledge graph to keep it synchronized with the real world. As the times change and new knowledge emerges, a knowledge graph needs to be updated continuously to maintain its accuracy and usefulness.

[0005] Traditional graph updating methods mainly rely on rules, manually written rules, and external data sources, but this approach is usually inefficient and difficult to cover all scenarios. Graph updating based on large model extraction automatically extracts new entity relationships from large-scale text, thereby achieving automatic updating of the knowledge graph, greatly improving the efficiency and accuracy of the update. Although the graph updating based on large model extraction has great potential in theory, due to the dynamic and diverse nature of real-world knowledge, the knowledge graph needs to be updated in a timely manner to reflect the latest changes in knowledge. However, current large model extraction methods often require a large amount of computing resources and time to update and fine-tune the model, limiting the frequency of updates.

[0006] Therefore, further improvements are needed to address issues such as dynamic model updating to achieve automated and efficient updating of knowledge graphs. SUMMARY

[0007] To solve the above problems in the prior art, the application provides a graph updating method based on a large model, a device, an electronic equipment and a medium to improve the updating efficiency of the knowledge graph.

[0008] In a first aspect, the application provides a graph updating method based on a large model, comprising:

[0009] acquire new text data, and perform entity extraction and relation extraction on the new text data to obtain extraction results, the extraction results including entity nodes and entity edges representing association relationships between the entity nodes;

[0010] perform similarity matching between the extraction results and entity nodes and entity edges in an existing graph, and obtain incremental entity nodes and incremental entity edges according to a matching result;

[0011] add the incremental entity nodes and the incremental entity edges to the existing graph.

[0012] Optionally, the row similarity matching includes calculating similarity between each item of content in the extraction results and entity nodes and entity edges in the existing graph, and determining that the corresponding content is an incremental entity node or an incremental entity edge if the similarity reaches a threshold.

[0013] Optionally, the similarity calculation formula is

[0014]

[0015] wherein A and B respectively represent feature vectors of entity nodes and entity edges in the existing graph and feature vectors of entity nodes and entity edges in the new text data; A·B represents the dot product of vectors A and B; |A| and |B| respectively represent the norm of vectors A and B.

[0016] Optionally, the acquisition of the new text data includes automatic collection and update of large-scale text data containing entity relationship information through automatic crawler technology.

[0017] Optionally, before performing entity extraction and relation extraction on the new text data, the new text data is represented through word vector technology, and the new text data is preprocessed using multilingual text data.

[0018] Correspondingly, the entity extraction and relation extraction on the new text data include entity extraction and relation extraction on the preprocessed new text data.

[0019] Optionally, the entity extraction is performed according to a pre-trained entity extraction model, and the relation extraction is performed based on a pre-trained relation extraction model.

[0020] Optionally, the entity extraction further comprises fine-tuning using a pre-trained large language model to build an entity extraction model, effectively identifying entities by learning the context and characteristics of entities in the text; adopting a named entity recognition technology to identify specific type entities in the text and label their types; migrating from a model trained in one field or language to other fields or languages by minimizing the sample distribution difference between the source field and the target field to achieve feature migration, in the process of the feature migration, measuring the sample distribution difference between the source field and the target field, the expression of the sample distribution difference is:

[0021]

[0022] wherein, and represent the samples of the source field and the target field respectively, (φ(·)) represents a feature mapping function, (n s ) and (n t ) represent the number of samples of the source field and the target field respectively;

[0023] By minimizing the sample distribution difference, the feature representation between the source field and the target field is as close as possible, realizing the migration of the feature.

[0024] Optionally, the relationship extraction further comprises constructing a relationship extraction model using a pre-trained language model, automatically generating labeled data in combination with an existing knowledge base or atlas, and training the relationship extraction model using an attention mechanism; and extracting the relationship between entities from the text based on the relationship extraction model; representing the text data and the existing atlas knowledge as graph structure data; selecting a graph neural network model to learn the relationship and characteristics between nodes in the graph structure data; and realizing cross-entity type relationship extraction.

[0025] In a second aspect, the present application also provides an atlas updating device based on a large model, comprising:

[0026] An acquisition module is configured to acquire new text data.

[0027] An extraction module is connected to the acquisition module and configured to perform entity extraction and relationship extraction on the new text data to obtain an extraction result, wherein the extraction result comprises entity nodes and entity edges representing the association relationship between the entity nodes.

[0028] A matching module is connected to the extraction module and configured to perform similarity matching between the extraction result and the entity nodes and entity edges in the existing atlas, and obtain incremental entity nodes and incremental entity edges according to the matching result.

[0029] An updating module connected to the matching module, configured to add the incremental entity nodes and incremental entity edges into the existing graph.

[0030] Optionally, the matching module further comprises:

[0031] A similarity calculation unit configured to calculate the similarity between each item of the extraction result and the entity nodes and entity edges in the existing graph, and determine the corresponding item as an incremental entity node or an incremental entity edge if the similarity reaches a threshold.

[0032] Optionally, the similarity calculation formula of the similarity calculation unit is:

[0033]

[0034] wherein A and B represent the feature vectors of the entity nodes and entity edges in the existing graph and the feature vectors of the entity nodes and entity edges in the new text data respectively; A·B represents the dot product of vectors A and B; |A| and |B| represent the norms of vectors A and B respectively.

[0035] Optionally, the obtaining module comprises:

[0036] An automated crawler unit configured to automatically collect and update large-scale text data containing entity relationship information through automated crawler technology.

[0037] Optionally, the device further comprises:

[0038] A preprocessing module configured to represent the new text data through word vector technology before performing entity extraction and relationship extraction on the new text data, and to preprocess the new text data using multilingual text data.

[0039] Correspondingly, the extraction module comprises an entity extraction module and a relationship extraction module; the entity extraction module is configured to perform entity extraction on the preprocessed new text data, and the relationship extraction module is configured to perform relationship extraction on the preprocessed new text data.

[0040] Optionally, the entity extraction module is configured to perform entity extraction according to a pre-trained entity extraction model, and the relationship extraction module is configured to perform relationship extraction based on a pre-trained relationship extraction model.

[0041] Optionally, the entity extraction module further comprises:

[0042] A fine-tuning unit configured to fine-tune a pre-trained large language model to construct an entity extraction model, and to effectively identify entities by learning the context and features of entities in the text.

[0043] The named entity recognition unit is configured to recognize specific types of entities in the text and label the types of the entities by using a named entity recognition technology.

[0044] The feature migration unit is configured to migrate the model trained in one field or language to other fields or languages, to realize feature migration by minimizing the sample distribution difference between the source field and the target field, and to measure the sample distribution difference between the source field and the target field in the process of the feature migration, which is expressed as:

[0045]

[0046] wherein, and respectively represent the samples of the source field and the target field, (φ(·)) represents a feature mapping function, (n s ) and (n t ) respectively represent the sample numbers of the source field and the target field.

[0047] By minimizing the sample distribution difference, the feature representations between the source field and the target field are as close as possible, and the feature migration is realized.

[0048] Optionally, the relationship extraction module further comprises:

[0049] The relationship extraction model unit is configured to construct a relationship extraction model by using a pre-trained language model, to automatically generate labeled data in combination with an existing knowledge base or graph, and to train the relationship extraction model by using an attention mechanism.

[0050] The graph structure data generation unit is configured to represent the text data and the existing graph knowledge as graph structure data.

[0051] The graph neural network model unit is configured to select a graph neural network model to learn the relationships and features between nodes in the graph structure data, and to realize relationship extraction across entity types.

[0052] In a third aspect, the present application also provides an electronic device, comprising at least one processor and a memory; the memory and the processor are connected through a bus;

[0053] The memory is configured to store one or more programs.

[0054] When the one or more programs are executed by the at least one processor, the large model-based graph updating method in any of the above aspects is implemented.

[0055] In a fourth aspect, the present application also provides a computer-readable storage medium having an execution program stored thereon, and the execution program, when executed, implements the large model-based graph updating method in any of the above aspects.

[0056] From the above, the large model-based graph updating method, device, electronic equipment and medium provided by the present application can effectively expand and update the existing graph by combining the results of entity extraction and relationship extraction, establishing new edges according to the relationships between entities, and adding new entities and relationships to the graph. Through the incremental updating strategy, only the newly added or changed part of the graph is processed, avoiding the reconstruction of the entire graph and improving the efficiency and real-time performance of the update. BRIEF DESCRIPTION OF DRAWINGS

[0057] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, do not limit the present application, and in the drawings:

[0058] Figure 1 is a flowchart of the large model-based graph updating method in the embodiments of the present application.

[0059] Figure 2 is a flowchart of the large model-based graph updating method in the embodiments of the present application.

[0060] Figure 3 is a structural schematic diagram of the electronic equipment in the embodiments of the present application. DETAILED DESCRIPTION

[0061] The present application will be described in detail below with reference to the accompanying drawings and specific embodiments, and the illustrative embodiments and descriptions are only used to explain the present application, but do not limit the present application.

[0062] Embodiment 1

[0063] The present application provides a large model-based graph updating method, which is a method for extracting information from large-scale text data and updating the graph by using an advanced natural language processing model. The method includes data collection and preprocessing, entity and relationship extraction, combining the results of entity extraction and relationship extraction, establishing new edges according to the relationships between entities, adding new entities and relationships to the graph, incrementally updating the graph by using an incremental updating strategy, and optimizing the graph updating strategy according to the patterns and rules of historical update data by using meta-learning technology.

[0064] The data collection specifically includes the following: collecting large-scale text data containing entity relationship information, such as news, Wikipedia, forum posts, social media content, etc. on the network. Using automatic crawler technology, real-time monitoring of text data updates on the network, and automatic data collection and updating to ensure the real-time performance of the graph.

[0065] Collecting large-scale text data containing entity relationship information is one of the key steps to update the graph. These data come from various channels on the network, such as news, Wikipedia, forum posts, and social media content, etc. To ensure the comprehensiveness and accuracy of the graph, the diversity of data is crucial, covering various fields and topics. To achieve timely updates of data, automated crawler technology is used. By monitoring text data updates on the network in real time, the crawler system can automatically collect and update data, ensuring the real-time nature of the graph. This automated data collection method not only saves human resources, but also quickly responds to information updates, keeping the graph up-to-date at all times.

[0066] Based on the exploration of preprocessing techniques for multilingual text data, unified processing of multilingual text is achieved to support the construction of cross-language graphs.

[0067] Word segmentation is the process of dividing continuous text sequences into meaningful words or symbols. In Chinese text processing, word segmentation techniques include rule-based and statistical-based methods. For Chinese text, the jieba word segmentation library is used for word segmentation processing. Next, part-of-speech tagging adds part-of-speech tags to each word, such as nouns, verbs, adjectives, etc. This step usually uses part-of-speech tagging tools such as NLTK and spaCy. The results of part-of-speech tagging will provide important auxiliary information for subsequent named entity recognition.

[0068] Named entity recognition is the identification of entities with specific meanings in text, such as names, places, organizations, etc. Methods include rule-based and statistical-based machine learning methods, such as Conditional Random Fields (CRF) and sequence labeling models. With the help of open-source named entity recognition tools, such as Stanford NER and spaCy, efficient named entity recognition tasks can be achieved. In addition, word vector representation maps words to continuous vector space, and common algorithms include Word2Vec and GloVe. These word vectors can capture semantic information and similarity relationships between words, helping to improve the accuracy of subsequent entity and relationship extraction.

[0069] Finally, multilingual text processing technology aims to achieve unified processing of multilingual text to support the construction of cross-language graphs. This application uses pre-trained multilingual models such as mBERT and XLM for text representation and feature extraction, thereby achieving unified processing of multilingual text. In addition, machine translation technology is also used to translate multilingual text into a unified language for processing, and then translate the results back to the original language to meet the construction needs of cross-language graphs. The combination of these technologies will provide comprehensive and flexible support for graph construction, promoting information exchange and knowledge integration in a multilingual environment.

[0070] The entity extraction further includes the following: in the entity extraction stage, the application needs to use advanced natural language processing techniques to identify entities with specific meanings from the text. First, the application uses a pre-trained large language model such as BERT, RoBERTa, etc. to build an entity extraction model through fine-tuning. These models can learn the context and features of entities in the text, effectively identifying entities.

[0071] Second, the use of named entity recognition technology is a key step in the entity extraction process. Through named entity recognition technology, the application identifies entities with specific types in the text, such as names, place names, organizations, etc., and labels them with the corresponding types. This step helps to further accurately identify and distinguish different types of entities.

[0072] In addition, the use of transfer learning technology is to improve the generalization ability of the entity extraction model. By transferring the entity extraction model trained in one domain or language to other domains or languages, the application reduces the dependence on labeled data and improves the applicability and performance of the model in different domains and languages.

[0073] Transfer learning is a powerful machine learning method whose core idea is that the knowledge learned on one task can be transferred to another related task to speed up the learning process and improve the performance of the model. In the context of entity extraction, transfer learning can apply the entity extraction model trained in one domain or language to another related domain or language, thereby reducing the dependence on labeled data and improving the generalization ability of the model.

[0074] Specifically, the process of transfer learning mainly includes the pre-training stage, the transfer stage and the fine-tuning stage. First, in the aforementioned pre-training stage, the application trains an entity extraction model in the source domain or language, usually using a pre-trained language model for fine-tuning. Next, in the transfer stage, the application transfers the model trained in the source domain or language to the target domain or language. This step usually uses feature extractor transfer, which keeps the underlying feature extractor of the model unchanged and only replaces the output layer. Finally, in the fine-tuning stage, the application fine-tunes the model in the target domain or language to further improve the performance of the model on the target task.

[0075] The present application migrates the bottom feature extractor of the model trained on the source domain, such as the first few layers of a convolutional neural network or a pre-trained model like BERT, to the target domain, and only replaces the output layer of the model. The purpose of this is to retain the general features learned on the source domain in order to better adapt to the task of the target domain. During the migration of the feature extractor, the present application uses the difference method to measure the sample distribution difference between the source domain and the target domain. By minimizing the difference, the present application makes the feature representation between the source domain and the target domain as close as possible, thereby achieving the migration of the features. The present application adds the difference method as an additional loss term to the loss function of the target task, and trains the model by optimizing the overall loss function. The mathematical expression is:

[0076]

[0077] wherein, and represent the samples of the source domain and the target domain respectively, (φ(·)) represents the feature mapping function, (n s ) and (n t ) represent the number of samples in the source domain and the target domain respectively.

[0078] Through transfer learning, the present application can make full use of the rich data and knowledge already available on the source domain or language, helping the model to adapt to the task on the target domain or language more quickly, while reducing the demand for labeled data on the target domain or language. This method not only improves the generalization ability of the model, but also promotes the sharing and exchange of information across domains and languages, providing effective support for the application and development of entity extraction tasks.

[0079] Finally, the present application explores the method of using visual data to assist entity extraction. By combining text and image information, the accuracy and coverage of entity extraction are improved. For example, the text information in the image is used to assist in identifying entities in the text, thereby improving the effect of entity extraction. The combination of multi-modal data can enrich the feature representation in the entity extraction process, further improving the quality and effect of entity extraction.

[0080] The relationship extraction specifically includes the following content:

[0081] In the relationship extraction phase, the present application needs to extract the relationship between entities from the text, which is one of the key steps in the construction of entity relationship graphs. Specifically:

[0082] Firstly, the application utilizes a pre-trained language model to construct a relation extraction model that can accurately extract the relationships between entities from text. By fine-tuning the language model on large-scale text data, the application trains a relation extraction model suitable for specific tasks, thereby improving the accuracy and effectiveness of relation extraction.

[0083] Secondly, the application draws on the method of distant supervision and combines existing knowledge bases or graphs to automatically generate labeled data for training the relation extraction model. This method can utilize rich prior knowledge to provide more training samples for the model, thereby improving the generalization ability and performance of the model.

[0084] In addition, utilizing attention mechanism technology is one of the effective means to improve the performance of the relation extraction model. By utilizing attention mechanism, the model can more accurately focus on the key information related to the relation extraction task in the text, thereby improving the accuracy and robustness of relation extraction.

[0085] Finally, the application explores the use of graph neural networks technology to combine text data and existing graph knowledge to achieve more complex relation extraction. Graph neural networks can effectively process graph-structured data by learning the relationships and features between nodes in the graph to achieve cross-entity type relation extraction, thereby improving the expressiveness and generalization ability of the relation extraction model.

[0086] In the embodiments of the application, in order to achieve more complex relation extraction, especially by utilizing graph neural networks (GNNs) technology, as shown in Figure 1 The updating method flow in the embodiments of the application includes the following steps:

[0087] First, graph data representation: text data and existing graph knowledge are represented as graph-structured data. For text data, the application converts it into a text graph, where each word or entity is represented as a node, and the relationships between nodes (such as co-occurrence relationships, dependency relationships, etc.) are represented as edges in the graph. For existing graph knowledge, the application represents it as one or more knowledge graphs, where entities and relationships are represented as nodes and edges, respectively.

[0088] Second step, graph neural network model selection: the present application selects appropriate graph neural network models, such as Graph Convolutional Networks (GCNs), Graph Attention Networks (GATs), etc. These models are used to learn the relationships and features between nodes in graph data. They can effectively process graph-structured data, gradually aggregate neighbor information of nodes through multi-layer neural network computation, and learn the representation of nodes.

[0089] Third step, cross-entity type relationship extraction: the present application uses graph neural network technology to realize cross-entity type relationship extraction. This means that the model of the present application can simultaneously use text data and existing graph knowledge when considering the relationships between different types of entities. Through forward propagation and backward propagation on graph-structured data, the model of the present application can learn more complex entity relationships and can generalize to new entities and new relationships.

[0090] Fourth step, model training and optimization: during model training, the present application needs to design appropriate loss functions to measure the performance of the model on the relationship extraction task. The loss function combines the information of text data and graph knowledge, and considers node classification, edge prediction, etc. Through optimization algorithms such as stochastic gradient descent, the model parameters are constantly adjusted so that the model can better adapt to the relationship extraction task.

[0091] Fifth step, model evaluation and verification: evaluate and verify the trained graph neural network model to ensure its performance and generalization ability on the relationship extraction task. The present application uses cross-validation, validation set evaluation, etc. to evaluate the accuracy, recall rate, F1 score, etc. of the model, and performs error analysis and visualization to better understand the performance of the model.

[0092] Through the above technical implementation, the combination of text data and existing graph knowledge using graph neural network technology can realize more complex relationship extraction, thereby improving the expressiveness and generalization ability of the relationship extraction model. This method effectively captures the association between text data and graph knowledge, providing a new solution for the relationship extraction task.

[0093] The present application constructs a powerful and efficient relationship extraction system, providing reliable support for the construction and application of entity relationship graphs. The comprehensive use of these methods will help improve the accuracy, coverage, and practicality of relationship extraction, and promote the further development and application of entity relationship graph technology.

[0094] The graph updating further comprises:

[0095] Firstly, the application combines the results of entity extraction and relation extraction to update the existing graph. This means that the application uses the entity and relation information extracted from the text data to update the existing graph, ensuring that it is consistent with the real-world entity relationships.

[0096] Secondly, the application establishes new edges between entities based on their relationships and adds new entities and relationships to the graph. This helps to build a more complete and rich knowledge network, enabling the graph to better reflect the complex relationships between entities in the real world.

[0097] At the same time, the application uses an incremental update algorithm to incrementally update the graph, rather than rebuilding the entire graph each time. This effectively saves computing resources and improves update efficiency, especially when dealing with large-scale graphs. The incremental update algorithm implementation is as follows:

[0098] First, in the data preparation phase, new text data containing entity and relationship information to be updated is obtained, and the text data is preprocessed, including tokenization, part-of-speech tagging, named entity recognition, etc., to extract entity and relationship information.

[0099] In the graph matching phase, each new entity or relationship needs to be matched in the existing graph to determine whether it already exists in the graph. This is done by measuring the similarity between the new data entities or relationships and similar nodes in the existing graph based on a similarity matching method.

[0100] The similarity matching method of the application is used to measure whether the directions of two vectors are consistent, i.e., whether they tend to the same direction in multi-dimensional space. In graph updating, entities or relationships are represented as feature vectors, and then their similarity is calculated.

[0101] The calculation formula of the similarity matching method of the application is as follows:

[0102]

[0103] Where A and B are two vectors, A·B represents their dot product (inner product), and (|A|) and (|B|) represent their norm (modulus) respectively.

[0104] In graph updating, if entities or relationships are represented as feature vectors A and B, their similarity is calculated to measure their similarity. If the similarity is close to 1, it means they are very similar; close to -1 means they are in opposite directions; close to 0 means they have little association.

[0105] When a conflict is found between the entities or relationships in the new data and the information in the existing graph, appropriate strategies need to be taken in the conflict resolution phase to resolve it. According to the application scenario and specific requirements, conflict resolution strategies are designed, such as prioritizing new data, updating existing information, and merging processing, etc.

[0106] In the graph updating phase, for each entity and relationship in the new data, according to the matching results and conflict resolution strategies, the corresponding nodes and edges in the graph are updated. If the entity or relationship in the new data completely matches the existing nodes and edges in the graph, no update is needed; otherwise, new nodes or edges need to be added to the graph.

[0107] In order to improve efficiency, the efficiency optimization of the incremental updating process needs to be considered when implementing the algorithm, especially when dealing with large-scale graphs. Index technology, caching mechanism, etc. are used to speed up the graph matching and updating process, reduce time complexity and space complexity.

[0108] In the monitoring and feedback phase, a monitoring and feedback mechanism is designed to monitor the execution of the updating algorithm in real time and timely discover and solve problems. The monitoring mechanism monitors the performance indicators, error conditions and abnormal conditions in the updating process, and feeds back to the system administrator or developer in time.

[0109] Finally, this application explores the use of Meta-Learning technology to optimize the graph updating strategy according to the patterns and rules of historical updating data, to adapt to different data distribution and updating requirements. This makes the graph updating process of this application more intelligent and adaptive, and can better adapt to the changing knowledge environment.

[0110] Through the comprehensive application of these strategies, this application can ensure the efficiency and accuracy of graph updating, thereby continuously enriching and perfecting the knowledge graph of this application, and providing reliable knowledge support for various application scenarios.

[0111] The model evaluation and iteration evaluate the updated graph, including accuracy, completeness, etc.

[0112] First, the graph is comprehensively evaluated, including the consideration of accuracy, completeness, etc. The selection of evaluation indicators is very critical, as it directly affects the overall understanding of the quality of the graph. Therefore, an evaluation data set needs to be prepared, which includes manually annotated data or data obtained through other reliable means, to ensure the objectivity and accuracy of the evaluation. The selection of evaluation methods is also crucial, and various methods such as rule-based, manually annotated, and statistical methods can be used to comprehensively analyze the quality of the graph and generate a detailed evaluation report.

[0113] Next, based on the evaluation results, the update model is adjusted and optimized to further improve the effect of atlas updating. Adjusting the model may involve changing the model architecture, adjusting the hyperparameters, and increasing the training data in various ways, while using automated parameter tuning techniques such as grid search, Bayesian optimization, etc. can improve the efficiency and accuracy of model optimization.

[0114] The use of continuous learning technology is to establish a dynamic learning system to continuously monitor the use and feedback of the atlas. By using incremental learning algorithms, the model continuously receives new data while maintaining the memory of previously learned knowledge, thereby achieving continuous adaptation to atlas updates.

[0115] Finally, the use of crowdsourcing technology can effectively collect user feedback data, including evaluations of atlas update effects, problems and suggestions, etc. By designing appropriate crowdsourcing tasks to attract a large number of users to participate, ensuring that the collected feedback data is representative and diverse, and providing more diversified ways for atlas updates.

[0116] In summary, through comprehensive evaluation, continuous learning and the use of crowdsourcing, etc., it is expected to continuously improve the performance and adaptability of the update model, ensuring the effectiveness and continuous optimization of atlas updates.

[0117] The above is only the preferred embodiment of the present application, so any equivalent changes or modifications made to the structure, features and principles described in the scope of the present patent application are included in the scope of the present patent application.

[0118] Embodiment 2

[0119] Based on the same inventive concept, the embodiments of the present application provide a large model-based atlas updating method, as shown in Figure 2 , which includes:

[0120] Obtain new text data and perform entity extraction and relation extraction on the new text data to obtain extraction results, the extraction results including entity nodes and entity edges representing the association between entity nodes;

[0121] Match the extraction results with the entity nodes and entity edges in the existing atlas, and obtain incremental entity nodes and incremental entity edges based on the matching results;

[0122] Add the incremental entity nodes and incremental entity edges to the existing atlas.

[0123] In one possible implementation, the similarity matching includes calculating the similarity of each item of content in the extraction results with the entity nodes and entity edges in the existing atlas, and determining the corresponding content as an incremental entity node or an incremental entity edge if the similarity reaches a threshold.

[0124] In a possible implementation, the similarity calculation formula is:

[0125]

[0126] wherein A and B represent feature vectors of entity nodes and entity edges of an existing graph and feature vectors of entity nodes and entity edges of new text data respectively; A·B represents the dot product of vectors A and B, and |A| and |B| represent the norm of vectors A and B respectively.

[0127] In a possible implementation, the obtaining of the new text data comprises automatically collecting and updating large-scale text data containing entity relationship information through an automated crawler technology.

[0128] In a possible implementation, before performing entity extraction and relationship extraction on the new text data, the new text data is represented through a word vector technology, and the new text data is preprocessed using multilingual text data.

[0129] Correspondingly, the entity extraction and relationship extraction on the new text data comprise performing entity extraction and relationship extraction on the preprocessed new text data.

[0130] In a possible implementation, the entity extraction is performed according to a pre-trained entity extraction model, and the relationship extraction is performed based on a pre-trained relationship extraction model.

[0131] In a possible implementation, the entity extraction further comprises fine-tuning using a pre-trained large language model, constructing an entity extraction model, and effectively identifying entities by learning the context and features of the entities in the text; adopting a named entity recognition technology to identify specific type entities in the text and label the types of the entities; migrating a model trained in one field or language to other fields or languages, realizing feature migration by minimizing the sample distribution difference between the source field and the target field, and measuring the sample distribution difference between the source field and the target field in the process of the feature migration, wherein the expression of the sample distribution difference is:

[0132]

[0133] wherein, and represent samples of the source field and the target field respectively, (φ(·)) represents a feature mapping function, and (n s ) and (n t ) represent the number of samples of the source field and the target field respectively.

[0134] By minimizing the sample distribution difference, the feature representation between the source domain and the target domain is made as close as possible, so as to realize the migration of the features.

[0135] In a possible implementation, the relation extraction further includes constructing a relation extraction model by using a pre-trained language model, automatically generating labeled data in combination with an existing knowledge base or graph, and training the relation extraction model by using an attention mechanism; and extracting relations between entities from text based on the relation extraction model; representing text data and existing graph knowledge as graph structure data; selecting a graph neural network model to learn relations and features between nodes in the graph structure data; and realizing cross-entity-type relation extraction.

[0136] Embodiment 3

[0137] Based on the same inventive concept, the embodiment of the present application provides a graph updating device based on a large model, comprising:

[0138] An acquisition module is configured to acquire new text data.

[0139] An extraction module is connected to the acquisition module and configured to perform entity extraction and relation extraction on the new text data to obtain an extraction result, wherein the extraction result includes entity nodes and entity edges used to represent the association between the entity nodes.

[0140] A matching module is connected to the extraction module and configured to perform similarity matching between the extraction result and entity nodes and entity edges in an existing graph, and obtain incremental entity nodes and incremental entity edges according to a matching result.

[0141] An updating module is connected to the matching module and configured to add the incremental entity nodes and the incremental entity edges to the existing graph.

[0142] In a possible implementation, the matching module further includes:

[0143] A similarity calculation unit is configured to calculate the similarity between each item of content in the extraction result and entity nodes and entity edges in the existing graph, and determine the corresponding content as an incremental entity node or an incremental entity edge if the similarity reaches a threshold.

[0144] In a possible implementation, the similarity calculation formula of the similarity calculation unit is:

[0145]

[0146] wherein A and B represent the feature vectors of the entity nodes and the entity edges of the existing graph and the feature vectors of the entity nodes and the entity edges of the new text data; A·B represents the dot product of vectors A and B; |A| and |B| represent the norms of vectors A and B, respectively.

[0147] In a possible implementation, the obtaining module comprises:

[0148] an automated crawler unit configured to automatically collect and update large-scale text data containing entity relationship information through an automated crawler technique.

[0149] In a possible implementation, the apparatus further comprises:

[0150] a preprocessing module configured to represent the new text data through a word vector technique before performing entity extraction and relationship extraction on the new text data, and to preprocess the new text data using multilingual text data.

[0151] Correspondingly, the extraction module comprises an entity extraction module and a relationship extraction module; the entity extraction module is configured to perform entity extraction on the preprocessed new text data, and the relationship extraction module is configured to perform relationship extraction on the preprocessed new text data.

[0152] In a possible implementation, the entity extraction module is configured to perform entity extraction according to a pre-trained entity extraction model, and the relationship extraction module is configured to perform relationship extraction based on a pre-trained relationship extraction model.

[0153] In a possible implementation, the entity extraction module further comprises:

[0154] a fine-tuning unit configured to fine-tune a pre-trained large language model to construct an entity extraction model, and to effectively identify entities by learning the context and features of the entities in the text.

[0155] a named entity recognition unit configured to identify specific types of entities in the text and label the types of the entities by using a named entity recognition technique.

[0156] a feature transfer unit configured to transfer a model trained in one domain or language to other domains or languages by minimizing the sample distribution difference between source domains and target domains, and to measure the sample distribution difference between the source domains and the target domains in the process of feature transfer, which is expressed as:

[0157]

[0158] wherein, and denote the samples of the source domain and the target domain respectively, (φ(·)) denotes a feature mapping function, (n s ) and (n t ) denote the sample numbers of the source domain and the target domain respectively.

[0159] By minimizing the sample distribution difference, the feature representation between the source domain and the target domain is made as close as possible, and the migration of the features is achieved.

[0160] In a possible implementation, the relation extraction module further includes:

[0161] A relation extraction model unit is configured to construct a relation extraction model by using a pre-trained language model, automatically generate labeled data in combination with an existing knowledge base or atlas, and train the relation extraction model by using an attention mechanism.

[0162] A graph structure data generation unit is configured to represent text data and existing atlas knowledge as graph structure data.

[0163] A graph neural network model unit is configured to select a graph neural network model to learn the relations and features between nodes in the graph structure data, and implement cross-entity type relation extraction.

[0164] Embodiment 4

[0165] Based on the same inventive concept, the embodiments of the present application also provide an electronic device, as shown in the figure, which can be a computer device, a single-chip microcomputer device, a smart mobile device, etc. The electronic device in the embodiment can include a processor, a memory, a transceiver component, etc. The memory, the processor, and the transceiver component are connected through a bus; the memory can be used to store an execution program, and the exemplary execution program can include instructions; the processor is configured to execute the instructions stored in the memory. The memory can also be used to store data, which can be called and / or modified when the instructions are executed. Figure 3

[0166] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the storage medium to implement a corresponding method flow or a corresponding function, to implement the steps of the atlas updating method based on a large model in the above embodiment.

[0167] Embodiment 5 ​

[0168] Based on the same inventive concept, the embodiments of the present application further provide a readable storage medium, specifically, an electronic device readable storage medium (Memory). The electronic device readable storage medium is a memory device in the electronic device, and is used to store programs and data. It can be understood that the storage medium herein can include a built-in storage medium in the electronic device, and of course can also include an expansion storage medium supported by the electronic device. The storage medium provides a storage space, and the storage space stores an operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and the instructions can be one or more execution programs (including program codes). It should be noted that the storage medium herein can be a high-speed RAM memory or a non-volatile memory such as at least one disk memory. Loading and executing one or more instructions stored in the storage medium by the processor can realize the steps of the atlas updating method based on the large model in the above embodiments.

[0169] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely 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-ROMs, optical storage, etc.) containing computer-usable program code.

[0170] The present application is described with reference to flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the 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 a general-purpose computer, a special-purpose computer, an embedded processor, 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 generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The means for implementing the functions specified in one or more flows and / or blocks.

[0171] These computer program instructions can also be stored in a computer-readable memory capable of guiding the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including instruction means, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1the function specified in the one or more blocks.

[0172] These computer program instructions can also be loaded into computer or other programmable data processing devices, so that a series of operation steps are performed on the computer or other programmable data processing devices to generate computer-implemented processes, so that the instructions executed on the computer or other programmable devices provide processes for implementing the flow Figure 1 one or more flows and / or blocks Figure 1 the function specified in the one or more blocks.

[0173] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, but not to limit the scope of protection, although the present application has been described in detail with reference to the above examples, those skilled in the art should understand: after reading the present application, the skilled in the art can make various changes, modifications or equivalent replacements to the specific embodiments of the application, but these changes, modifications or equivalent replacements are all within the scope of protection of the claims of the application.

Claims

1. A large model-based atlas updating method, characterized in that, The method includes: New text data is acquired, and entity extraction and relation extraction are performed on the new text data to obtain extraction results, which include entity nodes and entity edges used to represent the association relationships between entity nodes. The extraction results are matched with the entity nodes and entity edges in the existing graph for similarity, and incremental entity nodes and incremental entity edges are obtained based on the matching results. Add the incremental entity nodes and incremental entity edges to the existing graph.

2. The large model-based atlas updating method of claim 1, wherein, The similarity matching includes: calculating the similarity between each item in the extraction result and the entity nodes and entity edges in the existing graph; if the similarity reaches a threshold, the corresponding item is determined to be an incremental entity node or an incremental entity edge. 3.The large model-based atlas updating method of claim 2, wherein, The similarity calculation formula is as follows: Where A and B represent the feature vectors of entity nodes and entity edges in the existing graph and the feature vectors of entity nodes and entity edges in the new text data, respectively; A·B represents the dot product of vectors A and B, and |A| and |B| represent the norms of vectors A and B, respectively.

4. The large model-based atlas updating method of claim 1, wherein, The acquisition of new text data includes: automatically collecting and updating large-scale text data containing entity relationship information through automated web crawling technology.

5. The graph update method based on a large model as described in claim 1, characterized in that, Before performing entity extraction and relation extraction on the new text data, the new text data is represented using word vector technology, and the new text data is preprocessed using multilingual text data. Accordingly, the entity extraction and relation extraction of the new text data includes: performing entity extraction and relation extraction on the preprocessed new text data.

6. The graph update method based on a large model as described in claim 1 or 5, characterized in that, The entity extraction is performed based on a pre-trained entity extraction model, and the relation extraction is performed based on a pre-trained relation extraction model.

7. The graph update method based on a large model as described in claim 6, characterized in that, The entity extraction further includes: fine-tuning a pre-trained large-scale language model to construct an entity extraction model, effectively identifying entities by learning the context and features of entities in the text; using named entity recognition technology to identify specific types of entities in the text and labeling their types; transferring the model trained in one domain or language to other domains or languages, achieving feature transfer by minimizing the sample distribution difference between the source and target domains. During the feature transfer process, the sample distribution difference between the source and target domains is measured, and the expression for the sample distribution difference is: in, and Let φ(·) represent the samples in the source and target domains, respectively, and let (n) represent the feature mapping function. s ) and (n t ) represent the number of samples in the source domain and the target domain, respectively; By minimizing the differences in sample distribution, feature transfer is achieved by making the feature representations of the source and target domains as close as possible.

8. The graph update method based on a large model as described in claim 6, characterized in that, The relation extraction further includes: constructing a relation extraction model using a pre-trained language model, automatically generating labeled data by combining existing knowledge bases or graphs, and using an attention mechanism to train the relation extraction model; extracting relationships between entities from the text based on the relation extraction model; representing the text data and existing graph knowledge as graph structure data; selecting a graph neural network model to learn the relationships and features between nodes in the graph structure data; and realizing relation extraction across entity types.

9. A map update device based on a large model, characterized in that, The device includes: The acquisition module is used to acquire new text data; An extraction module, connected to the acquisition module, is used to extract entities and relationships from the new text data to obtain extraction results, which include entity nodes and entity edges representing the relationships between entity nodes. A matching module, connected to the extraction module, is used to perform similarity matching between the extraction result and entity nodes and entity edges in the existing graph, and to obtain incremental entity nodes and incremental entity edges based on the matching result. An update module, connected to the matching module, is used to add the incremental entity nodes and incremental entity edges to the existing graph.

10. The large-model-based map updating device as described in claim 9, characterized in that, The matching module further includes: The similarity calculation unit is used to calculate the similarity between each item in the extraction result and the entity nodes and entity edges in the existing graph. If the similarity reaches the threshold, the corresponding content is determined to be an incremental entity node or incremental entity edge.

11. The large-model-based graph update device as described in claim 10, characterized in that, The similarity calculation formula of the similarity calculation unit is: Where A and B represent the feature vectors of entity nodes and entity edges in the existing graph and the feature vectors of entity nodes and entity edges in the new text data, respectively; A·B represents the dot product of vectors A and B, and |A| and |B| represent the norms of vectors A and B, respectively.

12. The large-model-based map updating device as described in claim 9, characterized in that, The acquisition module includes: An automated crawler unit is used to automatically collect and update large-scale text data containing entity relationship information through automated crawling technology.

13. The large-model-based map updating device as described in claim 9, characterized in that, The device further includes: The preprocessing module is used to represent new text data using word vector technology before entity extraction and relation extraction, and to preprocess the new text data using multilingual text data. Accordingly, the extraction module includes an entity extraction module and a relation extraction module; the entity extraction module is used to extract entities from the preprocessed new text data, and the relation extraction module is used to extract relations from the preprocessed new text data.

14. The large-model-based map updating device as described in claim 9 or 13, characterized in that, The entity extraction module is used to extract entities based on a pre-trained entity extraction model, and the relation extraction module is used to extract relations based on a pre-trained relation extraction model.

15. The large-model-based map updating device as described in claim 13, characterized in that, The entity extraction module further includes: The fine-tuning unit is used to fine-tune a pre-trained large language model to build an entity extraction model that effectively identifies entities by learning the context and features of entities in the text. The named entity recognition unit is used to identify specific types of entities in text and label their types using named entity recognition technology. The feature transfer unit is used to transfer a model trained in one domain or language to another domain or language. Feature transfer is achieved by minimizing the sample distribution difference between the source and target domains. During the feature transfer process, the sample distribution difference between the source and target domains is measured, and its expression is: in, and Let φ(·) represent the samples in the source and target domains, respectively, and let (n) represent the feature mapping function. s ) and (n t ) represent the number of samples in the source domain and the target domain, respectively; By minimizing the differences in sample distribution, feature transfer is achieved by making the feature representations of the source and target domains as close as possible.

16. The large-model-based map updating device as described in claim 13, characterized in that, The relation extraction module further includes: The relation extraction model unit is used to construct a relation extraction model using a pre-trained language model, combine it with an existing knowledge base or graph, automatically generate labeled data, and use an attention mechanism to train the relation extraction model. The graph structure data generation unit is used to represent text data and existing graph knowledge as graph structure data; The graph neural network model unit is used to select the relationships and features between nodes in graph structure data that the graph neural network model learns, and to achieve relationship extraction across entity types.

17. An electronic device, characterized in that, At least one processor and a memory; the memory and processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the large model-based graph update method as described in any one of claims 1 to 8 is implemented.

18. A computer-readable storage medium, characterized in that, It contains an executable program, which, when executed, implements the graph update method based on a large model as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Method and system for automatically extracting and associating legal document key points

    CN121638262A