A ship static attribute reasoning method and system based on knowledge graph technology

By using the BERT model to process triplet text, determining semantic feature vectors, and extracting prior triplet feature vectors, the problem of inferring static attributes of ships is solved, enabling effective identification and pattern analysis of hidden ship data, and reducing the investment of human and material resources.

CN115965085BActive Publication Date: 2026-11-20JIMEI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211490518.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-25
Publication Date
2026-11-20
Estimated Expiration
2042-11-25

AI Technical Summary

Technical Problem

Existing technologies cannot effectively reason about the hidden data of ships through the interrelationships between ships, especially the reasoning about the static attributes of ships, and building knowledge graph triples requires a lot of human and material resources.

Method used

The BERT model is used to process triplet text, determine semantic feature vectors, extract the feature vectors of the hit prior triplets, and infer the static attributes of the ship based on these feature vectors. The hidden data of the ship is inferred using triplet text.

Benefits of technology

It enables effective reasoning about the static attributes of ships, identifies the operational behavior patterns of ships, reduces the input of human and material resources, and improves data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115965085B_ABST
    Figure CN115965085B_ABST
Patent Text Reader

Abstract

The application provides a ship static attribute reasoning method and system based on knowledge graph technology, comprising the following steps: obtaining a triplet text about a ship to be reasoned, and inputting the triplet text into a BERT model; determining semantic feature vectors of each mark in the triplet text through the BERT model; determining a hit prior triplet, and extracting a feature vector of the hit prior triplet; reasoning a ship static attribute according to the semantic feature vectors of each mark and the feature vector of the hit prior triplet; the application has the beneficial effect that: by inputting the triplet text about the ship to be reasoned into the BERT model, then obtaining the semantic feature vectors of each mark in the triplet text through the BERT model, then extracting the feature vector of the hit prior triplet, and finally reasoning the ship static attribute according to the semantic feature vectors of each mark and the feature vector of the hit prior triplet, the time attribute and the space attribute of the ship can be reasoned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of maritime transportation technology, and in particular to a method and system for reasoning about the static attributes of ships based on knowledge graph technology. Background Technology

[0002] Entity relation extraction, as a core task and crucial link in information extraction, natural language understanding, and information retrieval, extracts semantic relationships between entity pairs from text. It plays a vital role in sentence semantic understanding and the construction of entity semantic knowledge bases. The successful application of knowledge graphs has attracted widespread attention in the industry and has quickly become a research hotspot across various sectors. Papers related to knowledge graph-based relation extraction, knowledge graph-based knowledge reasoning, and knowledge graph-based question answering systems have rapidly occupied top conference and journal pages. Representation learning in knowledge graphs typically represents entities as spatial vectors and learns entity and relation representations through defined scoring functions. Currently, the main models include distance models, bilinear models, and neural strut models. Knowledge reasoning, also known as implicit relation mining or knowledge reasoning, refers to further mining implicit knowledge based on an existing knowledge base to enrich and expand it. In the reasoning process, association rules are often required. Due to the diversity of entities, entity attributes, and relationships, it is difficult to exhaustively enumerate all reasoning rules. Some more complex reasoning rules are often manually summarized. The mining of reasoning rules mainly relies on the rich co-occurrence of entities and relationships. The objects of knowledge reasoning can be entities, entity attributes, relationships between entities, the hierarchical structure of concepts in an ontology, etc. Knowledge reasoning methods can be mainly divided into two categories: logic-based reasoning and graph-based reasoning.

[0003] Since Google launched its knowledge graph in 2012, knowledge graph technology has rapidly become a research hotspot in fields such as data mining, databases, and artificial intelligence. Knowledge graphs (KG) use graph structures to describe knowledge and model things and the relationships between them. They express information in a form closer to human cognition, providing the ability to organize, manage, and understand massive amounts of information. Currently, knowledge graph-related technologies such as automatic knowledge acquisition, knowledge reasoning, knowledge representation, and knowledge fusion have become powerful assets for search and question answering, big data analysis, intelligent recommendation, and data integration, and are widely used in multiple industries. Knowledge graphs are relatively mature in other fields and can be applied to the field of maritime traffic accidents. The first step is to collect and organize three types of ship data, followed by entity relationship analysis and ontology design, ultimately constructing three typical types of ship knowledge graphs. Within these graphs, relationships between beneficiary countries, ship management companies, and ship ownership companies can be built. Based on the graph, ships with highly similar accident characteristics can be identified and prioritized for monitoring. However, two problems were encountered during the construction process: 1. Existing enterprise data is incomplete, and constructing knowledge graph triples requires significant human and material resources; 2. It is impossible to reason about hidden data through the interrelationships of ships (same type or same management company). Summary of the Invention

[0004] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a ship static attribute reasoning method and system based on knowledge graph technology, which solves the problem in the prior art that it is impossible to reason about the hidden data of ships, i.e., the static attributes of ships, through the interrelationships of ships.

