Transportation route optimization method and device and computer program product

By constructing directed graph and N-part graph models, combining depth-first search and maximum flow minimum segmentation algorithm, the transportation route is optimized, and the problem of low efficiency in transportation route planning and difficulty in achieving global optimal solutions in the existing technology is solved, and transportation is realized Minimize costs and maximize benefits.

CN119443434APending Publication Date: 2025-02-14BEIJING FUYOUDUODUO INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411447249.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, transportation line planning relies on experience and manual calculations, and is inefficient and difficult to achieve global optimal solutions.

Method used

By obtaining the transport route to be optimized, building a directed graph, traversing all combined paths based on the depth-first search method, building an N-part graph model, and solving it using the maximum flow minimum segmentation algorithm to optimize the transport route.

Benefits of technology

It realizes rapid and efficient traversal of the combination that meets the conditions, avoids the memory and processing speed bottlenecks caused by multiple connections to full orders, and minimizes transportation costs and maximizes benefits through N-part graphs and maximum flow minimum cutting methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443434A_ABST
    Figure CN119443434A_ABST
Patent Text Reader

Abstract

The invention discloses a transportation route optimization method and device, and a computer program product, and the method comprises the steps: obtaining a to-be-optimized transportation route, constructing a directed graph, and carrying out the traversal of the directed graph based on a depth-first search mode, so as to obtain all combined paths; constructing an N graph model based on all the obtained combined paths; and solving the constructed N-graph model based on a maximum flow minimum segmentation algorithm. Combinations conforming to conditions are quickly and efficiently traversed through a graph model and a DFS method, internal storage and processing speed bottlenecks caused by multiple times of connection of full-quantity orders are avoided, and then minimization of transportation cost and maximization of income are achieved by using an N graph and a maximum flow and minimum cut method. The problems that in the related technology, combination and optimization of lines often depend on experience and manual calculation, efficiency is poor, and a globally optimal solution is difficult to achieve are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a transportation route optimization method and device, and a computer program product. Background Art

[0002] In the transportation route planning of related technologies, the combination and optimization of routes often rely on experience and manual calculations, which are inefficient and difficult to achieve a global optimal solution. Summary of the invention

[0003] The main purpose of the present invention is to provide a method and device for optimizing a transportation route to solve the technical problems existing in the related art.

[0004] In order to achieve the above-mentioned purpose, according to a first aspect of the present invention, a method for optimizing a transportation route is provided, comprising constructing a directed graph after acquiring the transportation route to be optimized, and traversing the directed graph based on a depth-first search method to obtain all combined paths; constructing an N-part graph model based on all the obtained combined paths; and solving the constructed N-part graph model based on a maximum flow minimum cut algorithm.

[0005] Optionally, after obtaining the transportation route to be optimized, constructing a directed graph includes: encoding the regional points in the transportation route to be optimized, and encoding the paths formed between the regional points; taking all the encoded regional points as nodes, and the paths between the encoded originating regional points and the encoded destination regional points as directed edges, to obtain a directed graph; wherein, during encoding, the same regional points are encoded the same, if there are multiple edges between two regional points, and each edge is located on a different path, the path encoding is determined based on the encoding of the two regional points, and different distinguishing identification information.

[0006] Optionally, traversing the directed graph based on a depth-first search method to obtain all combined paths includes: during the traversal, an initial node is each encoded node with an out-degree in the directed graph, and a maximum traversal depth is N.

[0007] Optionally, constructing an N-part graph model based on all obtained combined paths includes: placing paths with different encodings in each part, wherein the paths are not repeated in the same part; and sequentially connecting the paths between adjacent parts.

[0008] Optionally, the solution of the constructed N-part graph model based on the maximum flow minimum split algorithm includes: constructing a source node Start and a sink node End; connecting the source node Start with the nodes in the first part; connecting the sink node End with the nodes in the last part; wherein the parameters of the edges in the maximum flow minimum split algorithm are set as cost parameters and carrying capacity parameters, and solving the problem with the goal of minimizing the transportation cost and maximizing the carrying capacity; and deduplicating existing duplicate paths during the solving process.

[0009] According to a second aspect of the present invention, a transport route optimization device is provided, comprising: a directed graph construction unit, configured to construct a directed graph after acquiring a transport route to be optimized; an N-part graph model construction unit, configured to traverse the directed graph based on a depth-first search method to obtain all combined paths; an N-part graph model is constructed based on all the obtained combined paths; and a model solving unit, configured to solve the constructed N-part graph model based on a maximum flow minimum cut algorithm.

