CN115994688A - Ship accident risk assessment method and device based on knowledge graph and electronic equipment - Google Patents

Ship accident risk assessment method and device based on knowledge graph and electronic equipment Download PDF

Info

Publication number
CN115994688A
CN115994688A CN202310126799.8A CN202310126799A CN115994688A CN 115994688 A CN115994688 A CN 115994688A CN 202310126799 A CN202310126799 A CN 202310126799A CN 115994688 A CN115994688 A CN 115994688A
Authority
CN
China
Prior art keywords
knowledge
ship
database
accident
random forest
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310126799.8A
Other languages
Chinese (zh)
Inventor
余红楚
郭正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University of Technology WUT
Sanya Science and Education Innovation Park of Wuhan University of Technology
Original Assignee
Wuhan University of Technology WUT
Sanya Science and Education Innovation Park of Wuhan University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan University of Technology WUT, Sanya Science and Education Innovation Park of Wuhan University of Technology filed Critical Wuhan University of Technology WUT
Priority to CN202310126799.8A priority Critical patent/CN115994688A/en
Publication of CN115994688A publication Critical patent/CN115994688A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a ship accident risk assessment method and device based on a knowledge graph and electronic equipment, wherein the method comprises the following steps: constructing a database of ship accident risks; constructing a first random forest model according to the database; constructing a ship accident risk ontology relation model according to each entity and the association relation among the entities in the database based on a knowledge graph theory; carrying out knowledge extraction on the database based on the ship accident risk ontology relation model; carrying out knowledge fusion on the database subjected to knowledge extraction to construct a knowledge graph; adjusting the weight of each decision tree in the first random forest model according to the knowledge graph to obtain a second random forest model; and inputting target ship data into the second random forest model to obtain a prediction result of the target ship accident risk. The invention can realize high-precision prediction and assessment of the overload or stranding risk of the ship.

Description

