Transfer learning entity relationship extraction method, device and equipment based on domain self-adaption and storage medium

Based on the adaptive migration learning method based on the field, the data set of corporate relations with diverse characteristics is pre -trained, and the model parameters are adjusted to adapt to the target field, solving the deficiencies of traditional methods in cross -field data processing, and achieved efficient corporate relations extraction.

CN119357378APending Publication Date: 2025-01-24BEIJING BIG DATA CENT
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411301360.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

Traditional enterprise relationship extraction methods perform poorly in the face of cross-domain data, and existing transfer learning methods fail to effectively solve structural and semantic differences between source and target areas, resulting in the model's adaptation in the target areas. Insufficient sex and accuracy.

Method used

Adopting adaptive migration learning methods based on fields, pre -training data sets marked with corporate relations in multiple source areas, and learning ducts with diverse characteristics, including data that depends on cross -language, multi -mode and time series dependencies. Then, the adaptive algorithm adjustment model parameters are then used to adapt to data characteristics and distribution in the target field. Finally, the model is fine -tuned by migrating learning algorithms, verifying its performance, and applied to identification and drawing corporate relations in the target field.

Benefits of technology

Effectively adjust the deep learning model to adapt to the target field, reduce the problem of decline in performance when the model migrate between different fields, improve the accuracy and adaptability of corporate relations, and reduce the dependence on a large number of labeling data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357378A_ABST
    Figure CN119357378A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of enterprise relation extraction, and particularly provides a transfer learning entity relation extraction method, device and equipment based on field self-adaption and a storage medium. The method comprises the steps that one or more source fields are selected; performing pre-training on the selected source field by adopting a deep learning model, and learning a labeled enterprise relationship data set in the source field; selecting a target domain with unlabeled or partially labeled enterprise relational data, and adjusting pre-trained model parameters by using a domain adaptive algorithm to adapt to data features and distribution of the target domain; after field adaptation of target field data features and distribution is completed, a transfer learning algorithm is deployed to carry out fine adjustment on the adjusted deep learning model; verifying the performance of the fine-tuned deep learning model in the target domain; and identifying and extracting the enterprise relationship and the relationship thereof in the text by applying the fine-tuned deep learning model in the target field. And high quality and consistency of the extracted enterprise relationship and the relationship data thereof are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of enterprise relationship extraction, and in particular to a method, device, equipment and storage medium for entity relationship extraction based on domain adaptation and transfer learning. Background Art

[0002] In the field of natural language processing, enterprise relationship extraction is a core task, which involves automatically identifying enterprise relationships (such as names, places, organizations, etc.) and semantic relationships between these enterprise relationships (such as cooperation, subordination, location relationships, etc.) from text. This task plays a vital role in many application fields such as information retrieval, knowledge graph construction, and intelligent question-answering systems. However, traditional enterprise relationship extraction methods often perform poorly when faced with cross-domain data. This is mainly because texts in different fields have significant differences in terminology, language style, syntactic structure, etc., which makes it impossible for the model to be effectively migrated and adapted.

[0003] Existing enterprise relationship extraction technologies usually rely on a large amount of labeled data in a domain to train models, which can achieve high accuracy in their training domains. However, when applied to new domains, such as migrating from medical texts to legal texts, their performance often drops significantly due to differences in data distribution between domains. In addition, the data annotation process is not only costly and time-consuming, but also requires the participation of domain experts, which makes it difficult to obtain labeled data in new domains.

[0004] In addition, although existing transfer learning methods can improve the model performance of the target domain by leveraging the knowledge of the source domain, these methods often do not have domain adaptation strategies specifically for corporate relationship extraction tasks and cannot directly address domain-specific issues in text data. These methods usually fail to effectively address the structural and semantic differences between the source and target domains during the migration process, resulting in insufficient adaptability and accuracy of the migrated model in the target domain. Summary of the invention

[0005] In view of the above-mentioned problems existing in traditional enterprise relationship extraction methods when facing cross-domain data, the present invention provides a method, device, equipment and storage medium for entity relationship extraction based on domain adaptation and transfer learning.

[0006] In a first aspect, the technical solution of the present invention provides a method for extracting entity relations based on domain-adaptive transfer learning, comprising: Select one or more source domains, identify and integrate annotated enterprise relationship data sets with diverse features and representative features in each selected source domain; wherein each annotated enterprise relationship data set includes cross-language enterprise relationship data, multimodal data, and time series-dependent enterprise relationship data; Use deep learning models to pre-train on the selected source domain and learn the labeled enterprise relationship dataset in the source domain; Select a target domain with unlabeled or partially labeled enterprise relationship data, and use a domain adaptation algorithm to adjust the pre-trained model parameters to adapt to the data characteristics and distribution of the target domain; After completing domain adaptation of the target domain data characteristics and distribution, deploy the transfer learning algorithm to fine-tune the adjusted deep learning model; Verify the performance of the fine-tuned deep learning model in the target domain; Apply fine-tuned deep learning models in the target domain to identify and extract business relationships and their relations in text.

[0007] As a further limitation of the technical solution of the present invention, the steps of selecting one or more source fields, identifying and integrating the labeled enterprise relationship data sets with diverse features and representative features in each selected source field include: For cross-language enterprise relationship data, enterprise relationship annotations in at least two languages ​​are selected, and the enterprise relationship expressions between different languages ​​are standardized and converted through language adaptation algorithms; In the processing of multimodal data, a modal conversion framework is used to simultaneously extract enterprise relationship information from image and text data, and establish an association model between visual objects in images and text descriptions; For time-series dependent enterprise relationship data, a time-sensitive enterprise relationship extraction strategy is implemented to automatically identify enterprise relationship behaviors and interactions within a time point or time period by analyzing time-stamped sequence data, and then extract the dynamic relationships between enterprise relationships that change over time; An enterprise relationship dataset is constructed by integrating enterprise relationship data, multimodal data and time series-dependent enterprise relationship data.