[0010] Optionally, after obtaining the transportation route to be optimized, constructing a directed graph includes: encoding the regional points in the transportation route to be optimized, and encoding the paths formed between the regional points; taking all the encoded regional points as nodes, and the paths between the encoded originating regional points and the encoded destination regional points as directed edges, to obtain a directed graph; wherein, during encoding, the same regional points are encoded the same, if there are multiple edges between two regional points, and each edge is located on a different path, the path encoding is determined based on the encoding of the two regional points, and different distinguishing identification information.

[0011] According to a third aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method described in any one of the implementations of the first aspect.

[0012] According to a fourth aspect of the present invention, there is provided an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method described in any one implementation of the first aspect.

[0013] According to a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program implements any one of the methods described in the first aspect when executed by a processor.

[0014] The method and device for optimizing transportation routes in this embodiment, as well as a computer program product, include the following steps: constructing a directed graph after obtaining the transportation routes to be optimized, and traversing the directed graph based on a depth-first search method to obtain all combined paths; constructing an N-part graph model based on all the combined paths obtained; and solving the constructed N-part graph model based on a maximum flow minimum cut algorithm. The graph model and the DFS method are used to quickly and efficiently traverse combinations that meet the conditions, thus avoiding the memory and processing speed bottlenecks caused by multiple connections to the full amount of orders, and then using the N-part graph and the maximum flow minimum cut method to minimize transportation costs and maximize revenues, thereby solving the technical problems existing in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 is a flow chart of a method for optimizing a transportation route according to an embodiment of the present invention;

[0017] Figure 2a , Figure 2b is an application scenario diagram of the transportation route optimization method according to an embodiment of the present invention;

[0018] Figure 3 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0021] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0022] According to an embodiment of the present invention, a method and device for optimizing a transportation route are provided. Figure 1 As shown, it includes the following steps 101 to 103:

[0023] Step 101: After obtaining the transportation route to be optimized, a directed graph is constructed, and the directed graph is traversed based on a depth-first search method to obtain all combined paths.

[0024] In this step, data preprocessing can be performed, that is, encoding the original line data and generating a unique identifier (uuid) to facilitate subsequent processing and deduplication. Figure 2a The original route format is origin city-destination city. All route cities are added as nodes, and the edges are directed edges from the origin city to the destination city, and finally a directed graph is generated.

[0025] As an optional implementation method of this embodiment, the directed graph is traversed based on a depth-first search method to obtain all combined paths, including: during the traversal, the initial node is each encoded node with an out-degree in the directed graph, and the maximum traversal depth is N.

[0026] In this optional implementation, the DFS method is used, and the initial node is each city node with an out-degree in the graph. DFS sets the maximum traversal depth to N nodes to traverse all possible paths.

[0027] As an optional implementation method of this embodiment, constructing a directed graph after obtaining the transportation route to be optimized includes: encoding the regional points in the transportation route to be optimized, and encoding the paths formed between the regional points; taking all the encoded regional points as nodes, and the paths between the encoded originating regional points and the encoded destination regional points as directed edges, to obtain a directed graph; wherein, during encoding, the same regional points are encoded the same; if there are multiple edges between two regional points, and each edge is located on a different path, the path encoding is determined based on the encoding of the two regional points, and different distinguishing identification information, the distinguishing identification is represented by a number, and the number of paths between the two regional points is determined by the number of paths.

[0028] In this optional implementation, the regional points are encoded by taking cities as an example. There may be multiple routes passing through two cities. In this case, there are multiple repeated roads between the two cities. For example, among all the possible combination paths traversed above, suppose there is a combination of Beijing-Tianjin-Taiyuan-Beijing, which includes three routes (Beijing-Tianjin, Tianjin-Taiyuan, Taiyuan-Beijing). There must also be a route like (Tianjin-Taiyuan, Taiyuan-Beijing, Beijing-Tianjin). These two combinations are actually composed of three completely identical routes, but the starting points are different, resulting in different combinations. The N-part graph method is sensitive to position, so it is not possible to remove duplicates here, but only to distinguish them.

[0029] Therefore, if there are multiple edges between two regional points, and each edge is located on a different route, the encoding of the path is determined based on the encoding of the two regional points and different distinguishing identification information. For example, the distinguishing identification is represented by a number, and there are several paths between the two regional points, and the number is identified to a certain number. For example, now assume that the unique codes of the three routes (Beijing-Tianjin, Tianjin-Taiyuan, Taiyuan-Beijing) are (a1 b2, c3d4, e5f6), respectively. Then the encoding order of the first combination is (a1 b2_1, c3d4_2, e5f6_3), and the encoding order of the second combination is (c3d4_1, e5f6_2, a1 b2_3). The difference between these two combinations is which route is in the first part of the three-part graph, and which is in the second and third parts. The same route (a1 b2_1, a1 b2_3) is in different positions and is regarded as a different route. The 1, 2, and 3 are the distinguishing identification information.

