Method and system for predicting probability of ship encountering pirate attack
By constructing a Bayesian cyber pirate attack prediction model that considers multiple factors, and using EM algorithm training, the problem of low prediction accuracy of pirate attack risk in the existing technology is solved, and the prediction accuracy and ship safety are improved.
Patent Information
- Application Number
- CN202410833413.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-11-01
Smart Images

Figure CN118886512A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, system, terminal and computer-readable storage medium for predicting the probability of a ship being attacked by pirates. Background Art
[0002] Maritime transport is an important bridge and link for international trade. Currently, 90% of world trade is carried out by sea. As can be seen, with the development of economic globalization, the dependence on maritime transport at home and abroad is increasing. However, in the process of maritime transport, pirate hijacking incidents will pose a major threat to international trade and have a serious impact on the safety and stability of maritime transport routes.
[0003] Bayesian Networks (BN) is a probabilistic graphical model that expresses the conditional dependencies between variables in the form of a directed acyclic graph (DAG) and is used for probabilistic reasoning and decision making. Currently, Bayesian networks have been widely used in behavioral analysis, sensitivity analysis, and decision management in various fields; in the analysis of pirate attacks, Bayesian networks can be used to simulate and infer the interactions between various factors and their impact on pirate attacks.
[0004] However, when building a Bayesian network model in the prior art to analyze the risk of pirate attacks, the factors considered are not comprehensive enough, and the prediction accuracy of the built model for the risk probability of pirate attacks needs to be improved.
[0005] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0006] The main purpose of the present invention is to provide a method, system, terminal and computer-readable storage medium for predicting the probability of a ship being attacked by pirates, aiming to solve the problem in the prior art that when building a Bayesian network model to analyze the risk of pirate attacks, the factors considered are not comprehensive enough and the prediction accuracy of the risk probability of pirate attacks is not high.
[0007] To achieve the above object, the present invention provides a method for predicting the probability of a ship being attacked by pirates, the method comprising the following steps:
[0008] obtaining a first global pirate dataset, analyzing the first global pirate dataset to obtain key factors of attacks;
[0009] screening the first global pirate dataset to obtain a second global pirate dataset, and obtaining a dataset containing the key factors from the second global pirate dataset;
[0010] Constructing a BN pirate attack prediction model, and using the data set to train the BN pirate attack prediction model to obtain a target prediction model;
[0011] The key factor data of the ship to be predicted is obtained, the key factor data is input into the target prediction model, and the probability of the ship to be predicted encountering a pirate attack is output.
[0012] Optionally, in the method for predicting the probability of a ship being attacked by pirates, the key factors include: ship factors, surrounding environmental factors, protection factors and pirate factors;
[0013] Among them, the ship's own factors include the ship type and ship status, the surrounding environment factors include time and monsoon zone, the protection factors include protection measures and danger reporting, and the pirate factors include the number of pirates and pirate weapons.
[0014] Optionally, the method for predicting the probability of a ship being attacked by pirates, wherein the step of screening the first global pirate dataset to obtain a second global pirate dataset, specifically comprises:
[0015] Extracting an intermediate dataset of pirate incidents in Southeast Asia from the first global pirate dataset;
[0016] The second global pirate dataset is obtained by removing duplicate, irrelevant and seriously missing data from the intermediate dataset, and cleaning, filtering and sorting the removed data.
[0017] Optionally, in the method for predicting the probability of a ship being attacked by pirates, the step of constructing a BN pirate attack prediction model specifically includes:
[0018] The ship type, the ship status, the time, the monsoon area, the protective measures, the danger report, the number of pirates and the pirate weapons are taken as root nodes;
[0019] The ship's own factors, the surrounding environment factors, the protection factors and the pirate factors are used as intermediate nodes;
[0020] The probability of a ship being attacked by pirates is taken as a target node, and a BN pirate attack prediction model is constructed according to the root node, the intermediate node and the target node.
[0021] Optionally, the method for predicting the probability of a ship being attacked by pirates, wherein the step of using the data set to train the BN pirate attack prediction model further comprises:
[0022] Discretizing the data in the data set according to different standards to obtain a discretized data set;
[0023] The discretized data set is divided into a training set and a test set according to a preset ratio.
[0024] Optionally, the method for predicting the probability of a ship encountering a pirate attack, wherein the step of using the data set to train the BN pirate attack prediction model specifically includes:
[0025] Using the training set to calculate the current model parameters of the BN pirate attack prediction model, and obtaining the previous model parameters, and calculating the latent variable expectations of the parameters according to the current model parameters and the previous model parameters;
[0026] The model parameters are adjusted according to the latent variable expectation to maximize the likelihood function of the observed data until the change in the model parameters is less than a preset threshold, thereby obtaining a prediction model after training.
[0027] Optionally, the method for predicting the probability of a ship being attacked by pirates, wherein the step of obtaining the trained prediction model further comprises:
[0028] The test set is used to perform performance evaluation on the trained prediction model to obtain the target prediction model that meets preset requirements.
[0029] In addition, to achieve the above-mentioned purpose, the present invention also provides a prediction system for the probability of a ship being attacked by pirates, wherein the prediction system for the probability of a ship being attacked by pirates comprises:
[0030] A key factor analysis module, used for acquiring a first global pirate data set, analyzing the first global pirate data set, and obtaining key factors of an attack;
[0031] a training data collection module, configured to screen the first global pirate data set to obtain a second global pirate data set, and obtain a data set containing the key factors from the second global pirate data set;
[0032] A target model training module, used for building a BN pirate attack prediction model, using the data set to train the BN pirate attack prediction model to obtain a target prediction model;
[0033] The attack probability prediction module is used to obtain key factor data of the ship to be predicted, input the key factor data into the target prediction model, and output the probability of the ship to be predicted encountering a pirate attack.
[0034] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a prediction program for the probability of a ship encountering a pirate attack stored in the memory and executable on the processor, wherein the prediction program for the probability of a ship encountering a pirate attack, when executed by the processor, implements the steps of the method for predicting the probability of a ship encountering a pirate attack as described above.
[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a prediction program for the probability of a ship being attacked by pirates, and when the prediction program for the probability of a ship being attacked by pirates is executed by a processor, the steps of the method for predicting the probability of a ship being attacked by pirates as described above are implemented.
[0036] In the present invention, a first global pirate data set is obtained, the first global pirate data set is analyzed, and key factors of attack are obtained; the first global pirate data set is screened to obtain a second global pirate data set, and a data set containing key factors is obtained from the second global pirate data set; a BN pirate attack prediction model is constructed, and the BN pirate attack prediction model is trained using the data set to obtain a target prediction model; key factor data of the ship to be predicted is obtained, the key factor data is input into the target prediction model, and the probability of the ship to be predicted encountering a pirate attack is output. The present invention adopts the construction of a Bayesian network, deeply analyzes the factors affecting the risk of pirate attacks, adds the influence of pirate factors on the basis of other comprehensive factors, and uses the EM algorithm to train the model parameters, thereby improving the prediction accuracy of the probability of pirate attacks, and helping to maintain the safety of ship operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a flow chart of a preferred embodiment of a method for predicting the probability of a ship being attacked by pirates according to the present invention;
[0038] Figure 2 It is a schematic diagram of the waters where global pirate attacks occurred from 2013 to 2022 in the method for predicting the probability of a ship being attacked by pirates of the present invention;
[0039] Figure 3 It is a schematic diagram of the occurrence time of pirate attacks in Southeast Asia from 2013 to 2022 in the prediction method of the probability of ships being attacked by pirates of the present invention;
[0040] Figure 4 This is a statistical diagram of pirate attacks in Southeast Asia from 2013 to 2022 in the method for predicting the probability of ships being attacked by pirates of the present invention;
[0041] Figure 5 It is a schematic diagram of constructing a BN pirate attack prediction model in the method for predicting the probability of a ship encountering a pirate attack of the present invention;
[0042] Figure 6 It is a schematic diagram of the training results of the BN pirate attack prediction model in the method for predicting the probability of a ship encountering a pirate attack of the present invention;
[0043] Figure 7 It is a schematic diagram of the posterior probability of each root node in the prediction method of the probability of a ship encountering a pirate attack of the present invention;
[0044] Figure 8 It is a schematic diagram of the principle of a preferred embodiment of the prediction system for the probability of a ship being attacked by pirates according to the present invention;
[0045] Fig. 9 Schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0046] The present application provides a method and related equipment for predicting the probability of a ship being attacked by pirates. In order to make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0048] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0049] The method for predicting the probability of a ship being attacked by pirates according to a preferred embodiment of the present invention is as follows: Figure 1 As shown, the method for predicting the probability of a ship being attacked by pirates comprises the following steps:
[0050] Step S10: obtaining a first global pirate data set, analyzing the first global pirate data set, and obtaining key factors of attacks.
[0051] Specifically, pirate attacks are still happening around the world, and a large amount of ship pirate attack data is needed to support the analysis of the risk factors of ship pirate attacks. Therefore, the present invention selects 1,126 pieces of pirate data from the IMO GISIS database from 2013 to 2022 as the first global pirate data set for data analysis, and the results are shown in Table 1 below.
[0052] Table 1: Piracy incidents (2013-2022)
[0053]
[0054]
[0055] As can be seen from the table, pirate attacks in Southeast Asia account for a relatively large proportion of global pirate incidents. From 2013 to 2015, the proportion exceeded 50%, indicating that Southeast Asia is the main area of global pirate activities. Since 2016, the proportion of Southeast Asia in global pirate attacks has begun to decline, but it has risen again in 2021 and 2022, reaching 49% and 58% respectively. Based on the analysis of the first global pirate data set, four key factors for ships to encounter pirate attacks are obtained. The key factors include: ship factors, surrounding environmental factors, protection factors and pirate factors. Among them, the ship factors include ship type and ship status, the surrounding environmental factors include time and monsoon zone, the protection factors include protection measures and danger reporting, and the pirate factors include the number of pirates and pirate weapons.
[0056] It is understandable that the impact of ship type on the risk of pirate attacks is mainly reflected in the types of cargo carried and the height of freeboard. Ships carrying high-value cargo are more likely to become targets of pirates, and the corresponding risk of pirate attacks will also increase. Ships with lower freeboards, due to the lack of sufficient physical barriers, allow pirates to quickly and relatively easily implement boarding operations, thereby increasing the risk of pirate attacks. Ships with type A freeboard, such as tankers, have design features including open decks with high integrity, fewer openings on the deck, thereby providing better enclosure, small freeboard requirements, and correspondingly large draft. Ships with type B freeboard, such as bulk carriers and container ships, do not have the same integrity as tankers, and have more openings on the deck, such as hatches for loading and unloading cargo. They require higher freeboards to accommodate the large number of openings on their decks and loading and unloading needs, and have relatively high freeboard requirements. Therefore, the present invention adopts a broad classification method based on the freeboard height of the ship to distinguish ship types. Tankers, liquefied petroleum gas (LPG) ships, liquefied natural gas (LNG) ships, barges, fishing boats, tugboats, yachts and other ships with relatively low freeboard are classified as low freeboard ships, cargo ships are defined as medium freeboard ships, and container ships and ro-ro ships are classified as high freeboard ships.
[0057] The state of the waters where the ship is located is also an important factor. According to data released by IMO, Figure 2 As shown in the figure, it can be found that the pirate incidents that occurred in ports and territorial waters from 2013 to 2022 accounted for 72% of the global pirate incidents. This shows that ships located in ports or territorial waters are at a relatively high risk of encountering pirate attacks. When anchored in the port, the crew will be more lax in their precautions against pirates, their vigilance may be reduced, and the port personnel are relatively complex, which greatly increases the risk of pirate attacks. The speed of ships in territorial waters is relatively slow, and pirates usually use fast and simple means of transportation, making pursuit and attack more likely to occur. Therefore, the ship's own factors mainly include two main factors: ship type and ship status.
[0058] Furthermore, the external environment also has a significant impact on the risk of pirate attacks. The external environmental factors that affect the risk of pirate attacks are mainly time factors and monsoon factors. From the perspective of time factors, the present invention defines 6:00-18:00 local time as daytime and the rest of the time as nighttime. After processing the data, Figure 3, it can be found that most of the pirate attacks in Southeast Asia occurred at night, accounting for 75% of all pirate incidents. Pirates in Southeast Asia usually drive high-speed boats close to ships with the help of darkness, control the crew and damage the communication equipment after boarding, with the ultimate goal of stealing high-value cargo on board. In the dark environment, the lack of natural light leads to reduced visibility at sea, which has a great impact on the vision of the crew. The limited field of view weakens the effectiveness of lookout, making it difficult for the crew to accurately and timely monitor abnormal conditions in the surrounding environment. In this case, it becomes extremely difficult to detect the whereabouts of pirates in a timely manner and take corresponding countermeasures, thereby increasing the risk of ships being attacked by pirates at night.
[0059] At the same time, if the ship is in the monsoon area, affected by the monsoon, the strong winds and strong waves brought by the monsoon will make the sea conditions very bad, which poses a challenge to the stability of the ship, resulting in difficulty in ship operation and seriously affecting the maneuverability of the ship. Most of the means of transportation used by pirates are simple wooden boats or speedboats, and pirate attacks will also be restricted. The operational risks of these ships increase, thereby reducing the frequency of pirate attacks and, to a certain extent, reducing the probability of pirate attacks. In summer, Southeast Asia is susceptible to the influence of the southwest monsoon, so the present invention records June to August as the monsoon period, and the remaining dates are analyzed as non-monsoon periods. Therefore, the surrounding environmental factors mainly include two main factors: time and monsoon area.
[0060] Furthermore, the protection factor is also very important. Although the ship cannot control the behavior of pirates, it can effectively reduce the possibility of successful pirate attacks by enhancing self-protection measures. By implementing preventive security strategies, the ship's ability to resist pirate attacks can be significantly improved. By taking appropriate protective measures, the impact of pirate attacks can be effectively reduced. The crew can detect pirates in time and convey information in time, and the captain can also take countermeasures quickly, thereby effectively reducing the risk of pirate attacks and achieving the purpose of protecting the crew, cargo and the ship itself.
[0061] In addition, timely sending of emergency alerts to relevant agencies of coastal countries or relevant international organizations is also very important for reducing the risk of pirate attacks on ships. Effective reporting can obtain timely rescue from relevant agencies, reduce the probability of successful pirate attacks, and help reduce the losses that may occur due to attacks. Through cooperation and information sharing with these agencies, ships can get help and strengthen their own security protection network, thereby effectively reducing the risk of pirate attacks. In addition, this active communication can also promote coordinated defense between regions and build a more solid security line of defense. Therefore, the protection factors mainly include two main factors: protection measures and danger reporting.
[0062] The present invention also takes into account the risk of pirate factors to ships, which are mainly reflected in the impact on ship protection measures. When there are a large number of pirates, even if the ship has taken protective measures, the effectiveness of the deployed protective measures against pirates will be greatly reduced. The increase in the number of pirates means that the intensity and scale of the attack will increase, which will make it difficult for the ship's defense system to respond effectively, increase the possibility of successful pirate attacks, and thus increase the risk of pirate attacks.
[0063] At the same time, the advanced level of pirates' weapons and equipment will also bring difficulties to the ship's protective measures. As pirates have more ways to obtain more advanced weapons, their attack capabilities have also been strengthened, which not only makes it more difficult for ships to defend against pirate attacks, but also increases the risk of ships being attacked by pirates. Therefore, pirate factors mainly include two main factors: the number of pirates and pirate weapons.
[0064] Step S20: Screen the first global pirate data set to obtain a second global pirate data set, and obtain a data set containing the key factors from the second global pirate data set.
[0065] Specifically, an intermediate data set of the target area is extracted from the first global pirate data set. The data of the target area is selected according to the prediction area to obtain the second global pirate data set. For example, in this embodiment, the probability of ships in Southeast Asia being attacked by pirates is mainly analyzed and predicted, so the target area is selected as Southeast Asia, and the first global pirate data set is screened to retain only the pirate data in Southeast Asia to obtain the intermediate data set. In this way, the model obtained later can better adapt to the actual situation of the current sea area and improve the accuracy of prediction.
[0066] Furthermore, duplicate, irrelevant and seriously missing data are removed from the intermediate data set, and the removed data are cleaned, filtered and sorted to obtain the second global pirate data set.
[0067] like Figure 4 As shown, it is understandable that in 2015, the Southeast Asian waters were the hardest hit by pirate attacks, accounting for 71%. Although the proportion has declined in the following years, pirate attacks in the Southeast Asian waters have shown an upward trend since 2020, and the proportion of pirate attacks in the past two years has exceeded half of the world. In order to conduct a more accurate analysis of the pirate data in Southeast Asia, the repeated, irrelevant and seriously missing data in the intermediate data set are removed, and the removed data are cleaned, filtered and sorted to construct a second global pirate data set containing multiple Southeast Asian pirate incidents for subsequent training and analysis of the Bayesian network model.
[0068] Step S30: construct a BN pirate attack prediction model, and use the data set to train the BN pirate attack prediction model to obtain a target prediction model;
[0069] The constructing of the BN pirate attack prediction model specifically includes: taking the ship type, the ship status, the time, the monsoon area, the protective measures, the danger report, the number of pirates and the pirate weapons as root nodes;
[0070] The ship's own factors, the surrounding environment factors, the protection factors and the pirate factors are used as intermediate nodes;
[0071] The probability of a ship being attacked by pirates is taken as a target node, and a BN pirate attack prediction model is constructed according to the root node, the intermediate node and the target node.
[0072] It is understandable that if Figure 5 As shown, the embodiment of the present application analyzes the risk factors of ship pirate attacks in detail from four aspects: the ship itself, the external environment, protective measures, and pirate actions. The influencing factors in Chapter 3 are converted into Bayesian network nodes. The Bayesian network nodes for ship pirate attack risk are determined to be 8 root nodes, 4 intermediate nodes, and 1 target node. The BN topology is constructed based on the network nodes determined above, as shown in Figure 4 As shown in the figure. In this network, the eight root nodes representing the original causes are ship type, ship status, time, monsoon zone, protection measures, reporting, number of pirates, and pirate weapons and equipment. The target node representing the final result is the risk of pirate attacks. The four intermediate nodes between the root node and the target node are the risk of the ship itself, external environmental conditions, protection, and pirate factors.
[0073] Furthermore, the use of the data set to train the BN pirate attack prediction model also includes: discretizing the data in the data set according to different standards to obtain a discretized data set; and dividing the discretized data set into a training set and a test set according to a preset ratio.
[0074] It is understandable that before building the model, the variables and influencing factors of the model need to be determined. Based on the above research, the present invention found 13 important factors that contribute to pirate attacks. The different states of these variables can be classified according to reasonable divisions. In the recognition process, the model parameter training algorithm needs to process discrete values, so the sample data needs to be discretized. The state description and discretized values of each node data are shown in Table 2.
[0075] Table 2: State description and discretization of each node data
[0076]
[0077] Among them, the ship pirate attack risk node indicates the possibility that the ship is successfully attacked by pirates and causes property or personnel losses. Hijacking crew members and ships and stealing or robbing ship property are all considered as the occurrence of pirate attack risks. Therefore, the present invention divides ship hijacking into two states: "occurrence" and "non-occurrence". "Occurrence" means that the ship is successfully attacked by pirates and causes losses to the ship. "Non-occurrence" means that the pirate attack is unsuccessful and does not cause losses to the ship.
[0078] Furthermore, the discretized data set is divided into a training set and a test set according to a preset ratio, for example, the training set and the test set are divided in a ratio of 7:3, the training set is used to train the BN pirate attack prediction model to obtain a trained BN pirate attack prediction model; the test set is used to perform performance testing on the trained BN pirate attack prediction model.
[0079] It is understandable that after determining the Bayesian network structure of the risk of ship pirate attacks, it is also necessary to clarify the relationship between the nodes and determine the conditional probability of the Bayesian network nodes. The present invention adopts the method of learning training sample data to obtain the conditional probability distribution of each node. In practical applications, the input is Figure 5 The data of the eight root nodes in the output is the total probability of pirate attack risk. Due to the problem of missing data in the reports of pirate attacks in the IMO GISIS database, the EM algorithm will be used to train the parameters. The EM algorithm has applications in many fields, including machine learning, pattern recognition, information retrieval, etc. In the construction of Bayesian networks, the EM algorithm is often used for parameter learning, especially when there are missing values in the data, so the EM algorithm is used for parameter training. The EM algorithm consists of two main steps: the expectation E step and the maximization M step. These two steps are performed alternately until the model converges.
[0080] Therefore, the BN pirate attack prediction model is trained using the data set to obtain a target prediction model, which specifically includes:
[0081] The current model parameters of the BN pirate attack prediction model are calculated using the training set, and the previous model parameters are obtained. The latent variable expectations of the parameters are calculated based on the current model parameters and the previous model parameters.
[0082] Specifically, this step is the expected E step, which does not involve parameter updating, but calculates the model parameter θ currently being estimated. The calculated data is used to infer the expected value of the posterior probability distribution of the latent variable, that is, the expected value of the posterior probability distribution of the parameter θ and the model parameter θ estimated last time. i-1The expected value of the posterior probability under Q. Given the observed data X and the current parameter θ, the expected value of the log-likelihood function of the complete data Z = (X, Y) is calculated. The formula can be expressed as:
[0083] Q(θ,θ i-1 )=E[log p(X,Y|θ)|X,θ i-1 ]
[0085] Among them, θ is the model parameter currently being estimated, θ i-1 is the model parameter of the previous estimate, i is the number of estimates, and Q is the difference between the parameter θ and its previous estimate θ i-1 The expected value Q of the posterior probability under , p represents the posterior probability, E represents the expectation, X represents the observed data, and Y represents the hidden variable related to the observed data X.
[0086] The model parameters are adjusted according to the latent variable expectation to maximize the likelihood function of the observed data until the change in the model parameters is less than a preset threshold, thereby obtaining a prediction model after training.
[0087] Specifically, this step is the maximization M step, which uses the latent variable expectation obtained in the E step to adjust the model parameters to maximize the likelihood function of the observed data. This step usually involves optimizing the likelihood function to find the best parameter value. i-1 ), you need to select a parameter to satisfy the condition:
[0088]
[0089] Among them, θ is the currently estimated model parameter, θ i-1 are the model parameters estimated in the previous time.
[0090] The above steps are performed for each model parameter until the change in the model parameter is less than a preset threshold, thereby obtaining a prediction model after training.
[0091] The method of obtaining the trained prediction model further includes: using the test set to perform performance evaluation on the trained prediction model to obtain the target prediction model that meets preset requirements.
[0092] Furthermore, the present invention is also verified and explored based on the target prediction model, such as Figure 6 As shown in Figure 2, after the BN pirate attack prediction model was trained using the EM algorithm of Netica software, the probability of a ship being hijacked was 70.1%. When the prior probability of the network node variables changes, the probability of a successful attack will also change accordingly.
[0093] By using diagnostic reasoning, we can find out the main factors that affect the risk of pirate attacks on ships in Southeast Asia. In the constructed BN pirate attack prediction model, the probability of the "occurrence" state of the ship pirate attack risk node is set to 100%, and the posterior probability of each root node is calculated based on the model training results. Figure 7 As shown, these data are sorted as follows: time = "night" > ship freeboard = "low" > number of pirates = "greater than 5" > ship status = "port".
[0094] That is, when the risk of pirate attacks occurs, the most important influencing factors are the time of night, low freeboard of the ship, the number of pirates greater than 5, and the port status being in port. Ships sailing at night are more likely to become targets of pirates, which may be because the visibility is low at night, the alertness and defense capabilities of the ship are relatively weakened, providing pirates with better concealment and attack opportunities. Unfavorable external environment and high-risk ships can increase the possibility of successful pirate attacks. Low freeboard ships are more vulnerable to pirate attacks because they may lack effective defense measures, such as anti-climbing devices, making it easier for pirates to board the ship. When the number of pirates exceeds five, the threat faced by the ship increases significantly. This may be because when the size of the pirate group is larger, they are able to control the ship and crew more effectively, thereby increasing the success rate of the attack. Ships anchored in ports are more vulnerable to pirate attacks because they are slower and the crew may relax their vigilance. Unfavorable external environment, such as bad sea conditions, may restrict the actions of pirates, thereby reducing the success rate of attacks.
[0095] The success rate of pirate attacks is most dependent on the external environment. Relatively speaking, timely reporting and failure to take protective measures have little impact on the risk of pirate attacks. Timely reporting and taking protective measures have limited effect on reducing the risk of pirate attacks. This may be because when a pirate attack occurs, these measures may no longer be able to effectively prevent the attack. From this, we can also judge that the following scenario: When a low-freeboard ship sailing at night in the port area of Southeast Asian waters encounters a pirate attack with more than 5 pirates, the risk of a pirate attack is relatively high. The International Maritime Organization reported that the typical feature of pirate activities in Southeast Asia is small-scale theft of anchored ships in territorial waters and port areas at night, which is consistent with the results envisioned by the present invention.
[0096] In the Bayesian network, sensitivity analysis refers to analyzing the impact of multiple reasons on the results and the degree of impact. Sensitivity analysis evaluates the probability of pirate attack risks on ships in Southeast Asia to verify the constructed model and find out the relevant factors that have an important impact on the risk of pirate attacks on ships. The present invention adopts a bottom-up method to perform sensitivity analysis. That is, starting from the child node, the probability of occurrence of the child node is set to 100%, and the change value of the probability of each parent node and the initial state is calculated. The larger the change value, the stronger the sensitivity of the node, and the greater the role in promoting the occurrence of the child node. In the Bayesian network of ship pirate attack risks in Southeast Asian waters, the "occurrence" state of the target node ship pirate attack risk node is set to 100%, and its changes are observed and sorted. The results are shown in Table 3.
[0097] Table 3: Root node status sensitivity
[0098]
[0099]
[0100] According to Table 3, when the risk of pirate attacks occurs, the most important influencing factors are that the number of pirates is greater than 5, it is not in the monsoon period, it is dark, and the ship is in the port. The sensitivity difference of these factors is relatively high, indicating that they have a strong promoting effect on the occurrence of pirate attack risks. The sensitivity difference of factors such as pirates using guns as weapons, low freeboard ships, failure to report, and protective measures are relatively low, and they are ranked in the second half, indicating that these factors have less impact on the risk of pirate attacks than other factors.
[0101] Step S40: Acquire key factor data of the ship to be predicted, input the key factor data into the target prediction model, and output the probability of the ship to be predicted encountering a pirate attack.
[0102] Specifically, key factor data of the ship to be predicted are obtained, the key factor data are input into the target prediction model for calculation, the probability of the ship to be predicted being attacked by pirates is output, and the operation of the ship is guided according to the probability, which can avoid encountering pirates to a large extent.
[0103] It can be seen that the present invention provides a method for predicting the probability of a ship encountering a pirate attack, taking the ship's own factors, surrounding environmental factors, protection factors and pirate factors as key factors affecting the risk of pirate attacks, and constructing a BN pirate attack prediction model based on the key factors. The present invention deeply analyzes the risk of pirate attacks, provides a theoretical basis for the prevention and control of the risk of pirate attacks on ships, helps to maintain the safety of ship operations, and can also help decision makers make more scientific and reasonable decisions in resource allocation, route planning and emergency response strategy formulation, thereby improving the overall maritime safety level, ensuring the safety of ships and crews, and reducing the potential impact of pirate attacks on international trade and the global economy.
[0104] Furthermore, if Figure 8 As shown, based on the above-mentioned method for predicting the probability of a ship being attacked by pirates, the present invention also provides a system for predicting the probability of a ship being attacked by pirates, wherein the system for predicting the probability of a ship being attacked by pirates comprises:
[0105] A key factor analysis module 51 is used to obtain a first global pirate data set, analyze the first global pirate data set, and obtain key factors of the attack;
[0106] a training data collection module 52, configured to screen the first global pirate data set to obtain a second global pirate data set, and obtain a data set containing the key factors from the second global pirate data set;
[0107] A target model training module 53 is used to construct a BN pirate attack prediction model, and train the BN pirate attack prediction model using the data set to obtain a target prediction model;
[0108] The attack probability prediction module 54 is used to obtain key factor data of the ship to be predicted, input the key factor data into the target prediction model, and output the probability of the ship to be predicted encountering a pirate attack.
[0109] Furthermore, if Fig. 9 As shown, based on the above-mentioned method and system for predicting the probability of a ship being attacked by pirates, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Fig. 9 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0110] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed in the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a prediction program 40 for the probability of a ship encountering a pirate attack is stored on the memory 20, and the prediction program 40 for the probability of a ship encountering a pirate attack can be executed by the processor 10, thereby realizing the prediction method for the probability of a ship encountering a pirate attack in the present application.
[0111] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing a method for predicting the probability of the ship being attacked by pirates.
[0112] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0113] In one embodiment, when the processor 10 executes the prediction program 40 of the probability of a ship being attacked by pirates in the memory 20, the following steps are implemented:
[0114] obtaining a first global pirate dataset, analyzing the first global pirate dataset to obtain key factors of attacks;
[0115] screening the first global pirate dataset to obtain a second global pirate dataset, and obtaining a dataset containing the key factors from the second global pirate dataset;
[0116] Constructing a BN pirate attack prediction model, and using the data set to train the BN pirate attack prediction model to obtain a target prediction model;
[0117] The key factor data of the ship to be predicted is obtained, the key factor data is input into the target prediction model, and the probability of the ship to be predicted encountering a pirate attack is output.
[0118] Among them, the key factors include: ship factors, surrounding environmental factors, protection factors and pirate factors;
[0119] Among them, the ship's own factors include the ship type and ship status, the surrounding environment factors include time and monsoon zone, the protection factors include protection measures and danger reporting, and the pirate factors include the number of pirates and pirate weapons.
[0120] The step of screening the first global pirate dataset to obtain the second global pirate dataset specifically includes:
[0121] Extracting an intermediate dataset of a target area from the first global pirate dataset;
[0122] The second global pirate dataset is obtained by removing duplicate, irrelevant and seriously missing data from the intermediate dataset, and cleaning, filtering and sorting the removed data.
[0123] The construction of the BN pirate attack prediction model specifically includes:
[0124] The ship type, the ship status, the time, the monsoon area, the protective measures, the danger report, the number of pirates and the pirate weapons are taken as root nodes;
[0125] The ship's own factors, the surrounding environment factors, the protection factors and the pirate factors are used as intermediate nodes;
[0126] The probability of a ship being attacked by pirates is taken as a target node, and a BN pirate attack prediction model is constructed according to the root node, the intermediate node and the target node.
[0127] Wherein, the method of using the data set to train the BN pirate attack prediction model also includes:
[0128] Discretizing the data in the data set according to different standards to obtain a discretized data set;
[0129] The discretized data set is divided into a training set and a test set according to a preset ratio.
[0130] The step of using the data set to train the BN pirate attack prediction model specifically includes:
[0131] Using the training set to calculate the current model parameters of the BN pirate attack prediction model, and obtaining the previous model parameters, and calculating the latent variable expectations of the parameters according to the current model parameters and the previous model parameters;
[0132] The model parameters are adjusted according to the latent variable expectation to maximize the likelihood function of the observed data until the change in the model parameters is less than a preset threshold, thereby obtaining a prediction model after training.
[0133] The step of obtaining the prediction model after training also includes:
[0134] The test set is used to perform performance evaluation on the trained prediction model to obtain the target prediction model that meets preset requirements.
[0135] In summary, the present invention provides a prediction method and related equipment for the probability of a ship encountering a pirate attack, the method comprising: obtaining a first global pirate data set, analyzing the first global pirate data set, and obtaining key factors of the attack; screening the first global pirate data set to obtain a second global pirate data set, and obtaining a data set containing key factors from the second global pirate data set; constructing a BN pirate attack prediction model, using the data set to train the BN pirate attack prediction model to obtain a target prediction model; obtaining key factor data of the ship to be predicted, inputting the key factor data into the target prediction model, and outputting the probability of the ship to be predicted encountering a pirate attack. The present invention adopts the construction of a Bayesian network, adds the influence of pirate factors on the basis of other comprehensive factors, and uses the EM algorithm to train the model parameters, thereby improving the prediction accuracy of the probability of pirate attacks and helping to maintain the safety of ship operation.
[0136] It should be noted that, in the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or terminal including the element.
[0137] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0138] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for predicting the probability of a ship being attacked by pirates, characterized in that: The method for predicting the probability of a ship being attacked by pirates includes: obtaining a first global pirate dataset, analyzing the first global pirate dataset to obtain key factors of attacks; screening the first global pirate dataset to obtain a second global pirate dataset, and obtaining a dataset containing the key factors from the second global pirate dataset; Constructing a BN pirate attack prediction model, and using the data set to train the BN pirate attack prediction model to obtain a target prediction model; The key factor data of the ship to be predicted is obtained, the key factor data is input into the target prediction model, and the probability of the ship to be predicted encountering a pirate attack is output.
2. The method for predicting the probability of a ship being attacked by pirates according to claim 1, characterized in that: The key factors include: ship factors, surrounding environmental factors, protection factors and pirate factors; Among them, the ship's own factors include the ship type and ship status, the surrounding environment factors include time and monsoon zone, the protection factors include protection measures and danger reporting, and the pirate factors include the number of pirates and pirate weapons.
3. The method for predicting the probability of a ship being attacked by pirates according to claim 1, characterized in that: The screening of the first global pirate dataset to obtain a second global pirate dataset specifically includes: Extracting an intermediate dataset of a target area from the first global pirate dataset; The second global pirate dataset is obtained by removing duplicate, irrelevant and seriously missing data from the intermediate dataset, and cleaning, filtering and sorting the removed data.
4. The method for predicting the probability of a ship being attacked by pirates according to claim 2, characterized in that: The construction of the BN pirate attack prediction model specifically includes: The ship type, the ship status, the time, the monsoon area, the protective measures, the danger report, the number of pirates and the pirate weapons are taken as root nodes; The ship's own factors, the surrounding environment factors, the protection factors and the pirate factors are used as intermediate nodes; The probability of a ship being attacked by pirates is taken as a target node, and a BN pirate attack prediction model is constructed according to the root node, the intermediate node and the target node.
5. The method for predicting the probability of a ship being attacked by pirates according to claim 1, characterized in that: The using the data set to train the BN pirate attack prediction model also includes: Discretizing the data in the data set according to different standards to obtain a discretized data set; The discretized data set is divided into a training set and a test set according to a preset ratio.
6. The method for predicting the probability of a ship being attacked by pirates according to claim 5, characterized in that: The using the data set to train the BN pirate attack prediction model specifically includes: Using the training set to calculate the current model parameters of the BN pirate attack prediction model, and obtaining the previous model parameters, and calculating the latent variable expectations of the parameters according to the current model parameters and the previous model parameters; The model parameters are adjusted according to the latent variable expectation to maximize the likelihood function of the observed data until the change in the model parameters is less than a preset threshold, thereby obtaining a prediction model after training.
7. The method for predicting the probability of a ship being attacked by pirates according to claim 6, characterized in that: The prediction model after training is obtained, and then further includes: The test set is used to perform performance evaluation on the trained prediction model to obtain the target prediction model that meets preset requirements.
8. A prediction system for the probability of a ship being attacked by pirates, characterized in that: The prediction system for the probability of a ship being attacked by pirates comprises: A key factor analysis module, used for acquiring a first global pirate data set, analyzing the first global pirate data set, and obtaining key factors of an attack; a training data collection module, configured to screen the first global pirate data set to obtain a second global pirate data set, and obtain a data set containing the key factors from the second global pirate data set; A target model training module, used for building a BN pirate attack prediction model, using the data set to train the BN pirate attack prediction model to obtain a target prediction model; The attack probability prediction module is used to obtain key factor data of the ship to be predicted, input the key factor data into the target prediction model, and output the probability of the ship to be predicted encountering a pirate attack.
9. A terminal, characterized in that: The terminal includes: a memory, a processor, and a prediction program for the probability of a ship being attacked by pirates, which is stored in the memory and can be run on the processor. When the prediction program for the probability of a ship being attacked by pirates is executed by the processor, the steps of the method for predicting the probability of a ship being attacked by pirates as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a prediction program for the probability of a ship being attacked by pirates. When the prediction program for the probability of a ship being attacked by pirates is executed by a processor, the steps of the method for predicting the probability of a ship being attacked by pirates as described in any one of claims 1 to 7 are implemented.
