Modeling prediction method and device based on dynamic knowledge graph, equipment and medium
By introducing dynamic knowledge graphs, circular gated networks (GRUs) and relational graph attention networks (rGATs) into the fishing boat system, the problem that static knowledge graphs cannot capture the dynamic behavior of fishing boats is solved, and accurate modeling and intelligent decision-making support for dynamic changes in fishing boats and sea areas are achieved.
Patent Information
- Application Number
- CN202510028069.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-05-23
AI Technical Summary
The existing fishing boat system builds a knowledge graph in static scenarios, and cannot accurately capture the migration patterns and group activities of fishing boats in the marine area, resulting in the inability to effectively provide intelligent decision-making support.
A modeling and prediction method based on dynamic knowledge graph is adopted, and a dynamic knowledge graph is constructed by using fishing boats and sea area data as nodes, using edges to represent the migration and interaction between fishing boats and sea areas, and introducing time attributes. Combining the gated recurrent network GRU and the relationship-graph attention network rGAT, a prediction model is constructed to handle the update of node representations and graph-level representations in the dynamic knowledge graph.
It can accurately model the dynamic changes of fishing boats and sea areas in a time dimension, capture the migration patterns and group activities of fishing boats, and provide intelligent decision-making support, such as optimizing navigation paths, early warning of illegal fishing behaviors and improving fishing efficiency.
Smart Images