[0030] Step 102: Construct an N-part graph model based on all the obtained combined paths.

[0031] As an optional implementation method of this embodiment, constructing an N-part graph model based on all the obtained combined paths includes: placing paths with different encodings in each part, wherein the paths are not repeated in the same part; and sequentially connecting the paths between adjacent parts so that the connection composition is consistent with the transportation route to be optimized.

[0032] In this optional implementation, reference Figure 2b , construct an N-part graph model (where N corresponds to the aforementioned traversal depth), according to the aforementioned steps, take a three-part graph as an example, where each part represents a set of lines, and different lines are distinguished by virtual line coding. The non-repetitive paths in each part refer to the absence of repeated paths between two geographical points, which can be achieved by keeping the distinguishing identification information in each part consistent.

[0033] Exemplarily, all lines ending with _1 are placed in the first part, all lines ending with _2 are placed in the second part, and all lines ending with _3 are placed in the third part.

[0034] Further, the paths between adjacent parts are linked in sequence so that the connection composition is consistent with the transportation route to be optimized. Figure 2bAccording to the actual situation of the line, the first part can be connected to the second part, and the second part to the third part. For example, for example, there are Beijing-Tianjin 1, Tianjin-Taiyuan 1, Taiyuan-Beijing 1 in the first part, Beijing-Tianjin 2, Tianjin-Taiyuan 2, Taiyuan-Beijing 2 in the second part, and the same in the third part. Then, it is necessary to connect the first part to the second part, and the second part to the third part. Beijing-Tianjin 1 can be connected to Tianjin-Taiyuan 2. Of course, there may be Tianjin-Shanghai 2, Tianjin-Guangzhou 2 and other lines in the second part, but it is possible that only the first part and the second part can be connected, and the second part and the third part cannot be connected, or the optimal effect after the connection is not as good as the lowest cost of Beijing-Tianjin 1 connecting Tianjin-Taiyuan 2. Therefore, it can be connected on demand.

[0035] Step 103: Solve the constructed N-part graph model based on the maximum flow minimum split algorithm.

[0036] As an optional implementation method of this embodiment, the solution of the constructed N-part graph model based on the maximum flow minimum split algorithm includes: constructing a source node Start and a sink node End; connecting the source node Start with the nodes in the first part; connecting the sink node End with the nodes in the last part; wherein, the parameters of the edges in the maximum flow minimum split algorithm are set as cost parameters and carrying capacity parameters, and the solution is performed with the goal of minimizing the transportation cost and maximizing the carrying capacity; and deduplicating existing duplicate paths during the solution process.

[0037] In this implementation, the maximum flow minimum cut algorithm is applied to construct a network model containing additional nodes start and end. The start node is connected to all nodes in the first part, and the end node is connected to all nodes in the last part. The parameters of the edge include cost and capacity, where cost is the reciprocal average of the income per kilometer (this is the optimization goal and can be replaced by other features), and capacity is the maximum daily carrying capacity of the line.

[0038] Furthermore, in the solution process, the repeated line combinations generated by the model are deduplicated, that is, the first appearance of a1b2_x is retained, and any subsequent appearance of a1b2_1, a1b2_2, a1b2_3 is ignored, and the optimal solution is retained. It should be understood that when the graph model is built, the repetitions have been distinguished in each part, but the repeated lines here are different from the repetitions of the full lines. For example, after connecting the first, second and third parts, there will be a Beijing-Tianjin-Taiyuan-Beijing line, a Tianjin-Taiyuan-Beijing-Tianjin line, and also a Taiyuan-Beijing-Tianjin-Taiyuan line. These three are actually the same line, but with different starting points. The deduplication here refers to the deduplication of the same line but with different starting points.

[0039] The route reorganization optimization algorithm of this embodiment can effectively improve the efficiency and benefits of route combination. It uses the graph model and DFS method to quickly and efficiently traverse the qualified combinations, avoiding the memory and processing speed bottlenecks caused by multiple connections to the full order. Then, it uses the N-part graph and the maximum flow minimum cut method to minimize the transportation cost and maximize the benefit.

[0040] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0041] According to an embodiment of the present invention, a transport route optimization device is also provided, including a directed graph construction unit, configured to construct a directed graph after obtaining the transport route to be optimized; an N-part graph model construction unit, configured to traverse the directed graph based on a depth-first search method to obtain all combined paths; an N-part graph model is constructed based on all the obtained combined paths; and a model solving unit is configured to solve the constructed N-part graph model based on a maximum flow minimum cut algorithm.

