A domain adaptation method and system based on a knowledge graph and continuous learning
By using knowledge graphs and continuous learning methods, we can achieve continuous and stable expansion of cross-domain knowledge, which solves the problem of accuracy decline of unsupervised domain adaptation methods when the target domain image data changes. This improves the applicability and learning efficiency of robots in cross-media scenarios and enhances the knowledge sharing and collaboration capabilities of robot teams.
Patent Information
- Application Number
- CN202311373268.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-10-20
AI Technical Summary
Existing unsupervised domain adaptation methods suffer from a significant drop in accuracy when the target domain image data changes suddenly and the time to access the new target domain image is short, which limits the applicability and generalization ability of robots in cross-media scenarios.
We employ a knowledge graph-based and continuous learning approach. By using a cross-domain knowledge graph model, we transfer knowledge from historical target domain image data to current target domain image data. We also achieve continuous learning of knowledge through cross-domain knowledge re-memory to prevent category forgetting of cross-domain images. We optimize the loss function using node embedding similarity measurement and contrastive learning to improve generalization ability.
It improves the robot's adaptability in cross-domain scenarios, alleviates the problem of category forgetting, enhances the robot's learning efficiency and task completion ability in constantly changing environments, and promotes knowledge sharing and collaboration among robots.
Smart Images

