Remote Sensing Text Similarity Calculation Method Based on Knowledge Graph and Comparative Learning
By constructing a knowledge graph in the remote sensing domain and training a simple contrastive learning word embedding model, and combining the knowledge graph and contrastive learning methods, word vectors with discriminative power are generated. This solves the problems of accuracy and applicability in remote sensing text similarity calculation, and achieves more efficient semantic information capture and model generalization.
Patent Information
- Application Number
- CN202411678241.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-11-22
AI Technical Summary
Existing methods for calculating text similarity in the field of remote sensing suffer from limited vocabulary coverage and insufficient word vector discriminative power, resulting in poor accuracy and applicability of the calculation results.
A knowledge graph in the remote sensing domain is constructed and a simple contrastive learning word embedding model is trained. Word vectors are obtained by combining the knowledge graph and contrastive learning. Cosine similarity is used to calculate weighted summation, generating word vectors with discriminative power to improve the accuracy and applicability of similarity calculation.
It improves the accuracy and applicability of remote sensing text similarity calculation, enhances the model's generalization ability, and can accurately capture the semantic information of text in the remote sensing field, making it suitable for data recommendation services.
Smart Images

Figure CN119538903B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of remote sensing science and natural language processing technology, specifically a method for calculating the similarity of remote sensing text based on knowledge graphs and contrastive learning. Background Technology
[0002] Currently, text similarity calculations in the remote sensing field primarily rely on models such as word2vec and BERT to obtain word vectors, and then measure text similarity by calculating cosine distance, Euclidean distance, and other similarity metrics between these word vectors. However, these methods have significant limitations. Specifically, word2vec-based methods cannot cover words not present in the corpus when calculating similarity, thus limiting the computational scope. While BERT-based methods are not limited by the corpus, the resulting embedding vectors have low discriminative power, leading to insufficient accuracy in similarity calculations.
[0003] Therefore, how to learn the semantic relationships between words and generate word vectors with discriminative power, improve the accuracy and applicability of text similarity calculation, and enhance the generalization ability of the model have become urgent problems to be solved in the fields of remote sensing science and natural language processing technology. Summary of the Invention
[0004] To address the aforementioned issues, this invention proposes a remote sensing text similarity calculation method based on knowledge graphs and contrastive learning. This method can solve the problems of existing methods having low word vector discriminative power, poor accuracy of similarity calculation results, and limited applicability when calculating text similarity in the remote sensing field.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solution:
[0006] This invention relates to a remote sensing text similarity calculation method based on knowledge graphs and contrastive learning, comprising the following operations:
[0007] Remote sensing text data was collected from data websites and journal articles related to the field of remote sensing using web crawling tools. A knowledge graph of the field of remote sensing was constructed based on the remote sensing text data, and a simple contrastive learning word embedding model was trained.
[0008] Obtain remote sensing words whose similarity is to be calculated, determine the corresponding word vectors based on the knowledge graph of the remote sensing domain, and determine the corresponding word vectors based on the simple contrastive learning word embedding model based on the simple contrastive learning word embedding model.
[0009] The cosine similarity calculation method is used to calculate the corresponding similarity based on the knowledge graph based word vectors, and the similarity based on the simple contrast learning word embedding model is calculated based on the word vectors based on the simple contrast learning word embedding model.
[0010] The similarity result is obtained by weighted summation of the similarity based on the knowledge graph and the similarity based on the simple contrastive learning word embedding model.
[0011] A further improvement of the present invention is that the remote sensing knowledge graph includes specialized terms in the field of remote sensing and the relationships between these terms.
[0012] A further improvement of the present invention is that: the step of obtaining the remote sensing words whose similarity is to be calculated, and determining the corresponding knowledge graph-based word vectors based on the remote sensing domain knowledge graph, specifically includes:
[0013] Based on the remote sensing words whose similarity is to be calculated, the knowledge graph-based word vectors are obtained through an embedding model based on a translation mechanism, including the following steps:
[0014] For any triple, i.e., a combination of a head entity, a relation, and a tail entity, the head entity and relation are mapped to a space of a preset dimension to obtain head entity vectors and relation vectors in the same space. The correctness of the mapped vectors is then determined using the following formula:
[0015] h+r≈t
[0016] In the formula, h represents the head entity vector obtained by mapping; r represents the relation vector obtained by mapping; and t represents the tail entity vector obtained by mapping. That is, the sum of the head entity vector and the relation vector obtained by mapping is approximately equal to the tail entity vector.
[0017] A further improvement of this invention is that: the cosine similarity calculation method is used to calculate the corresponding knowledge graph-based similarity based on the word vectors, and the similarity based on the simple contrastive learning word embedding model is calculated based on the word vectors based on the word vectors based on the simple contrastive learning word embedding model. The corresponding calculation formulas are as follows:
[0018]
[0019] In the formula, A and B represent the two word vectors corresponding to the two remote sensing words whose similarity is to be calculated; ||A|| and ||B|| represent the lengths of word vectors A and B, respectively.
[0020] A further improvement of the present invention is that the similarity result is obtained by weighted summation of the similarity based on the knowledge graph and the similarity based on the simple contrastive learning word embedding model, and the corresponding calculation formula is as follows:
[0021] Similarity=α×SimGraph+β×SimCSE
[0022] In the formula, Similarity represents the similarity result obtained by weighted summation; SimGraph represents the similarity based on the knowledge graph; SimCSE represents the similarity based on the simple contrastive learning word embedding model; α represents the weight coefficient corresponding to the similarity based on the knowledge graph; and β represents the weight coefficient corresponding to the similarity based on the simple contrastive learning word embedding model.
[0023] A further improvement of the present invention is that the determination rules for the weight coefficient α corresponding to the similarity based on the knowledge graph and the weight coefficient β corresponding to the similarity based on the simple contrastive learning word embedding model are as follows:
[0024]
[0025] In the formula, α represents the weight coefficient corresponding to the similarity based on the knowledge graph; β represents the weight coefficient corresponding to the similarity based on the simple contrastive learning word embedding model.
[0026] The beneficial effects of this invention are as follows: This invention proposes a method for calculating the similarity of remote sensing text based on knowledge graphs and contrastive learning. It collects remote sensing text data from data websites and journal articles related to the remote sensing field using web crawlers, constructs a remote sensing knowledge graph based on the remote sensing text data, and trains a simple contrastive learning word embedding model. It obtains remote sensing words whose similarity is to be calculated, determines the corresponding word vectors based on the knowledge graph based on the remote sensing knowledge graph, and determines the corresponding word vectors based on the simple contrastive learning word embedding model based on the simple contrastive learning word embedding model. It uses a cosine similarity calculation method to calculate the corresponding similarity based on the knowledge graph based word vectors, and calculates the corresponding similarity based on the simple contrastive learning word embedding model based word vectors. Finally, it performs a weighted sum of the similarity based on the knowledge graph and the similarity based on the simple contrastive learning word embedding model to obtain the final similarity result. This invention combines a knowledge graph in the remote sensing domain with a simple contrastive learning word embedding model to accurately capture the semantic information of text in the remote sensing domain, improving the accuracy of similarity calculation. The calculation method has a wide range of applications, including calculating word similarity in the remote sensing domain and data recommendation services. Furthermore, by training the contrastive learning word embedding model, this invention can learn the semantic relationships between words and generate word vectors with discriminative power, enhancing the model's generalization ability. Attached Figure Description
[0027] Figure 1This is a flowchart illustrating the remote sensing text similarity calculation method based on knowledge graphs and contrastive learning provided in an embodiment of the present invention.
[0028] Figure 2 The flowchart illustrates the calculation process of the remote sensing domain text similarity calculation method based on knowledge graph and simple contrastive learning word embedding model provided in this embodiment of the invention.
[0029] Figure 3 This is a schematic diagram illustrating the basic idea of obtaining word vectors using an embedding model based on a translation mechanism, as provided in an embodiment of the present invention. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0031] See Figure 1 The remote sensing text similarity calculation method based on knowledge graphs and contrastive learning in this embodiment includes the following steps:
[0032] S1. Use web crawler tools to collect remote sensing text data from data websites and journal articles related to the remote sensing field, construct a knowledge graph of the remote sensing field based on the remote sensing text data, and train a simple contrastive learning word embedding model.
[0033] S2, obtain the remote sensing words whose similarity is to be calculated, determine the corresponding word vectors based on the knowledge graph of the remote sensing domain, and determine the corresponding word vectors based on the simple contrast learning word embedding model based on the simple contrast learning word embedding model.
[0034] S3, using the cosine similarity calculation method to calculate the corresponding similarity based on the knowledge graph based word vectors, and using the word vectors based on the simple contrast learning word embedding model to calculate the corresponding similarity based on the simple contrast learning word embedding model;
[0035] S4, the similarity results are obtained by weighted summation of the similarity based on the knowledge graph and the similarity based on the simple contrastive learning word embedding model.
[0036] The remote sensing knowledge graph includes specialized terms in the field of remote sensing and the relationships between these terms.
[0037] See Figure 2We acquire data from remote sensing-related websites and journal articles, including remote sensing data websites, journal articles, Baidu Encyclopedia, remote sensing-related public accounts, industry news, and national standards. We use professional web crawling tools to collect remote sensing text data, construct a corresponding remote sensing knowledge graph, and train a simple contrastive learning word embedding model. This remote sensing knowledge graph includes professional terms in the remote sensing field and the relationships between these terms.
[0038] The process of obtaining remote sensing words for which similarity is to be calculated, and determining corresponding knowledge graph-based word vectors based on the remote sensing domain knowledge graph, specifically includes:
[0039] Based on the remote sensing words whose similarity is to be calculated, the knowledge graph-based word vectors are obtained through an embedding model based on a translation mechanism, including the following steps:
[0040] For any triple, i.e., a combination of a head entity, a relation, and a tail entity, the head entity and relation are mapped to a space of a preset dimension to obtain head entity vectors and relation vectors in the same space. The correctness of the mapped vectors is then determined using the following formula:
[0041] h+r≈t
[0042] In the formula, h represents the head entity vector obtained by mapping; r represents the relation vector obtained by mapping; and t represents the tail entity vector obtained by mapping. That is, the sum of the head entity vector and the relation vector obtained by mapping is approximately equal to the tail entity vector.
[0043] Understandably, the remote sensing words whose similarity to be calculated are input into a trained simple contrastive learning word embedding model to obtain word vectors based on the simple contrastive learning word embedding model; the knowledge graph-based word vectors are obtained through a translation-based embedding model (TransE model), as referenced. Figure 3 The basic idea of the TransE model for obtaining word vectors based on knowledge graphs is as follows: For any triple, i.e., the combination of head entity, relation and tail entity, the head entity and relation are first mapped to a space of a certain dimension to obtain the head entity vector and relation vector in the same space. Then, the correctness of the mapped vector is judged by the formula h + r ≈ t, where h represents the mapped head entity vector; r represents the mapped relation vector; and t represents the mapped tail entity vector. That is, the sum of the mapped head entity vector and relation vector should be as equal as possible to the tail entity vector.
[0044] The cosine similarity calculation method is used to calculate the corresponding similarity based on the knowledge graph based word vectors, and the corresponding similarity based on the simple contrastive learning word embedding model is calculated based on the word vectors based on the simple contrastive learning word embedding model. The corresponding calculation formulas are as follows:
[0045]
[0046] In the formula, A and B represent the two word vectors corresponding to the two remote sensing words whose similarity is to be calculated; ||A|| and ||B|| represent the lengths of word vectors A and B, respectively.
[0047] The similarity result is obtained by weighted summation of the similarity based on the knowledge graph and the similarity based on the simple contrastive learning word embedding model. The corresponding calculation formula is as follows:
[0048] Similarity=α×SimGraph+β×SimCSE
[0049] In the formula, Similarity represents the similarity result obtained by weighted summation; SimGraph represents the similarity based on the knowledge graph; SimCSE represents the similarity based on the simple contrastive learning word embedding model; α represents the weight coefficient corresponding to the similarity based on the knowledge graph; and β represents the weight coefficient corresponding to the similarity based on the simple contrastive learning word embedding model.
[0050] The rules for determining the weight coefficient α corresponding to the similarity based on the knowledge graph and the weight coefficient β corresponding to the similarity based on the simple contrastive learning word embedding model are as follows:
[0051]
[0052] In the formula, α represents the weight coefficient corresponding to the similarity based on the knowledge graph; β represents the weight coefficient corresponding to the similarity based on the simple contrastive learning word embedding model.
[0053] It should be noted that the obtained word 1 and word 2 can be input into the remote sensing domain knowledge graph to obtain knowledge graph word vector 1 and knowledge graph word vector 2. The similarity of these word vectors is calculated to obtain the knowledge graph similarity. The obtained word 1 and word 2 can be input into the simple contrastive learning embedding model to obtain simple contrastive learning word embedding model word vector 1 and simple contrastive learning word embedding model word vector 2. The similarity of these word vectors is calculated to obtain the simple contrastive learning word embedding model similarity. The knowledge graph similarity and the simple contrastive learning word embedding model similarity are weighted and summed to obtain the final similarity.
[0054] Through the above embodiments, this invention, using a remote sensing text similarity calculation method based on knowledge graphs and contrastive learning, collects remote sensing text data from data websites and journal articles related to the remote sensing field using web crawlers. Based on this data, a remote sensing knowledge graph is constructed, and a simple contrastive learning word embedding model is trained. Remote sensing words for which similarity is to be calculated are obtained. Corresponding word vectors based on the knowledge graph are determined, and corresponding word vectors based on the simple contrastive learning word embedding model are determined. A cosine similarity calculation method is used to calculate the knowledge graph-based similarity based on the word vectors, and the similarity based on the simple contrastive learning word embedding model is calculated based on the word vectors. Finally, a weighted sum of the knowledge graph-based similarity and the simple contrastive learning word embedding model-based similarity is performed to obtain the final similarity result. This invention combines a knowledge graph in the remote sensing domain with a simple contrastive learning word embedding model to accurately capture the semantic information of text in the remote sensing domain, thus improving the accuracy of similarity calculation. Furthermore, the calculation method has a wide range of applications, including calculating word similarity in the remote sensing domain and data recommendation services. Moreover, by training the contrastive learning word embedding model, this invention can learn the semantic relationships between words and generate discriminative word vectors, enhancing the model's generalization ability.
[0055] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.
[0056] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for calculating remote sensing text similarity based on knowledge graphs and contrastive learning, characterized in that, Includes the following steps: Remote sensing text data was collected from data websites and journal articles related to the field of remote sensing using web crawling tools. A knowledge graph of the field of remote sensing was constructed based on the remote sensing text data, and a simple contrastive learning word embedding model was trained. Obtain remote sensing words for which similarity is to be calculated, and determine corresponding knowledge graph-based word vectors based on the remote sensing domain knowledge graph, specifically including: Based on the remote sensing words whose similarity is to be calculated, the knowledge graph-based word vectors are obtained through an embedding model based on a translation mechanism, including the following steps: For any triple, i.e., a combination of a head entity, a relation, and a tail entity, the head entity and relation are mapped to a space of a preset dimension to obtain head entity vectors and relation vectors in the same space. The correctness of the mapped vectors is then determined using the following formula: h+r≈t In the formula, h represents the head entity vector obtained by mapping; r represents the relation vector obtained by mapping; and t represents the tail entity vector obtained by mapping. That is, the sum of the head entity vector and the relation vector obtained by mapping is approximately equal to the tail entity vector. The corresponding word vectors based on the simple contrastive learning word embedding model are determined. The cosine similarity calculation method is used to calculate the corresponding similarity based on the knowledge graph based word vectors, and the similarity based on the simple contrast learning word embedding model is calculated based on the word vectors based on the simple contrast learning word embedding model. The similarity result is obtained by weighted summation of the similarity based on the knowledge graph and the similarity based on the simple contrastive learning word embedding model.
2. The remote sensing text similarity calculation method based on knowledge graph and contrastive learning according to claim 1, characterized in that, The remote sensing knowledge graph includes specialized terms in the field of remote sensing and the relationships between these terms.
3. The remote sensing text similarity calculation method based on knowledge graph and contrastive learning according to claim 1, characterized in that, The cosine similarity calculation method is used to calculate the corresponding similarity based on the knowledge graph based word vectors, and the corresponding similarity based on the simple contrastive learning word embedding model is calculated based on the word vectors based on the simple contrastive learning word embedding model. The corresponding calculation formulas are as follows: In the formula, A and B represent the two word vectors corresponding to the two remote sensing words whose similarity is to be calculated; ||A|| and ||B|| represent the lengths of word vectors A and B, respectively.
4. The remote sensing text similarity calculation method based on knowledge graph and contrastive learning according to claim 1, characterized in that, The similarity result is obtained by weighted summation of the similarity based on the knowledge graph and the similarity based on the simple contrastive learning word embedding model. The corresponding calculation formula is as follows: Similarity=α×SimGraph+β×SimCSE In the formula, Similarity represents the similarity result obtained by weighted summation; SimGraph represents the similarity based on the knowledge graph; SimCSE represents the similarity based on the simple contrastive learning word embedding model; α represents the weight coefficient corresponding to the similarity based on the knowledge graph; and β represents the weight coefficient corresponding to the similarity based on the simple contrastive learning word embedding model.
5. The remote sensing text similarity calculation method based on knowledge graph and contrastive learning according to claim 4, characterized in that, The rules for determining the weight coefficient α corresponding to the similarity based on the knowledge graph and the weight coefficient β corresponding to the similarity based on the simple contrastive learning word embedding model are as follows: In the formula, α represents the weight coefficient corresponding to the similarity based on the knowledge graph; β represents the weight coefficient corresponding to the similarity based on the simple contrastive learning word embedding model.
Citation Information
Patent Citations
Method, device and equipment for obtaining supervision recognition result in multiple modes and storage medium
CN111428044A
Entity similarity calculation method for knowledge graph fusion
CN111813962A
Automatic labeling method based on remote sensing image recommendation information
CN115934966A