[0008] As a further limitation of the technical solution of the present invention, the step of using a deep learning model to perform pre-training on a selected source domain and learning a labeled enterprise relationship data set in the source domain includes: For each source domain, the deep learning model is pre-trained using the training set of the enterprise relationship dataset, where the training process includes pre-processing and embedding representation of each data type; During the pre-training process, the cross entropy loss function is used to minimize the prediction error between enterprise relationships and relationship labels; The performance of the pre-trained deep learning model is evaluated using the validation set of the enterprise relationship dataset.

[0009] As a further limitation of the technical solution of the present invention, for each source domain, the step of pre-training the deep learning model using the training set of the enterprise relationship dataset includes: For cross-language enterprise relationship data, the deep learning model processes multilingual inputs by using a language embedding layer to map texts in different languages ​​into a common feature space for enterprise relationship learning. For multimodal data, the deep learning model integrates a multimodal fusion module to simultaneously process image and text data through a visual-text attention mechanism, and calculates attention weights using the interaction between image features and text features; For time series dependent enterprise relational data, the deep learning model uses a time-aware encoding layer to combine position encoding with time tags to form a time-aware feature representation.

[0010] As a further limitation of the technical solution of the present invention, the steps of selecting a target domain with unlabeled or partially labeled enterprise relationship data and using a domain adaptation algorithm to adjust the pre-trained model parameters to adapt to the data characteristics and distribution of the target domain include: Identify target domains with unlabeled or partially labeled enterprise relational data; Analyze the data characteristics and distribution in the target domain, determine the differences with the source domain, and calculate the sum of the mean and variance differences between the target domain and the source domain in K key feature dimensions; Use domain adaptive algorithms to adjust the network layer structure and weights of pre-trained deep learning models to match the needs of the target domain; By calculating the output difference of the target domain data before and after the deep learning model is adjusted, and minimizing the difference to adapt to the data distribution of the target domain; Label samples in the target area; The deep learning model adjusted through iterative training continuously optimizes and adjusts parameters by training on the target domain data.

[0011] As a further limitation of the technical solution of the present invention, after completing the domain adaptation of the target domain data characteristics and distribution, the step of deploying the transfer learning algorithm to fine-tune the adjusted deep learning model includes: The gradient descent method is used to optimize the parameters of the deep learning model, and the loss function is used to update the parameters during fine-tuning; During the fine-tuning process, monitor the performance of the deep learning model in the target domain, evaluate the enterprise relationship recognition and relationship extraction performance of the deep learning model through accuracy, recall rate and F1 score, and adjust the transfer learning strategy based on the performance evaluation results.

[0012] As a further limitation of the technical solution of the present invention, the steps of applying the fine-tuned deep learning model to identify and extract corporate relationships and their relationships in the text in the target domain include: Use deep learning models to automatically identify corporate relationship types from text data; The enterprise relationship extraction algorithm is used to generate a list of enterprise relationship pairs and their relationships using the output of the deep learning model; Post-process the extracted enterprise relationships and their relationships, and output the processed enterprise relationships and their relationship data into XML or JSON structured format; Monitor the error and omission rates during the output process, and use an adaptive feedback mechanism to adjust the deep learning model.

[0013] In a second aspect, the technical solution of the present invention provides a transfer learning entity relationship extraction device based on domain adaptation, including a data set generation module, a pre-training module, a model adjustment module, a model fine-tuning module, a model verification module and an execution module; A data set generation module is used to select one or more source domains, identify and integrate annotated enterprise relationship data sets with diverse features and representative features in each selected source domain; wherein each annotated enterprise relationship data set includes cross-language enterprise relationship data, multimodal data, and time series-dependent enterprise relationship data; A pre-training module is used to use a deep learning model to perform pre-training on a selected source domain to learn a labeled enterprise relationship dataset in the source domain; A model adjustment module is used to select a target domain with unlabeled or partially labeled enterprise relationship data and use a domain adaptation algorithm to adjust the pre-trained model parameters to adapt to the data characteristics and distribution of the target domain; The model fine-tuning module is used to deploy the transfer learning algorithm to fine-tune the adjusted deep learning model after completing the domain adaptation of the target domain data characteristics and distribution; Model validation module, used to verify the performance of the fine-tuned deep learning model in the target domain; An execution module that applies the fine-tuned deep learning model in the target domain to identify and extract business relationships and their relations in text.

[0014] As a further limitation of the technical solution of the present invention, the data set generation module includes a cross-language data processing unit, a multimodal data processing unit, a sequence data processing unit and a data set generation unit; A cross-language data processing unit, used to select enterprise relationship annotations in at least two languages ​​from cross-language enterprise relationship data, and to standardize and convert enterprise relationship expressions between different languages ​​through a language adaptation algorithm; A multimodal data processing unit, used to adopt a modal conversion framework in the processing of multimodal data, synchronously extract enterprise relationship information from image and text data, and establish an association model between visual objects in the image and text descriptions; The sequence data processing unit is used to implement time-sensitive enterprise relationship extraction strategies for time-series dependent enterprise relationship data. By analyzing time-stamped sequence data, it automatically identifies enterprise relationship behaviors and interactions within a time point or time period, and then extracts the dynamic relationships between enterprise relationships that change over time; The data set generation unit is used to integrate enterprise relationship data, multimodal data and time series-dependent enterprise relationship data to construct an enterprise relationship data set.