Ship accident risk assessment method and device based on knowledge graph and electronic equipment
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a ship accident risk assessment method and device based on a knowledge graph and electronic equipment.
Background
With the rapid development of world shipping, the number of ships presents an increased situation, the probability of accident risk of the ships is greatly increased, and great challenges are brought to safe navigation and traffic supervision of the ships.
At present, the assessment of the risk of stranding of the ship is mainly based on historical stranding accidents or on ship track data, and comprises the steps of adopting a ship stranding risk simulation method (nonlinear finite element), fuzzy calculation and the like, and evaluating the stranding risk of the ship by giving a certain probability interval to strong wind, water depth, water flow, visibility and artificial factors in a water area.
These methods fail to take into account the variability of different vessel bodies, nor the interplay between different factors, while not taking into account stranded treatments.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a knowledge-graph-based ship accident risk assessment method, a knowledge-graph-based ship accident risk assessment device and an electronic device, which are used for solving the problems of low accuracy, low efficiency and low universality of the target ship accident risk assessment.
In order to solve the above problems, the present invention provides a ship accident risk assessment method based on a knowledge graph, comprising:
constructing a database of ship accident risks;
constructing a first random forest model according to the database;
constructing a ship accident risk ontology relation model according to each entity and the association relation among the entities in the database based on a knowledge graph theory;
carrying out knowledge extraction on the database based on the ship accident risk ontology relation model;
carrying out knowledge fusion on the database subjected to knowledge extraction to construct a knowledge graph;
adjusting the weight of each decision tree in the first random forest model according to the knowledge graph to obtain a second random forest model;
and inputting target ship data into the second random forest model to obtain a prediction result of the target ship accident risk.
In some possible implementations, the marine accident risk ontology relationship model includes marine stranding or overloading information, accident analysis information, and disposal decisions:
the ship stranding or overload information covers accident time, accident site and accident ship;
the accident analysis information comprises accident reasons and accident results;
the disposal decisions include accident ship positioning, accident ship perimeter detection and navigation mark optimization adjustment.
In some possible implementations, the database includes structured data; constructing a first random forest model according to the database, wherein the method comprises the following steps of: and constructing the first random forest model according to the structured data.
In some possible implementations, the database further includes semi-structured data and unstructured data; the knowledge extraction of the database based on the ship accident risk ontology relation model comprises the following steps:
directly mapping the structured data and filling the data into the ship stranded risk ontology relation model;
knowledge extraction is carried out on the semi-structured data through a wrapper, and the semi-structured data subjected to the knowledge extraction is filled into the ship stranding risk ontology relation model;
and carrying out knowledge extraction on the unstructured data through a deep learning model, and filling the unstructured data subjected to knowledge extraction into the ship stranded risk ontology relation model.
In some possible implementations, the knowledge extraction of the unstructured data through a deep learning model includes:
performing entity extraction on the unstructured data based on a deep learning model;
and constructing Multi-BiLSTMA models with different sizes according to BiLSTM and attribute mechanisms, and extracting the relationship of the unstructured data according to the Multi-BiLSTMA models with different sizes.
In some possible implementations, the entity extraction of the unstructured data based on the deep learning model includes:
extracting ship accident risk character features based on an ELMo model;
and obtaining the ship accident risk naming entity identification according to the character characteristics based on the Bi-LSTM+CRF model.
In some possible implementations, the knowledge fusion of the knowledge extracted database is performed to construct a knowledge graph, including:
performing entity alignment, entity disambiguation and data classification on the database subjected to knowledge extraction to obtain a database subjected to knowledge fusion;
and storing the database into a graph database to construct a knowledge graph.
In some possible implementations, adjusting weights of decision trees in the first random forest model according to the knowledge graph to obtain a second random forest model includes:
and inputting the characteristic data of the knowledge graph into the first random forest model, and adjusting the weight of each decision tree in the first random forest model to obtain a second random forest model.
On the other hand, the invention also provides a ship accident risk assessment device based on the knowledge graph, which comprises the following steps:
the database construction unit is used for constructing a database of ship accident risks;
the first random forest model building unit is used for building a first random forest model according to the database;
the ship accident risk ontology relation model construction unit is used for constructing a ship accident risk ontology relation model according to each entity and the association relation among the entities in the database based on the knowledge graph theory;
the database knowledge extraction unit is used for carrying out knowledge extraction on the database based on the ship accident risk ontology relation model;
the knowledge graph construction unit is used for carrying out knowledge fusion on the database subjected to knowledge extraction to construct a knowledge graph;
the second random forest model building unit is used for adjusting the weight of each decision tree in the first random forest model according to the knowledge graph to obtain a second random forest model;
and the prediction unit of the ship accident risk is used for inputting target ship data into the second random forest model to obtain a prediction result of the target ship accident risk.
In another aspect, the invention also provides an electronic device comprising a memory and a processor, wherein,
the memory is used for storing programs;
the processor is coupled to the memory, and is configured to execute the program stored in the memory, so as to implement the steps in the ship accident risk assessment method based on the knowledge graph in any one of the possible implementation manners.
The beneficial effects of adopting the embodiment are as follows: according to the ship accident risk assessment method based on the knowledge graph, a database of ship accident risk is firstly constructed, a first random forest model is constructed according to the database, then a ship accident risk body relation model is constructed according to the knowledge graph theory and the association relation among the entities of the database, knowledge extraction and fusion are carried out on the database based on the ship accident risk body relation model to construct the knowledge graph, then the weights of decision trees of the first random forest model are adjusted according to the knowledge graph to obtain a second random model, and finally target ship data are input into the second random forest model to obtain a prediction result of the target ship accident risk. According to the invention, knowledge extraction and fusion are carried out on three kinds of data with different structures based on the knowledge graph theory to obtain the ship risk accident knowledge graph, so that the defects of the mutual influence of different ship bodies, the treatment of stranded accidents and the like are considered, and the high-precision prediction of ship overload and the assessment of ship stranded risk can be supported.
Drawings
Fig. 1 is a schematic structural diagram of an embodiment of a knowledge-based ship accident risk assessment method provided by the invention;
FIG. 2 is a schematic diagram of a marine accident risk ontology relationship model;
fig. 3 is a schematic structural diagram of an embodiment of a ship accident risk assessment device based on a knowledge graph according to the present invention;
fig. 4 is a schematic structural diagram of an embodiment of an electronic device according to the present invention.
Detailed Description
Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form a part hereof, and together with the description serve to explain the principles of the invention, and are not intended to limit the scope of the invention.
Fig. 1 is a schematic flow chart of an embodiment of a ship accident risk assessment method based on a knowledge graph, where the ship accident risk assessment method based on the knowledge graph, as shown in fig. 1, includes:
s101, constructing a database of ship accident risks;
s102, constructing a first random forest model according to the database;
s103, constructing a ship accident risk ontology relation model according to each entity and the association relation among the entities in the database based on a knowledge graph theory;
s104, carrying out knowledge extraction on the database based on the ship accident risk ontology relation model;
s105, carrying out knowledge fusion on the database subjected to knowledge extraction to construct a knowledge graph;
s106, adjusting the weight of each decision tree in the first random forest model according to the knowledge graph to obtain a second random forest model;
s107, inputting target ship data into the second random forest model to obtain a prediction result of the target ship accident risk.
Compared with the prior art, the ship accident risk assessment method based on the knowledge graph provided by the embodiment comprises the steps of firstly constructing a database of ship accident risks, constructing a first random forest model according to the database, then constructing a ship accident risk ontology relation model according to the knowledge graph theory and according to the incidence relation among all entities of the database, then carrying out knowledge extraction and fusion on the database based on the ship accident risk ontology relation model to construct a knowledge graph, then adjusting weights of all decision trees of the first random forest model according to the knowledge graph to obtain a second random model, and finally inputting target ship data into the second random forest model to obtain a prediction result of the target ship accident risk. According to the invention, knowledge extraction and fusion are carried out on three kinds of data with different structures based on the knowledge graph theory to obtain the ship risk accident knowledge graph, so that the defects of the mutual influence of different ship bodies, the treatment of stranded accidents and the like are considered, and the high-precision prediction of ship overload and the assessment of ship stranded risk can be supported.
In step S101, a database of risk of marine accident is constructed, and the database includes structured data, semi-structured data, and unstructured data.
In some embodiments of the present invention, as shown in fig. 2, a ship accident risk ontology relationship model is schematically shown, and in step S103, the ship accident risk ontology relationship model includes ship stranding or overload information, accident analysis information, and disposal decisions:
the ship stranding or overload information covers accident time, accident site and accident ship;
the accident analysis information comprises accident reasons and accident results;
the disposal decisions include accident ship positioning, accident ship perimeter detection and navigation mark optimization adjustment.
In a specific embodiment of the invention, a marine accident risk ontology relationship model is constructed, the following being an example of a stranded accident:
in 2022, 8 months and 18 days, the morning is 02:43, and ship 72 has a ship stranding accident in the water area near Jiujiang river channel Jiujiang nan #5 red float. After receiving the report, 10103 fire at the channel of the Yangtze river and the nine river is driven to the scene at a speed of fire and reaches the accident water area at a ratio of 03:06. The stranded vessel is stranded in the channel due to "overspray" violation sailing, as determined by the field situation. The on-site navigation mark is inspected by utilizing the navigation mark ship at the first time, the stranded ship is positioned, meanwhile, the water depth of the water area around the stranded ship is detected, and the situation of the residual available water depth is timely found out so as to prepare for the subsequent optimization adjustment of the navigation mark and restore navigation. And the main body of the channel department in the secondary area 04:30 and Ke Changzhun brings the navigation department to arrive at the site for command, and after the site situation is fully researched, a temporary navigation mark optimization and adjustment scheme is rapidly formulated. 05:50, the navigation channel 10103 starts to optimally adjust the on-site navigation mark, and the optimal adjustment operation of the red float of the Jiujiang No. 4 and the red float of the Jiujiang No. 5 is completed only for 20 minutes. Through adjustment, the stranded ship is arranged outside the channel, the on-site navigation is recovered in time, and the dredging construction safety is also ensured.
The entity labeling result is as follows:
accident ship: ship Yu voyage 72
Accident cause: "super draft" violation sailing
Accident site: water area around Jiujiang water channel Jiujiang south #5 red float
Accident consequences: stranding down
Accident handling subject: 10103 at the channel of the Yangtze river and the nine river
Accident handling scheme: and (5) positioning the stranded ship, detecting the water depth of the water area around the stranded ship, and optimizing and adjusting the navigation mark.
In some embodiments of the invention, in step S102, the database comprises structured data; constructing a first random forest model according to the database, wherein the method comprises the following steps of: and constructing the first random forest model according to the structured data.
The structured data is processed by using a database tool. Expressing and analyzing structured data by establishing a two-dimensional table structure, the structured data including entities, attributes and tuples; semi-structured data, which is a special form of structured data that does not conform to a relational database or other form of data table form structure, but contains tags or other labels to separate semantic elements and maintain a hierarchical structure of records and data fields; for unstructured data, unstructured data includes text, image and PDF data, which is data without a fixed structure.
In some embodiments of the present invention, in step S104, the database further includes semi-structured data and unstructured data; the knowledge extraction of the database based on the ship accident risk ontology relation model comprises the following steps:
directly mapping the structured data and filling the data into the ship stranded risk ontology relation model;
knowledge extraction is carried out on the semi-structured data through a wrapper, and the semi-structured data subjected to the knowledge extraction is filled into the ship stranding risk ontology relation model;
and carrying out knowledge extraction on the unstructured data through a deep learning model, and filling the unstructured data subjected to knowledge extraction into the ship stranded risk ontology relation model.
In a specific embodiment of the invention, the knowledge extraction of the ship stranding or overload risk accident of the structured data is completed by extracting the related data of the ship stranding or overload risk accident, converting the data into a RDF (Resource Description Framework) model or an attribute map model form by using a map or a D2RQ (Accessing Relational Databases as Virtual RDF Graphs) data processing tool, and storing the data in a map database (such as Neo4j, janusGraph, hugeGraph, nebula, gStore, DGraph, orientDB, arangoDB and the like). Knowledge extraction of ship stranding or overload risk incidents for semi-structured data is accomplished by a manual, semi-automated, or fully automated method wrapper. Taking webpage data as an example, the packer development based on a manual method firstly analyzes the structure and the code of the webpage manually, and writes a data extraction expression of the webpage related to the ship overspray-stranded accident, wherein the expression can be generally in the form of an XPath expression, an expression of a css selector and the like, and the method is suitable for knowledge extraction of related websites with simple and stable structures. The method for inducing the wrapper based on supervised learning is a semi-automatic method, firstly, webpage information extraction rules are learned from marked training ship stranding or overload risk accident assessment data, then webpage data with the same structure are extracted, and general development flows follow the steps of webpage cleaning, data marking, supervised wrapper space generation, knowledge extraction effect assessment and the like. The full-automatic method is to conduct clustering grouping on large-scale websites related to ship stranding or overload risk accidents and analyze repeated patterns of similar webpages, so that an automatic packer is involved to achieve knowledge extraction of ship stranding or overload risk accidents.
In some embodiments of the invention, the knowledge extraction of the unstructured data through a deep learning model comprises:
performing entity extraction on the unstructured data based on a deep learning model;
and constructing Multi-BiLSTMA models with different sizes according to BiLSTM and attribute mechanisms, and extracting the relationship of the unstructured data according to the Multi-BiLSTMA models with different sizes.
For unstructured data, entity recognition extracts semantic information word features fused with context relations from a sequence text based on an ELMo (Embeddings from Language Models, context pre-training model), meanwhile, the context features of the sequence text are obtained through a Bi-LSTM (Bi-directional Long Short-Term Memory, bidirectional long and short Memory cyclic neural network model) bidirectional short-time Memory network, and a tag sequence with the highest probability is marked and extracted by using a CRF (Conditional Random Fields, conditional random field). In some embodiments of the present invention, the entity extraction of the unstructured data based on the deep learning model includes:
extracting ship accident risk character features based on an ELMo model;
and obtaining the ship accident risk naming entity identification according to the character characteristics based on the Bi-LSTM+CRF model.
In a specific embodiment of the invention, named entity recognition is realized by using Bi-LSTM+CRF, and the specific steps are as follows:
input layer: for each training text, firstly, word segmentation and part-of-speech tagging are carried out, and the part-of-speech tagging of each word is the part-of-speech tagging of the vocabulary to which the word belongs. Each word in the text and the corresponding part-of-speech tagging sequence are the inputs of the model.
Word vector representation layer: the text corpus training word vector of large-scale water traffic is firstly applied, wherein the word vector comprises word vectors of most commonly used Chinese characters. In addition, there is a need for a vector representation of each part-of-speech tag, which can be generated by a process similar to word vector training. After the construction of the word vector and the part of speech tagging vector is completed, for each input word, the word vector and the part of speech tagging vector representation of the word can be obtained through table lookup, and finally the two vectors are spliced to obtain the feature vector representation of the word.
Bidirectional LSTM hidden layer: comprising two LSTM hidden layers, forward and backward. Let the input word vector at the current time be E t The output of the forward hidden layer unit at the last moment is
Figure BDA0004082361840000101
The output of the backward hidden layer unit is +.>
Figure BDA0004082361840000102
The outputs of the forward and backward hidden layer units at the current time are +.>
Figure BDA0004082361840000103
And->
Figure BDA0004082361840000104
Bidirectional LSTM output layer and Attention layer: each of whichThe output units are connected with the forward and backward LSTM hidden layer units simultaneously to obtain the output of g t Finally, a weight matrix G is obtained.
CRF layer: and (5) a chain type conditional random field labeling layer. Training a conditional probability model of the output sequence with respect to the input sequence in combination with the sequence of the bi-directional LSTM output layer and the final given labeling sequence. And when judging, giving an output vector sequence of the bidirectional LSTM hidden layer to obtain a probability vector of each word belonging to each entity tag.
Output layer: and obtaining the entity label y corresponding to each word through the probability vector of each word belonging to each entity label.
It should be noted that, the introduction of the self-adaptive gating mechanism by the LSTM determines that the LSTM unit stores the current state and memorizes the current information, and the LSTM unit can store the information for a long time, but the information is easy to lose in long-distance propagation, so we use the LSTM unit and the Attention together. The Attention mechanism, unlike LSTM, does not rely on the calculation result of the last step in each step of computation of Attention, and can capture the overall dependent information in one step. It can effectively improve the problem of information loss in LSTM caused by long distance propagation. Attention is combined with LSTM for relationship extraction tasks. Multi-BiLSTMA, in view of the better complementarity that BiLSTM and Attention have, is used in combination. However, the fixed BiLSTM can only learn information of one specific dimension, and a Multi-BiLSTMA model is constructed by setting different BiLSTMs, so that the Multi-BiLSTMA model can learn characteristics of information with a plurality of dimensions. In some embodiments of the present invention, the Multi-BiLSTMA model with different sizes is constructed according to BiLSTM and attribute mechanisms, and the relationship extraction is performed on the unstructured data according to the Multi-BiLSTMA model with different sizes, which specifically includes the following steps:
step one: input layer let s=w 1 ,w 2 .. A sentence with two named entities, w i The i-th word in the expression is mapped into corresponding word vector (building) by S through Lookup Table (Look-up Table), the Look-up Table can be obtained through initialization, and pre-trained can be directly used, and the initialization is adopted in the descriptionIs a method of (2). If the sentence length is L, the sentence mapped into the vector may be expressed as x= [ X ] 1 ,x 2 ,...x l ]Wherein x is i ∈R D Is the i-th word w i D is the dimension of the vector. If the dictionary size is V, the input layer may be represented as X ε R V×D . This process can be expressed as x=embedding(s)
Step two: the Multi-BiLSTMA layer in this description consists of three BiLSTMA cells. Wherein each BiLSTMA cell is composed of a layer of BiLSTM and a layer of Attention. BiLSTMA receives data from the input layer, and uses a forward LSTM and a reverse LSTM to form a BiLSTM layer for extracting deeper features of the coding.
This process is summarized as
Figure BDA0004082361840000111
Step three: the Attention layer merges the information on each time step in the BiLSTM layer, and obtains the information with larger influence on the extraction result through calculation. This process can be summarized as a=attention (H)
Step four: after the outputs of the three BiLSTMA units are spliced, the previous layer is completely connected through a full-connection layer, the information learned by the model is classified, wherein the size of the hidden layer is the relation type number, namely 7. This procedure is summarized as d=Dense (A).
In order to obtain a better experimental effect, the softmax layer is used for carrying out normalization processing on the output result of the full-connection layer, and a final classification result is obtained. In general, this process can be summarized as y=soft max (D). The entity relationship is realized based on pattern matching, and the patterns are exemplified as follows:
the accident information includes accident time
The accident information includes accident site
The accident information includes accident ship
[ accident Ship ] straddled [ accident site ]
[ accident Ship stranding over [ accident time ]
Accident analysis includes accident cause
Accident analysis includes
[ accident Ship ] stranding because of [ accident reason ]
Accident handling is based on the following
The ship accident risk knowledge is extracted based on the analysis result of the ship overload or stranded event of the ship accident risk ontology relation model, and the ship overload or stranded event analysis result is realized by a method of integrating the mode layer construction from top to bottom and the feature layer construction from bottom to top.
It should be noted that, knowledge fusion realizes entity alignment by merging and logically associating entities with the same semantics identified by databases, i.e., data with different structures (such as ship stranding survey reports, maritime safety supervision information tables, maritime safety supervision summary tables, etc.); the entity linking and disambiguation is realized by linking to corresponding entities existing in the database and combining different descriptions of the same attribute. And performs unified specification on descriptions in different formats. In some embodiments of the present invention, in step S105, the performing knowledge fusion on the database after knowledge extraction to construct a knowledge graph includes:
performing entity alignment, entity disambiguation and data classification on the database subjected to knowledge extraction to obtain a database subjected to knowledge fusion;
and storing the database into a graph database to construct a knowledge graph.
In a specific embodiment of the invention, the knowledge fusion specifically comprises the following steps:
data preprocessing stage
The quality of the original data directly affects the final link result, the description modes of different data sets on the same entity are often different, and normalization processing of the data is an important step for improving the accuracy of subsequent links. Data preprocessing related technology: grammar normalization and data normalization.
Record linking
Assuming that the values of records x and y of two entities, x and y on the ith attribute are x i ,y i Then go throughThe record link is performed in two steps as follows:
attribute similarity: synthesizing single attribute similarity to obtain attribute similarity vector [ sim (x) 1 ,y 1 ),sim(x 2 ,y 2 ),…,sim(x n ,y n )],
Entity similarity, namely obtaining the similarity of an entity according to the attribute similarity vector.
Block division
From all entity pairs in a given database, potentially matching record pairs are selected as candidates and the size of the candidates is reduced as much as possible. The coverage is guaranteed while each block is made smaller, so that apparently unrelated entities that do not need linking are excluded from the block. In order to reduce the necessity of exact matching while ensuring coverage. The common partitioning method is as follows:
a partitioning method based on a Hash function comprises the following steps: for record x, there is hash (x) =h i Then x maps to block C bound to key h i And (3) upper part.
Proximity classification: clustering Canopy; sequencing a neighbor algorithm; red-Blue Set Cover.
Load balancing
The number of entities in all the blocks is guaranteed to be equivalent, so that the improvement degree of the performance of the blocks is guaranteed. The simplest method is as follows: multiple Map-Reduce operations.
Result evaluation
Evaluation index: accuracy, recall, F value, run time of the whole algorithm.
And finally, storing the constructed knowledge graph by means of a high-performance NOSQL graph database Neo4j, so that the subsequent analysis and achievement application based on the knowledge graph are convenient to develop.
In some embodiments of the present invention, in step S106, adjusting weights of decision trees in the first random forest model according to the knowledge graph to obtain a second random forest model includes:
and inputting the characteristic data of the knowledge graph into the first random forest model, and adjusting the weight of each decision tree in the first random forest model to obtain a second random forest model.
In a specific embodiment of the invention, the knowledge graph stores m pieces of characteristic data, and k independent variables are included in each piece of characteristic data, wherein the independent variables are ship dimensions (maximum dimensions: full length, full width, clearance height, ship dimensions: line length, profile width, profile length, draft), displacement (empty ship displacement, full load displacement, loading displacement), load capacity (total load capacity, payload capacity), speed of voyage, time, location, geographic features, meteorological factors and the like. The feature data of the knowledge graph is processed as input of a first random forest model; and extracting k (k < m) characteristic data from m pieces of ship accident risk knowledge graph characteristic data randomly with a place back each time to form a new training set, wherein a certain piece of data can be extracted for multiple times or a certain piece of data can be not extracted at one time because of random place back sampling, and a decision tree can be trained by using one training set each time.
In the process of training a decision tree, i independent variables are randomly selected from j independent variables at each node to carry out branch growth, and the more the independent variables are selected, the better the training effect of the decision tree is. Finally, a trained second random forest model is obtained, target ship data are input into the second random forest model, and a prediction result of the target ship accident risk is obtained.
After the n times of random extraction are put back, n decision trees trained by different training sets can be obtained after the training is finished, and a more accurate and reasonable final prediction result is obtained according to the prediction results of the n decision trees and the principle of 'minority obeying majority'.
In this embodiment, n=400 and i=10 (i < j) are set, where 36 decision trees are predicted to run normally, 364 decision trees are predicted to run stranded, and the final predicted result is stranded according to the principle of "minority-subject-majority".
In order to better implement the knowledge-based ship accident risk assessment method according to the embodiment of the present invention, correspondingly, as shown in fig. 3, on the basis of the knowledge-based ship accident risk assessment method, the embodiment of the present invention further provides a knowledge-based ship accident risk assessment device, and a knowledge-based ship accident risk assessment device 300 includes:
a database construction unit 301, configured to construct a database of ship accident risks;
a first random forest model building unit 302, configured to build a first random forest model according to the database;
a ship accident risk ontology relationship model construction unit 303, configured to construct a ship accident risk ontology relationship model according to each entity and the association relationship between the entities in the database based on a knowledge graph theory;
a database knowledge extraction unit 304, configured to perform knowledge extraction on the database based on the ship accident risk ontology relationship model;
a knowledge graph construction unit 305, configured to perform knowledge fusion on the database after knowledge extraction to construct a knowledge graph;
a second random forest model building unit 306, configured to adjust weights of decision trees in the first random forest model according to the knowledge graph to obtain a second random forest model;
and the predicting unit 307 for predicting the risk of the ship accident is configured to input the target ship data into the second random forest model, and obtain a predicting result of the risk of the ship accident.
The knowledge-graph-based ship accident risk assessment device 300 provided in the foregoing embodiment may implement the technical solution described in the foregoing embodiment of the knowledge-graph-based ship accident risk assessment method, and the specific implementation principles of the foregoing modules or units may be referred to the corresponding content in the foregoing embodiment of the knowledge-graph-based ship accident risk assessment method, which is not described herein again.
As shown in fig. 4, the present invention further provides an electronic device 400 accordingly. The electronic device 400 comprises a processor 401, a memory 402 and a display 403. Fig. 4 shows only some of the components of the electronic device 400, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead.
The processor 401 may in some embodiments be a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 402, such as the knowledge-graph based marine accident risk assessment method of the present invention.
In some embodiments, the processor 401 may be a single server or a group of servers. The server farm may be centralized or distributed. In some embodiments, the processor 401 may be local or remote. In some embodiments, the processor 401 may be implemented in a cloud platform. In an embodiment, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an inter-internal, multiple clouds, or the like, or any combination thereof.
The memory 402 may be an internal storage unit of the electronic device 400 in some embodiments, such as a hard disk or memory of the electronic device 400. The memory 402 may also be an external storage device of the electronic device 400 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the electronic device 400.
Further, the memory 402 may also include both internal storage units and external storage devices of the electronic device 400. The memory 402 is used for storing application software and various types of data for installing the electronic device 400.
The display 403 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like in some embodiments. The display 403 is used for displaying information at the electronic device 400 and for displaying a visual user interface. The components 401-403 of the electronic device 400 communicate with each other via a system bus.
In an embodiment, when the processor 401 executes the knowledge graph based marine accident risk assessment program in the memory 402, the following steps may be implemented:
constructing a database of ship accident risks;
constructing a first random forest model according to the database;
constructing a ship accident risk ontology relation model according to each entity and the association relation among the entities in the database based on a knowledge graph theory;
carrying out knowledge extraction on the database based on the ship accident risk ontology relation model;
carrying out knowledge fusion on the database subjected to knowledge extraction to construct a knowledge graph;
adjusting the weight of each decision tree in the first random forest model according to the knowledge graph to obtain a second random forest model;
and inputting target ship data into the second random forest model to obtain a prediction result of the target ship accident risk.
It should be understood that: the processor 401 may in executing the knowledge-graph based marine accident risk assessment program in the memory 402 may perform other functions in addition to the above functions, in particular see the description of the corresponding method embodiments above.
Further, the type of the electronic device 400 is not particularly limited, and the electronic device 400 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (personal digital assistant, PDA), a wearable device, a laptop (laptop), etc. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices that carry IOS, android, microsoft or other operating systems. The portable electronic device described above may also be other portable electronic devices, such as a laptop computer (laptop) or the like having a touch-sensitive surface, e.g. a touch panel. It should also be appreciated that in other embodiments of the invention, electronic device 400 may not be a portable electronic device, but rather a desktop computer having a touch-sensitive surface (e.g., a touch panel).
Those skilled in the art will appreciate that all or part of the flow of the methods of the embodiments described above may be accomplished by way of a computer program to instruct associated hardware, where the program may be stored on a computer readable storage medium. Wherein the computer readable storage medium is a magnetic disk, an optical disk, a read-only memory or a random access memory, etc.
The present invention is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present invention are intended to be included in the scope of the present invention.