Figure CN117611871B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a domain adaptation method and system based on knowledge graphs and continuous learning. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] With the increasing prevalence of robotic applications, unsupervised domain adaptation (UDA) has become a research hotspot for improving robot performance during new task learning. Existing UDA methods often assume that all target domain images and other data are available in advance during training. However, in practical applications, learning and application needs vary across different scenarios, and image data often appears as data streams from different scenarios. The knowledge differences and variability between different scenarios pose challenges to algorithms used in robotics applications, especially since traditional machine learning algorithms typically perform well only in specific scenarios, with significant performance degradation in other scenarios. This limits the generalization ability and practical application scope of the algorithms. Generally, in robotics applications, the target domain image data is learned by the model only once, resulting in limited performance improvement. Although traditional UDA methods may perform better on new target domain images after sufficient adaptation, their accuracy drops significantly when the target domain image data changes abruptly and the exposure time to the new target domain image is short.
[0004] Therefore, how to continuously learn and adapt from new images and other data to make cross-media scenarios more widely applicable has become an urgent technical problem to be solved. Summary of the Invention
[0005] To address the shortcomings of existing technologies, the purpose of this invention is to provide a domain adaptation method and system based on knowledge graphs and continuous learning, which can achieve continuous and stable expansion of cross-domain knowledge and improve the robot's adaptability to cross-domain scenarios.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solution:
[0007] The first aspect of this invention provides a domain adaptation method based on knowledge graphs and continuous learning, comprising the following steps:
[0008] Obtain the target domain image data sequence, and perform cross-domain image entity recognition and relation extraction on the historical target domain image data sequence;
[0009] Based on the extracted entity identification and relationships, a cross-domain knowledge graph model is constructed using the node embedding similarity measurement method;
[0010] A cross-domain knowledge graph model is used to transfer knowledge from historical target domain image data to current target domain image data. During the knowledge transfer process, continuous learning of knowledge is achieved through cross-domain knowledge re-memory. Based on continuous learning, comparative learning through cross-domain knowledge graphs is used to prevent the forgetting of cross-domain image categories.
[0011] Furthermore, for a sequence of t target domain image data, the historical image data consists of t-1 target domain image data, and the current target domain image is the t-th target domain image data. The specific steps for cross-domain image entity recognition and relation extraction on the historical target domain image data sequence are as follows:
[0012] Historical target domain image data and partial image feature data from the source domain are extracted and stored in memory. The image feature data serves as category surrogate points, which contain entity and relationship information from the previously established knowledge graph.
[0013] Furthermore, the specific steps for constructing a cross-domain knowledge graph model using node embedding similarity measurement methods are as follows:
[0014] By embedding nodes into the category surrogate points, the category surrogate points are transformed into low-dimensional vector representations;
[0015] Calculate the similarity between low-dimensional vectors;
[0016] Establish cross-domain knowledge graphs based on similarity.
[0017] Furthermore, the specific steps for transferring knowledge from historical target domain image data to current target domain image data using a cross-domain knowledge graph model are as follows:
[0018] A similarity graph is constructed based on the feature relationships between historical target domain image data, and a cross-domain knowledge graph is built on this basis;
[0019] Based on a batch of N image samples in a current domain t. Create a similarity instance graph;
[0020] By connecting a cross-domain knowledge graph model with a similarity instance graph, a fused knowledge graph is obtained.
[0021] Furthermore, during the prediction of the current target domain image data features using the fused knowledge graph, a loss function with entropy minimization as the optimization objective is established to ensure the generalization ability of the current target domain image data.
[0022] Furthermore, the specific steps for achieving continuous learning of knowledge through cross-domain knowledge re-memorization are as follows:
[0023] Select a pair of similar image nodes or subgraphs as positive sample pairs from cross-domain knowledge graphs and similarity instance graphs;
[0024] Select a pair of image nodes or subgraphs whose cosine distance is less than a specific threshold from the cross-domain knowledge graph and similarity instance graph as negative sample pairs;
[0025] The loss function for contrastive learning is defined based on positive and negative sample pairs.
[0026] A second aspect of the present invention provides a domain adaptation system based on knowledge graphs and continuous learning, comprising:
[0027] The feature extraction module is configured to acquire target domain image data sequences and perform cross-domain image entity recognition and relation extraction on historical target domain image data sequences.
[0028] The cross-domain knowledge graph model building module is configured to build a cross-domain knowledge graph model based on the extracted entity recognition and relationships, using a node embedding similarity measurement method.
[0029] The knowledge transfer module is configured to utilize a cross-domain knowledge graph model to transfer knowledge from historical target domain image data to current target domain image data. During this transfer process, continuous learning is achieved through cross-domain knowledge re-memorization. Furthermore, comparative learning using the cross-domain knowledge graph addresses the problem of category forgetting in cross-domain images.
[0030] A third aspect of the present invention provides a medium having a program stored thereon, which, when executed by a processor, implements the steps of the domain adaptation method based on knowledge graphs and continuous learning as described in the first aspect of the present invention.
[0031] A fourth aspect of the present invention provides an apparatus including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the domain adaptation method based on knowledge graphs and continuous learning as described in the first aspect of the present invention.
[0032] The above one or more technical solutions have the following beneficial effects:
[0033] This invention discloses a domain adaptation method and system based on knowledge graphs and continuous learning. In robotic scenarios, when faced with new cross-domain tasks, this method can leverage existing knowledge graph structures to infer and apply previously learned knowledge, thereby accelerating the robot's learning speed and improving performance. Secondly, the knowledge graph structure can also promote knowledge sharing and collaboration among robots. When multiple robots work together, they can transfer and acquire knowledge from each other by sharing the knowledge graph structure. This collaboration improves the learning efficiency and task completion ability of the entire robot team. In summary, the transfer and generalization capabilities of this method enable robots to better handle unknown situations and maintain high efficiency and flexibility in constantly changing environments.
[0034] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0035] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0036] Figure 1 This is a flowchart of the domain adaptation method based on knowledge graphs and continuous learning in Embodiment 1 of the present invention;
[0037] Figure 2 This is a cross-domain knowledge graph structure diagram in Embodiment 1 of the present invention. Detailed Implementation
[0038] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0039] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0040] Example 1:
[0041] To address the significant drop in accuracy of existing unsupervised domain adaptation algorithms when target domain image data changes abruptly and the exposure time to new target domain images is short, and to enable continuous learning and adaptation from new image and other data, thus broadening applicability across media scenarios, this embodiment explores a new practical task called continuous learning domain adaptation. This scenario allows the robot to update and expand its knowledge based on constantly changing environments and task requirements, enabling it to continuously learn and adapt to new situations, thereby providing more intelligent and personalized services. In this task, labeled source domain image samples are always available, but unlabeled target domain image samples from different scenarios change gradually, and only one target domain image sample dataset is available at a time. This leads to the forgetting of knowledge from previous target domain images during subsequent adaptation to new target domain image data.
[0042] To address the aforementioned issues, this embodiment employs the following technical solution: improving the generalization performance of new target domain image data during and before training, while simultaneously achieving effective adaptation of the target domain images and mitigating forgetting; in continuous learning domain adaptation, assuming a labeled source domain image dataset... in, and N represents the input image and the distribution of the corresponding labels, respectively. s Let K represent the number of image samples, and K be the number of image data categories. Assume there is a continuously arriving sequence of target domain image data. Where T represents the total number of target domains. The t-th target domain contains There are image data samples, but no label y, i.e. Furthermore, all target domain images share the same label space as source domain images. The t-th target domain image T... t The generalization performance depends on the previously seen t-1 target domain images and source domain images, i.e. This embodiment also includes a sample memory M for storing category surrogate points for each target domain image data in ST. The learning model is first trained on images in a labeled source domain, and then trained on a series of continuously appearing unlabeled target domain images.
[0043] Building upon the source domain model, this paper employs a knowledge graph-based continuous learning domain adaptation method to effectively extract knowledge from previously learned t-1 target domain image data and train it on the t-th target domain image. This model uses a knowledge graph structure to jointly model a cross-domain image knowledge graph, providing good model performance (target domain adaptation performance) and maintaining good performance on the previously trained domain after training on other target domain images (forgetting mitigation performance). The knowledge graph-based continuous learning domain adaptation possesses three key capabilities: cross-domain knowledge graph representation, cross-domain knowledge graph transfer, and contrastive learning of cross-domain knowledge graphs. The structure of the knowledge graph representation plays a crucial role in stabilizing memory, and transfer during knowledge graph updates promotes the effective utilization of cross-domain image knowledge. Based on this, to address the problem of cross-domain category forgetting, this embodiment proposes contrastive learning of cross-domain knowledge graphs. Detailed steps are shown below.
[0044] Embodiment 1 of this invention provides a domain adaptation method based on knowledge graphs and continuous learning. To enhance the applicability of robots in cross-media scenarios, a continuous learning domain adaptation task was studied. In this task, the target domain image data is learned by the model only once, often leading to knowledge forgetting of previous target domain image samples during subsequent adaptation to new target domain image samples. Continuous learning domain adaptation faces two new challenges: 1) the current target domain image is previously unseen; 2) previously seen target domain image samples are unusable in subsequent adaptations. To better address continuous learning domain adaptation, a continuous knowledge representation model based on knowledge graph structures was investigated to further suppress the catastrophic forgetting problem of representations during network learning. A novel continuous learning domain adaptation method based on knowledge graph structures was developed to utilize the inherent relationship between source and target domain images.
[0045] like Figure 1 As shown, the specific steps include:
[0046] Step 1: Obtain the target domain image data sequence and perform cross-domain image entity recognition and relation extraction on the historical target domain image data sequence.
[0047] Step 2: Based on the extracted entity identification and relationships, construct a cross-domain knowledge graph model using the node embedding similarity measurement method.
[0048] Step 3: Use a cross-domain knowledge graph model to transfer knowledge from historical target domain image data to current target domain image data. During the knowledge transfer process, continuous learning of knowledge is achieved through cross-domain knowledge re-memory. Based on continuous learning, comparative learning through cross-domain knowledge graphs is used to prevent the forgetting of cross-domain image categories.
[0049] In step 1, for a sequence of t different target domain image data, the historical target domain image data consists of t-1 target domain image data, and the current target domain image is the t-th target domain image data. In this embodiment, images from different scene domains are used as image data sequences.
[0050] The establishment of a cross-domain knowledge graph model aims to integrate knowledge from images across different domains into a unified knowledge graph, enabling reasoning and application of knowledge in various scenarios. The establishment of the knowledge graph requires entity recognition and relation extraction from cross-domain images. This means extracting entities and their relationships from image data from different scene domains. The specific steps for performing cross-domain entity recognition and relation extraction on historical target domain image data sequences are as follows:
[0051] For the t-th target domain image data, extract the previously trained t-1 historical target domain image data and partial image feature data from the source domain, and store them in memory. The image feature data consists of (t-1)*K class surrogate points. Category proxy points contain entity and relationship information from the previously established knowledge graph.
[0052] In step 2, in order to build a cross-domain knowledge graph, a node embedding similarity metric can be used.
[0053] The specific steps for constructing a cross-domain knowledge graph model using node embedding similarity measurement methods are as follows:
[0054] By embedding nodes into the category surrogate points, the category surrogate points are transformed into low-dimensional vector representations;
[0055] Calculate the similarity between low-dimensional vectors:
[0056]
[0057] Establish cross-domain knowledge graphs based on similarity, such as Figure 2 As shown, θ represents the parameters of the training network, and the vertex distribution describes the process in which the initial vertex distribution gradually changes as the sequence increases.
[0058] After calculating the similarity, a cross-domain knowledge graph is built based on the similarity. Since this knowledge graph is built from cross-domain images, it integrates knowledge from images in different domains.
[0059] Based on this, a cross-domain knowledge graph is established. This allows for knowledge reasoning and application in different scenarios. The establishment of a knowledge graph model integrates knowledge from different domain images into a unified knowledge graph, facilitating knowledge reasoning and application, and enabling better understanding and utilization of knowledge from different domain images.
[0060] In step 3, the specific steps for transferring knowledge from historical target domain image data to current target domain image data using a cross-domain knowledge graph model are as follows:
[0061] A similarity map is constructed based on the feature relationships between historical target domain image data;
[0062] Based on a batch of N image samples in a current domain t. Create a similarity instance graph;
[0063] By connecting a cross-domain knowledge graph model with a similarity instance graph, a fused knowledge graph is obtained.
[0064] The fused knowledge graph is used to predict the features of the current target domain image data.
[0065] More specifically, in the current t-th target domain image data, the previous t-1 historical knowledge can be transferred to the current target domain image data training process. For the t-1-th knowledge graph... Combine the image data in the current target domain t with the knowledge graph from the previous t-1. A connection is made to inherit previous knowledge. Specifically, this is done to process N batches of image samples in the current domain t. First, the extracted features are defined as follows: A similarity graph A can be constructed based on the relationships between them. t :
[0066]
[0067] First, the relationships between these image samples are studied using an instance-level fully connected graph, namely the similarity example graph. Let A represent these relationships. t It is an edge set, and the extracted features are used as vertices V in the graph. t Two vertices and The edge between Based on the similarity distance between them Perform the measurement. Similarity instance graph. It can reflect the similarity and relationships between image samples, providing guidance for knowledge transfer. Next, we will explore cross-domain knowledge graphs. Similarity Instance Diagram Connect the data and perform graph convolution operations. This allows the knowledge graph to pass on previous knowledge to each current sample, better adapting it to the current target domain image.
[0068] After information transfer, by learning the structural information in the knowledge graph, structural information can be transferred and expressed, leading to a better understanding and utilization of the relationships between entities in the knowledge graph. The current t-th target domain image contains the relationships between previous knowledge and the current image sample, which helps to better utilize historical knowledge to support knowledge transfer between the current target domain and source domain images.
[0069] In the process of predicting the features of the current target domain image data using the fused knowledge graph, a loss function with entropy minimization as the optimization objective is established to ensure the generalization ability of the current target domain image data.
[0070] Specifically, the current t-th target domain image is compared with the knowledge graph. The characteristics after fusion are This feature is predicted by fusing knowledge from previous knowledge graphs. Based on this, we establish an entropy minimization optimization objective:
[0071]
[0072] The loss function described above ensures the transfer of previous cross-domain knowledge, thereby improving the generalization ability of the current target domain image.
[0073] In this embodiment, to address the problem of category forgetting in cross-domain images, a contrastive learning framework based on knowledge graphs is proposed. This mechanism is a technique for learning similarities and differences for cross-domain image knowledge re-memorization. It utilizes knowledge graphs... Similarity Instance Diagram Graph-level representations are learned by analyzing the similarities and differences between different image nodes or subgraphs to re-memorize historical information and perform knowledge distillation between images from different domains. The specific steps for achieving continuous knowledge learning through cross-domain knowledge re-memorization are as follows:
[0074] (1) First, construct positive image sample pairs from cross-domain knowledge graphs. Similarity Instance Diagram We select a pair of similar image nodes or subgraphs as positive sample pairs. These positive sample pairs can be measured based on the node similarity between the two graphs.
[0075] (2) Construct negative sample pairs from cross-domain knowledge graphs. Similarity Instance Diagram Select a pair of image nodes or subgraphs whose cosine distance is less than a specific threshold of 0.8 as negative sample pairs.
[0076] (3) Define the loss function for contrastive learning based on positive and negative sample pairs.
[0077] After defining positive and negative samples, for the similarity instance graph Image nodes in The corresponding positive samples in the knowledge graph are The negative sample set is Define the following contrastive learning loss function:
[0078]
[0079] By optimizing the loss function, positive sample pairs become closer in the embedding space, while negative sample pairs are further apart. This reduces the catastrophic forgetting of old class knowledge when learning new target image categories and improves the model's performance.
[0080] Combining the two loss functions mentioned above, the training objective function is obtained as follows:
[0081]
[0082] After establishing the objective function, backpropagation using stochastic gradient descent, a technique employed in deep learning, can continuously improve the performance of this method. Stochastic gradient descent is an optimization algorithm that updates the model's parameters by calculating the gradient of the objective function, guiding it towards a better outcome.
[0083] The method in this embodiment mitigates the catastrophic forgetting of known target domain images and exhibits strong adaptability to unseen domain images. It can continuously accumulate knowledge from old domains to achieve better generalization ability on any new domain. Based on this, a new evaluation metric is provided for the continuous learning domain adaptation task. Specifically, for the t-th target domain image data, the harmonic average of its accuracy and knowledge retention ability is obtained.
[0084]
[0085] Here, DA t FA is the accuracy of the t-th target domain image data. t This represents the accuracy of the model on the first t-1 target domain images when training to the t-th target domain image data. It measures the model's ability to memorize and accumulate knowledge. β is a parameter that controls the model's performance in DA. t and FA t A trade-off between them; smaller β values (β<1) place greater emphasis on DA. t Larger β values (β>1) will place greater emphasis on FA. t .
[0086] This embodiment, through careful design and optimization of the algorithm, achieves a high generalization evaluation accuracy (DA) for target domain image data.t And the ability to memorize knowledge (FA) t and harmonic mean index All methods achieved excellent results, effectively addressing the generalization problem of target domain image data while maintaining good knowledge retention. To verify the effectiveness of the method in this embodiment, it was validated on the Digits, PACS, and DomainNet datasets. The results showed that the method achieved very good generalization and retention capabilities on image datasets, with an accuracy of DA. t And the ability to memorize knowledge (FA) t With a memorization rate exceeding 80%, our method can better adapt to different image datasets and tasks, thereby improving overall performance and effectiveness. In addition to validation on image classification datasets, further experiments were conducted on more challenging object detection datasets such as Pascal VOC, ImageNet, and MS-COCO. These experiments yielded high harmonic mean scores. This further demonstrates the superior generalization and memory capabilities of the method in this embodiment.
[0087] Furthermore, this method is also applied in robotic scenarios. When faced with new cross-domain tasks, it can leverage existing knowledge graph structures to infer and apply previously learned knowledge, thereby accelerating the robot's learning speed and improving performance. Secondly, the knowledge graph structure can also facilitate knowledge sharing and collaboration among robots. When multiple robots work together, they can transfer and acquire knowledge from each other by sharing the knowledge graph structure. This collaboration improves the learning efficiency and task completion ability of the entire robot team. Therefore, the transfer and generalization capabilities of this method enable robots to better handle unknown situations and remain efficient and flexible in constantly changing environments.
[0088] Example 2:
[0089] Embodiment 2 of the present invention provides a domain adaptation system based on knowledge graphs and continuous learning, comprising:
[0090] The feature extraction module is configured to acquire target domain image data sequences and perform cross-domain image entity recognition and relation extraction on historical target domain image data sequences.
[0091] The cross-domain knowledge graph model building module is configured to build a cross-domain knowledge graph model based on the extracted entity recognition and relationships, using a node embedding similarity measurement method.
[0092] The knowledge transfer module is configured to utilize a cross-domain knowledge graph model to transfer knowledge from historical target domain image data to current target domain image data. During this transfer process, continuous learning is achieved through cross-domain knowledge re-memorization. Furthermore, comparative learning using the cross-domain knowledge graph addresses the problem of category forgetting in cross-domain images.
[0093] Example 3:
[0094] Embodiment 3 of the present invention provides a medium on which a program is stored, which, when executed by a processor, implements the steps in the domain adaptation method based on knowledge graphs and continuous learning as described in Embodiment 1 of the present invention.
[0095] Example 4:
[0096] Embodiment 4 of the present invention provides a device including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the domain adaptation method based on knowledge graph and continuous learning as described in Embodiment 1 of the present invention.
[0097] The steps and methods involved in Examples 2, 3 and 4 above correspond to those in Example 1. For specific implementation details, please refer to the relevant description section of Example 1.
[0098] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0099] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A domain adaptation method based on knowledge graphs and continuous learning, characterized in that, Includes the following steps: Obtain the target domain image data sequence, and perform cross-domain image entity recognition and relation extraction on the historical target domain image data sequence and the source domain; specifically: extract some image feature data from the historical target domain image data and the source domain, and store them in the memory, where the image feature data are category surrogate points, and the category surrogate points contain entity and relation information from the previously established knowledge graph; Based on the extracted entity identification and relationships, a cross-domain knowledge graph model is constructed using the node embedding similarity measurement method; The specific steps for constructing a cross-domain knowledge graph model using the node embedding similarity measurement method are as follows: By embedding nodes into the category surrogate points, the category surrogate points are transformed into low-dimensional vector representations; Calculate the similarity between low-dimensional vectors; Establish cross-domain knowledge graphs based on similarity; A cross-domain knowledge graph model is used to transfer knowledge from historical target domain image data to current target domain image data. During the knowledge transfer process, continuous learning of knowledge is achieved through cross-domain knowledge re-memory. Based on continuous learning, comparative learning through cross-domain knowledge graph is used to prevent the forgetting of cross-domain image categories. The specific steps for transferring knowledge from historical target domain image data to current target domain image data using a cross-domain knowledge graph model are as follows: A similarity map is constructed based on the feature relationships between historical target domain image data; By connecting a cross-domain knowledge graph model with a similarity graph, a fused knowledge graph is obtained. The fused knowledge graph is used to predict the features of the current target domain image data; The specific steps to achieve continuous learning of knowledge through cross-domain knowledge re-memorization are as follows: Select a pair of similar image nodes or subgraphs as positive sample pairs from cross-domain knowledge graphs and similarity instance graphs; Select a pair of image nodes or subgraphs whose cosine distance is less than a specific threshold from the cross-domain knowledge graph and similarity instance graph as negative sample pairs; The loss function for contrastive learning is defined based on positive and negative sample pairs.
2. The domain adaptation method based on knowledge graphs and continuous learning as described in claim 1, characterized in that, For a target domain image data sequence containing t images, the historical target domain image data consists of t-1 target domain image data, and the current target domain image is the t-th target domain image data.
3. The domain adaptation method based on knowledge graphs and continuous learning as described in claim 1, characterized in that, In the process of predicting the features of the current target domain image data using the fused knowledge graph, a loss function with entropy minimization as the optimization objective is established to ensure the generalization ability of the current target domain image data.
4. A domain adaptation system based on knowledge graphs and continuous learning, characterized in that, include: The feature extraction module is configured to acquire target domain image data sequences and perform cross-domain image entity recognition and relation extraction on historical target domain image data sequences and source domain images. Specifically, it extracts partial image feature data from historical target domain image data and source domain images and stores them in memory. The image feature data are category surrogate points, which contain entity and relation information from the previously established knowledge graph. The cross-domain knowledge graph model construction module is configured to construct a cross-domain knowledge graph model based on extracted entity recognition and relationships, using a node embedding similarity measurement method. The specific steps for constructing the cross-domain knowledge graph model using the node embedding similarity measurement method are as follows: By embedding nodes into the category surrogate points, the category surrogate points are transformed into low-dimensional vector representations; Calculate the similarity between low-dimensional vectors; Establish cross-domain knowledge graphs based on similarity; The knowledge transfer module is configured to use a cross-domain knowledge graph model to transfer knowledge from historical target domain image data to current target domain image data. During the knowledge transfer process, continuous learning of knowledge is achieved through cross-domain knowledge re-memorization. The specific steps for transferring knowledge from historical target domain image data to current target domain image data using a cross-domain knowledge graph model are as follows: A similarity map is constructed based on the feature relationships between historical target domain image data; By connecting a cross-domain knowledge graph model with a similarity graph, a fused knowledge graph is obtained. The fused knowledge graph is used to predict the features of the current target domain image data; The specific steps to achieve continuous learning of knowledge through cross-domain knowledge re-memorization are as follows: Select a pair of similar image nodes or subgraphs as positive sample pairs from cross-domain knowledge graphs and similarity instance graphs; Select a pair of image nodes or subgraphs whose cosine distance is less than a specific threshold from the cross-domain knowledge graph and similarity instance graph as negative sample pairs; The loss function for contrastive learning is defined based on positive and negative sample pairs.
5. A computer-readable storage medium, characterized in that, It stores multiple instructions, which are adapted to be loaded and executed by the processor of the terminal device according to any one of claims 1-3, the domain adaptation method based on knowledge graph and continuous learning.
6. A terminal device, characterized in that, It includes a processor and a computer-readable storage medium, the processor being used to implement various instructions; the computer-readable storage medium being used to store multiple instructions adapted for loading and execution by the processor of the domain adaptation method based on knowledge graphs and continuous learning as described in any one of claims 1-3.
Citation Information
Patent Citations
Unsupervised transfer learning method based on graph convolution network
CN110717526A
Source free domain adaptive target detection method and system based on multi-graph contrast learning
CN116895002A