[0015] As a further limitation of the technical solution of the present invention, the pre-training module is specifically used to pre-train the deep learning model for each source domain using the training set of the enterprise relationship data set, wherein the training process includes pre-processing and embedding representation of each data type; during the pre-training process, the cross entropy loss function is used to minimize the prediction error between the enterprise relationship and the relationship label; the performance of the pre-trained deep learning model is evaluated using the validation set of the enterprise relationship data set; for cross-language enterprise relationship data, the deep learning model processes multilingual input by using the language embedding layer, and maps texts in different languages ​​to a common feature space for enterprise relationship learning; for multimodal data, the deep learning model integrates a multimodal fusion module, synchronously processes image and text data through a visual-text attention mechanism, and calculates attention weights by using the interaction between image features and text features; for time series-dependent enterprise relationship data, the deep learning model uses a time-aware coding layer to combine position coding with time tags to form a time-aware feature representation.

[0016] As a further limitation of the technical solution of the present invention, the model adjustment module is specifically used to identify a target domain with unlabeled or partially labeled enterprise relationship data; analyze the data characteristics and distribution in the target domain, determine the differences with the source domain, and calculate the sum of the mean and variance differences between the target domain and the source domain in K key feature dimensions; use a domain adaptive algorithm to adjust the network layer structure and weights of the pre-trained deep learning model to match the needs of the target domain; calculate the output difference of the target domain data before and after the deep learning model is adjusted, and minimize the difference to adapt to the data distribution of the target domain; label samples of the target domain; iteratively train the adjusted deep learning model and continuously optimize the adjustment parameters through training on the target domain data.

[0017] As a further limitation of the technical solution of the present invention, the model fine-tuning module is specifically used to apply the gradient descent method to optimize the parameters of the deep learning model, and the loss function is used to update the parameters during the fine-tuning process; during the fine-tuning process, the performance of the deep learning model in the target field is monitored, the enterprise relationship recognition and relationship extraction performance of the deep learning model is evaluated by accuracy, recall rate and F1 score, and the transfer learning strategy is adjusted according to the performance evaluation results.

[0018] As a further limitation of the technical solution of the present invention, the execution module is specifically used to automatically identify the enterprise relationship type from the text data using the deep learning model; use the enterprise relationship extraction algorithm to generate a list of enterprise relationship pairs and their relationships using the output of the deep learning model; post-process the extracted enterprise relationships and their relationships, and output the processed enterprise relationships and their relationship data into XML or JSON structured format; Monitor the error and omission rates during the output process, and use an adaptive feedback mechanism to adjust the deep learning model.

[0019] In the third aspect, the technical solution of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the domain-adaptive transfer learning entity relationship extraction method as described in any one of claims 1 to 7.

[0020] In a fourth aspect, the technical solution of the present invention also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the domain-adaptive transfer learning entity relationship extraction method as described in the first aspect.

[0021] It can be seen from the above technical solutions that the present invention has the following advantages: (1) Through domain adaptation, the deep learning model can be effectively adjusted to adapt to the specific data characteristics and distribution of the target domain, reducing the problem of performance degradation when the model is transferred between different domains, so that the same model can be used to effectively extract corporate relationships in multiple domains without retraining the model for each domain. (2) By constructing a corporate relationship dataset containing cross-language, multimodal data and time series dependencies, the generalization ability of the model is enhanced. In addition, the transfer learning algorithm is further fine-tuned by using a small amount of target domain data, significantly reducing the dependence on a large amount of labeled data, which enables the method to maintain high performance even when data annotation resources are limited. (3) The high quality and consistency of the extracted corporate relationships and their relationship data are ensured, which can not only accurately identify and classify corporate relationships, but also ensure the accuracy and availability of data through post-processing.

[0022] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0024] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0025] Figure 2 is a schematic block diagram of an apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] like Figure 1 As shown, the embodiment of the present invention provides a method for extracting entity relations based on domain-adaptive transfer learning, including: S1: Select one or more source domains, identify and integrate annotated enterprise relationship data sets with diverse and representative features in each selected source domain; wherein each annotated enterprise relationship data set includes cross-language enterprise relationship data, multimodal data, and time series-dependent enterprise relationship data; This step specifically includes: S11: In the Select Source field ,in, Identify and integrate each source domain Enterprise relationship dataset with diverse and representative features , for each enterprise relationship dataset Including cross-language enterprise relational data , multimodal data and time series dependent enterprise relational data ; S12: For cross-language enterprise relational data , selecting enterprise relationship annotations in at least two languages, and using language adaptation algorithms to standardize and convert enterprise relationship expressions between different languages; It should be noted that for cross-language entity relationship data, by selecting entity relationship annotations containing at least two languages ​​and standardizing and converting the enterprise relationship expressions in different languages ​​through language adaptation algorithms, the model can effectively identify entity relationships between different languages, thereby realizing cross-language expression of enterprise relationships; S13: In multimodal data In the processing, a modal conversion framework is used to simultaneously extract enterprise relationship information from image and text data, and establish an association model between visual objects in images and text descriptions; Here, the steps for obtaining modal data include: Image data acquisition: Extract entity-related images from target domain text data. For example, in a corporate relationship extraction system, when a news report involves a certain company, the system can automatically capture relevant pictures of the company mentioned in the news, including corporate logos and office location photos.

[0028] Acquisition of text data: Extracting text data related to entities from the same data source. These text data are usually sentences describing the characteristics or behaviors of entities. For example, in news reports, there may be text descriptions of corporate cooperation and acquisition activities.

[0029] Acquisition of audio or video data: In multimodal data processing, in addition to images and text, audio and video data can also be included. For example, in the minutes of a corporate meeting, there may be audio or video files that involve discussions and agreements between companies.