[0005] The present invention provides a method for inferring the static attributes of ships based on knowledge graph technology, comprising the following steps: obtaining triple text related to the ship to be inferred, and inputting the triple text into a BERT model; determining the semantic feature vector of each marker in the triple text through the BERT model; determining the hit prior triples and extracting the feature vector of the hit prior triples; and inferring the static attributes of the ship based on the semantic feature vector of each marker and the feature vector of the hit prior triples.

[0006] The present invention also provides a ship static attribute reasoning system based on knowledge graph technology, comprising: a triple text acquisition module, used to acquire triple text related to the ship to be reasoned and input the triple text into a BERT model; a feature vector determination module, used to determine the semantic feature vector of each marker in the triple text through the BERT model; determine the hit prior triples and extract the feature vector of the hit prior triples; and a ship static attribute reasoning module, used to reason out the ship static attributes based on the semantic feature vector of each marker and the feature vector of the hit prior triples.

[0007] Embodiments of the present invention also provide a server, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the ship static attribute reasoning method based on knowledge graph technology as described above.

[0008] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the ship static attribute reasoning method based on knowledge graph technology as described above.

[0009] The main difference and effect of the embodiments of the present invention compared with the prior art is as follows: By inputting the triple text of the ship to be inferred into the BERT model, the semantic feature vectors of each symbol in the triple text are obtained through the BERT model, the feature vectors of the hit prior triples are extracted, and finally the static attributes of the ship are inferred based on the semantic feature vectors of each symbol and the feature vectors of the hit prior triples. Thus, the semantic representation and construction method of the ship operation behavior pattern hidden in the massive historical fusion data can be inferred from the triple text of the ship, thereby enabling the inference of the ship's temporal and spatial attributes.

[0010] As a further improvement, before obtaining the triple text related to the ship to be reasoned and inputting the triple text into the BERT model, the method includes: constructing a standard entity knowledge base containing the target entity within the knowledge graph; and determining the triple text related to the ship to be reasoned in the standard entity knowledge base.

[0011] As a further improvement, the step of constructing a standard entity knowledge base containing the target entity within the knowledge graph database includes: constructing a candidate entity knowledge base containing the target entity within the knowledge graph database; filtering and sorting the candidate entities within the candidate entity knowledge base containing the target entity; and constructing a standard entity knowledge base containing the target entity based on the filtered and sorted candidate entity knowledge base.

[0012] As a further improvement, the construction of a candidate entity knowledge base containing the target entity in the knowledge graph database includes: determining a partial candidate entity knowledge base based on the similarity of the target entities, determining a partial candidate entity knowledge base based on a pre-set word coverage, and determining a partial candidate entity knowledge base based on a pre-set edit distance.

[0013] The above scheme determines a partial candidate entity knowledge base based on the similarity of the target entity, a partial candidate entity knowledge base based on the pre-set word coverage, and a partial candidate entity knowledge base based on the pre-set edit distance. Entities in the knowledge graph that are related to the target entity are added to the candidate entity knowledge base as candidate entities from three aspects, thereby obtaining a candidate entity knowledge base containing the target entity, which is also to derive the correct target entity.

[0014] As a further improvement, the determination of the hit prior triples includes: acquiring a ship dataset and structured and semi-structured data crawled from the Internet; constructing a relational prior knowledge base based on the ship dataset and the structured and semi-structured data; and determining the hit prior triples in the relational prior knowledge base based on the triple text of the ship to be inferred.

[0015] The above scheme constructs a relational prior knowledge base based on structured and semi-structured data and ship datasets. Then, based on the triple text of the ship to be reasoned, the matching prior triples are determined in the relational prior knowledge base. The feature vectors of the matching prior triples are then encoded into the semantic feature vectors of each flag, thereby improving the extraction effect of entity relations.

[0016] As a further improvement, the step of inferring the ship's static attributes based on the semantic feature vectors of each marker and the feature vectors of the hit prior triples includes: determining a first fusion number based on the semantic feature vectors of each marker and the feature vectors of the hit prior triples; inferring the head and tail positions of the head entity based on the first fusion number; inferring the relationship type and the head and tail positions of the tail entity based on the first fusion number and the head and tail positions of the head entity; and inferring the temporal and spatial attributes of the relationship occurrence, i.e., the ship's static attributes, based on the first fusion number, the head and tail positions of the entities, the relationship type, and the head and tail positions of the tail entity.

[0017] The above scheme determines the first fusion number based on the semantic feature vectors of each marker and the feature vectors of the hit prior triples. Then, it infers the head and tail positions of the head entity based on the first fusion number. Next, it infers the relationship type and the head and tail positions of the tail entity based on the first fusion number and the head and tail positions of the entity. Finally, it infers the temporal and spatial attributes of the relationship, i.e., the static attributes of the ship, based on the first fusion number, the head and tail positions of the entity, the relationship type, and the head and tail positions of the tail entity. This solves the problem of entity relationship extraction under complex conditions. By first extracting the head entity and then extracting the relationship and tail entity, it can effectively solve problems such as entity overlap and the same pair of entities corresponding to multiple relationships. Attached Figure Description

