CN110363330A - A kind of paths planning method, device, computer equipment and readable storage medium storing program for executing - Google Patents

A kind of paths planning method, device, computer equipment and readable storage medium storing program for executing Download PDF

Info

Publication number
CN110363330A
CN110363330A CN201910521403.3A CN201910521403A CN110363330A CN 110363330 A CN110363330 A CN 110363330A CN 201910521403 A CN201910521403 A CN 201910521403A CN 110363330 A CN110363330 A CN 110363330A
Authority
CN
China
Prior art keywords
node
dispatching
group
dispatching group
location information
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.)
Granted
Application number
CN201910521403.3A
Other languages
Chinese (zh)
Other versions
CN110363330B (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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201910521403.3A priority Critical patent/CN110363330B/en
Publication of CN110363330A publication Critical patent/CN110363330A/en
Application granted granted Critical
Publication of CN110363330B publication Critical patent/CN110363330B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • 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/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Tourism & Hospitality (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Game Theory and Decision Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of paths planning method, device, computer equipment and readable storage medium storing program for executing, M dispatching group is arranged in the number M first dispensed as needed in the present invention, the N number of node clustering dispensed will be needed into M dispatching group again, finally carries out path planning in each dispatching group respectively;By the way that dispatching group is arranged, the dimension for reducing path planning solves the technical issues of path planning is carried out in numerous nodes, only needs to carry out path planning for a small amount of node in a dispatching group in the present invention, and then the efficiency of path planning is improved, reduce planning time.

Description

A kind of paths planning method, device, computer equipment and readable storage medium storing program for executing
Technical field
The present invention relates to routing algorithm technical fields, and in particular to a kind of paths planning method, device, computer equipment and Readable storage medium storing program for executing.
Background technique
Shortest path first is born in operational research and computer science, can will be many by computer technologies such as data structures The practical problem in other fields is abstracted into the shortest route problem in operational research, for example, traffic route planning etc..Traditional is most short Path model is all based on all nodes and carries out path planning;But when the node for needing to carry out path planning is more, rule Mark need to be traversed for the time-consuming in the path of all nodes will be elongated, and be difficult to cook up shortest path.In addition, traditional Shortest path model is all based on static node and carries out path planning, but in practical applications, the position of node is meeting Dynamic change;Therefore, it is necessary to constantly adjust during carrying out path planning.
Summary of the invention
The purpose of the present invention is to provide a kind of paths planning method, device, computer equipment and readable storage medium storing program for executing, lead to The mode for crossing Clustering solves the technical issues of path planning is carried out in numerous nodes, to improve path rule The efficiency drawn.
The present invention is to solve above-mentioned technical problem by following technical proposals:
According to an aspect of the invention, there is provided a kind of paths planning method, this method comprises the following steps:
Step 1, the location information for needing to carry out N number of node of path planning is obtained, and obtains preset M dispatching group The location information of central point;
Step 2, it according to the location information of N number of node and the location information of the central point of M dispatching group, calculates Each node arrives the distance value of each central point respectively;
Step 3, the distance value for arriving each central point respectively according to each node determines the smallest distance value, will The corresponding node of the smallest distance value is added in corresponding dispatching group, and repeats step 1 to step based on remaining node Rapid 3, until all nodes are added in corresponding dispatching group;
Step 4, according to the location information of the node in each dispatching group, mean place information is calculated, it will be described average Location information of the location information as the central point of corresponding dispatching group, and step 1 is repeated to step 4, until twice in succession The error amount of the location information for each central point that Clustering obtains is within the set range;
Step 5, according to the location information of each node in each dispatching group, path planning is carried out.
Optionally, the distance value for arriving each central point respectively according to each node, determines the smallest distance Value, the corresponding node of the smallest distance value is added in corresponding dispatching group, is specifically included:
It is when multiple the smallest distance values occur, and corresponding to different nodes, multiple the smallest distance values are corresponding more A node is respectively added in corresponding dispatching group;Alternatively,
When there are multiple the smallest distance values, and when the corresponding same node, by the node it is random be added to correspondence A dispatching group in.
Optionally, the location information according to each node in each dispatching group carries out path planning, specific to wrap It includes:
For a dispatching group, first section nearest apart from preset dispatching starting point is determined from the dispatching group Point determines second node nearest apart from first node from other nodes of the dispatching group, and so on, Until determining the P nearest node of the P-1 node of distance, from other nodes of the dispatching group to determine to traverse The path of the preset dispatching starting point and all nodes in the dispatching group;Wherein, the value of P is in the dispatching group The total number of node.
Optionally, the location information according to each node in each dispatching group carries out path planning, specific to wrap It includes:
For a dispatching group, the distance between any two node in dispatching group value and the dispatching are calculated The distance value of each node in group to preset dispatching starting point;
According to all distance values, all sections that can be traversed in the preset dispatching starting point and the dispatching group are calculated The smallest overall distance value of point, and determine to traverse the preset dispatching starting point according to the smallest overall distance value and described match Send the path of all nodes in group.
Optionally, the method also includes:
According to the value of the value of N and M, the maximum node number of each dispatching group is determined;
It is described the corresponding node of the smallest distance value is added in corresponding dispatching group after, the method is also wrapped It includes:
Judge whether the number of nodes in the dispatching group has reached corresponding maximum node number, if so, no longer calculating it His node to the dispatching group central point distance.
To achieve the goals above, the present invention also provides a kind of path planning apparatus, which specifically includes consisting of Part:
Module is obtained, needs to carry out the location information of N number of node of path planning for obtaining, and it is a to obtain preset M The location information of the central point of dispatching group;
Computing module, the position for the central point according to the location information and M dispatching group of N number of node are believed Breath, calculates the distance value that each node arrives each central point respectively;
Cluster module, for arriving the distance value of each central point respectively according to each node, determine it is the smallest away from From value, the corresponding node of the smallest distance value is added in corresponding dispatching group, and is based on remaining node retriggered institute Acquisition module is stated, until all nodes are added in corresponding dispatching group;
Processing module calculates mean place information for the location information according to the node in each dispatching group, by institute Location information of the mean place information as the central point of corresponding dispatching group is stated, and obtains module described in retriggered, until even The error amount of the location information of continuous each central point that Clustering obtains twice is within the set range;
Planning module carries out path planning for the location information according to each node in each dispatching group.
Optionally, the planning module, is specifically used for:
For a dispatching group, first section nearest apart from preset dispatching starting point is determined from the dispatching group Point determines second node nearest apart from first node from other nodes of the dispatching group, and so on, Until determining the P nearest node of the P-1 node of distance, from other nodes of the dispatching group to determine to traverse The path of the preset dispatching starting point and all nodes in the dispatching group;Wherein, the value of P is in the dispatching group The total number of node.
Optionally, the planning module, is specifically used for:
For a dispatching group, the distance between any two node in dispatching group value and the dispatching are calculated The distance value of each node in group to preset dispatching starting point;According to all distance values, calculating can traverse described preset The smallest overall distance value of starting point and all nodes in the dispatching group is dispensed, and is determined according to the smallest overall distance value Traverse the path of the preset dispatching starting point and all nodes in the dispatching group.
To achieve the goals above, the present invention also provides a kind of computer equipment, which is specifically included: storage Device, processor and it is stored in the computer program that can be run on the memory and on the processor, the processor The step of realizing the paths planning method of above-mentioned introduction when executing described program.
To achieve the goals above, the present invention also provides a kind of computer readable storage medium, it is stored thereon with computer Program, the step of paths planning method of above-mentioned introduction is realized when described program is executed by processor.
Paths planning method, device, computer equipment and readable storage medium storing program for executing provided by the invention, first dispatching as needed Number M M dispatching group be set, then will N number of node clustering for dispensing of needs into M dispatching group, finally match respectively each It send and carries out path planning in group.By be arranged dispatching group, reduce the dimension of path planning, solve in numerous nodes into The technical issues of row path planning, only needs to carry out path planning for a small amount of node in a dispatching group in the present invention, And then the efficiency of path planning is improved, reduce planning time.In addition, in the present invention, according between each node away from From, Clustering is carried out to N number of node, by the multiple node clusterings being closer into a dispatching group, so that total Dispatching distance accomplishes to minimize as far as possible.In addition, in the present invention, optimal solution in order to obtain, during carrying out Clustering It will do it iterative operation, adaptivity obtains optimal Clustering result.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is a kind of optional flow diagram for the paths planning method that embodiment one provides;
Fig. 2 is a kind of optional program module schematic diagram for the path planning apparatus that embodiment two provides;
Fig. 3 is a kind of optional hardware structure schematic diagram for the computer equipment that embodiment three provides.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
Embodiment one
Paths planning method provided by the invention is illustrated with reference to the accompanying drawing.
Fig. 1 is a kind of optional flow diagram of paths planning method of the present invention, as shown in Figure 1, this method can wrap Include following steps:
Step S101: obtaining the location information for needing to carry out N number of node of path planning, and obtains preset M dispatching The location information of the central point of group.
Wherein, N and M is positive integer, and N > M.
In the present embodiment, since the number of nodes dispensed is more, it will do it dimension-reduction treatment, by N number of node It is divided into M dispatching group, and divides M times and dispensed, that is, the number of dispatching group and the number of dispatching are consistent.
It should also be noted that, the initial position message of the central point of each dispatching group can be artificial settings, it can also To be to randomly select M node from N number of node, using the location information of the M node selected as each dispatching group Central point initial position message.
Step S102: according to the location information of N number of node and the location information of the central point of M dispatching group, meter Calculate the distance value that each node arrives each central point respectively.
Specifically, when randomly selecting central point of the M node respectively as each dispatching group from N number of node, step S102, comprising:
Calculate the distance value that remaining N-M node arrives the central point of each dispatching group respectively.
In the present embodiment, random from the N number of node for need to carry out path planning when first time executing Clustering Central point of the M node as each dispatching group is selected, and calculates remaining node at a distance from the central point of each dispatching group Value.In this way, having M distance value for a remaining node, respectively indicating the central point of the residue node and M dispatching group Distance value.
Step S103: arriving the distance value of each central point respectively according to each node, determine the smallest distance value, The corresponding node of the smallest distance value is added in corresponding dispatching group, and step S101 is repeated based on remaining node To step S103, until all nodes are added in corresponding dispatching group.
Specifically, described determine the smallest distance value, the corresponding node of the smallest distance value is added to corresponding match It send in group, specifically includes:
It is when multiple the smallest distance values occur, and corresponding to different nodes, multiple the smallest distance values are corresponding more A node is respectively added in corresponding dispatching group;Alternatively,
When there are multiple the smallest distance values, and when the corresponding same node, by the node it is random be added to correspondence A dispatching group in.
With this, in the present embodiment, arrives the distance value of the central point of each dispatching group respectively according to each node, determine The smallest distance value;When there are multiple the smallest distance values, the case where multiple the smallest distance values correspond to different nodes Under, multiple nodes are added in corresponding multiple dispatching groups, for example, node A to dispatching group 1 central point distance value be 5 Km, the distance value of the central point of node B to dispatching group 2 be also 5 kms, and other nodes are to the central point of each dispatching group Distance value is all larger than 5 kms, then node A is added in dispatching group 1, and node B is added in dispatching group 2;Also need Bright, if the distance value of central point of node A and node B to dispatching group 1 is 5 kms, and other nodes are to each dispatching The distance value of the central point of group is all larger than 5 kms, then is added to node A and node B in dispatching group 1 simultaneously;When there are multiple When the smallest distance value, in the case where multiple the smallest distance values correspond to the same node, the node is added at random In one dispatching group, for example, node A to dispatching group 1 central point distance value be 5 kms, node A to the center of dispatching group 2 The distance value of point is also 5 kms, and the distance value of central point of other nodes to each dispatching group is all larger than 5 kms, then will save Point A is added in dispatching group 1 or node A is added in dispatching group 2.
It should also be noted that, in the present embodiment, it is only that the smallest distance value is corresponding during a Clustering Node carry out Clustering processing, other nodes without Clustering processing;Due to saving during Clustering The location information of point there may be variation, so need to recalculate the node for not being clustered grouping to each central point away from From to carry out Clustering processing.
Preferably, the algorithm of Clustering can use k-means algorithm, using the distance between two nodes as suitable Response function, the distance between two nodes are smaller, and fitness value is bigger, then probability of the distribution into the same dispatching group is got over Greatly.
Step S104: according to the location information of the node in each dispatching group, calculating mean place information, will be described flat Location information of the equal location information as the central point of corresponding dispatching group, and step S101 to step S104 is repeated, until The error amount of the location information for each central point that Clustering obtains twice in succession is within the set range.
Specifically, a dispatching group is directed to, based on Clustering as a result, according to cluster to each section in the dispatching group The positional information calculation of point goes out mean place information, and using calculated mean place information as the central point of the dispatching group Location information.For example, the location information for each node being located in dispatching group includes longitude and latitude value, then root Mean longitude value is calculated according to the longitude of each node in the dispatching group, and according to each node in the dispatching group Latitude value calculate mean latitude value, using the mean longitude value and mean latitude value being averaged as the dispatching group Location information.
In the present embodiment, only in first time Clustering, made using the location information of the M node randomly selected For the location information of the central point of M dispatching group, and calculate remaining N-M node to each dispatching group central point distance Value;It, can be according to last time Clustering as a result, calculating the mean place of each dispatching group during Clustering later Information, and using calculated mean place information as the location information of the central point of M dispatching group, to calculate N number of node To the distance value of the central point of M dispatching group.
Optimal Clustering is obtained as a result, and based on optimal Clustering knot by constantly clustering iteration with this Fruit carries out the path planning in later period.
Step S105: according to the location information of each node in each dispatching group, path planning is carried out.
Specifically, step S105, including following two mode:
Mode one, for a dispatching group, determined from the dispatching group apart from preset dispatching starting point it is nearest the One node determines second node nearest apart from first node from other nodes of the dispatching group, with This analogizes, until determining the P nearest node of the P-1 node of distance, from other nodes of the dispatching group with true Make the path for traversing the preset dispatching starting point and all nodes in the dispatching group;Wherein, the value of P is described matches Send the total number of the node in group.
Wherein, dispatching starting point is the starting point dispensed every time;It is from the dispatching starting point in each delivery process Start, the node into each dispatching group is dispensed.
In the present embodiment, the location information of dispatching starting point and the position letter of each node in a dispatching group are obtained Breath, and it is each into the distance and the dispatching group of the dispatching starting point successively to calculate each node in the dispatching group The distance between a node;Later, it is first determined to the smallest node A of distance of the dispatching starting point, then from the dispatching group In be determined to the smallest node B of distance of the node A, and so on, until determining last in the dispatching group A node, so as to form the path for traversing all nodes.
Mode two, for a dispatching group, calculate the distance between any two node in dispatching group value and The distance value of each node in the dispatching group to preset dispatching starting point;According to all distance values, calculating can traverse institute The smallest overall distance value of preset dispatching starting point and all nodes in the dispatching group is stated, and according to the smallest overall distance Value is determined to traverse the path of the preset dispatching starting point and all nodes in the dispatching group.
It should be noted that in practical applications, other path planning algorithms in existing also can be used, and such as: ant Ant algorithm, particle swarm algorithm.
Further, the method also includes:
According to the value of the value of N and M, the maximum node number of each dispatching group is determined.
Wherein, maximum node number is the maximum quantity for allowing the node for including in a dispatching group.In the present embodiment, it is The number of nodes in each dispatching group after guaranteeing Clustering is balanced, the corresponding maximum section of respectively each dispatching group setting Points.For example, the value that the value of N is 102, M is 5, then need to be arranged 5 dispatching groups, and the wherein maximum node of three dispatching groups Number is 20, and the maximum node number of remaining two dispatching groups is 21.
Further, it is described the corresponding node of the smallest distance value is added in corresponding dispatching group after, institute State method further include:
Judge whether the number of nodes in the dispatching group has reached corresponding maximum node number, if so, no longer calculating it His node to the dispatching group central point distance.
In the present embodiment, it is contemplated that some nodes are closer, and may be all assigned in the same dispatching group, this The node number in dispatching group that sample eventually forms may differ greatly;So by the way that corresponding maximum is arranged for each dispatching group Number of nodes, to limit the quantity of the node of each dispatching group, so that the node number in each dispatching group after Clustering is poor It is anisotropic little.For example, if the node number in the first dispatching group has reached maximum node number, after the first dispatching group is no longer participate in The Clustering of phase operates, and remaining node can only be assigned in other dispatching groups.
Embodiment two
The paths planning method provided in one based on the above embodiment provides a kind of path planning apparatus in the present embodiment, Specifically, Fig. 2 shows the optional structural block diagram of the path planning apparatus, which is divided into one or more A program module, one or more program module are stored in storage medium, and as performed by one or more processors, To complete the present invention.The so-called program module of the present invention is the series of computation machine program instruction for referring to complete specific function Section is more suitable for describing implementation procedure of the path planning apparatus in storage medium than program itself, is described below and introduces specific The function of each program module of the present embodiment.
As shown in Fig. 2, path planning apparatus specifically includes consisting of part:
Module 201 is obtained, needs to carry out the location information of N number of node of path planning for obtaining, and obtain preset M The location information of the central point of a dispatching group;
Computing module 202, for the position according to the central point of the location information and M dispatching group of N number of node Information calculates the distance value that each node arrives each central point respectively;
Cluster module 203 is determined the smallest for arriving the distance value of each central point respectively according to each node The corresponding node of the smallest distance value is added in corresponding dispatching group by distance value, and is based on remaining node retriggered The acquisition module, until all nodes are added in corresponding dispatching group;
Processing module 204 calculates mean place information for the location information according to the node in each dispatching group, Using the mean place information as the location information of the central point of corresponding dispatching group, and module is obtained described in retriggered, directly The error amount of the location information of each central point obtained to Clustering twice in succession is within the set range;
Planning module 205 carries out path planning for the location information according to each node in each dispatching group.
Specifically, cluster module 203, is used for:
It is when multiple the smallest distance values occur, and corresponding to different nodes, multiple the smallest distance values are corresponding more A node is respectively added in corresponding dispatching group;Alternatively,
When there are multiple the smallest distance values, and when the corresponding same node, by the node it is random be added to correspondence A dispatching group in.
Further, planning module 205 are specifically used for:
For a dispatching group, first section nearest apart from preset dispatching starting point is determined from the dispatching group Point determines second node nearest apart from first node from other nodes of the dispatching group, and so on, Until determining the P nearest node of the P-1 node of distance, from other nodes of the dispatching group to determine to traverse The path of the preset dispatching starting point and all nodes in the dispatching group;Wherein, the value of P is in the dispatching group The total number of node.
Planning module 205, is also used to:
For a dispatching group, the distance between any two node in dispatching group value and the dispatching are calculated The distance value of each node in group to preset dispatching starting point;According to all distance values, calculating can traverse described preset The smallest overall distance value of starting point and all nodes in the dispatching group is dispensed, and is determined according to the smallest overall distance value Traverse the path of the preset dispatching starting point and all nodes in the dispatching group.
Further, described device further include:
Setup module, for determining the maximum node number of each dispatching group according to the value of N and the value of M.
The cluster module 203, is also used to:
It is described the corresponding node of the smallest distance value is added in corresponding dispatching group after, judge the dispatching group In number of nodes whether reached corresponding maximum node number, if so, no longer calculating other nodes into the dispatching group The distance of heart point.
Embodiment three
The present embodiment also provides a kind of computer equipment, can such as execute the smart phone, tablet computer, notebook of program Computer, desktop computer, rack-mount server, blade server, tower server or Cabinet-type server are (including independent Server cluster composed by server or multiple servers) etc..As shown in figure 3, the computer equipment 30 of the present embodiment to It is few to include but is not limited to: memory 301, the processor 302 of connection can be in communication with each other by system bus.It should be pointed out that Fig. 3 illustrates only the computer equipment 30 with component 301-302, it should be understood that being not required for implementing all show Component, the implementation that can be substituted is more or less component.
In the present embodiment, memory 301 (i.e. readable storage medium storing program for executing) includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, magnetic Disk, CD etc..In some embodiments, memory 301 can be the internal storage unit of computer equipment 30, such as the calculating The hard disk or memory of machine equipment 30.In further embodiments, memory 301 is also possible to the external storage of computer equipment 30 The plug-in type hard disk being equipped in equipment, such as the computer equipment 30, intelligent memory card (Smart Media Card, SMC), peace Digital (Secure Digital, SD) card, flash card (Flash Card) etc..Certainly, memory 301 can also both include meter The internal storage unit for calculating machine equipment 30 also includes its External memory equipment.In the present embodiment, memory 301 is commonly used in depositing Storage is installed on the operating system and types of applications software of computer equipment 30, for example, embodiment two path planning apparatus program Code etc..In addition, memory 301 can be also used for temporarily storing the Various types of data that has exported or will export.
Processor 302 can be in some embodiments central processing unit (Central Processing Unit, CPU), Controller, microcontroller, microprocessor or other data processing chips.The processor 302 is commonly used in control computer equipment 30 overall operation.
Specifically, in the present embodiment, processor 302 is for executing the paths planning method stored in processor 302 Program, the program of the paths planning method are performed realization following steps:
Step 1, the location information for needing to carry out N number of node of path planning is obtained, and obtains preset M dispatching group The location information of central point;
Step 2, it according to the location information of N number of node and the location information of the central point of M dispatching group, calculates Each node arrives the distance value of each central point respectively;
Step 3, the distance value for arriving each central point respectively according to each node determines the smallest distance value, will The corresponding node of the smallest distance value is added in corresponding dispatching group, and repeats step 1 to step based on remaining node Rapid 3, until all nodes are added in corresponding dispatching group;
Step 4, according to the location information of the node in each dispatching group, mean place information is calculated, it will be described average Location information of the location information as the central point of corresponding dispatching group, and step 1 is repeated to step 4, until twice in succession The error amount of the location information for each central point that Clustering obtains is within the set range;
Step 5, according to the location information of each node in each dispatching group, path planning is carried out.
The specific embodiment process of above method step can be found in first embodiment, and the present embodiment is not repeated to go to live in the household of one's in-laws on getting married herein It states.
Example IV
The present embodiment also provides a kind of computer readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, magnetic Disk, CD, server, App are stored thereon with computer program, the computer program is held by processor using store etc. Following method and step is realized when row:
Step 1, the location information for needing to carry out N number of node of path planning is obtained, and obtains preset M dispatching group The location information of central point;
Step 2, it according to the location information of N number of node and the location information of the central point of M dispatching group, calculates Each node arrives the distance value of each central point respectively;
Step 3, the distance value for arriving each central point respectively according to each node determines the smallest distance value, will The corresponding node of the smallest distance value is added in corresponding dispatching group, and repeats step 1 to step based on remaining node Rapid 3, until all nodes are added in corresponding dispatching group;
Step 4, according to the location information of the node in each dispatching group, mean place information is calculated, it will be described average Location information of the location information as the central point of corresponding dispatching group, and step 1 is repeated to step 4, until twice in succession The error amount of the location information for each central point that Clustering obtains is within the set range;
Step 5, according to the location information of each node in each dispatching group, path planning is carried out.
The specific embodiment process of above method step can be found in first embodiment, and the present embodiment is not repeated to go to live in the household of one's in-laws on getting married herein It states.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of paths planning method, which is characterized in that the described method includes:
Step 1, the location information for needing to carry out N number of node of path planning is obtained, and obtains the center of preset M dispatching group The location information of point;
Step 2, it according to the location information of N number of node and the location information of the central point of M dispatching group, calculates each Node arrives the distance value of each central point respectively;
Step 3, the distance value for arriving each central point respectively according to each node, determines the smallest distance value, will be minimum The corresponding node of distance value be added in corresponding dispatching group, and step 1 is repeated to step 3 based on remaining node, Until all nodes are added in corresponding dispatching group;
Step 4, according to the location information of the node in each dispatching group, mean place information is calculated, by the mean place Location information of the information as the central point of corresponding dispatching group, and step 1 is repeated to step 4, until clustering twice in succession It is grouped the error amount of the location information of obtained each central point within the set range;
Step 5, according to the location information of each node in each dispatching group, path planning is carried out.
2. paths planning method according to claim 1, which is characterized in that described to be arrived respectively respectively according to each node The distance value of a central point determines the smallest distance value, and the corresponding node of the smallest distance value is added to corresponding dispatching In group, specifically include:
When there are multiple the smallest distance values, and when corresponding different nodes, by the corresponding multiple sections of multiple the smallest distance values Point is respectively added in corresponding dispatching group;Alternatively,
When there are multiple the smallest distance values, and when the corresponding same node, by the node it is random be added to corresponding one In a dispatching group.
3. paths planning method according to claim 1, which is characterized in that each section according in each dispatching group The location information of point carries out path planning, specifically includes:
For a dispatching group, first node nearest apart from preset dispatching starting point is determined from the dispatching group, from Second node nearest apart from first node is determined in other nodes of the dispatching group, and so on, until Determine the P nearest node of the P-1 node of distance, from other nodes of the dispatching group to determine described in traversal The path of preset dispatching starting point and all nodes in the dispatching group;Wherein, the value of P is the node in the dispatching group Total number.
4. paths planning method according to claim 1, which is characterized in that each section according in each dispatching group The location information of point carries out path planning, specifically includes:
For a dispatching group, calculate in the distance between any two node in dispatching group value and the dispatching group Each node to it is preset dispatching starting point distance value;
According to all distance values, the preset dispatching starting point and all nodes in the dispatching group can be traversed by calculating Smallest overall distance value, and determined to traverse the preset dispatching starting point and the dispatching group according to the smallest overall distance value In all nodes path.
5. paths planning method according to claim 1, which is characterized in that the method also includes:
According to the value of the value of N and M, the maximum node number of each dispatching group is determined;
It is described the corresponding node of the smallest distance value is added in corresponding dispatching group after, the method also includes:
Judge whether the number of nodes in the dispatching group has reached corresponding maximum node number, if so, no longer calculating other sections Point arrives the distance of the central point of the dispatching group.
6. a kind of path planning apparatus, which is characterized in that described device includes:
Module is obtained, needs to carry out the location information of N number of node of path planning for obtaining, and obtains preset M and dispenses The location information of the central point of group;
Computing module, for the location information according to the central point of the location information and M dispatching group of N number of node, meter Calculate the distance value that each node arrives each central point respectively;
Cluster module determines the smallest distance value for arriving the distance value of each central point respectively according to each node, The corresponding node of the smallest distance value is added in corresponding dispatching group, and based on acquisition described in remaining node retriggered Module, until all nodes are added in corresponding dispatching group;
Processing module calculates mean place information for the location information according to the node in each dispatching group, will be described flat Location information of the equal location information as the central point of corresponding dispatching group, and module is obtained described in retriggered, until continuous two The error amount of the location information for each central point that secondary Clustering obtains is within the set range;
Planning module carries out path planning for the location information according to each node in each dispatching group.
7. path planning apparatus according to claim 6, which is characterized in that the planning module is specifically used for:
For a dispatching group, first node nearest apart from preset dispatching starting point is determined from the dispatching group, from Second node nearest apart from first node is determined in other nodes of the dispatching group, and so on, until Determine the P nearest node of the P-1 node of distance, from other nodes of the dispatching group to determine described in traversal The path of preset dispatching starting point and all nodes in the dispatching group;Wherein, the value of P is the node in the dispatching group Total number.
8. path planning apparatus according to claim 6, which is characterized in that the planning module is specifically used for:
For a dispatching group, calculate in the distance between any two node in dispatching group value and the dispatching group Each node to it is preset dispatching starting point distance value;According to all distance values, calculating can traverse the preset dispatching The smallest overall distance value of starting point and all nodes in the dispatching group, and determine to traverse according to the smallest overall distance value The path of the preset dispatching starting point and all nodes in the dispatching group.
9. a kind of computer equipment, the computer equipment includes: memory, processor and is stored on the memory simultaneously The computer program that can be run on the processor, which is characterized in that the processor realizes right when executing described program It is required that the step of any one of 1 to 5 the method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed The step of any one of claim 1 to 5 the method is realized when device executes.
CN201910521403.3A 2019-06-17 2019-06-17 Path planning method and device, computer equipment and readable storage medium Active CN110363330B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910521403.3A CN110363330B (en) 2019-06-17 2019-06-17 Path planning method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910521403.3A CN110363330B (en) 2019-06-17 2019-06-17 Path planning method and device, computer equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110363330A true CN110363330A (en) 2019-10-22
CN110363330B CN110363330B (en) 2023-04-07

Family

ID=68217388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910521403.3A Active CN110363330B (en) 2019-06-17 2019-06-17 Path planning method and device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110363330B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126688A (en) * 2019-12-19 2020-05-08 北京顺丰同城科技有限公司 Distribution route determining method and device, electronic equipment and readable storage medium
CN111428925A (en) * 2020-03-20 2020-07-17 北京百度网讯科技有限公司 Method and device for determining distribution route
CN111461467A (en) * 2020-06-22 2020-07-28 北京每日优鲜电子商务有限公司 Material distribution method and system based on electronic order, server and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868843A (en) * 2016-03-22 2016-08-17 南京邮电大学 Route planning method oriented to goods delivery
CN106980912A (en) * 2017-04-07 2017-07-25 广东电网有限责任公司佛山供电局 A kind of multiple spot distribution routing planning method and system
CN108830528A (en) * 2018-06-15 2018-11-16 重庆城市管理职业学院 Express mail Distribution path planing method based on time-space attribute

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868843A (en) * 2016-03-22 2016-08-17 南京邮电大学 Route planning method oriented to goods delivery
CN106980912A (en) * 2017-04-07 2017-07-25 广东电网有限责任公司佛山供电局 A kind of multiple spot distribution routing planning method and system
CN108830528A (en) * 2018-06-15 2018-11-16 重庆城市管理职业学院 Express mail Distribution path planing method based on time-space attribute

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126688A (en) * 2019-12-19 2020-05-08 北京顺丰同城科技有限公司 Distribution route determining method and device, electronic equipment and readable storage medium
CN111126688B (en) * 2019-12-19 2023-05-26 北京顺丰同城科技有限公司 Distribution route determining method, distribution route determining device, electronic equipment and readable storage medium
CN111428925A (en) * 2020-03-20 2020-07-17 北京百度网讯科技有限公司 Method and device for determining distribution route
CN111461467A (en) * 2020-06-22 2020-07-28 北京每日优鲜电子商务有限公司 Material distribution method and system based on electronic order, server and medium

Also Published As

Publication number Publication date
CN110363330B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN110363330A (en) A kind of paths planning method, device, computer equipment and readable storage medium storing program for executing
CN108200203B (en) Block chain system based on double-layer network
CN109144731A (en) Data processing method, device, computer equipment and storage medium
CN108810115B (en) Load balancing method and device suitable for distributed database and server
CN108958882A (en) A kind of container method of adjustment, device and system
CN107292701A (en) Order group technology and device
CN103607424B (en) Server connection method and server system
CN105357322B (en) A kind of virtual machine distribution method based on Topology partition
CN110519090B (en) Method and system for allocating accelerator cards of FPGA cloud platform and related components
CN109543726A (en) A kind of method and device of training pattern
JP7042923B2 (en) Cargo sorting method and cargo sorting device of sorting center, and cargo sorting system
CN105634974B (en) Route determining methods and device in software defined network
CN106407207A (en) Real-time added data updating method and apparatus
CN109254839A (en) It determines the method in task triggered time, construct the method and system of task timer
CN106533826A (en) Network state detection method and system
CN109558674A (en) Method for Sales Forecast and its model training method, device
CN103997515B (en) Center system of selection and its application are calculated in a kind of distributed cloud
CN103294799B (en) A kind of data parallel batch imports the method and system of read-only inquiry system
CN110445824A (en) NB-IoT data reporting method, device, system and computer readable storage medium
CN103326925A (en) Message push method and device
CN104298539B (en) Scheduling virtual machine and dispatching method again based on network aware
CN109002342B (en) OpenStack-based method and system for directionally scheduling computing resources
CN112491592B (en) Storage resource grouping method, system, terminal and storage medium
CN107944931A (en) Seed user expanding method, electronic equipment and computer-readable recording medium
CN109144690A (en) task processing method and device

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