[0030] In a news report, there is a sentence describing "Company A and Company B have signed a cooperation agreement", accompanied by pictures of the company logos of Company A and Company B. Through the above process, the system: extracts the key entities "Company A", "Company B", and "Cooperation Agreement" and their relationships from the text. Extracts the company logo features of Company A and Company B from the image. Uses the visual-text alignment model to associate the "Company A" and "Company B" logos with the entities in the text, and finally outputs structured data that Company A and Company B have a cooperation relationship.

[0031] S14: For time series dependent enterprise relational data ,implementing a time-sensitive enterprise relationship extraction strategy by analyzing time-stamped ,sequence data, and automatically identifies the enterprise relationship behaviors and ,interactions within a time point or time period, and then extracting the ,dynamic relationships between enterprise relationships that change over time; It should be noted that in enterprise relationship extraction, interactions usually refer to dynamic relationships between different enterprises or entities, such as cooperation, competition, and supply chain dependence. Interactions may change over time. Examples of dynamic relationships include: 1. Formation of cooperative relationship: Time point identification: In January 2024, Company A and Company B signed a strategic cooperation agreement.

[0032] Interaction: After the signing of the agreement, the two companies have cooperated on a number of projects.

[0033] Dynamic relationship extraction: Starting from January 2024, the relationship between A and B changes from competition to cooperation and strengthens in the following months.

[0034] 2. Evolution of competitive relations: Time period identification: In 2023, Company C and Company D are competing fiercely in a certain market segment.

[0035] Interaction: In mid-2023, Company C gains market share through price cuts and marketing campaigns.

[0036] Dynamic relationship extraction: In the months of 2023, the competitive relationship between C and D intensified significantly, and as market share changed, the competitive relationship between the two companies continued to adjust.

[0037] 3. Disruption and recovery of supply chain relationships: Time point identification: In 2022, the global supply chain was affected by the macro environment, resulting in supply chain disruption between Company E and its main supplier F.

[0038] Interaction: During supply chain disruptions, Company E is forced to find new suppliers or adjust production plans.

[0039] Dynamic relationship extraction: From the beginning of 2022 to the end of 2022, the supply relationship between E and F experienced dynamic changes from stability to interruption and then to recovery.

[0040] S15: Comprehensive enterprise relationship data , multimodal data and time series dependent enterprise relational data , the enterprise relationship dataset constructed .

[0041] S2: Use deep learning models to pre-train on the selected source domain and learn the labeled enterprise relationship dataset in the source domain; This step specifically includes: S21: A deep learning model M based on the Transforme architecture is used. The deep learning model is equipped with a multi-head attention mechanism to process cross-language enterprise relationship data, multimodal data, and time series-dependent enterprise relationship data. S22: For each source field , using the corresponding enterprise relationship dataset To train the deep learning model M, the training process includes preprocessing and embedding representation of each data type; S23: During pre-training, the cross entropy loss function is used , minimize the prediction error between enterprise relations and relation labels, and introduce the structured loss of enterprise relations to capture the relationship between enterprise relations: ; in, is the distribution of the true labels of data category c, is the model's predicted distribution for data category c, where C is the total number of categories. The second term is the structured loss, which is used to optimize the relationship between enterprise relationships. , and is the predicted label of enterprise relationship i and j, is the potential score function of relation r, is the regularization parameter, is the set of enterprise relationship pairs; S24: Deep learning models simultaneously learn to process cross-language enterprise relationship data in a multi-task learning setting , multimodal data and time series dependent enterprise relational data By configuring different attention heads, we can optimize the processing of various types of data, and optimize cross-language enterprise relationships, multimodal data, and time series-dependent enterprise relationships: ; in, , and They are the loss functions for processing cross-language enterprise relations, multimodal enterprise relations, and time series dependent enterprise relations; , and It corresponds to , and The weight of .

[0042] S25: Use the validation set to evaluate the performance of the pre-trained deep learning model.

[0043] The pre-training process is as follows: (1) Initialization of model parameters Pre-trained parameter transfer: Model parameters pre-trained from the source domain are usually used as initial parameters for fine-tuning in the target domain. The parameters have been well trained in the tasks in the source domain, providing a good starting point.

[0044] Random initialization: For layers or modules that are unique to the target domain, random initialization may be required, and the parameters usually use standard initialization methods such as Xavier initialization or He initialization.

[0045] (2) Learning rate selection Gradual Adjustment: The choice of learning rate is very important during model fine-tuning. Use a smaller learning rate to avoid excessive parameter adjustments during fine-tuning that may damage the performance of the pre-trained model.

[0046] Learning rate decay: Use learning rate decay strategies, such as cosine annealing and exponential decay, to gradually reduce the learning rate during training to ensure stability in the later stages of training.

[0047] (3) Determination of regularization parameters Overfitting prevention and control: In order to prevent the model from overfitting when there is less data in the target field, the regularization parameters need to be adjusted appropriately. L2 regularization is a common method, and the optimal value is determined through cross-validation.

[0048] Adjustment for inter-domain differences: If the target domain is very different from the source domain, stronger regularization may be needed to prevent the knowledge in the source domain from negatively affecting the adaptability to the target domain.

[0049] (4) Weight parameters in multi-task learning Task weights: In a multi-task learning setting, the loss functions of different tasks (cross-language, multimodal, time series) often require different weight parameters to balance. The parameters are usually determined through grid search or Bayesian optimization methods to obtain the best balance between tasks in the target domain.

[0050] Dynamic adjustment: During training, weight parameters are dynamically adjusted based on the learning progress of each task. For example, by monitoring the loss changes of each task, weights are automatically adjusted to accelerate convergence.