[0018] Figure 1 This is a flowchart of the ship static attribute reasoning method based on knowledge graph technology in the first embodiment of the present invention;

[0019] Figure 2 This is a flowchart of the ship static attribute reasoning method based on knowledge graph technology in the second embodiment of the present invention;

[0020] Figure 3 This is a flowchart of the ship static attribute reasoning method based on knowledge graph technology in the third embodiment of the present invention;

[0021] Figure 4 This is a schematic diagram of a ship static attribute reasoning system based on knowledge graph technology according to the fourth embodiment of the present invention;

[0022] Figure 5 This is a schematic diagram of an electronic device according to the fifth embodiment of the present invention;

[0023] Figure 6 This is a schematic diagram of the entity matching model that integrates entity categories in this invention;

[0024] Figure 7 This is a schematic diagram of the entity matching model that integrates search engine features in this invention;

[0025] Figure 8 This is a schematic diagram of the entity matching model that incorporates the attention mechanism in this invention;

[0026] Figure 9 This is a flowchart of the ternary text reasoning related to ships in this invention;

[0027] Figure 10 This is a schematic diagram illustrating the final construction of the ship knowledge graph in this invention;

[0028] Figure 11 This is a schematic diagram of the three types of entities and the five relationships between them in this invention;

[0029] Figure 12This is a schematic diagram of the crude oil vessel knowledge graph in this invention;

[0030] Figure 13 This is a schematic diagram of the container ship knowledge graph in this invention;

[0031] Figure 14 This is a schematic diagram of the knowledge graph of ordinary dry bulk carriers in this invention. Detailed Implementation

[0032] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.

[0033] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0034] The first embodiment of the present invention relates to a method for reasoning about the static attributes of ships based on knowledge graph technology. The process is as follows: Figure 1 As shown, the details are as follows:

[0035] Step 101: Obtain the triple text related to the ship to be inferred, and input the triple text into the BERT model;

[0036] Specifically, before obtaining the triple text related to ships to be inferred and inputting it into the BERT model, it is necessary to construct a candidate entity knowledge base containing the target entity in the knowledge graph. Then, the candidate entities in the candidate entity knowledge base containing the target entity are filtered and sorted. Then, a standard entity knowledge base containing the target entity is constructed based on the filtered and sorted candidate entity knowledge base. Finally, the triple text related to ships to be inferred in the standard entity knowledge base is determined.

[0037] Step 102: Determine the semantic feature vector of each marker in the triplet text using the BERT model.

[0038] Specifically, BERT stands for Bidirectional Encoder Representation from Transformers, which is the encoder of bidirectional Transformers. The BERT model is based on the transformer network structure and has a powerful feature extraction capability, which can effectively extract the semantic information of text. It serves as the feature extraction module for relation extraction in this application.

[0039] Step 103: Determine the hit prior triples and extract the feature vectors of the hit prior triples.

[0040] Specifically, the process involves first acquiring a ship dataset and structured and semi-structured data crawled from the internet. Then, a relational prior knowledge base is constructed based on the ship dataset and the structured and semi-structured data. Finally, the matching prior triplets are determined within the relational prior knowledge base based on the triplet text of the ship to be inferred.

[0041] Step 104: Infer the static attributes of the ship based on the semantic feature vectors of each marker and the feature vectors of the hit prior triples.

[0042] Specifically, the first fusion number is determined based on the semantic feature vectors of each marker and the feature vectors of the hit prior triples. Then, the head and tail positions of the head entity are inferred based on the first fusion number. Next, the relationship type and the head and tail positions of the tail entity are inferred based on the first fusion number and the head and tail positions of the head entity. Finally, the temporal and spatial attributes of the relationship, which are the ship's static attributes, are inferred based on the first fusion number, the head and tail positions of the entities, the relationship type, and the head and tail positions of the tail entity.

[0043] This implementation method can input the triple text of the ship to be inferred into the BERT model, then obtain the semantic feature vector of each symbol in the triple text through the BERT model, then extract the feature vector of the hit prior triple, and finally infer the static attributes of the ship based on the semantic feature vector of each symbol and the feature vector of the hit prior triple. Thus, it is possible to use the triple text of the ship to infer the semantic representation and construction method of the ship operation behavior pattern hidden in massive historical fusion data, thereby enabling the inference of the ship's temporal and spatial attributes.

[0044] The second embodiment of the present invention relates to a method for reasoning about the static attributes of ships based on knowledge graph technology. The second embodiment is a detailed description of the first embodiment as a whole. The main detailed description is that: in the second embodiment of the present invention, an implementation method is specified, which describes the specific process of constructing a standard entity knowledge base containing target entities in a knowledge graph database.

[0045] Please refer to this implementation method. Figure 2 The process includes the following steps, which are explained below:

[0046] Step 201: Construct a candidate entity knowledge base containing the target entity in the knowledge graph base.

[0047] Specifically, the candidate entity knowledge base can be constructed by determining a portion of the candidate entity knowledge base based on the similarity of the target entities, a portion based on the pre-set word coverage, and a portion based on the pre-set edit distance.

[0048] In practical applications, the main goal of generating candidate entities in the candidate entity knowledge base is to include the target entity while keeping the candidate entity set as small as possible. The quality of the generated candidate entity set is related to the accuracy of entity standardization. If the candidate entity set does not contain the target entity, it is impossible to obtain the correct standard entity. In order for the candidate entity set to contain the target entity, more entities from the knowledge graph need to be added to the candidate entity knowledge base as candidate entities. The size of the candidate entity knowledge base also affects the performance of this application. When the candidate entity knowledge base contains only the target entity, there is no need to sort it. When the candidate entity knowledge base is too large, it will seriously affect the performance of this application. Therefore, it is necessary to reduce the number of candidate entities in the candidate entity knowledge base while ensuring the recall rate of the candidate entity knowledge base.

[0049] The candidate entity knowledge base is generated as follows:

[0050] (1) Determine a partial candidate entity knowledge base based on the similarity of the target entity: Calculate the frequency of each character in the target entity, then obtain entity words containing each character from the knowledge graph database, and then calculate the similarity between the entity words containing each character and the target entity. Through the vector similarity of each entity word, recall the top 10 entity words with the highest similarity to the target entity and add them to the candidate entity knowledge base. The specific calculation of similarity is shown in the following formula. Since each character that makes up an entity word is very important, the TF-IDF vector of an entity word is represented only by its word frequency (TF), and the vector of an entity word is represented by the word frequency (TF) of each character. w It is pieced together, n w The concatenation indicates the number of times the character w appears in the entity word, n E TF represents the total number of entity words. w This represents the frequency of the current character in the knowledge base. sin(A,B) is the similarity between two entity words A and B, calculated using the cosine similarity cosθ.