[0042] Optionally, after obtaining the transportation route to be optimized, constructing a directed graph includes: encoding the regional points in the transportation route to be optimized, and encoding the paths formed between the regional points; taking all the encoded regional points as nodes, and the paths between the encoded originating regional points and the encoded destination regional points as directed edges, to obtain a directed graph; wherein, during encoding, the same regional points are encoded the same, if there are multiple edges between two regional points, and each edge is located on a different path, the path encoding is determined based on the encoding of the two regional points, and different distinguishing identification information.

[0043] Optionally, traversing the directed graph based on a depth-first search method to obtain all combined paths includes: during the traversal, an initial node is each encoded node with an out-degree in the directed graph, and a maximum traversal depth is N.

[0044] Optionally, constructing an N-part graph model based on all obtained combined paths includes: placing paths with different encodings in each part, wherein the paths are not repeated in the same part; and sequentially connecting the paths between adjacent parts.

[0045] Optionally, the solution of the constructed N-part graph model based on the maximum flow minimum split algorithm includes: constructing a source node Start and a sink node End; connecting the source node Start with the nodes in the first part; connecting the sink node End with the nodes in the last part; wherein the parameters of the edges in the maximum flow minimum split algorithm are set as cost parameters and carrying capacity parameters, and solving the problem with the goal of minimizing the transportation cost and maximizing the carrying capacity; and deduplicating existing duplicate paths during the solving process.

[0046] According to an embodiment of the present invention, the present invention also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the method described in any of the above embodiments when executing.

[0047] According to an embodiment of the present invention, the present invention further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the method described in any of the above embodiments when executed.

[0048] According to an embodiment of the present invention, the present invention further provides a computer program product, which can implement the method described in any of the above embodiments when executed by a processor.

[0049] Figure 3 A schematic block diagram of an example electronic device 300 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices.

[0050] like Figure 3 As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0051] A number of components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0052] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above, such as the object matching method. For example, in some embodiments, the object matching method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method described above may be performed.

[0053] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0054] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0055] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

Claims

1. A method for optimizing a transportation route, characterized in that: include: After obtaining the transportation route to be optimized, a directed graph is constructed, and the directed graph is traversed based on a depth-first search method to obtain all combined paths; Construct an N-part graph model based on all the obtained combined paths; The constructed N-part graph model is solved based on the maximum flow minimum split algorithm.

2. The method for optimizing the transportation route according to claim 1, characterized in that: After obtaining the transportation route to be optimized, the directed graph is constructed including: Encoding the regional points in the transportation route to be optimized and encoding the paths formed between the regional points; All the coded regional points are taken as nodes, and the lines between the coded originating regional points and the coded destination regional points are taken as directed edges, thereby obtaining a directed graph; Among them, the same regional points are coded the same during encoding. If there are multiple edges between two regional points and each edge is located on a different line, the encoding of the path is determined based on the encoding of the two regional points and different distinguishing identification information.

3. The method for optimizing the transportation route according to claim 1, characterized in that: The directed graph is traversed based on a depth-first search method to obtain all combined paths including: During traversal, the initial node is each node with an out-degree code in the directed graph, and the maximum traversal depth is N.

4. The method for optimizing the transportation route according to claim 3, characterized in that: Building an N-part graph model based on all the obtained combined paths includes: Placing differently coded paths in each section, wherein the paths are not repeated in the same section; Connect the paths between adjacent parts in sequence.

5. The method for optimizing the transportation route according to claim 1, characterized in that: The solution of the constructed N-part graph model based on the maximum flow minimum segmentation algorithm includes: Construct the source node Start and the sink node End; The source node Start is connected to the node in the first part; The sink node End is connected to the node in the last section; Among them, the parameters of the edges in the maximum flow minimum split algorithm are set as cost parameters and carrying capacity parameters, and the solution is carried out with the goal of minimizing the transportation cost and maximizing the carrying capacity; during the solution process, duplicate paths are removed.

6. A transport route optimization device, characterized in that: include: A directed graph construction unit is configured to construct a directed graph after acquiring the transportation route to be optimized; The N-part graph model building unit is configured to traverse the directed graph based on a depth-first search method to obtain all combination paths; and build the N-part graph model based on all the obtained combination paths; The model solving unit is configured to solve the constructed N-part graph model based on the maximum flow minimum split algorithm.

7. The transport route optimization device according to claim 6, characterized in that: After obtaining the transportation route to be optimized, the directed graph is constructed including: Encoding the regional points in the transportation route to be optimized and encoding the paths formed between the regional points; All the coded regional points are taken as nodes, and the lines between the coded originating regional points and the coded destination regional points are taken as directed edges, thereby obtaining a directed graph; Among them, the same regional points are coded the same during encoding. If there are multiple edges between two regional points and each edge is located on a different line, the encoding of the path is determined based on the encoding of the two regional points and different distinguishing identification information.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 5.

9. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method described in any one of claims 1-5.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 5.