[0051] (5) Adaptive parameters in the loss function Domain Adaptive Loss Function: In order to minimize the distribution difference between the source domain and the target domain, the parameters in the domain adaptive loss function need to be adjusted through experiments. For example, the weight parameters in the Kullback-Leibler divergence that measures the distribution difference between the source domain and the target domain are tuned by testing different configurations on the validation set.

[0052] Parameter adjustment in structured loss: For the structured loss of entity relations, additional parameters are introduced to control the weight of the relations, and the parameters are adjusted according to the actual needs of the domain.

[0053] It should be further explained that the S22 includes the following steps: S221: A deep learning model M based on the Transformer architecture is used. The deep learning model contains a special encoder-decoder structure, where the encoder is used to generate context-aware feature representations of different data types, and the decoder is used to predict corporate relationships and their relationships, combined with self-attention and feedforward neural networks: ; ; Among them, x represents the input feature, y represents the input of the decoder, and z represents the output of the encoder. represents the multi-head attention mechanism, Representation layer normalization; S222: For cross-language enterprise relational data , the deep learning model processes multilingual input by using a language embedding layer to map texts in different languages ​​into a common feature space for enterprise relationship learning: ; Among them, E(L) is the embedding of the original language features, and are the learned weights and biases used to transform embeddings of different languages ​​into a common feature space; S223: For multimodal data , the deep learning model integrates the multimodal fusion module, synchronously processes image and text data through the visual-text attention mechanism, and uses the interaction between image features and text features to calculate the attention weight through the following formula: ; in, represents the image query matrix, and Represent the key and value matrices of the text, is the added bias; S224: For time series dependent enterprise relational data , the deep learning model improves the sensitivity to time changes through the time-aware coding layer. The time-aware coding layer combines position coding with time tags to form a time-aware feature representation. The time-aware position coding is expressed by the following formula: ; Among them, t represents the time label, is the time frequency parameter, and PE(pos) is the position code.

[0054] S3: Select a target domain with unlabeled or partially labeled enterprise relationship data, and use a domain adaptation algorithm to adjust the pre-trained model parameters to adapt to the data characteristics and distribution of the target domain; This step specifically includes: S31: Identify target domains with unlabeled or partially labeled enterprise relational data : ; Among them, H represents the target field With any source field The heterogeneity between is the Kullback-Leibler divergence of the target domain and source domain data distribution; S32: Analyze target areas The characteristics and distribution of data in the source domain The differences between the target domain and the source domain include text structure, terminology usage, and data format, and the mean of the K key feature dimensions between the target domain and the source domain are calculated. and variance Sum of differences: ; The purpose of calculating this sum is to quantify the overall difference between the target domain and the source domain in all key feature dimensions. By summing the mean and variance differences of all feature dimensions, we get As a comprehensive indicator, it is used to guide the adjustment of model parameters in the domain adaptation step. in, Indicates the target area With source field The sum of the differences in all key feature dimensions, K is the number of feature dimensions, representing the total number of key features considered in the target and source domains. Indicates the target area The mean value in the kth feature dimension, Indicates the source domain The mean on the same feature dimension, Indicates the target area The variance in the kth feature dimension, Indicates the source domain Variance on the same feature dimension.

[0055] S33: Use domain adaptation technology to adjust the network layer structure and weights of the pre-trained deep learning model M to match the target domain Requirements: ; in, and are the model parameters before and after adjustment, is the feature difference measure, is a measure of distribution difference, is the adjustment factor; ; ; x represents each data point in the feature space, and is the probability of data point x in the target domain and the source domain; S34: Implement the domain adaptation algorithm to adapt the deep learning model to the data characteristics of the new domain by minimizing the distribution difference between the source domain and the target domain. The formula is: ; in, represents the model output before adjustment, represents the adjusted model output; is the domain adaptation loss function, which represents the mean of the output difference of the target domain data before and after the model adjustment, and N is the target domain The total number of samples in , x is a data sample in the target field, Represents the Euclidean distance or L2 norm, which is used to measure the difference between two output vectors; Here, by calculating the output difference of the target domain data before and after the model is adjusted, this difference is minimized to adapt to the data distribution of the target domain. Through this loss function, it is ensured that the model can better adapt to the data characteristics of the target domain under the adjusted parameters, thereby improving the performance of the model in the new domain.

[0056] S35: Use a small amount of labeled data or automatic labeling technology to target the target area Conduct sample labeling; In this step, a small amount of labeled data or automatic labeling technology is used to label samples in the target domain. In the process of domain adaptation, the model is fine-tuned using the existing small amount of labeled data in the target domain. The presence of labeled data helps the model adapt to the target domain more accurately. If the labeled data is small, automatic labeling technology is used to generate more training samples.

[0057] S36: Deep learning models adjusted through iterative training in target domains Monitor the performance of deep learning models when processing data in the target domain.

[0058] It should be noted that the model adjusted through iterative training is fine-tuned on the target domain, and the adjusted model needs to be further fine-tuned on the target domain data, which is completed through iterative training. In the iterative training, the parameters optimized in S34 are used as the initial values, and the parameters are continuously adjusted through training on the target domain data to ensure that the performance of the model when processing the target domain data is gradually optimized.

