CN113487268B - Ship route identification method and device, electronic equipment and storage medium - Google Patents

Ship route identification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113487268B
CN113487268B CN202110845603.1A CN202110845603A CN113487268B CN 113487268 B CN113487268 B CN 113487268B CN 202110845603 A CN202110845603 A CN 202110845603A CN 113487268 B CN113487268 B CN 113487268B
Authority
CN
China
Prior art keywords
directed graph
route
ship
acquiring
target ship
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110845603.1A
Other languages
Chinese (zh)
Other versions
CN113487268A (en
Inventor
范晓龙
孟军
韩斌
展建敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Elane Inc
Original Assignee
Elane Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Elane Inc filed Critical Elane Inc
Priority to CN202110845603.1A priority Critical patent/CN113487268B/en
Publication of CN113487268A publication Critical patent/CN113487268A/en
Application granted granted Critical
Publication of CN113487268B publication Critical patent/CN113487268B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Operations Research (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a ship route identification method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: constructing a directed graph based on port historical religion data of the target ship, and acquiring a first set and a second set; and acquiring the route of the target ship based on the first set and the second set. According to the ship route identification method, the device, the electronic equipment and the storage medium, the directed graph is constructed through the port historical religion data, the strong communication components and the rings in the directed graph are extracted, and the route of the target ship is obtained based on the first set formed by the strong communication components and the second set formed by the rings, so that the ship route can be identified more efficiently, accurately and timely, the route of any container in the world can be dynamically excavated, multidimensional analysis on the global container route can be more convenient, and the change of the ship operation route can be dynamically excavated.

Description

Ship route identification method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of transportation technologies, and in particular, to a method and apparatus for identifying a ship route, an electronic device, and a storage medium.
Background
With the development of shipping, container routes are amplified or changed more frequently, so that dynamic identification of container ships and other shipping ship routes is important for ship shipment.
The container route has the characteristics of airlines, connectivity, directivity and circularity. The container ship runs in an airliner mode through the airlines, wherein ports are communicated with each other, the directivity from port A to port B exists, and the circularity from port A (set A as a starting port, namely the ending port of the airlines) to port A is achieved. Scheduling problems exist in the container ship transportation process, such as port adding, port throwing or port transferring (namely, a ship company can dynamically mobilize the ship to change the course in the container transportation process, but the change does not affect the course of the cargo operation of the ship company, and only another container ship can be possibly replaced for continuous transportation), and the like.
The existing method is to manually identify the ship route based on the historical leaning data, but the timeliness, the accuracy and the efficiency of route identification are low.
Disclosure of Invention
The invention provides a ship route identification method, a device, electronic equipment and a storage medium, which are used for solving the technical problem of poor timeliness of route identification in the prior art.
The invention provides a ship route identification method, which comprises the following steps:
constructing a directed graph based on port historical religion data of the target ship;
acquiring a first set and a second set based on the directed graph;
acquiring a route of the target ship based on the first set and the second set;
wherein, the vertexes in the directed graph represent ports on which the target ship is hung, and the edges in the directed graph represent the hanging relation and the hanging attribute of the two ports; the first set is a set formed by strong connected components of the directed graph; the second set is a set of rings in the directed graph.
According to the ship route identification method provided by the invention, after acquiring the route of the target ship based on the first set and the second set, the method further comprises the following steps:
and acquiring the route of the target ship company based on the route of each target ship of the target ship company.
According to the ship route identification method provided by the invention, the port history leaning data based on the target ship is used for constructing a directed graph, and the method for acquiring the first set and the second set based on the directed graph further comprises the following steps:
performing topological sorting on the directed graph;
based on the results of the topological ordering, it is determined that a ring is present in the directed graph.
According to the ship route identification method provided by the invention, the first set is acquired based on the directed graph, and the method specifically comprises the following steps:
based on a depth-first search algorithm, obtaining each strong connected component of the directed graph;
the first set is obtained based on the strongly connected components of the directed graph.
According to the ship route identification method provided by the invention, the second set is acquired based on the directed graph, and the method specifically comprises the following steps:
coloring each vertex in the directed graph based on a depth-first search algorithm;
acquiring each ring in the directed graph based on the coloring result;
the second set is obtained based on the respective rings in the directed graph.
According to the ship route identification method provided by the invention, the route of the target ship is obtained based on the first set and the second set, and the method specifically comprises the following steps:
respectively acquiring first similarity of each element in the first set and each element in the second set;
and acquiring the route of the target ship based on the first similarity.
According to the ship route identification method provided by the invention, the route of the target ship company is obtained based on the route of each target ship of the target ship company, and the method specifically comprises the following steps:
acquiring a second similarity between every two airlines;
and merging the routes of the target ships of the target ship company based on the second similarity, and acquiring the routes of the target ship company.
The invention also provides a ship route recognition device, which comprises:
the building module is used for building a directed graph based on port historical leaning data of the target ship;
the acquisition module is used for acquiring a first set and a second set based on the directed graph;
the identification module is used for acquiring the route of the target ship based on the first set and the second set;
wherein, the vertexes in the directed graph represent ports on which the target ship is hung, and the edges in the directed graph represent the hanging relation and the hanging attribute of the two ports; the first set is a set formed by strong connected components of the directed graph; the second set is a set of rings in the directed graph.
The invention also provides electronic equipment, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the ship route identification method according to any one of the above when executing the computer program.
The invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of a ship route identification method as described in any of the above.
According to the ship route identification method, the device, the electronic equipment and the storage medium, the directed graph is constructed through the port history leaning data, the strong communication components and the rings in the directed graph are extracted, and the route of the target ship is obtained based on the first set formed by the strong communication components and the second set formed by the rings, so that the ship route can be identified more efficiently, accurately and timely, the route of any container in the world can be dynamically excavated, the multidimensional analysis of the global container route can be more convenient, and the change of the ship operation route can be dynamically excavated.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a ship route identification method provided by an embodiment of the invention;
FIG. 2 is a schematic diagram of a directed graph in an embodiment of the invention;
FIG. 3 is a schematic structural view of a ship route recognition device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the embodiments of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," "outer," and the like indicate or are based on the orientation or positional relationship shown in the drawings, merely to facilitate description of the embodiments of the present invention and to simplify the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance, and not order.
In describing embodiments of the present invention, it should be noted that, unless explicitly stated and limited otherwise, the terms "mounted," "connected," and "connected" should be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in embodiments of the present invention will be understood in detail by those of ordinary skill in the art.
In order to overcome the problems in the prior art, the invention provides a ship route identification method, a device, electronic equipment and a storage medium, and the invention is characterized in that based on port historical reliability data, the ship route is dynamically excavated by utilizing methods of strong communication components, DFS (Depth-First-Search) and topological sequencing in graph theory, and the like, so that the problems that global container route change and expansion are difficult to discover and the influence of port skip, port adding and port transferring on route excavation can be solved, and the analysis of container company routes and the dynamic excavation of global container routes can be satisfied.
Fig. 1 is a schematic flow chart of a ship route identification method according to an embodiment of the present invention. The ship route recognition method according to the embodiment of the present invention is described below with reference to fig. 1. As shown in fig. 1, the method includes: and 101, constructing a directed graph based on port historical leaning data of the target ship.
Wherein, the top point in the directed graph represents the port on which the target ship is hung, and the side in the directed graph represents the hanging relation and the hanging attribute of the two ports.
Specifically, the port wall-mounted data is mass port wall-mounted data of global ships generated by using AIS (Automatic Identification System, automatic ship identification system, AIS system for short) data, the wall-mounted data are distributed on a time axis in a staggered manner, and shipping time nodes and space nodes of the ships for years are recorded.
The port hitching data includes time information and space information of the ship. The time information comprises arrival time, berthing time and departure time, and the space information comprises port identification, anchor identification and berthing identification.
The leaning relation refers to the order in which ships are leaning at ports.
The berthing attribute comprises the basic attribute of a port on which the ship is berthed (comprising port name, id, berth, anchor ground, wharf, position, country and the like), the berthing time (comprising anchor time, equal berthing time, berthing operation time, departure time and the like), port distance, transportation time and the like.
Based on the port historical leaning data of the target ship, continuous same leaning ports (aiming at removing interference data) are removed, ports are taken as nodes v, connecting lines between ports are taken as edges e, the sequence of leaning ports is taken as the direction of the edges, and average time between ports is taken as a weight w. Namely, a directed acyclic graph g= (V, E) is generated, and an attribute d, v.d of the node V represents a port id.
Optionally, the target vessel is a container vessel.
If the target vessel starts from port a and arrives at port B without being suspended from other ports in the port history suspension data, there is an edge in the directed graph connecting the vertex representing port a (also called a "node") with the vertex representing port B, the direction of the edge being such that the vertex representing port a is connected to the vertex representing port B.
The historical leaning data of the container ship is used for removing continuous same leaning ports (the purpose is to remove interference data), ports are used as nodes, connecting lines between ports are used as edges, port sequencing is used as a direction, and average time between ports is used as a weight. The method comprises the steps of giving different ids to ports, taking the running direction of ships from port id1 to port id2 as the direction of a chart edge, recording the number of voyages and voyage time, sequentially taking charts of the hanging ports of target ship in a target time period (such as the last year) according to the steps, and finally calculating the average voyage time of the edge as weight by using the voyage time and voyage time recorded by the edge in the charts through a formula w=the voyage time and/or voyage time.
Step 102, acquiring a first set and a second set based on the directed graph.
The first set is a set formed by strong connected components of the directed graph; the second set is a set of rings in the directed graph.
Specifically, in the directed graph G, if there is one directed path from vi to vj between two vertices vi, vj (vi > vj) and there is one directed path from vj to vi, then the two vertices are said to be strongly connected (strongly connected). I.e. two vertices are said to be strongly connected if they can be mutually connected.
If every two vertices of the directed graph G are strongly connected, G is said to be a strongly connected graph. The extremely large strongly connected subgraph of the directed graph is called the strongly connected component (strongly connected components).
Extremely strong connected subgraph: a strongly connected subgraph of a graph and joining any point that is not in its point set will result in it no longer being strongly connected.
The first set may be obtained by calculating each strong connected component of the directed graph obtained in step 101 by any algorithm that calculates the strong connected components of the directed graph.
In graph theory, a loop is a non-empty path that repeats with only the first and last vertices. The loop in the directed graph (directed loop) is a non-null path that repeats with only the first and last vertices.
The second set may be obtained by calculating the respective loops of the directed graph obtained in step 101 by any one of the loop finding algorithms.
Step 103, acquiring the route of the target ship based on the first set and the second set.
In particular, because container ships are operated on airlines, there are periodic and dynamic scheduling of the ships, all sets of strongly connected components (i.e., the first set) and all sets of rings (i.e., the second set) may contain partial airlines, full airlines, airlines beginning, no airlines, multiple airlines, etc., where in theory one or more of the above may exist.
By fusion analysis of the first set and the second set, the route of the target ship can be obtained, so that the problem that the route is inaccurate or incomplete by using strong communication components or using rings alone is solved.
And the fusion analysis is carried out, so that the conditions of partial routes, complete routes, route start, no routes, multiple routes and the like can be distinguished, the complete routes can be identified, and the influence of port skip and port addition on route identification is solved.
Alternatively, the first set and the second set are processed, and the route represented by each element in the intersection may be determined as the route of the target ship by adopting a method of acquiring the intersection of the first set and the second set.
According to the embodiment of the invention, the directed graph is constructed through port historical religion data, the strong communication components and the rings in the directed graph are extracted, and the route of the target ship is acquired based on the first set formed by the strong communication components and the second set formed by the rings, so that the ship route can be identified more efficiently, accurately and timely, the route of any container in the world can be dynamically excavated, multidimensional analysis on the route of the container in the world can be more convenient, and the change of the operation route of the ship can be dynamically excavated.
Based on the foregoing in any one of the foregoing embodiments, after acquiring the route of the target ship based on the first set and the second set, further includes: and acquiring the route of the target ship company based on the route of each target ship of the target ship company.
Specifically, for a target ship company, each container ship of the company may be regarded as a target ship.
For each target ship, the ship route of the target ship can be obtained by the ship route identification method provided by the embodiment.
For the target ship company, the route of each target ship of the target ship company may be subjected to fusion analysis, for example, repeated routes are removed and/or routes including ports less than a preset threshold (for example, 3 or the like) are removed, and the route of the target ship company may be obtained.
It will be appreciated that each ship company may be individually targeted to obtain the route for each ship company worldwide, i.e., the global container route. And storing and updating all the obtained global container airlines according to the classification of the shipcompany, and dynamically calculating the global airlines.
It should be noted that similar routes between the target marine companies are not merged.
The embodiment of the invention can identify the global container route more efficiently, accurately and timely by dynamically excavating the global container route according to the ship company, can dynamically excavate the global container route, can more conveniently analyze the global container route in a multi-dimensional manner, and can dynamically excavate the change of the global container route.
Based on the foregoing in any one of the foregoing embodiments, constructing a directed graph based on port history hitching data of the target ship, and acquiring a space between the first set and the second set based on the directed graph, further includes: the directed graph is topologically ordered.
Specifically, between step 101 and step 102, a step of determining that a loop exists in the directed graph is further included.
If it is determined that a loop exists in the directed graph, step 102 may continue to be performed.
If it is determined that no loops are present in the directed graph, step 102 is not continued.
The decision as to whether or not a ring exists in the directed graph may be determined by topologically ordering the directed graph.
Topology ordering is carried out on the directed graph, and the topology ordering can be generated by using a DFS and a TOPLLOGICAL-SORT algorithm:
(1) Selecting a vertex without a precursor (namely, the input degree is 0) from the directed graph, and outputting the vertex;
(2) This vertex and all arcs ending in it are omitted from the directed graph.
Repeating the two steps until the graph is empty or the graph is not empty but the vertex without the precursor cannot be found.
Based on the results of the topological ordering, it is determined that a ring is present in the directed graph.
Specifically, if a topology ordering graph can be generated, all vertices are output, indicating no loop in the directed graph, step 102 is no longer performed.
If topology ordering generation fails, there are vertices not output, indicating loops in the directed graph, and step 102 is continued.
According to the embodiment of the invention, the ring exists in the directed graph through topological sequencing of the directed graph, so that the situation that the ring cannot be obtained by directly executing the ring finding algorithm can be avoided, invalid ship route identification can be avoided, and the efficiency can be improved.
Based on the content of any of the foregoing embodiments, obtaining the first set based on the directed graph specifically includes: based on a depth-first search algorithm, each strongly connected component of the directed graph is obtained.
Specifically, a depth-first search algorithm may be employed to calculate the strongly connected components of the directed graph, thereby obtaining the strongly connected components of the directed graph.
Depth-first search algorithms commonly used to compute strongly connected components of a graph include: kosaraju algorithm, tarjan algorithm, gabow algorithm, etc.
Taking the Tarjan algorithm as an example, each strong connected component is a subtree in the search tree. During searching, unprocessed nodes in the current search tree are added into a stack, and whether the node from the top of the stack to the stack is a strong communication component can be judged during backtracking. Defining DFN (u) as the sequence number (time stamp) searched by node u, and the sub-tree of Low (u) as u or u can trace back to the sequence number of the node in the earliest stack. It can be derived from the definition that Low (u) =min { Low (u), low (v) } (u, v) is a branch edge, u is a parent node of v.
A first set is obtained based on the strongly connected components of the directed graph.
Specifically, each strong connected component of the directed graph is taken as an element in the first set, so that the first set can be obtained.
According to the embodiment of the invention, each strong communication component of the directed graph is obtained through a depth-first search algorithm to obtain the first set, so that the strong communication component of the directed graph can be obtained more efficiently, accurately and timely, the ship route can be identified more efficiently, accurately and timely, the route of any container in the world can be dynamically excavated, multidimensional analysis of the route of the container in the world can be more convenient, and the change of the ship operation route can be dynamically excavated.
Based on the content of any of the foregoing embodiments, obtaining the second set based on the directed graph specifically includes: each vertex in the directed graph is colored based on a depth-first search algorithm.
In particular, the depth-first search algorithm for each ring in the directed graph provided by the embodiments of the present invention may be referred to as an improved DFS.
Depth-first may be implemented during the search using a general coloring algorithm, i.e., node coloring (represented using 0, -1, 1) to represent the state C [ N ] of the node.
The nodes in the graph are modified as follows, and one node in the graph has three states according to the value of C [ N ]:
cn=0, indicating that this node has not been accessed;
cn=1, indicating that this node was accessed at least 1 time, and its offspring nodes are being accessed;
cn=1, indicating that all descendent nodes of this node have been accessed.
According to the above assumption, when searching according to DFS, there are three possibilities when a node is encountered:
1. if C [ N ] =0, this is a new node, not processed;
2. if C N = -1, the description is that the node itself was accessed during the process of accessing the descendant of the node, then there is a loop in the directed graph.
3. If C n=1, a derivation similar to 2, there is no ring in the directed graph.
Each vertex starts with 0, is found to be-1 in the search, and is set to 1 again at the end (i.e., after its adjacency list is completely retrieved). This technique ensures that each vertex search is only present on one depth-first tree at the end, and therefore the trees are separate. In addition to creating a depth-first forest, the depth-first search simultaneously time stamps each node. Each node v has two time stamps: the first time stamp d v is recorded when node v is first found (juxtaposing-1) and the second time intercept fv is recorded when the adjacency list of check v is finished (juxtaposing v 1).
Based on the coloring result, each ring in the directed graph is acquired.
Specifically, based on the depth-first search process, several loops in the graph can be found, and the path of each loop is recorded. Thus, all loops in the figure can be obtained through the improved DFS algorithm and used for excavating the container route.
Based on the individual rings in the directed graph, a second set is obtained.
Specifically, each ring of the directed graph is used as an element in the second set, so that the second set can be obtained.
According to the embodiment of the invention, each ring of the directed graph is obtained through an improved depth-first search algorithm to obtain the second set, and the strong communication component of the directed graph can be obtained more efficiently, accurately and timely, so that the ship route can be identified more efficiently, accurately and timely, the route of any container in the world can be dynamically excavated, multidimensional analysis on the route of the container in the world can be more convenient, and the change of the ship operation route can be dynamically excavated.
Based on the foregoing in any one of the foregoing embodiments, acquiring, based on the first set and the second set, a route of the target ship specifically includes: a first similarity is obtained for each element in the first set to each element in the second set.
Specifically, for the first set and the second set, a first similarity of each element in the first set to each element in the second set may be determined by looking for whether the strongly connected components are a subset of the rings.
If a strong connected component is a subset of a ring, indicating that the first similarity of the two is similar; if a strongly connected component is not a subset of a ring, the first similarity of the two is said to be dissimilar.
Based on the first similarity, a course of the target vessel is acquired.
Specifically, the similar set E corresponding to the first set and the second set can be obtained through the steps.
Each set E is composed of strongly connected components and rings that have a similarity relationship. I.e., each strongly connected component in set E is at least similar to one ring in set E; each ring in the set E is at least similar to one strongly connected component in the set E.
Wherein E is present in three cases:
1. the similar set E is empty, which indicates that the ship route is not found;
2. only one-to-one similarity exists in the similarity set E, which indicates that the ship route is found, and each ring in the similarity set E can be respectively determined as the route of the target ship;
3. there is many-to-many or many-to-one similarity in the similarity set E, and the longest ring of the similar plurality of rings may be determined as the course of the target vessel.
The embodiment of the invention can identify the route of the target ship based on the similarity between the strong communication components and the ring, can identify the ship route more efficiently, accurately and timely, can dynamically excavate the route of any container in the world, can more conveniently analyze the route of the container in the world in a multi-dimensional manner, and can dynamically excavate the change of the operation route of the ship.
Based on the foregoing in any of the embodiments, obtaining the route of the target ship company based on the route of each target ship of the target ship company specifically includes: a second similarity between every two airlines is obtained.
Specifically, each two routes includes a first route of the first target ship and a second route of the second target ship.
A second similarity between each two routes may be obtained by a similarity algorithm jaccard similarity.
Jaccard index, also known as Jaccard similarity coefficient (Jaccard similarity coefficient), is used to compare similarity to variability between finite sample sets. The larger the Jaccard coefficient value, the higher the sample similarity.
And merging the routes of the target ships of the target ship company based on the second similarities, and acquiring the routes of the target ship company.
Specifically, for two routes with second similarity greater than the similarity threshold, the two routes can be combined by inserting, so that a route which is not repeated by the target ship company can be obtained.
The similarity threshold may be set according to the actual situation, for example, the similarity threshold is 80%. The embodiment of the present invention is not particularly limited with respect to the specific value of the similarity threshold.
The embodiment of the invention combines the routes of all target ships of the target ship company based on the similarity among the routes, acquires the routes of the target ship company, can identify the global container route more efficiently, accurately and timely, can dynamically mine the global container route, can more conveniently analyze the global container route in a multi-dimensional manner, and can dynamically mine the change of the global container route.
The ship route recognition device provided by the invention is described below, and the ship route recognition device described below and the ship route recognition method described above can be correspondingly referred to each other.
Fig. 3 is a schematic structural diagram of a ship route recognition device according to an embodiment of the present invention. Based on the foregoing content of any of the foregoing embodiments, as shown in fig. 3, the apparatus includes a construction module 301, an acquisition module 302, and an identification module 303, where:
a construction module 301, configured to construct a directed graph based on port historical religion data of a target ship;
an obtaining module 302, configured to obtain a first set and a second set based on the directed graph;
an identifying module 303, configured to obtain a route of the target ship based on the first set and the second set;
wherein, the top point in the directed graph represents the port on which the target ship is hung, and the edge in the directed graph represents the order of hanging of the two ports; a first set, which is a set formed by strong connected components of the directed graph; the second set is a set of rings in the directed graph.
Specifically, the construction module 301, the acquisition module 302, and the identification module 303 are electrically connected in sequence.
The construction module 301 removes consecutive identical leaning ports (for the purpose of removing interference data) based on port history leaning data of the target ship, takes ports as nodes v, takes a line between ports as a side e, takes port sequencing as a direction, and takes average time between ports as a weight w. Namely, a directed acyclic graph g= (V, E) is generated, and an attribute d, v.d of the node V represents a port id.
The obtaining module 302 may calculate each strong connected component of the directed graph obtained in step 101 through any algorithm for calculating the strong connected component of the directed graph, to obtain the first set.
The obtaining module 302 may also calculate each ring of the directed graph obtained in step 101 through any one of ring finding algorithms to obtain the second set.
The recognition module 303 can obtain the route of the target ship by performing fusion analysis on the first set and the second set, so as to overcome the problem that the route is inaccurate or incomplete by using strong communication components or using rings alone.
Optionally, the ship route recognition device further comprises:
and the summarizing module is used for acquiring the route of the target ship company based on the route of each target ship of the target ship company.
Optionally, the ship route recognition device further comprises:
the determining module is used for carrying out topological ordering on the directed graph; based on the results of the topological ordering, it is determined that a ring is present in the directed graph.
Optionally, the acquiring module 302 includes:
the first acquisition unit is used for acquiring all strong connected components of the directed graph based on a depth-first search algorithm; a first set is obtained based on the strongly connected components of the directed graph.
Optionally, the acquiring module 302 includes:
a second acquisition unit for coloring each vertex in the directed graph based on a depth-first search algorithm; acquiring each ring in the directed graph based on the coloring result; based on the individual rings in the directed graph, a second set is obtained.
Optionally, the identification module 303 is specifically configured to:
respectively acquiring first similarity of each element in the first set and each element in the second set;
based on the first similarity, a course of the target vessel is acquired.
Optionally, the summarizing module is specifically configured to:
acquiring a second similarity between every two airlines;
and merging the routes of the target ships of the target ship company based on the second similarities, and acquiring the routes of the target ship company.
The ship route recognition device provided by the embodiment of the invention is used for executing the ship route recognition method provided by the invention, the implementation mode of the device is consistent with the implementation mode of the ship route recognition method provided by the invention, the same beneficial effects can be achieved, and the description is omitted here.
The ship route recognition device is used for the ship route recognition method of each embodiment. Therefore, the description and definition in the ship route recognition method in the foregoing embodiments may be used for understanding each execution module in the embodiments of the present invention.
According to the embodiment of the invention, the directed graph is constructed through port historical religion data, the strong communication components and the rings in the directed graph are extracted, and the route of the target ship is acquired based on the first set formed by the strong communication components and the second set formed by the rings, so that the ship route can be identified more efficiently, accurately and timely, the route of any container in the world can be dynamically excavated, multidimensional analysis on the route of the container in the world can be more convenient, and the change of the operation route of the ship can be dynamically excavated.
Fig. 4 illustrates a physical schematic diagram of an electronic device, as shown in fig. 4, which may include: processor 410, communication interface (Communications Interface) 420, memory 430 and communication bus 440, wherein processor 410, communication interface 420 and memory 430 communicate with each other via communication bus 440. The processor 410 may invoke logic instructions stored in the memory 430 and executable on the processor 410 to perform the ship route identification method provided by the above-described method embodiments, the method comprising: constructing a directed graph based on port historical religion data of the target ship, and acquiring a first set and a second set; acquiring a route of the target ship based on the first set and the second set; wherein, the top point in the directed graph represents the port on which the target ship is hung, and the edge in the directed graph represents the order of hanging of the two ports; a first set, which is a set formed by strong connected components of the directed graph; the second set is a set of rings in the directed graph.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The processor 410 in the electronic device provided by the embodiment of the present invention may call the logic instruction in the memory 430, and its implementation manner is consistent with the implementation manner of the ship route identification method provided by the present invention, and may achieve the same beneficial effects, which are not described herein again.
In another aspect, embodiments of the present invention further provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the ship route identification method provided in the above-described method embodiments, the method comprising: constructing a directed graph based on port historical religion data of the target ship, and acquiring a first set and a second set; acquiring a route of the target ship based on the first set and the second set; wherein, the top point in the directed graph represents the port on which the target ship is hung, and the edge in the directed graph represents the order of hanging of the two ports; a first set, which is a set formed by strong connected components of the directed graph; the second set is a set of rings in the directed graph.
When the computer program product provided by the embodiment of the invention is executed, the above-mentioned ship route identification method is realized, and the specific implementation manner is consistent with the implementation manner recorded in the embodiment of the above-mentioned ship route identification method, and the same beneficial effects can be achieved, and the detailed description is omitted herein.
In still another aspect, an embodiment of the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor is implemented to perform the ship route identification method provided in the above embodiments, the method including: constructing a directed graph based on port historical religion data of the target ship, and acquiring a first set and a second set; acquiring a route of the target ship based on the first set and the second set; wherein, the top point in the directed graph represents the port on which the target ship is hung, and the edge in the directed graph represents the order of hanging of the two ports; a first set, which is a set formed by strong connected components of the directed graph; the second set is a set of rings in the directed graph.
When the computer program stored on the non-transitory computer readable storage medium provided by the embodiment of the invention is executed, the above-mentioned ship route identification method is implemented, and the specific implementation manner is consistent with the implementation manner recorded in the embodiment of the above-mentioned ship route identification method, and the same beneficial effects can be achieved, and the details are not repeated here.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method of identifying a ship route, comprising:
constructing a directed graph based on port historical religion data of the target ship;
acquiring a first set and a second set based on the directed graph;
acquiring a route of the target ship based on the first set and the second set;
wherein, the vertexes in the directed graph represent ports on which the target ship is hung, and the edges in the directed graph represent the hanging relation and the hanging attribute of the two ports; the first set is a set formed by strong connected components of the directed graph; the second set is a set formed by rings in the directed graph;
the acquiring the route of the target ship based on the first set and the second set specifically comprises the following steps:
respectively acquiring first similarity of each element in the first set and each element in the second set;
and acquiring the route of the target ship based on the first similarity.
2. The ship course identification method as claimed in claim 1, wherein after the course of the target ship is acquired based on the first set and the second set, further comprising:
and acquiring the route of the target ship company based on the route of each target ship of the target ship company.
3. The ship route identification method according to claim 1, wherein the constructing a directed graph based on the port history listing data of the target ship, and the acquiring a space between the first set and the second set based on the directed graph, further comprises:
performing topological sorting on the directed graph;
based on the results of the topological ordering, it is determined that a ring is present in the directed graph.
4. The ship route identification method according to claim 1, wherein the obtaining the first set based on the directed graph specifically comprises:
based on a depth-first search algorithm, obtaining each strong connected component of the directed graph;
the first set is obtained based on the strongly connected components of the directed graph.
5. The ship route identification method according to claim 1, wherein the obtaining the second set based on the directed graph specifically comprises:
coloring each vertex in the directed graph based on a depth-first search algorithm;
acquiring each ring in the directed graph based on the coloring result;
the second set is obtained based on the respective rings in the directed graph.
6. The ship route identification method according to claim 2, wherein the obtaining the route of the target ship company based on the route of each of the target ships of the target ship company specifically comprises:
acquiring a second similarity between every two airlines;
and merging the routes of the target ships of the target ship company based on the second similarity, and acquiring the routes of the target ship company.
7. A ship route recognition device, comprising:
the building module is used for building a directed graph based on port historical leaning data of the target ship;
the acquisition module is used for acquiring a first set and a second set based on the directed graph;
the identification module is used for acquiring the route of the target ship based on the first set and the second set;
wherein, the vertexes in the directed graph represent ports on which the target ship is hung, and the edges in the directed graph represent the hanging relation and the hanging attribute of the two ports; the first set is a set formed by strong connected components of the directed graph; the second set is a set formed by rings in the directed graph;
the identification module is specifically used for:
respectively acquiring first similarity of each element in the first set and each element in the second set;
and acquiring the route of the target ship based on the first similarity.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the ship route identification method according to any one of claims 1 to 6 when the program is executed.
9. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the ship route identification method according to any one of claims 1 to 6.
CN202110845603.1A 2021-07-26 2021-07-26 Ship route identification method and device, electronic equipment and storage medium Active CN113487268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110845603.1A CN113487268B (en) 2021-07-26 2021-07-26 Ship route identification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110845603.1A CN113487268B (en) 2021-07-26 2021-07-26 Ship route identification method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113487268A CN113487268A (en) 2021-10-08
CN113487268B true CN113487268B (en) 2023-07-18

Family

ID=77943827

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110845603.1A Active CN113487268B (en) 2021-07-26 2021-07-26 Ship route identification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113487268B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115658749B (en) * 2022-10-25 2023-05-26 工银瑞信基金管理有限公司 Fund product ordering method and device based on directed acyclic graph and electronic equipment
CN117132090B (en) * 2023-10-27 2024-02-13 亿海蓝(北京)数据技术股份公司 Method and system for sequencing ship periods in common cabin, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193942A (en) * 2017-05-19 2017-09-22 西安邮电大学 The rapid generation of all connected subgraphs in a kind of digraph
CN108988338A (en) * 2018-08-28 2018-12-11 云南电网有限责任公司昆明供电局 The power grid for being suitable for open loop power supply based on strong continune component depth-first search adjusts method for electrically and device automatically
EP3435298A1 (en) * 2017-07-24 2019-01-30 SilverRail Australia Pty Ltd Computer implemented technologies configured to enable efficient processing of data in a transportation network based on generation of directed graph data derived from transportation timetable data
CN110020788A (en) * 2019-03-15 2019-07-16 阿里巴巴集团控股有限公司 The determination method and apparatus of target entity resource distribution
CN110516708A (en) * 2019-07-23 2019-11-29 江苏大学 A kind of path prediction technique based on track and road network
CN112905584A (en) * 2021-04-27 2021-06-04 亿海蓝(北京)数据技术股份公司 Method and device for recommending gas station and readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8239404B2 (en) * 2010-06-10 2012-08-07 Microsoft Corporation Identifying entries and exits of strongly connected components
US10382529B2 (en) * 2016-01-29 2019-08-13 Nicira, Inc. Directed graph based span computation and configuration dispatching
US20210042872A1 (en) * 2016-09-15 2021-02-11 Simpsx Technologies Llc Price Time Priority Queue Routing for Transportation Capacity Units
WO2018087550A2 (en) * 2016-11-09 2018-05-17 Inventive Cogs (Campbell) Limited Vehicle route guidance
US11829935B2 (en) * 2018-04-03 2023-11-28 Florida A&M University Application of a multi-objective optimization model for automatic vessel scheduling in liner shipping

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193942A (en) * 2017-05-19 2017-09-22 西安邮电大学 The rapid generation of all connected subgraphs in a kind of digraph
EP3435298A1 (en) * 2017-07-24 2019-01-30 SilverRail Australia Pty Ltd Computer implemented technologies configured to enable efficient processing of data in a transportation network based on generation of directed graph data derived from transportation timetable data
CN108988338A (en) * 2018-08-28 2018-12-11 云南电网有限责任公司昆明供电局 The power grid for being suitable for open loop power supply based on strong continune component depth-first search adjusts method for electrically and device automatically
CN110020788A (en) * 2019-03-15 2019-07-16 阿里巴巴集团控股有限公司 The determination method and apparatus of target entity resource distribution
CN110516708A (en) * 2019-07-23 2019-11-29 江苏大学 A kind of path prediction technique based on track and road network
CN112905584A (en) * 2021-04-27 2021-06-04 亿海蓝(北京)数据技术股份公司 Method and device for recommending gas station and readable storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
AISbased shipping routes using the dijkstra algorithm;Pedro等;transnav the international journal on marine navigation and safety of sea transportation;565-571 *
vessels route planning problem with uncertain data;Tomasz等;transnav the international journal on marine navigation and safety of sea transportation;第10卷(第03期);459-464 *
基于有向图可达性的SLP向量化识别方法;赵捷;赵荣彩;;中国科学:信息科学(03);全文 *
有向图的强连通分量及应用;吴金全;软件;35(03);72-75 *

Also Published As

Publication number Publication date
CN113487268A (en) 2021-10-08

Similar Documents

Publication Publication Date Title
CN113487268B (en) Ship route identification method and device, electronic equipment and storage medium
Arguedas et al. Maritime traffic networks: From historical positioning data to unsupervised maritime traffic monitoring
CN109194707B (en) Distributed graph embedding method and device
CN110580251B (en) Group track accompanying mode online analysis method and system under big data environment
Tsiogkas et al. Efficient multi-AUV cooperation using semantic knowledge representation for underwater archaeology missions
CN113190636B (en) Offshore road network construction method and system
CN105282123A (en) Network protocol identification method and device
JP2016081494A (en) Method and apparatus for distributing graph data in distributed computing environment
CN107818328A (en) With reference to the deficiency of data similitude depicting method of local message
CN111626311B (en) Heterogeneous graph data processing method and device
CN109961129A (en) A kind of Ocean stationary targets search scheme generation method based on improvement population
Lu et al. Historical AIS data-driven unsupervised automatic extraction of directional maritime traffic networks
CN108052743B (en) Method and system for determining step approach centrality
CN115470236A (en) Multi-subgraph matching method, device and equipment
CN110245271B (en) Large-scale associated data partitioning method and system based on attribute graph
Ayele et al. Spare part transportation management in High North
CN107025248A (en) A kind of map location editor orientation system based on parent-offspring's safety
Prasad et al. Maritime Vessel Route Extraction and Automatic Information System (AIS) Spoofing Detection
CN115225373A (en) Network space security situation expression method and device under incomplete information condition
US8281006B2 (en) Connection state estimating device, connection state estimating method and storage medium
CN113284030A (en) Urban traffic network community division method
Baur et al. Network comparison
CN109726895A (en) A kind of task execution method and device for planning of multiple target point
Khuller et al. Basic graph algorithms
Simonetti et al. New branch-and-bound algorithms for k-cardinality tree problems

Legal Events

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