[0051] (2) Determine a partial candidate entity knowledge base based on the pre-set word coverage: By calculating the word coverage of each entity word in the knowledge graph, a word coverage threshold is pre-set, and entity words with a word coverage higher than the threshold are added to the candidate entity knowledge base. The specific calculation of word coverage is shown in the following formula: Where, count(m) w ∩s w ) represents the word coverage of entity words, count(s w () indicates the word count of entity words.

[0052] (3) Determine a partial candidate entity knowledge base based on pre-set edit distance: By calculating the edit distance of each entity word in the knowledge graph, a threshold for edit distance is pre-set, and entity words with edit distances less than the threshold are added to the candidate entity knowledge base. The specific edit distance is shown in the following formula: d = Levenshtein(m w ,s w ), where d represents the edit distance between an entity mention and a standard entity word. Edit distance refers to the minimum number of edit operations required to convert an entity mention into a standard entity word. Edit operations include replacing one character with another, inserting a character, and deleting a character.

[0053] Step 202: Filter and sort the candidate entities in the candidate entity knowledge base that contains the target entity.

[0054] Specifically, after generating the candidate entity knowledge base, it is necessary to select the candidate entities that best match the target entity from the candidate entity knowledge base. That is, it is necessary to sort the candidate entities in the candidate entity knowledge base. By constructing an entity matching model, the matching probability of the entities is used to sort the candidate entities in the candidate entity knowledge base. According to the characteristics of the knowledge base of this application, there is a problem of incomplete or missing entity description information. Therefore, it is necessary to construct other features to represent the entities in the knowledge base. In the task of entity standardization, entity type is a powerful feature. It represents the type information of the entity and can describe the entities in the knowledge base from a specific perspective. According to the characteristics of the knowledge base mentioned above, the geographical information of the entity is also a relatively important feature. By using the geographical information feature, it is possible to roughly determine whether two entity words match. Since the knowledge base lacks entity description information, the results of the entity in the search engine are used as supplementary information of the entity. In order to describe the importance of each word of the entity word, an attention mechanism is introduced, and a neural network attention mechanism model for text matching is constructed.

[0055] More specifically, entity category refers to the type to which an entity belongs. Entities of different types cannot be the same entity. This application utilizes entity category information as auxiliary information for ranking candidate entities to construct an entity matching model that integrates entity categories. The key feature of this model is the introduction of the BERT model into the entity standardization task. The BERT model is used to obtain vector representations of entity words for candidate entity matching analysis. Simultaneously, an entity classification model is used to obtain the entity type mentioned, serving as auxiliary information input into the BERT model to enhance the comprehensive description of entity mentions. The overall structure of the entity matching model is as follows: Figure 6 As shown, by Figure 6 As shown, the entity matching model input consists of two parts: the first part is the entity mention and the entity mention type, and the second part is the candidate entity and the candidate entity type. The first and second parts are separated by the [SEP] separator and serve as the input to the BERT model. The entity mention type is given by the entity classification model. This method uses the TextCNN classification model. The entity type of the candidate entity is directly obtained from the knowledge base. Then, the corresponding vector in the BERT model output is taken as the input of the pooling layer, and then connected to a fully connected layer. An activation function is used for activation, abstracting the candidate entity ranking problem into a binary classification problem of entity matching. The candidate entities are ranked according to the matching probability of each candidate entity.

[0056] Step 203: Construct a standard entity knowledge base containing the target entity based on the candidate entity knowledge base after screening and sorting.

[0057] Specifically, the first step is to establish a relatively complete standard entity knowledge base containing the target entity. The recall rate of candidate entity generation is related to the size of the standard entity knowledge base. The more entities and the more comprehensive the standard entity knowledge base, the higher the recall rate when candidate entities are generated.

[0058] Step 204: Determine the triplet texts related to ships to be reasoned in the standard entity knowledge base.

[0059] In practical applications, a standard entity knowledge base containing the target entity has already been constructed in the knowledge graph database. The target entity can then be searched within this standard entity knowledge base. Search engine features: Due to the lack of descriptive information and entity attributes in entity mentions and the knowledge base, this application expands the entity's descriptive information through a search engine to increase entity descriptive features. This application extracts the search results from the current entity's homepage using the entity's search results on the search engine. The titles of the search results serve as the entity's descriptive information, adding background knowledge to the entity and assisting in the candidate entity ranking task. The overall model structure is as follows: Figure 7 As shown, Figure 7As shown, entity mentions, candidate entities, and their search results text are concatenated. The entity mentions and candidate entities are separated by the [SEP] delimiter and used as input to the BERT model. The title of the entity search result is the title in the search engine homepage results as additional information for the entity. Then, the corresponding vector in the BERT model output is taken as input to the pooling layer, and then a fully connected layer is connected. An activation function is used for activation to complete the construction of an entity matching model that integrates search engine features.

[0060] Furthermore, there's the attention mechanism. Research shows that simply using the attention mechanism can achieve excellent results in the NLP field, making it a hot research topic. The attention mechanism helps the model discover and construct features more effectively, allowing for selective feature extraction during training. It calculates the relevance of each word to the entity matching task, reflecting the importance of each character in entity matching. This application adds a character attention layer to the model to determine the contribution of each character to the entity word. Then, attention weights are applied to the output vector of the BERT layer to obtain a weighted feature vector, which is then output through pooling layers and fully connected layers. The overall model structure is as follows: Figure 8 As shown, Figure 8 As shown, entity mentions and candidate target entities are separated by the [SEP] delimiter and used as input to the BERT model. Then, the corresponding vectors in the output of the BERT model are weighted with the word attention layer and used as input to the pooling layer. Then, a fully connected layer is connected to complete the model construction. The role of the word attention layer is to filter the input text and determine which words are more important so that the model focuses on them during training.

[0061] It should be further explained that the entity standardization method proposed in this application, which integrates auxiliary information, completes the entity standardization task by constructing an entity knowledge base, recalling candidate entities, and ranking candidate entities. In the process of ranking candidate entities, entity type features, entity location features, entity search engine features, and attention mechanisms are used. By integrating entity type features and attention mechanisms, the entity standardization task accuracy reaches 0.81 on the constructed test set.

[0062] Steps 205 to 208 are similar to steps 101 to 104 in the first embodiment, and will not be described again here.

[0063] This implementation determines a partial candidate entity knowledge base based on the similarity of the target entity, a partial candidate entity knowledge base based on a pre-set word coverage, and a partial candidate entity knowledge base based on a pre-set edit distance. Entities in the knowledge graph that are related to the target entity are added to the candidate entity knowledge base as candidate entities from three aspects, thereby obtaining a candidate entity knowledge base containing the target entity, which is also to derive the correct target entity.

[0064] The third embodiment of the present invention relates to a method for reasoning about the static attributes of ships based on knowledge graph technology. The third embodiment is a detailed description of the second embodiment as a whole. The main detailed description is that in the third embodiment of the present invention, an implementation method is specified, which describes the specific process of determining the hit prior triples and reasoning about the static attributes of ships based on the semantic feature vectors of each flag and the feature vectors of the hit prior triples.

[0065] Please refer to this implementation method. Figure 3 The process includes the following steps, which are explained below:

[0066] Steps 301 to 306 are similar to steps 201 to 206 in the first embodiment, and will not be described again here.

[0067] Step 307: Obtain the ship dataset and structured and semi-structured data crawled from the Internet.

[0068] Specifically, the ship dataset includes ship knowledge, the country of origin of the ship, the shipping company to which the ship belongs, and port knowledge. Research shows that Internet text data is growing at the exabyte level every year, and a large part of it is presented in semi-structured forms such as tables and XML. Compared with unstructured data, semi-structured data contains very rich entity attribute information in the form of key-value pairs, which is an important source of knowledge for the construction of the knowledge base of this application.

[0069] Step 308: Based on the ship dataset and the structured and semi-structured data, construct a priori knowledge base of relationships.

[0070] Step 309: Determine the matched prior triples in the relation prior knowledge base based on the triple text of the ship to be inferred.

[0071] Specifically, the AC automaton algorithm is used to perform a knowledge keyword search within the constructed relational prior knowledge base based on the triplet text of the ship to be reasoned, and to find the prior triplet that matches the triplet text of the ship to be reasoned.

[0072] Step 310: Determine the first fusion number based on the semantic feature vectors of each flag and the feature vectors of the hit prior triples.

[0073] Specifically, the feature vectors of the hit prior triples are encoded into the semantic feature vectors of each flag extracted by the BERT model, and then fed into the subsequent process for prediction.

[0074] Step 311: Infer the head and tail positions of the head entity based on the first fusion number.

[0075] Step 312: Based on the first fusion number and the first and last positions of the head entity, infer the relationship type and the first and last positions of the tail entity.

[0076] Step 313: Based on the first fusion number and the first and last positions of the entity, the relationship type, and the first and last positions of the tail entity, infer the temporal and spatial attributes of the relationship, which are the static attributes of the ship.

[0077] Specifically, this application is based on joint relation extraction using probabilistic graphs: In the seq2seq task, the decoder is actually modeling as shown in the formula: P(y1,y2,…,y n |x)=P(y1|x)P(y2|y1,x),…,P(y n |x,y1,y2,…,y n-1 In the actual decoding process, the first token is predicted using x. Then, assuming the first token is known, the second token is predicted, and so on, until the end token is found. Inspired by this, the relation extraction of quintuples can also be based on this probabilistic graph method. Specifically, P(s,p,o,t,l)=P(s)P(o|s)P(p|s,o)P(t|s,p,o)P(l|s,p,o,t), where s represents the head entity (subject). p represents the relation type, o represents the tail entity (object), t represents the time attribute of the relation occurrence (time), and l represents the location attribute of the relation occurrence (location). That is, first predict s, then pass s to predict the o corresponding to s, and so on recursively. Finally, pass s, p, o, and t to predict the corresponding l. In actual implementation, the prediction of o and p can be combined into one step, and the prediction of t and l can be combined into one step. So, to summarize, first predict s, then predict p and o based on s, and finally predict the corresponding t and l based on s, p, and o.

[0078] In practical applications, the text of the triplet related to the ship to be reasoned is input into the BERT model to obtain the semantic feature vector h of each token in the text. Then, the feature vector of the hit prior triplet is encoded into the feature vector h of each token to obtain h+pre; (2) followed by a "half-pointer-half-label" structure to predict the first and last positions of s; (3) then h+pre is fused with the predicted s to obtain h+pre+s, followed by multiple "half-pointer-half-label" structures to simultaneously predict the type of p and the first and last positions of o; (4) finally, h+pre is fused with the predicted s, p, and o to obtain h+pre+s+p+o, followed by two "half-pointer-half-label" structures to simultaneously predict the first and last positions of t and l, and finally the relation quintuple is obtained, which is the ship static attribute in this application. For details, please refer to Figure 9 ;

[0079] Furthermore, for each token, two new features are added, representing whether it is the start and end position of the head entity (subject). If it is the start position of the head entity (subject), one feature value is 1, otherwise it is 0. If it is the end position of the head entity (subject), the other feature value is 1, otherwise it is 0. Finally, the 768-dimensional features obtained from the BERT model are concatenated and fused with the 2-dimensional features obtained from the relational prior knowledge base. For the tail entity (object), time attribute (time), and spatial attribute (location) entities, a similar method is used to encode them into the semantic feature vector h of each token, resulting in a 786-dimensional feature vector h+pre. The feature matrix dimension of the token sequence is len*786.

[0080] It should be further explained that the fused features obtained in the previous step are fed into a "half-pointer-half-label" structure to predict the start and end positions of the head entity (subject). Specifically, the fed-in fused features are connected to two fully connected layers with sigmoid activation functions, which are used to predict the start and end positions of the head entity (subject) respectively. These two fully connected layers with sigmoid activation functions are called the "half-pointer-half-label" structure. The sigmoid activation function is used instead of the softmax activation function to solve the problem of multiple head entities (subject) in the text sequence. Compared with sequence labeling, this structure solves the problem of entity overlap very well. For example, in the ship Yude Lun, to extract {Yude Lun, its company, Xiamen Chengyi Co., Ltd.}, the head entity (subject) and the tail entity (object) overlap. The "half-pointer-half-label" structure uses two fully connected layers to label the start and end pointers of the entities respectively, which solves the problem of entity overlap very well.

[0081] It should be further explained that during training, a head entity (subject) inferred from the triple text of the ship to be inferred is randomly selected. The feature vectors of its head and tail tokens are taken, and after vector averaging, they are added to the token sequence text. For each token, the h+pre+s feature vector is obtained. Then, multiple "half-pointer-half-label" structures are used to simultaneously predict the type of the predicate and the head and tail positions of the tail entity (object). One "half-pointer-half-label" structure corresponds to predicting the tail entity (object) of one type of predicate relation. If there are n types of predicate relations, then n such structures are needed to predict the corresponding tail entities (objects), and finally, a relation quintuple is obtained.

[0082] More specifically, this application proposes a method for entity relation extraction based on probabilistic graphs that integrates the BERT model with prior knowledge features. Related experiments were designed to verify this method. The experiments show that the entity relation joint extraction framework based on probabilistic graphs effectively solves the problems of entity overlap and multiple relationships corresponding to the same pair of entities, thus improving the extraction effect. Integrating prior knowledge features further improves the model extraction effect.

[0083] In practical applications, this application collects and organizes three types of ship data, performs entity relationship analysis and ontology design, and finally constructs a ship knowledge graph. For details, please refer to [link / reference needed]. Figure 10 Based on the requirements and data characteristics, a graph ontology was designed, resulting in three types of entities (ship, company, country) and five relationships between entities. Please refer to [link / reference needed] for details. Figure 11 We collected and organized heterogeneous data from multiple sources, including structured, semi-structured, and unstructured data, and extracted them into knowledge graph triple structures using knowledge acquisition techniques.<head,relation,tail> Among them, the knowledge graph for crude oil vessels has 1105 entities and 3665 relationships. Please refer to [link / reference]. Figure 12 Container ship knowledge graph: Number of entities: 2483, Number of relations: 12080. Please refer to [link / reference]. Figure 13 Knowledge Graph for General Dry Bulk Carriers: Number of Entities: 1466, Number of Relationships: 6319. Please refer to [link / reference]. Figure 14 To achieve the desired prediction results, this application employs a graph-based link prediction method. The experimental comparison methods include TransH, TransR, TransD, DistMult, and ComplEx, which perform static analysis of the graph, analyze the tail nodes, predict tail objects, and rank the prediction results. The final metrics are as follows:

[0084] Table 1 Knowledge Graph Prediction Indicators

[0085] Type MR MRR HITS@1 HTIS@3 HITS@10 TransE 199 0.55 0.476 0.598 0.694 TransR 271 0.507 0.443 0.548 0.615 TransD 250 0.516 0.436 0.572 0.648 DisMult 254 0.347 0.254 0.383 0.509 Complex 251 0.398 0.309 0.422 0.606 TransH 274 0.513 0.430 0.571 0.657

[0086] This implementation constructs a prior knowledge base of relationships based on structured and semi-structured data and a ship dataset. Then, based on the triple text related to the ships to be inferred, it determines the matched prior triples within the prior knowledge base. The feature vectors of the matched prior triples are then encoded into the semantic feature vectors of each marker, thereby improving the extraction effect of entity relationships. Furthermore, it determines a first fusion number based on the semantic feature vectors of each marker and the feature vectors of the matched prior triples. Based on the first fusion number, it infers the head and tail positions of the head entity. Then, based on the first fusion number and the head and tail positions of the head entity, it infers the relationship type and the head and tail positions of the tail entity. Finally, based on the first fusion number and the head and tail positions of the entities, the relationship type, and the head and tail positions of the tail entity, it infers the temporal and spatial attributes of the relationship, i.e., the ship's static attributes. This solves the problem of entity relationship extraction under complex conditions. By first extracting the head entity, and then extracting the relationship and tail entity, it can effectively solve problems such as entity overlap and the same pair of entities corresponding to multiple relationships.

[0087] The fourth embodiment of the present invention relates to a ship static attribute reasoning system based on knowledge graph technology. Please refer to [link to relevant documentation]. Figure 4 ,include:

[0088] The triplet text acquisition module is used to acquire triplet text related to ships to be inferred and input the triplet text into the BERT model.

[0089] The feature vector determination module is used to determine the semantic feature vector of each tag in the triplet text using the BERT model; to determine the hit prior triplets and extract the feature vector of the hit prior triplets.

[0090] The ship static attribute reasoning module is used to infer the ship's static attributes based on the semantic feature vectors of each flag and the feature vectors of the hit prior triples.

[0091] It is not difficult to see that this embodiment is a system implementation corresponding to the first embodiment, and this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the first embodiment.

[0092] It is worth mentioning that all modules involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by this invention; however, this does not mean that other units are absent from this embodiment.

[0093] The fifth embodiment of the present invention relates to a server; please refer to [link / reference]. Figure 5 ,include:

[0094] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described ship static attribute reasoning method based on knowledge graph technology.

[0095] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.

[0096] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.

[0097] The sixth embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method embodiments.

[0098] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0099] In summary, this invention inputs the triplet text about ships to be inferred into a BERT model, then uses the BERT model to obtain the semantic feature vectors of each marker in the triplet text. Next, it extracts the feature vectors of the matched prior triples. Finally, based on the semantic feature vectors of each marker and the feature vectors of the matched prior triples, it infers the static attributes of the ship. This allows for the inference of semantic representations and construction methods of ship operational behavior patterns hidden in massive historical fusion data using triplet text about ships, thus enabling the inference of the ship's temporal and spatial attributes. Therefore, this invention effectively overcomes the various shortcomings of existing technologies and has high industrial application value.

[0100] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method for reasoning about the static attributes of ships based on knowledge graph technology, characterized in that, Includes the following steps: Obtain the triple text related to the ship to be inferred, and input the triple text into the BERT model; The semantic feature vectors of each marker in the triplet text are determined using the BERT model. Identify the hit prior triples and extract the feature vectors of the hit prior triples; The ship's static attributes are inferred based on the semantic feature vectors of each marker and the feature vectors of the hit prior triples. The ship's static attributes include the temporal and spatial attributes of the relationship. The process, prior to obtaining the triplet text related to the ship to be inferred and inputting the triplet text into the BERT model, includes: Construct a candidate entity knowledge base containing the target entity in the knowledge graph base; Filter and sort candidate entities within the candidate entity knowledge base that contain the target entity; Construct a standard entity knowledge base containing the target entity based on the candidate entity knowledge base after screening and sorting. Identify the triplet text related to ships to be reasoned in the standard entity knowledge base; The process involves filtering and ranking candidate entities within a candidate entity knowledge base that contains the target entity. This includes: extracting the search results from the current entity's homepage using search results on a search engine, using the search result title as the entity's description information, and adding background knowledge to assist in ranking the candidate entities. A word attention layer is added to the entity matching model to determine the contribution of words to entity terms. Entity mentions and candidate target entities are separated by the [SEP] delimiter and used as input to the BERT model. The corresponding vector from the BERT model output is then weighted with the word attention layer and used as input to the pooling layer. A fully connected layer is then connected, and an activation function is used for activation, thus completing the construction of the entity matching model. The candidate entity ranking problem is abstracted into a binary classification problem of entity matching, and candidate entities are ranked according to their matching probability.

2. The method for ship static attribute reasoning based on knowledge graph technology according to claim 1, characterized in that: The construction of a candidate entity knowledge base containing the target entity in the knowledge graph database includes: A partial candidate entity knowledge base is determined based on the similarity of the target entities, a partial candidate entity knowledge base is determined based on the pre-set word coverage, and a partial candidate entity knowledge base is determined based on the pre-set edit distance.

3. The method for ship static attribute reasoning based on knowledge graph technology according to claim 1, characterized in that: The prior triplet that is determined to be hit includes: Acquire ship datasets and structured and semi-structured data crawled from the Internet; Based on the aforementioned ship dataset and the structured and semi-structured data, a priori knowledge base of relationships is constructed. Based on the triplet text of the ship to be inferred, determine the matched prior triplet in the relational prior knowledge base.

4. The method for ship static attribute reasoning based on knowledge graph technology according to claim 1, characterized in that: The inference of ship static attributes based on the semantic feature vectors of each marker and the feature vectors of the matched prior triples includes: The first fusion number is determined based on the semantic feature vectors of each flag and the feature vectors of the hit prior triples; The head and tail positions of the head entity are deduced based on the first fusion number; Based on the first fusion number and the first and last positions of the head entity, the relationship type and the first and last positions of the tail entity are inferred. Based on the first fusion number and the first and last positions of the entity, the relationship type, and the first and last positions of the tail entity, the temporal and spatial attributes of the relationship are inferred, which are the static attributes of the ship.

5. A ship static attribute reasoning system based on knowledge graph technology, characterized in that: include: The triplet text acquisition module is used to acquire triplet text related to ships to be inferred, and input the triplet text into the BERT model; The feature vector determination module is used to determine the semantic feature vector of each marker in the triplet text through the BERT model; determine the hit prior triplets; and extract the feature vector of the hit prior triplets. The ship static attribute reasoning module is used to infer the ship static attributes based on the semantic feature vectors of each flag and the feature vectors of the hit prior triples. The ship static attribute reasoning system based on knowledge graph technology is further used to construct a candidate entity knowledge base containing the target entity in the knowledge graph database before obtaining the triple text of the ship to be reasoned and inputting the triple text into the BERT model; to filter and sort the candidate entities in the candidate entity knowledge base containing the target entity; and to construct a standard entity knowledge base containing the target entity based on the filtered and sorted candidate entity knowledge base. The standard entity knowledge base is used to identify the triplet text related to ships to be reasoned. This involves filtering and ranking candidate entities within the candidate entity knowledge base that contain the target entity. This includes: extracting the search results from the current entity's homepage using search results on a search engine, using the search result title as the entity's description information, adding background knowledge to the entity, and assisting in ranking the candidate entities. A word attention layer is added to the entity matching model to determine the contribution of words to entity words. Entity mentions and candidate target entities are separated by the [SEP] delimiter and used as input to the BERT model. The corresponding vector from the BERT model output is then weighted with the word attention layer and used as input to the pooling layer. A fully connected layer is then connected, and an activation function is used for activation, completing the construction of the entity matching model. The candidate entity ranking problem is abstracted into a binary classification problem of entity matching, and candidate entities are ranked according to their matching probability.

6. A server, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform a ship static attribute reasoning method based on knowledge graph technology as described in any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements a ship static attribute reasoning method based on knowledge graph technology as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Relation quintuple extraction method based on BERT and priori knowledge features

    CN112199491A

  • Entity standardization method

    CN113255353A