[0059] S4: After completing the domain adaptation of the target domain data characteristics and distribution, deploy the transfer learning algorithm to fine-tune the adjusted deep learning model; This step specifically includes: S41: In the field of completing the target After domain adaptation of data features and distribution, the transfer learning algorithm is deployed to fine-tune the adjusted deep learning model M; S42: Use target fields Fine-tune the labeled data in or the data generated by automatic labeling technology; in this step, the code is automatically adjusted; S43: Apply the gradient descent method to optimize the parameters of the deep learning model. During the fine-tuning process, the following loss function is used to update the parameters: ; in, is the true label distribution of the target domain data of category c, is the model's predicted distribution for c-category data, C is the total number of categories, R is the set of relationship types, represents the distance function between the predicted and true relationship, They represent the actual relationship and predicted relationship of relationship type r, respectively. is the weight of relation type r, is the regularization parameter; S44: Adjust the learning rate and regularization parameters to optimize the training process and apply to prevent overfitting; S45: During fine-tuning, monitor the model's performance in the target domain The performance of the deep learning model in enterprise relationship recognition and relationship extraction is evaluated through accuracy, recall and F1 score, and the transfer learning strategy is adjusted according to the performance evaluation results.

[0060] S5: Verify the performance of the fine-tuned deep learning model in the target domain; S6: Apply the fine-tuned deep learning model in the target domain to identify and extract corporate relationships and their relations in text.

[0061] This step specifically includes: S61: In the target area A fine-tuned deep learning model M is applied to identify and extract corporate relationships and their relations in the text: ; Among them, E and R represent the enterprise relationship set and relationship set respectively. is the learned parameter matrix, is the characteristic function mapping the enterprise relationship to the characteristic vector of the relationship, and Z is the normalization factor; S62: Use the deep learning model M to automatically identify the types of business relationships from the text data, including names, locations, and organizations, and identify the types of relationships between business relationships, including cooperation, subordination, and location relationships: ; In the formula, For computing entities and entities The score function of the relationship r between , is the vector representation of entity e, is a specific matrix of relation r, which is used to capture the interaction pattern between two entities under this relation. Each relation r corresponds to a different matrix , is the bias term associated with relation r, is the parameter set of the model, including the parameters of all entity vectors, relationship matrices, and bias terms.

[0062] S63: Use the enterprise relationship extraction algorithm to generate a list of enterprise relationship pairs and their relationships using the output of the deep learning model M, in the format of: ; in, The generated entity pair and A list of relationships between is the set of all possible entity and relation triples, The Sigmoid function is used to convert the relationship score into a probability. The Sigmoid function maps the score to a probability value between 0 and 1, indicating and The possibility that there is a relationship r between them.

[0063] S64: Post-processing the extracted enterprise relationships and their relationships, including relationship verification and enterprise relationship normalization; S65: Output the processed enterprise relationship and its relationship data into XML or JSON structured format: ; Among them, S represents the verified enterprise relationship and relationship set, The function converts the enterprise relationship pair into XML or JSON format; S66: Monitor the error rate and omission rate during the output process, and use an adaptive feedback mechanism to adjust the deep learning model M: ; in, and Denote the false positive and false negative sets respectively, D denotes the distance function between the predicted distribution and the true distribution, and is a weight parameter that adjusts the importance of error types.

[0064] In this step, the monitoring step comprehensively evaluates the performance of the model in the target domain through a variety of indicators and methods. The purpose is to ensure that the model can successfully adapt to the target domain and maintain efficient entity relationship extraction performance in the target domain. Through continuous monitoring and feedback, the model can dynamically adjust to meet the specific challenges of the target domain, thereby achieving stable and accurate prediction results.

[0065] like Figure 2 As shown, an embodiment of the present invention provides a transfer learning entity relationship extraction device based on domain adaptation, including a data set generation module, a pre-training module, a model adjustment module, a model fine-tuning module, a model verification module and an execution module; A data set generation module is used to select one or more source domains, identify and integrate annotated enterprise relationship data sets with diverse features and representative features in each selected source domain; wherein each annotated enterprise relationship data set includes cross-language enterprise relationship data, multimodal data, and time series-dependent enterprise relationship data; A pre-training module is used to use a deep learning model to perform pre-training on a selected source domain to learn a labeled enterprise relationship dataset in the source domain; A model adjustment module is used to select a target domain with unlabeled or partially labeled enterprise relationship data and use a domain adaptation algorithm to adjust the pre-trained model parameters to adapt to the data characteristics and distribution of the target domain; The model fine-tuning module is used to deploy the transfer learning algorithm to fine-tune the adjusted deep learning model after completing the domain adaptation of the target domain data characteristics and distribution; Model validation module, used to verify the performance of the fine-tuned deep learning model in the target domain; An execution module that applies the fine-tuned deep learning model in the target domain to identify and extract business relationships and their relations in text.

[0066] In some embodiments, the data set generation module includes a cross-language data processing unit, a multimodal data processing unit, a sequence data processing unit, and a data set generation unit; A cross-language data processing unit, used to select enterprise relationship annotations in at least two languages ​​from cross-language enterprise relationship data, and to standardize and convert enterprise relationship expressions between different languages ​​through a language adaptation algorithm; A multimodal data processing unit, used to adopt a modal conversion framework in the processing of multimodal data, synchronously extract enterprise relationship information from image and text data, and establish an association model between visual objects in the image and text descriptions; The sequence data processing unit is used to implement time-sensitive enterprise relationship extraction strategies for time-series dependent enterprise relationship data. By analyzing time-stamped sequence data, it automatically identifies enterprise relationship behaviors and interactions within a time point or time period, and then extracts the dynamic relationships between enterprise relationships that change over time; The data set generation unit is used to integrate enterprise relationship data, multimodal data and time series-dependent enterprise relationship data to construct an enterprise relationship data set.