Figure CN120031114A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a modeling and prediction method, device, equipment and medium based on a dynamic knowledge graph. Background Art
[0002] With the development of fisheries and maritime communication technology, the demand for intelligent fishing vessels is increasing. Traditional fishing vessel systems usually only use a single piece of fishing vessel information independently, such as the location information or sensor data of the vessel; this isolated approach ignores the synergistic effect of group information interaction between fishing vessels in the sea area, and cannot comprehensively analyze the overall dynamic behavior of multiple fishing vessels in the ocean area. In addition, the existing fishing vessel system has limited ability to integrate real-time marine environmental data, resulting in lags and insufficient information when making complex decisions.
[0003] As a technology that can model multi-dimensional complex relationships, knowledge graphs have powerful information integration and reasoning capabilities. Knowledge graphs have been used in fisheries. For example, the Chinese invention patent application with application number CN201910527799.2 discloses a fishery knowledge graph construction device, method and computer-readable storage medium, which mainly extracts entities such as fishermen and fishery companies from fishery field data, and establishes associations between these entities through preset associations, and finally generates a fishery knowledge graph. However, this method uses knowledge graph construction in a static scene, which cannot accurately capture the migration patterns and group activities of fishing vessels in the ocean area, resulting in the inability to effectively provide intelligent decision support (such as optimizing navigation routes, warning of illegal fishing, and improving fishing efficiency). Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a modeling and prediction method, device, equipment and medium based on a dynamic knowledge graph, so as to solve the problem that the prior art uses knowledge graph construction in a static scene, which cannot accurately capture the migration patterns and group activity behaviors of fishing boats in the ocean area, thereby resulting in the inability to effectively provide intelligent decision support.
[0005] In a first aspect, the present invention provides a modeling and prediction method based on a dynamic knowledge graph, the method comprising the following steps:
[0006] Step S1: Take fishing boats and sea area data as nodes, use edges to represent the migration and interaction between fishing boats and sea areas, and introduce time attributes to characterize dynamic characteristics, so as to construct a dynamic knowledge graph of fishing boats and sea areas;
[0007] Step S2: construct a prediction model by combining the gated recurrent network GRU and the relational graph attention network rGAT, and use the constructed prediction model to process the update of node representation and graph-level representation in the dynamic knowledge graph.
[0008] Furthermore, the step S1 specifically includes:
[0009] Define the dynamic knowledge graph of fishing boats and sea areas as G = (V, E, T), and record the dynamic knowledge graph as graph G; where V represents the node set, E represents the edge set, T represents the current time of graph G, and T represents a monotonically increasing number;
[0010] In graph G, the nodes include fishing boat node V 船 and sea area node V 域 , that is, each fishing boat is regarded as an independent fishing boat node V 船 , each sea area is regarded as an independent sea area node V 域 ;
[0011] In graph G, the edges include the fishing boat migration edge E 迁移 Interaction edge with fishing boats 交互 , that is, when a fishing boat sails from one sea area to another, at the nodes V in these two sea areas 域 An undirected edge is established between them as the fishing boat migration edge E 迁移 ; When a fishing boat enters a certain sea area, at the fishing boat node V 船 With sea area node V 域 An edge is established between them as the fishing boat sea area interaction edge E 交互 .
[0012] Furthermore, the fishing boat node V 船 The attributes include but are not limited to: the unique identification of the fishing vessel, the current latitude and longitude coordinates, speed, navigation direction, and fishing activity status;
[0013] The sea area node V 域 The attributes include but are not limited to: unique identification of the sea area, current meteorological conditions of the sea area, legal constraints, and resource information;
[0014] The fishing boat migration edge E 迁移 The attributes include but are not limited to: migration time, sailing distance, migration speed;
[0015] The fishing boat sea area interaction edge E 交互 The attributes include, but are not limited to: fishing activity information, compliance information, and environmental interaction information.
[0016] Furthermore, the step S2 specifically includes:
[0017] Set the fishing boat node V 船 and sea area node V 域 Unify them into the same attribute vector structure and migrate the fishing boat edge E 迁移 Interaction edge with fishing boats 交互Unified into the same attribute vector structure;
[0018] rGAT node representation update: At a given moment, the relationship graph attention network rGAT is used to aggregate the neighbor nodes of the nodes in the graph G and the relationships between them, so as to update the representation of each node in the graph G;
[0019] Computation of graph-level representation: Use the readout function to derive graph-level feature representation;
[0020] GRU time update: Use the gated recurrent network GRU to process the time series of node representation and graph level representation, and realize the update of node representation and graph level representation in the time dimension;
[0021] Based on the updated node representation and graph-level representation of the gated recurrent network GRU, related tasks are performed.
[0022] Furthermore, the fishing boat node V 船 and sea area node V 域 Unify into the same attribute vector structure: Specifically: transform the fishing boat node V 船 The attribute vector is recorded as [A 船0 ,A 船1 ,...,A 船k ], the sea area node V 域 The attribute vector is recorded as [A 域0 ,A 域1 ,...,A 域p ]; Set the fishing boat node V 船 and sea area node V 域 The attribute vectors are concatenated together and an A is added to the first bit of the concatenated vector. t Used to represent the category of the node, so as to obtain an attribute vector with a length of k+p+1 [A t ,A 船0 ,A 船1 ,...,A 船k ,A 域0 ,A 域 1,...,A 域p ];
[0023] The fishing boats will be moved to the side 迁移 Interaction edge with fishing boats 交互 Unified into the same attribute vector structure: Specifically: the fishing boat migration edge E 迁移 The attribute vector is denoted as [A 迁移0 ,A 迁移1 ,...,A 迁移y ], the fishing boat sea area interactive edge E 交互 The attribute vector is denoted as [A 交互0 ,A 交互1,...,A 交互o ]; Move the fishing boat to the side 迁移 Interaction edge with fishing boats 交互 The attribute vectors are concatenated together and an A is added to the first bit of the concatenated vector. t Used to represent the category of the node, so as to obtain an attribute vector with a length of y+o+1 [A t ,A 迁移0 ,A 迁移1 ,...,A 迁移y ,A 交互0 ,A 交互1 ,...,A 交互o ].
[0024] Furthermore, in the calculation of graph-level representation, the readout function includes but is not limited to a sum function, a mean function or a maximum pooling function.
[0025] Furthermore, the related tasks include but are not limited to node classification tasks or link prediction tasks.
[0026] In a second aspect, the present invention provides a modeling and prediction device based on a dynamic knowledge graph, the device comprising a knowledge graph construction module and a model updating module;
[0027] The knowledge graph construction module is used to use fishing boats and sea area data as nodes, use edges to represent the migration and interaction between fishing boats and sea areas, and introduce time attributes to characterize dynamic characteristics, so as to construct a dynamic knowledge graph of fishing boats and sea areas;
[0028] The model updating module is used to build a prediction model by combining the gated recurrent network GRU and the relational graph attention network rGAT, and use the constructed prediction model to process the update of node representation and graph-level representation in the dynamic knowledge graph.
[0029] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.
[0030] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0031] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: by introducing a dynamic knowledge graph and combining a recurrent gated network (GRU) and a relational graph attention network (rGAT), the dynamic changes of fishing boats and sea areas can be accurately modeled in the time dimension, thereby accurately capturing the migration patterns and group activity behaviors of fishing boats in the ocean area; at the same time, based on the updated node representation and graph-level representation, better fishing boat migration can be analyzed and predicted, abnormal fishing behavior can be warned, etc., thereby providing good intelligent decision support.
[0032] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.
[0034] Figure 1 This is an execution flow chart of a modeling and prediction method based on a dynamic knowledge graph in Embodiment 1 of the present invention;
[0035] Figure 2 This is an example diagram of a fishing boat-sea area dynamic knowledge graph provided in the present invention;
[0036] Figure 3 This is a schematic diagram of the processing principle using the relational graph attention network rGAT and the gated recurrent network GRU in the present invention;
[0037] Figure 4 This is a graph showing the evaluation index results of the present invention in predicting typical fishing vessel behavior;
[0038] Figure 5 This is a diagram showing the results of the multidimensional data analysis of fishing boat behavior according to the present invention;
[0039] Figure 6 A fuel consumption comparison diagram of the present invention and the unguided route;
[0040] Figure 7 This is a schematic diagram of the structure of a modeling and prediction device based on a dynamic knowledge graph in Embodiment 2 of the present invention;
[0041] Figure 8 This is a schematic diagram of the structure of an electronic device in Embodiment 3 of the present invention;
[0042] Fig. 9 Schematic diagram of the structure of the medium in the fourth embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to better understand the technical solution of the present invention, the technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0044] The core inventive concept of the present invention includes the following two aspects:
[0045] First, fishing boats and sea area data are used as nodes, and edges are used to represent the migration and interaction between fishing boats and sea areas, thus forming a heterogeneous graph. Since the structure of the heterogeneous graph includes nodes and edges, it can integrate multidimensional data to provide a basis for subsequent spatiotemporal analysis; time attributes are introduced to characterize dynamic characteristics, thereby constructing a dynamic knowledge graph of fishing boats and sea areas. This dynamic knowledge graph can be continuously updated over time to capture the migration patterns of fishing boats and changes in the sea environment in real time.
[0046] Secondly, the relational graph attention network rGAT is applied to the node feature update of the dynamic knowledge graph, and the relational graph attention network rGAT is used to capture the complex multi-level relationship between fishing boats and sea areas. At the same time, the time dimension is introduced, combined with the timing modeling capability of the gated recurrent network GRU, to construct a spatiotemporal analysis and prediction model for the dynamic behavior of fishing boat groups, which can more accurately capture the dynamic evolution of fishing boat groups and provide more precise support for intelligent decision-making.
[0047] Embodiment 1
[0048] This embodiment provides a modeling prediction method based on a dynamic knowledge graph. Figure 1 As shown, the method comprises the following steps:
[0049] Step S1: Take fishing boats and sea area data as nodes, use edges to represent the migration and interaction between fishing boats and sea areas, so as to form a heterogeneous graph, and introduce time attributes to characterize dynamic characteristics, so as to construct a dynamic knowledge graph of fishing boats and sea areas;
[0050] Step S2: construct a prediction model by combining the gated recurrent network GRU and the relational graph attention network rGAT, and use the constructed prediction model to process the update of node representation and graph-level representation in the dynamic knowledge graph.
[0051] In an embodiment of the present invention, the step S1 specifically includes:
[0052] The dynamic knowledge graph of fishing boats and sea areas is defined as G = (V, E, T), and the dynamic knowledge graph is recorded as graph G; where V represents the node set, E represents the edge set, T represents the current time of graph G, and T represents a monotonically increasing number; since the behavior of fishing boats and the sea environment are both dynamic, that is, the graph G is a dynamic graph, so time T is used to represent the state of the graph at different times;
[0053] In graph G, the nodes include fishing boat node V 船 and sea area node V 域 , that is, each fishing boat is regarded as an independent fishing boat node V 船 , each sea area is regarded as an independent sea area node V 域 In the present invention, the fishing boat node V 船 The attributes include but are not limited to: the unique identification of the fishing vessel, the current latitude and longitude coordinates, speed, navigation direction, fishing activity status (such as fishing, sailing, mooring); the sea area node V 域 The attributes include but are not limited to: the unique identification of the sea area, the meteorological conditions of the current sea area (such as wind speed, wind direction, tide, etc.), legal constraints (such as whether it is a protected area, a no-fishing area, etc.), resource information (such as fish distribution, etc.); of course, in the specific implementation of the present invention, fishing boat nodes V can also be added according to actual use needs. 船 and sea area node V 域 Attributes;
[0054] In graph G, the edges include the fishing boat migration edge E 迁移 Interaction edge with fishing boats 交互 , that is, when a fishing boat sails from one sea area to another, at the nodes V in these two sea areas 域 An undirected edge is established between them as the fishing boat migration edge E 迁移 , since the migration of fishing boats is bidirectional, when fishing boats migrate between two sea areas, the nodes V 域 An undirected edge is established between them; when a fishing boat enters a certain sea area, at the fishing boat node V 船 With sea area node V 域 An edge is established between them as the fishing boat sea area interaction edge E 交互 , the fishing boat sea area interaction edge E 交互 It is used to describe the relationship between fishing boats and sea areas. 迁移 The attributes of the fishing boat sea area include but are not limited to: migration time, sailing distance, migration speed; 交互 The attributes include, but are not limited to: fishing activity information (such as whether fishing is in progress, etc.), compliance information (such as whether fishing is conducted within a legal area, etc.), and environmental interaction information (such as the impact of wind speed and ocean currents on fishing boats, etc.); of course, in the specific implementation of the present invention, the migration edge of the fishing boat can also be increased according to actual use needs. 迁移 Interaction edge with fishing boats 交互 The properties of Figure 2 As shown, the Figure 2 This is an example diagram of a fishing boat-sea area dynamic knowledge graph provided by the present invention.
[0055] In an embodiment of the present invention, Figure 3 As shown, the step S2 specifically includes:
[0056] A1. Set the fishing boat node V 船 and sea area node V 域 Unify them into the same attribute vector structure and migrate the fishing boat edge E 迁移 Interaction edge with fishing boats 交互 Unified into the same attribute vector structure; because the fishing boat node V 船 and sea area node V 域 There are two different nodes, which have different attribute vectors. In order to facilitate the subsequent processing of nodes, the present invention adopts the fishing boat node V 船 and sea area node V 域 Unified into the same attribute vector structure; similarly, the fishing boat migration edge E 迁移 Interaction edge with fishing boats 交互 There are two different edges, and they also have different attribute vectors. In order to facilitate the subsequent processing of the edges, the fishing boat migration edge E is also adopted. 迁移 Interaction edge with fishing boats 交互 Unified into the same attribute vector structure.
[0057] Wherein, the fishing boat node V 船 and sea area node V 域 Unify into the same attribute vector structure: Specifically: transform the fishing boat node V 船 The attribute vector is denoted as [A 船0 ,A 船1 ,...,A 船k ], the sea area node V 域 The attribute vector is denoted as [A 域0 ,A 域1 ,...,A 域p ]; Set the fishing boat node V 船 and sea area node V 域 The attribute vectors are concatenated together and an A is added to the first bit of the concatenated vector. t Used to represent the category of the node, so as to obtain an attribute vector with a length of k+p+1 [A t ,A 船0 ,A 船1 ,...,A 船k ,A 域0 ,A 域1 ,...,A 域p ], k and p are both positive integers greater than 0; in the specific use of the present invention, when the node category is a fishing boat node, the attribute vector [A 域0 ,A 域1 ,...,A 域p] is set to zero; otherwise, when the node type is a sea area node, the attribute vector [A 船0 ,A 船1 ,...,A 船k ] is set to zero;
[0058] The fishing boats will be moved to the side 迁移 Interaction edge with fishing boats 交互 Unified into the same attribute vector structure: Specifically: the fishing boat migration edge E 迁移 The attribute vector is denoted as [A 迁移0 ,A 迁移1 ,...,A 迁移y ], the fishing boat sea area interactive edge E 交互 The attribute vector is denoted as [A 交互0 ,A 交互1 ,...,A 交互o ]; Move the fishing boat to the side 迁移 Interaction edge with fishing boats 交互 The attribute vectors are concatenated together and an A is added to the first bit of the concatenated vector. t Used to represent the category of the node, so as to obtain an attribute vector with a length of y+o+1 [A t ,A 迁移0 ,A 迁移1 ,...,A 迁移y ,A 交互0 ,A 交互1 ,...,A 交互o ], y and o are both positive integers greater than 0; in the specific use of the present invention, when the edge category is a fishing boat migration edge, the attribute vector [A 交互0 ,A 交互1 ,...,A 交互o ] is set to zero; otherwise, when the edge category is a fishing boat sea area interaction edge, the attribute vector [A 迁移0 ,A 迁移1 ,...,A 迁移y ] is set to zero.
[0059] A2. rGAT node representation update: At a given moment, the relationship graph attention network rGAT is used to aggregate the neighbor nodes of the node in the graph G and the relationship between the neighbor nodes, so as to update the representation of each node in the graph G; the core of the relationship graph attention network rGAT is to perform independent feature updates on nodes of different relationship types in the graph structure. Through the relationship graph attention aggregation operation, rGAT learns the representation of the node from the node's neighbor nodes and their relationships. That is, for each node, it not only uses the information of its direct neighbors, but also considers the impact of neighbors under different relationships on its features.
[0060] The following is a detailed introduction to the entire process of rGAT node representation update:
[0061] The node attribute vector [A t ,A 船0 ,A 船1 ,...,A 船k ,A 域0 ,A 域1 ,...,A 域p ] is recorded as e, and the attribute vector of the edge is recorded as r. In the first layer of the attention network of the graph attention network rGAT, the inputs are the attributes of the nodes And the attributes of the edges Get the updated node attributes And the updated edge attributes in, and are the lengths of the input node feature vector and the input edge feature vector, respectively. e and N r are the number of input nodes and input edges respectively. In order to capture the relationship between connected nodes, a shared attention mechanism is used here. For two nodes v and u connected by edge i, the attention att is calculated. viu =f[e v ||r i ||e u ], where f is a forward-connected network, e v and e u are the features of nodes v and u, r i is the feature of edge i; then, the softmax function is applied, a viu =soft max ui (att viu ), and the obtained viu It can be regarded as the contribution of node u to node v, or it can be regarded as the contribution of node v to node u. For a node, without loss of generality, taking node v as an example, the contribution of all neighbors of node v is aggregated to obtain the final representation of node v. Let σ be a nonlinear function, where κ v is the set of neighbors of node v, ρ vu is the set of edges connecting nodes v and u, and * is multiplication, as shown in the following formula:
[0062]
[0063] After several layers of the above attention network operation, the feature representation of the node can be obtained, which is represented by e here. Because the graph is dynamic, the node feature representation at time t is e t .
[0064] A3. Calculation of graph-level representation: Use the readout function to obtain the graph-level feature representation G t , where t represents the time. The calculation of graph-level representation is the aggregation of global representation of the entire graph, especially when it comes to graph classification and global feature extraction; in order to obtain the global representation of the graph from the node representation, the readout function of DGL can be used. The readout function is an operation that summarizes node features into graph-level features.
[0065] In the present invention, in the calculation of graph-level representation, the readout function includes but is not limited to a sum function (sum), a mean function (mean) or a maximum pooling function (max pooling). By adopting the readout function, the node features are aggregated into a global graph feature vector, which can be used for subsequent processing or classification tasks.
[0066] A4. GRU time update: Use the gated recurrent network GRU to process the time series of node representation and graph-level representation, that is, input the node features and graph-level features at different times into the gated recurrent network GRU for processing, so as to update the node representation and graph-level representation in the time dimension; because in the dynamic graph scenario, the node representation will change with the passage of time T, T+1, and T+2, the gated recurrent network GRU can capture the long-term and short-term dependencies in the time series by processing these node or graph feature sequences that change over time, thereby providing the system with more spatiotemporal dynamic feature prediction capabilities; for example, assuming that at time T, the node feature is h v T , at time T+1 and T+2, the node features are h v T+1 、h v T+2 After receiving these time-varying features, the gated recurrent network GRU updates the time series representation of the node so that it contains historical information and time dependencies.
[0067] The present invention uses the gated recurrent network GRU to model the characteristics of time series, captures the temporal dynamic changes of node features and the time dependency of graph-level features, and not only processes the temporal relationship of the node level, but also can perform effective spatiotemporal dynamic prediction of the global information at the graph level.
[0068] A5. Perform related tasks based on the updated node representation and graph-level representation of the gated recurrent network GRU;
[0069] The related tasks include but are not limited to:
[0070] Node classification task: Based on the updated node features, the classification algorithm is used to identify and classify the nodes, and relevant analysis is performed, such as analyzing the current status of a fishing boat (such as fishing, sailing, or mooring) or the distribution of resources in the sea area.
[0071] Or link prediction tasks: after the attributes of the interaction edges and migration edges between the fishing boats and the sea area nodes are updated, future links can be predicted, that is, the future migration and interaction behaviors between the fishing boats and the sea area can be predicted, thereby assisting intelligent decision-making.
[0072] In specific implementations, the present invention can well predict and analyze the behavior of fishing vessels through the spatiotemporal characteristics based on real-time updated dynamic knowledge graphs and neural network processing, and promptly discover potential abnormal behaviors, such as illegal fishing or navigation deviations from the planned path. By modeling historical data, it can predict the possible behavioral patterns of fishing vessel groups in the future, and assist fishing vessel managers in making scientific decisions, such as optimizing route selection, rationally planning fishing areas, and strengthening resource protection.
[0073] Specific application scenarios of the technical solution of the present invention include but are not limited to:
[0074] Optimize fishing efficiency: Based on the migration patterns of fishing vessels and resource distribution predictions, intelligently recommend the best fishing areas to improve fishing efficiency.
[0075] Illegal fishing warning: Based on abnormal behavior detection, early warning is provided for fishing vessels entering the prohibited fishing areas to engage in illegal fishing, thus ensuring the sustainability of fishery resources.
[0076] Route optimization: By analyzing the dynamic navigation data of fishing vessels, the navigation path can be optimized, the navigation time can be saved, the fuel consumption can be reduced, and the economy of fishing vessel operations can be improved.
[0077] The actual effect verification of the technical solution of the present invention:
[0078] The fishing vessel-sea area dynamic knowledge graph model of the present invention supports a dynamic prediction algorithm of spatiotemporal evolution, and has shown good results in multiple typical fishing vessel behavior prediction tasks. In order to verify the practical application value of the technical solution of the present invention, we conducted a large number of experiments to test the accuracy, precision and recall of the model in typical event predictions. The results show that the technical solution of the present invention is able to perform well under the complexity of spatiotemporal dynamic data. We selected typical fishing vessel behavior events, such as fishing vessel migration events, illegal fishing events, and fishing efficiency optimization events for prediction; in the experiment, we used standard machine learning evaluation indicators, namely, accuracy and precision to measure the prediction effect of the model. Figure 4As shown in the figure, the experimental results show that the technical solution proposed by the present invention can accurately capture the dynamic behavior of fishing boat groups, especially in predicting migration events and illegal fishing events, and has achieved a high degree of accuracy. At the same time, when the present invention is implemented, the fishing boat-sea area dynamic knowledge graph model of the present invention can also be used for multi-dimensional data analysis, such as Figure 5 As shown, it shows the results of multidimensional data analysis of fishing vessel behavior.
[0079] In order to verify the effectiveness of the present invention in optimizing fishing boat routes and reducing costs, we collected data from 20 different routes and conducted simulation tests. Each route simulated the navigation path and fuel consumption of a fishing boat, and compared the difference in fuel consumption between the route optimized by the present invention and the unguided route (i.e., the traditional navigation path). Figure 6 As shown, the test results show that: compared with the unguided navigation route, the optimized route generated by the present invention significantly reduces fuel consumption, with an average consumption reduction of about 2%-5%; these test results verify the feasibility and effectiveness of the technical solution proposed in the present invention in practical applications.
[0080] In summary, by adopting the above-mentioned technical scheme of the present invention, at least the following beneficial effects are achieved: by introducing a dynamic knowledge graph and combining a recurrent gated network (GRU) and a relational graph attention network (rGAT), the dynamic changes of fishing boats and sea areas can be accurately modeled in the time dimension, thereby accurately capturing the migration patterns and group activity behaviors of fishing boats in the ocean area; at the same time, based on the updated node representation and graph-level representation, better fishing boat migration can be analyzed and predicted, abnormal fishing behavior can be warned, etc., thereby providing good intelligent decision support.
[0081] Based on the same inventive concept, the present application also provides a device corresponding to the method in Example 1, see Example 2 for details.
[0082] Embodiment 2
[0083] In this embodiment, a modeling and prediction device based on a dynamic knowledge graph is provided. Figure 7 As shown, the device includes a knowledge graph construction module and a model updating module;
[0084] The knowledge graph construction module is used to use fishing boats and sea area data as nodes, use edges to represent the migration and interaction between fishing boats and sea areas, so as to form a heterogeneous graph, and introduce time attributes to characterize dynamic characteristics, so as to construct a dynamic knowledge graph of fishing boats and sea areas;
[0085] The model updating module is used to build a prediction model by combining the gated recurrent network GRU and the relational graph attention network rGAT, and use the constructed prediction model to process the update of node representation and graph-level representation in the dynamic knowledge graph.
[0086] In an embodiment of the present invention, the knowledge graph construction module is specifically used to:
[0087] The dynamic knowledge graph of fishing boats and sea areas is defined as G = (V, E, T), and the dynamic knowledge graph is recorded as graph G; where V represents the node set, E represents the edge set, T represents the current time of graph G, and T represents a monotonically increasing number; since the behavior of fishing boats and the sea environment are both dynamic, that is, the graph G is a dynamic graph, so time T is used to represent the state of the graph at different times;
[0088] In graph G, the nodes include fishing boat node V 船 and sea area node V 域 , that is, each fishing boat is regarded as an independent fishing boat node V 船 , each sea area is regarded as an independent sea area node V 域 In the present invention, the fishing boat node V 船 The attributes include but are not limited to: the unique identification of the fishing vessel, the current latitude and longitude coordinates, speed, navigation direction, fishing activity status (such as fishing, sailing, mooring); the sea area node V 域 The attributes include but are not limited to: the unique identification of the sea area, the meteorological conditions of the current sea area (such as wind speed, wind direction, tide, etc.), legal constraints (such as whether it is a protected area, a no-fishing area, etc.), resource information (such as fish distribution, etc.); of course, in the specific implementation of the present invention, fishing boat nodes V can also be added according to actual use needs. 船 and sea area node V 域 Attributes;
[0089] In graph G, the edges include the fishing boat migration edge E 迁移 Interaction edge with fishing boats 交互 , that is, when a fishing boat sails from one sea area to another, at the nodes V in these two sea areas 域 An undirected edge is established between them as the fishing boat migration edge E 迁移 , since the migration of fishing boats is bidirectional, when fishing boats migrate between two sea areas, the nodes V 域 An undirected edge is established between them; when a fishing boat enters a certain sea area, at the fishing boat node V 船 With sea area node V 域 An edge is established between them as the fishing boat sea area interaction edge E 交互 , the fishing boat sea area interaction edge E 交互 It is used to describe the relationship between fishing boats and sea areas.迁移 The attributes of the fishing boat sea area include but are not limited to: migration time, sailing distance, migration speed; 交互 The attributes include, but are not limited to: fishing activity information (such as whether fishing is in progress, etc.), compliance information (such as whether fishing is conducted within a legal area, etc.), and environmental interaction information (such as the impact of wind speed and ocean currents on fishing boats, etc.); of course, in the specific implementation of the present invention, the migration edge of the fishing boat can also be increased according to actual use needs. 迁移 Interaction edge with fishing boats 交互 The properties of Figure 2 As shown, the Figure 2 This is an example diagram of a fishing boat-sea area dynamic knowledge graph provided by the present invention.
[0090] In an embodiment of the present invention, Figure 3 As shown, the model updating module is specifically used for:
[0091] A1. Set the fishing boat node V 船 and sea area node V 域 Unify them into the same attribute vector structure and migrate the fishing boat edge E 迁移 Interaction edge with fishing boats 交互 Unified into the same attribute vector structure; because the fishing boat node V 船 and sea area node V 域 There are two different nodes, which have different attribute vectors. In order to facilitate the subsequent processing of nodes, the present invention adopts the fishing boat node V 船 and sea area node V 域 Unified into the same attribute vector structure; similarly, the fishing boat migration edge E 迁移 Interaction edge with fishing boats 交互 There are two different edges, and they also have different attribute vectors. In order to facilitate the subsequent processing of the edges, the fishing boat migration edge E is also adopted. 迁移 Interaction edge with fishing boats 交互 Unified into the same attribute vector structure.
[0092] Wherein, the fishing boat node V 船 and sea area node V 域 Unify into the same attribute vector structure: Specifically: transform the fishing boat node V 船 The attribute vector is denoted as [A 船0 ,A 船1 ,...,A 船k ], the sea area node V 域 The attribute vector is denoted as [A 域0 ,A 域1 ,...,A 域p ]; Set the fishing boat node V 船 and sea area node V 域The attribute vectors are concatenated together and an A is added to the first bit of the concatenated vector. t Used to represent the category of the node, so as to obtain an attribute vector with a length of k+p+1 [A t ,A 船0 ,A 船1 ,...,A 船k ,A 域0 ,A 域1 ,...,A 域p ], k and p are both positive integers greater than 0; in the specific use of the present invention, when the node category is a fishing boat node, the attribute vector [A 域0 ,A 域1 ,...,A 域p ] is set to zero; otherwise, when the node type is a sea area node, the attribute vector [A 船0 ,A 船1 ,...,A 船k ] is set to zero;
[0093] The fishing boats will be moved to the side 迁移 Interaction edge with fishing boats 交互 Unified into the same attribute vector structure: Specifically: the fishing boat migration edge E 迁移 The attribute vector is denoted as [A 迁移0 ,A 迁移1 ,...,A 迁移y ], the fishing boat sea area interactive edge E 交互 The attribute vector is denoted as [A 交互0 ,A 交互1 ,...,A 交互o ]; Move the fishing boat to the side 迁移 Interaction edge with fishing boats 交互 The attribute vectors are concatenated together and an A is added to the first bit of the concatenated vector. t Used to represent the category of the node, so as to obtain an attribute vector with a length of y+o+1 [A t ,A 迁移0 ,A 迁移1 ,...,A 迁移y ,A 交互0 ,A 交互1 ,...,A 交互o ], y and o are both positive integers greater than 0; in the specific use of the present invention, when the edge category is a fishing boat migration edge, the attribute vector [A 交互0 ,A 交互1 ,...,A 交互o ] is set to zero; otherwise, when the edge category is a fishing boat sea area interaction edge, the attribute vector [A 迁移0 ,A 迁移1,...,A 迁移y ] is set to zero.
[0094] A2. rGAT node representation update: At a given moment, the relationship graph attention network rGAT is used to aggregate the neighbor nodes of the node in the graph G and the relationship between the neighbor nodes, so as to update the representation of each node in the graph G; the core of the relationship graph attention network rGAT is to perform independent feature updates on nodes of different relationship types in the graph structure. Through the relationship graph attention aggregation operation, rGAT learns the representation of the node from the node's neighbor nodes and their relationships. That is, for each node, it not only uses the information of its direct neighbors, but also considers the impact of neighbors under different relationships on its features.
[0095] The following is a detailed introduction to the entire process of rGAT node representation update:
[0096] The node attribute vector [A t ,A 船0 ,A 船1 ,...,A 船k ,A 域0 ,A 域1 ,...,A 域p ] is recorded as e, and the attribute vector of the edge is recorded as r. In the first layer of the attention network of the graph attention network rGAT, the inputs are the attributes of the nodes And the attributes of the edges Get the updated node attributes And the updated edge attributes in, and are the lengths of the input node feature vector and the input edge feature vector, respectively. e and N r are the number of input nodes and input edges respectively. In order to capture the relationship between connected nodes, a shared attention mechanism is used here. For two nodes v and u connected by edge i, the attention att is calculated. viu =f[e v ||r i ||e u ], where f is a forward-connected network, e v and e u are the features of nodes v and u, r i is the feature of edge i; then, the softmax function is applied, a viu =softmax ui (att viu ), and the obtained viuIt can be regarded as the contribution of node u to node v, or it can be regarded as the contribution of node v to node u. For a node, without loss of generality, taking node v as an example, the contribution of all neighbors of node v is aggregated to obtain the final representation of node v. Let σ be a nonlinear function, where κ v is the set of neighbors of node v, ρ vu is the set of edges connecting nodes v and u, and * is multiplication, as shown in the following formula:
[0097]
[0098] After several layers of the above attention network operation, the feature representation of the node can be obtained, which is represented by e here. Because the graph is dynamic, the node feature representation at time t is e t .
[0099] A3. Calculation of graph-level representation: Use the readout function to obtain the graph-level feature representation G t , where t represents the time. The calculation of graph-level representation is the aggregation of global representation of the entire graph, especially when it comes to graph classification and global feature extraction; in order to obtain the global representation of the graph from the node representation, the readout function of DGL can be used. The readout function is an operation that summarizes node features into graph-level features.
[0100] In the present invention, in the calculation of graph-level representation, the readout function includes but is not limited to a sum function (sum), a mean function (mean) or a maximum pooling function (maxpooling). By adopting the readout function, the node features are aggregated into a global graph feature vector, which can be used for subsequent processing or classification tasks.
[0101] A4. GRU time update: Use the gated recurrent network GRU to process the time series of node representation and graph-level representation, that is, input the node features and graph-level features at different times into the gated recurrent network GRU for processing, so as to update the node representation and graph-level representation in the time dimension; because in the dynamic graph scenario, the node representation will change with the passage of time T, T+1, and T+2, the gated recurrent network GRU can capture the long-term and short-term dependencies in the time series by processing these node or graph feature sequences that change over time, thereby providing the system with more spatiotemporal dynamic feature prediction capabilities; for example, assuming that at time T, the node feature is h v T , at time T+1 and T+2, the node features are h v T+1 、h v T+2After receiving these time-varying features, the gated recurrent network GRU updates the time series representation of the node so that it contains historical information and time dependencies.
[0102] The present invention uses the gated recurrent network GRU to model the characteristics of time series, captures the temporal dynamic changes of node features and the time dependency of graph-level features, and not only processes the temporal relationship of the node level, but also can perform effective spatiotemporal dynamic prediction of the global information at the graph level.
[0103] A5. Perform related tasks based on the updated node representation and graph-level representation of the gated recurrent network GRU;
[0104] The related tasks include but are not limited to:
[0105] Node classification task: Based on the updated node features, the classification algorithm is used to identify and classify the nodes, and relevant analysis is performed, such as analyzing the current status of a fishing boat (such as fishing, sailing, or mooring) or the distribution of resources in the sea area.
[0106] Or link prediction tasks: after the attributes of the interaction edges and migration edges between the fishing boats and the sea area nodes are updated, future links can be predicted, that is, the future migration and interaction behaviors between the fishing boats and the sea area can be predicted, thereby assisting intelligent decision-making.
[0107] Based on the same inventive concept, the present application provides an electronic device embodiment corresponding to the first embodiment, see the third embodiment for details.
[0108] Embodiment 3
[0109] This embodiment provides an electronic device, such as Figure 8 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any implementation method in the first embodiment can be implemented.
[0110] Since the electronic device introduced in this embodiment is a device used to implement the method in the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements the device used by the method in the embodiment of the present application, it belongs to the scope of protection of the present application.
[0111] Based on the same inventive concept, the present application provides a storage medium corresponding to the first embodiment, see the fourth embodiment for details.
[0112] Embodiment 4
[0113] This embodiment provides a computer-readable storage medium, such as Fig. 9 As shown, a computer program is stored thereon, and when the computer program is executed by a processor, any implementation method in Example 1 can be implemented.
[0114] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0115] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0116] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0117] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0118] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A modeling and prediction method based on a dynamic knowledge graph, characterized by: The method comprises the following steps: Step S1: Take fishing boats and sea area data as nodes, use edges to represent the migration and interaction between fishing boats and sea areas, and introduce time attributes to characterize dynamic characteristics, so as to construct a dynamic knowledge graph of fishing boats and sea areas; Step S2: Combine the gated recurrent network GRU and the relational graph attention network rGAT to build a prediction model, and use the constructed prediction model to process the update of node representation and graph-level representation in the dynamic knowledge graph.
2. A modeling and prediction method based on a dynamic knowledge graph according to claim 1, characterized in that: The step S1 specifically includes: Define the dynamic knowledge graph of fishing boats and sea areas as G = (V, E, T), and record the dynamic knowledge graph as graph G; where V represents the node set, E represents the edge set, T represents the current time of graph G, and T represents a monotonically increasing number; In graph G, the nodes include fishing boat node V 船 and sea area node V 域 , that is, each fishing boat is regarded as an independent fishing boat node V 船 , each sea area is regarded as an independent sea area node V 域 ; In graph G, the edges include the fishing boat migration edge E 迁移 Interaction edge with fishing boats 交互 , that is, when a fishing boat sails from one sea area to another, at the nodes V in these two sea areas 域 An undirected edge is established between them as the fishing boat migration edge E 迁移 ; When a fishing boat enters a certain sea area, at the fishing boat node V 船 With sea area node V 域 An edge is established between them as the fishing boat sea area interaction edge E 交互 .
3. A modeling and prediction method based on a dynamic knowledge graph according to claim 2, characterized in that: The fishing vessel node V 船 The attributes include but are not limited to: the unique identification of the fishing vessel, the current latitude and longitude coordinates, speed, navigation direction, and fishing activity status; The sea area node V 域 The attributes include but are not limited to: unique identification of the sea area, current meteorological conditions of the sea area, legal constraints, and resource information; The fishing boat migration edge E 迁移 The attributes include but are not limited to: migration time, sailing distance, migration speed; The fishing boat sea area interaction edge E 交互 The attributes include, but are not limited to: fishing activity information, compliance information, and environmental interaction information.
4. A modeling and prediction method based on a dynamic knowledge graph according to claim 2, characterized in that: The step S2 specifically includes: Set the fishing boat node V 船 and sea area node V 域 Unify them into the same attribute vector structure and migrate the fishing boat edge E 迁移 Interaction edge with fishing boats 交互 Unified into the same attribute vector structure; rGAT node representation update: At a given moment, the relationship graph attention network rGAT is used to aggregate the neighbor nodes of the node in the graph G and the relationship between the neighbor nodes, so as to update the representation of each node in the graph G; Computation of graph-level representation: Use the readout function to derive graph-level feature representation; GRU time update: Use the gated recurrent network GRU to process the time series of node representation and graph level representation, and realize the update of node representation and graph level representation in the time dimension; Based on the updated node representation and graph-level representation of the gated recurrent network GRU, related tasks are performed.
5. A modeling and prediction method based on a dynamic knowledge graph according to claim 4, characterized in that: The fishing boat node V 船 and sea area node V 域 Unify into the same attribute vector structure: Specifically: transform the fishing boat node V 船 The attribute vector is recorded as [A 船0 ,A 船1 ,...,A 船k ], the sea area node V 域 The attribute vector is recorded as [A 域0 ,A 域1 ,...,A 域p ]; Set the fishing boat node V 船 and sea area node V 域 The attribute vectors are concatenated together and an A is added to the first bit of the concatenated vector. t Used to represent the category of the node, so as to obtain an attribute vector with a length of k+p+1 [A t ,A 船0 ,A 船1 ,...,A 船k ,A 域0 ,A 域1 ,...,A 域p ]; The fishing boats will be moved to the side 迁移 Interaction edge with fishing boats 交互 Unified into the same attribute vector structure: Specifically: the fishing boat migration edge E 迁移 The attribute vector is recorded as [A 迁移0 ,A 迁移1 ,...,A 迁移y ], the fishing boat sea area interactive edge E 交互 The attribute vector is recorded as [A 交互0 ,A 交互1 ,...,A 交互o ]; Move the fishing boat to the side 迁移 Interaction edge with fishing boats 交互 The attribute vectors are concatenated together and an A is added to the first bit of the concatenated vector. t Used to represent the category of the node, so as to obtain an attribute vector with a length of y+o+1 [A t ,A 迁移0 ,A 迁移1 ,...,A 迁移y ,A 交互0 ,A 交互1 ,...,A 交互o ].
6. A modeling and prediction method based on a dynamic knowledge graph according to claim 4, characterized in that: In the calculation of graph-level representation, the readout function includes but is not limited to a sum function, a mean function or a maximum pooling function.
7. A modeling and prediction method based on a dynamic knowledge graph according to claim 4, characterized in that: The related tasks include but are not limited to node classification tasks or link prediction tasks.
8. A modeling and prediction device based on a dynamic knowledge graph, characterized in that: The device includes a knowledge graph construction module and a model updating module; The knowledge graph construction module is used to use fishing boats and sea area data as nodes, use edges to represent the migration and interaction between fishing boats and sea areas, and introduce time attributes to characterize dynamic characteristics, so as to construct a dynamic knowledge graph of fishing boats and sea areas; The model updating module is used to build a prediction model by combining the gated recurrent network GRU and the relational graph attention network rGAT, and use the constructed prediction model to process the update of node representation and graph-level representation in the dynamic knowledge graph.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Fishery knowledge graph construction device and method and computer readable storage medium
CN110222196A
Cited By
Multi-level collaborative planning system and resource allocation method for EOD project
CN120655233A
Gill net fishing boat oil consumption analysis method based on trajectory big data
CN121435144A
Ontology and Large Language Model-Based Maritime Traffic Semantic Analysis and Composite Query Processing System and Method
KR102966718B1