Claims (10)

1. The ship accident risk assessment method based on the knowledge graph is characterized by comprising the following steps of:
constructing a database of ship accident risks;
constructing a first random forest model according to the database;
constructing a ship accident risk ontology relation model according to each entity and the association relation among the entities in the database based on a knowledge graph theory;
carrying out knowledge extraction on the database based on the ship accident risk ontology relation model;
carrying out knowledge fusion on the database subjected to knowledge extraction to construct a knowledge graph;
adjusting the weight of each decision tree in the first random forest model according to the knowledge graph to obtain a second random forest model;
and inputting target ship data into the second random forest model to obtain a prediction result of the target ship accident risk.
2. The knowledge-graph-based marine accident risk assessment method according to claim 1, wherein the marine accident risk ontology relationship model comprises marine stranding or overload information, accident analysis information and disposal decisions:
the ship stranding or overload information covers accident time, accident site and accident ship;
the accident analysis information comprises accident reasons and accident results;
the disposal decisions include accident ship positioning, accident ship perimeter detection and navigation mark optimization adjustment.
3. The knowledge-based marine accident risk assessment method according to claim 1, wherein the database comprises structured data; constructing a first random forest model according to the database, wherein the method comprises the following steps of: and constructing the first random forest model according to the structured data.
4. A knowledge-based marine accident risk assessment method according to claim 3, wherein the database further comprises semi-structured data and unstructured data; the knowledge extraction of the database based on the ship accident risk ontology relation model comprises the following steps:
directly mapping the structured data and filling the data into the ship stranded risk ontology relation model;
knowledge extraction is carried out on the semi-structured data through a wrapper, and the semi-structured data subjected to the knowledge extraction is filled into the ship stranding risk ontology relation model;
and carrying out knowledge extraction on the unstructured data through a deep learning model, and filling the unstructured data subjected to knowledge extraction into the ship stranded risk ontology relation model.
5. The knowledge-graph-based marine accident risk assessment method according to claim 4, wherein the knowledge extraction of the unstructured data through a deep learning model comprises:
performing entity extraction on the unstructured data based on a deep learning model;
and constructing Multi-BiLSTMA models with different sizes according to BiLSTM and attribute mechanisms, and extracting the relationship of the unstructured data according to the Multi-BiLSTMA models with different sizes.
6. The knowledge-based marine accident risk assessment method according to claim 5, wherein the performing entity extraction on the unstructured data based on a deep learning model comprises:
extracting ship accident risk character features based on an ELMo model;
and obtaining the ship accident risk naming entity identification according to the character characteristics based on the Bi-LSTM+CRF model.
7. The knowledge-based ship accident risk assessment method according to claim 1, wherein the knowledge-based ship accident risk assessment method is characterized in that knowledge fusion is performed on the knowledge-extracted database to construct a knowledge graph, and the knowledge graph comprises:
performing entity alignment, entity disambiguation and data classification on the database subjected to knowledge extraction to obtain a database subjected to knowledge fusion;
and storing the database into a graph database to construct a knowledge graph.
8. The knowledge-based marine accident risk assessment method according to claim 1, wherein adjusting weights of decision trees in the first random forest model according to the knowledge graph to obtain a second random forest model comprises:
and inputting the characteristic data of the knowledge graph into the first random forest model, and adjusting the weight of each decision tree in the first random forest model to obtain a second random forest model.
9. The utility model provides a ship accident risk assessment device based on knowledge graph which characterized in that includes:
the database construction unit is used for constructing a database of ship accident risks;
the first random forest model building unit is used for building a first random forest model according to the database;
the ship accident risk ontology relation model construction unit is used for constructing a ship accident risk ontology relation model according to each entity and the association relation among the entities in the database based on the knowledge graph theory;
the database knowledge extraction unit is used for carrying out knowledge extraction on the database based on the ship accident risk ontology relation model;
the knowledge graph construction unit is used for carrying out knowledge fusion on the database subjected to knowledge extraction to construct a knowledge graph;
the second random forest model building unit is used for adjusting the weight of each decision tree in the first random forest model according to the knowledge graph to obtain a second random forest model;
and the prediction unit of the ship accident risk is used for inputting target ship data into the second random forest model to obtain a prediction result of the target ship accident risk.
10. An electronic device comprising a memory and a processor, wherein,
the memory is used for storing programs;
the processor, coupled to the memory, for executing the program stored in the memory to implement the steps in the knowledge-graph-based marine accident risk assessment method according to any one of the preceding claims 1 to 8.
CN202310126799.8A 2023-02-10 2023-02-10 Ship accident risk assessment method and device based on knowledge graph and electronic equipment Pending CN115994688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310126799.8A CN115994688A (en) 2023-02-10 2023-02-10 Ship accident risk assessment method and device based on knowledge graph and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310126799.8A CN115994688A (en) 2023-02-10 2023-02-10 Ship accident risk assessment method and device based on knowledge graph and electronic equipment