[0067] In some embodiments, the pre-training module is specifically used to pre-train the deep learning model for each source domain using a training set of a business relationship dataset, wherein the training process includes pre-processing and embedding each data type; during the pre-training process, a cross-entropy loss function is used to minimize the prediction error between business relationships and relationship labels; the performance of the pre-trained deep learning model is evaluated using a validation set of the business relationship dataset; for cross-language business relationship data, the deep learning model processes multilingual inputs by using a language embedding layer, and maps texts in different languages ​​to a common feature space for business relationship learning; for multimodal data, the deep learning model integrates a multimodal fusion module, synchronously processes image and text data through a visual-text attention mechanism, and calculates attention weights using the interaction between image features and text features; for time series-dependent business relationship data, the deep learning model uses a time-aware coding layer to combine position coding with time tags to form a time-aware feature representation.

[0068] In some embodiments, the model adjustment module is specifically used to identify a target domain with unlabeled or partially labeled enterprise relationship data; analyze the data characteristics and distribution in the target domain, determine the differences with the source domain, and calculate the sum of the mean and variance differences between the target domain and the source domain in K key feature dimensions; use a domain adaptive algorithm to adjust the network layer structure and weights of the pre-trained deep learning model to match the needs of the target domain; calculate the output difference of the target domain data before and after the deep learning model is adjusted, and minimize the difference to adapt to the data distribution of the target domain; label samples in the target domain; iteratively train the adjusted deep learning model and continuously optimize the adjustment parameters by training on the target domain data.

[0069] In some embodiments, the model fine-tuning module is specifically used to apply the gradient descent method to optimize the parameters of the deep learning model, and the loss function is used to update the parameters during the fine-tuning process; during the fine-tuning process, the performance of the deep learning model in the target field is monitored, and the enterprise relationship recognition and relationship extraction performance of the deep learning model is evaluated by accuracy, recall rate and F1 score, and the transfer learning strategy is adjusted according to the performance evaluation results.

[0070] In some embodiments, the execution module is specifically used to automatically identify the enterprise relationship type from the text data using the deep learning model; use the enterprise relationship extraction algorithm to generate a list of enterprise relationship pairs and their relationships using the output of the deep learning model; post-process the extracted enterprise relationships and their relationships, and output the processed enterprise relationships and their relationship data into an XML or JSON structured format; Monitor the error and omission rates during the output process, and use an adaptive feedback mechanism to adjust the deep learning model.

[0071] The embodiment of the present invention also provides an electronic device, which includes: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus. The communication bus can be used for information transmission between the electronic device and the sensor. The processor can call the logic instructions in the memory to execute the following method: select one or more source fields, identify and integrate the labeled enterprise relationship data sets with diverse features and representative features in each selected source field; wherein each labeled enterprise relationship data set includes cross-language enterprise relationship data, multimodal data and time series dependent enterprise relationship data; use a deep learning model to pre-train on the selected source field to learn the labeled enterprise relationship data set in the source field; select a target field with unlabeled or partially labeled enterprise relationship data, use a domain adaptation algorithm to adjust the pre-trained model parameters to adapt to the data characteristics and distribution of the target field; after completing the field adaptation of the target field data characteristics and distribution, deploy a transfer learning algorithm to fine-tune the adjusted deep learning model; verify the performance of the fine-tuned deep learning model in the target field; apply the fine-tuned deep learning model in the target field to identify and extract enterprise relationships and their relationships in the text.

[0072] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0073] An embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute the method provided by the above method embodiment, for example, including: selecting one or more source domains, identifying and integrating labeled enterprise relationship data sets with diverse features and representative features in each selected source domain; wherein each labeled enterprise relationship data set includes cross-language enterprise relationship data, multimodal data and time series-dependent enterprise relationship data; using a deep learning model to perform pre-training on the selected source domain to learn the labeled enterprise relationship data sets in the source domain; selecting a target domain with unlabeled or partially labeled enterprise relationship data, and using a domain adaptation algorithm to adjust the pre-trained model parameters to adapt to the data characteristics and distribution of the target domain; after completing the domain adaptation of the target domain data characteristics and distribution, deploying a transfer learning algorithm to fine-tune the adjusted deep learning model; verifying the performance of the fine-tuned deep learning model in the target domain; and applying the fine-tuned deep learning model in the target domain to identify and extract enterprise relationships and their relationships in text.

[0074] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0075] An embodiment of the domain-adaptive transfer learning entity relationship extraction device provided in an embodiment of the present invention belongs to the same inventive concept as the domain-adaptive transfer learning entity relationship extraction method in the above-mentioned embodiments. For details not described in detail in the embodiment of the domain-adaptive transfer learning entity relationship extraction device, refer to the embodiment of the domain-adaptive transfer learning entity relationship extraction method in the above-mentioned embodiments.

[0076] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.

Claims

1. A method for extracting entity relations based on domain-adaptive transfer learning, characterized in that: include: Select one or more source domains, identify and integrate annotated enterprise relationship data sets with diverse features and representative features in each selected source domain; wherein each annotated enterprise relationship data set includes cross-language enterprise relationship data, multimodal data, and time series-dependent enterprise relationship data; Use deep learning models to pre-train on the selected source domain and learn the labeled enterprise relationship dataset in the source domain; Select a target domain with unlabeled or partially labeled enterprise relationship data, and use a domain adaptation algorithm to adjust the pre-trained model parameters to adapt to the data characteristics and distribution of the target domain; After completing domain adaptation of the target domain data characteristics and distribution, deploy the transfer learning algorithm to fine-tune the adjusted deep learning model; Verify the performance of the fine-tuned deep learning model in the target domain; Apply fine-tuned deep learning models in the target domain to identify and extract business relationships and their relations in text.

2. The entity relationship extraction method based on domain adaptation transfer learning according to claim 1 is characterized in that: The steps of selecting one or more source domains, identifying and integrating annotated enterprise relationship datasets with diverse and representative features in each selected source domain include: For cross-language enterprise relationship data, enterprise relationship annotations in at least two languages ​​are selected, and the enterprise relationship expressions between different languages ​​are standardized and converted through language adaptation algorithms; In the processing of multimodal data, a modal conversion framework is used to simultaneously extract enterprise relationship information from image and text data, and establish an association model between visual objects in images and text descriptions; For time-series dependent enterprise relationship data, a time-sensitive enterprise relationship extraction strategy is implemented to automatically identify enterprise relationship behaviors and interactions within a time point or time period by analyzing time-stamped sequence data, and then extract the dynamic relationships between enterprise relationships that change over time; An enterprise relationship dataset is constructed by integrating enterprise relationship data, multimodal data and time series-dependent enterprise relationship data.

3. The entity relationship extraction method based on domain adaptation transfer learning according to claim 2 is characterized in that: The deep learning model is pre-trained on the selected source domain. The steps of learning the labeled enterprise relationship dataset in the source domain include: For each source domain, the deep learning model is pre-trained using the training set of the enterprise relationship dataset, where the training process includes pre-processing and embedding representation of each data type; During the pre-training process, the cross entropy loss function is used to minimize the prediction error between enterprise relationships and relationship labels; The performance of the pre-trained deep learning model is evaluated using the validation set of the enterprise relationship dataset.

4. The method for extracting entity relations based on domain-adaptive transfer learning according to claim 3, characterized in that: For each source domain, the steps for pre-training the deep learning model using the training set of the enterprise relationship dataset include: For cross-language enterprise relationship data, the deep learning model processes multilingual inputs by using a language embedding layer to map texts in different languages ​​into a common feature space for enterprise relationship learning. For multimodal data, the deep learning model integrates a multimodal fusion module to simultaneously process image and text data through a visual-text attention mechanism, and calculates attention weights using the interaction between image features and text features; For time series dependent enterprise relational data, the deep learning model uses a time-aware encoding layer to combine position encoding with time tags to form a time-aware feature representation.

5. The method for extracting entity relations based on domain-adaptive transfer learning according to claim 4, characterized in that: The steps of selecting a target domain with unlabeled or partially labeled enterprise relationship data and using a domain adaptation algorithm to adjust the pre-trained model parameters to adapt to the data characteristics and distribution of the target domain include: Identify target domains with unlabeled or partially labeled enterprise relational data; Analyze the data characteristics and distribution in the target domain, determine the differences with the source domain, and calculate the sum of the mean and variance differences between the target domain and the source domain in K key feature dimensions; Use domain adaptive algorithms to adjust the network layer structure and weights of pre-trained deep learning models to match the needs of the target domain; By calculating the output difference of the target domain data before and after the deep learning model is adjusted, and minimizing the difference to adapt to the data distribution of the target domain; Label samples in the target area; The deep learning model adjusted through iterative training continuously optimizes and adjusts parameters by training on the target domain data.

6. The method for extracting entity relations based on domain-adaptive transfer learning according to claim 5, characterized in that: After completing domain adaptation of the target domain data characteristics and distribution, the steps of deploying the transfer learning algorithm to fine-tune the adjusted deep learning model include: The gradient descent method is used to optimize the parameters of the deep learning model, and the loss function is used to update the parameters during fine-tuning; During the fine-tuning process, monitor the performance of the deep learning model in the target domain, evaluate the enterprise relationship recognition and relationship extraction performance of the deep learning model through accuracy, recall rate and F1 score, and adjust the transfer learning strategy based on the performance evaluation results.

7. The method for extracting entity relations based on domain-adaptive transfer learning according to claim 6, characterized in that: The steps to apply the fine-tuned deep learning model in the target domain to identify and extract business relationships and their relations in text include: Use deep learning models to automatically identify corporate relationship types from text data; The enterprise relationship extraction algorithm is used to generate a list of enterprise relationship pairs and their relationships using the output of the deep learning model; Post-process the extracted enterprise relationships and their relationships, and output the processed enterprise relationships and their relationship data into XML or JSON structured format; Monitor the error and omission rates during the output process, and use an adaptive feedback mechanism to adjust the deep learning model.

8. A transfer learning entity relationship extraction device based on domain adaptation, characterized in that: It includes a data set generation module, a pre-training module, a model adjustment module, a model fine-tuning module, a model verification module and an execution module; A data set generation module is used to select one or more source domains, identify and integrate annotated enterprise relationship data sets with diverse features and representative features in each selected source domain; wherein each annotated enterprise relationship data set includes cross-language enterprise relationship data, multimodal data, and time series-dependent enterprise relationship data; A pre-training module is used to use a deep learning model to perform pre-training on a selected source domain to learn a labeled enterprise relationship dataset in the source domain; A model adjustment module is used to select a target domain with unlabeled or partially labeled enterprise relationship data and use a domain adaptation algorithm to adjust the pre-trained model parameters to adapt to the data characteristics and distribution of the target domain; The model fine-tuning module is used to deploy the transfer learning algorithm to fine-tune the adjusted deep learning model after completing the domain adaptation of the target domain data characteristics and distribution; Model validation module, used to verify the performance of the fine-tuned deep learning model in the target domain; An execution module that applies the fine-tuned deep learning model in the target domain to identify and extract business relationships and their relations in text.

9. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the domain-adaptive transfer learning entity relationship extraction method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the domain-adaptive transfer learning entity relationship extraction method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Transform model training method and device, electronic equipment and readable storage medium

    CN119807714A

  • Training Method, Device, Electronic Device and Readable Storage Medium for Transformer Model

    CN119807714B

  • Process knowledge graph intelligent construction method based on cross-domain transfer learning

    CN121480655A

  • Process knowledge graph intelligent construction method based on cross-domain transfer learning

    CN121480655B