Publications (1)

Publication Number Publication Date
CN115994688A true CN115994688A (en) 2023-04-21

Family

ID=85990240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310126799.8A Pending CN115994688A (en) 2023-02-10 2023-02-10 Ship accident risk assessment method and device based on knowledge graph and electronic equipment

Country Status (1)

Country Link
CN (1) CN115994688A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117252449A (en) * 2023-11-20 2023-12-19 水润天府新材料有限公司 Full-penetration drainage low-noise pavement construction process and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117252449A (en) * 2023-11-20 2023-12-19 水润天府新材料有限公司 Full-penetration drainage low-noise pavement construction process and system
CN117252449B (en) * 2023-11-20 2024-01-30 水润天府新材料有限公司 Full-penetration drainage low-noise pavement construction process and system

Similar Documents

Publication Publication Date Title
US11514247B2 (en) Method, apparatus, computer device and readable medium for knowledge hierarchical extraction of a text
CN106156003B (en) A kind of question sentence understanding method in question answering system
CN104834747B (en) Short text classification method based on convolutional neural networks
CN112613314A (en) Electric power communication network knowledge graph construction method based on BERT model
CN106951558B (en) Data processing method of tax intelligent consultation platform based on deep search
CN113392209B (en) Text clustering method based on artificial intelligence, related equipment and storage medium
CN110110085A (en) Traffic accident file classification method and system based on character level neural network and SVM
CN113935502A (en) Dam-oriented emergency condition event extraction method based on double attention mechanism
CN112905868A (en) Event extraction method, device, equipment and storage medium
CN110163205A (en) Image processing method, device, medium and calculating equipment
WO2023159767A1 (en) Target word detection method and apparatus, electronic device and storage medium
CN108920446A (en) A kind of processing method of Engineering document
CN112182241A (en) Automatic construction method of knowledge graph in field of air traffic control
CN111026880A (en) Joint learning-based judicial knowledge graph construction method
CN115994688A (en) Ship accident risk assessment method and device based on knowledge graph and electronic equipment
CN114281968A (en) Model training and corpus generation method, device, equipment and storage medium
CN113312498B (en) Text information extraction method for embedding knowledge graph by undirected graph
CN117033816A (en) Parking recommendation method and device, electronic equipment and storage medium
CN116595023A (en) Address information updating method and device, electronic equipment and storage medium
CN110888944A (en) Attention convolution neural network entity relation extraction method based on multiple convolution window sizes
Song et al. Spatial-temporal transformer network for multi-year ENSO prediction
CN116050374A (en) Cross-domain and cross-source data alignment method and system and electronic equipment
CN115408532A (en) Open source information-oriented weapon equipment knowledge graph construction method, system, device and storage medium
CN114911940A (en) Text emotion recognition method and device, electronic equipment and storage medium
Wang Remote sensing image semantic segmentation network based on ENet

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination