CN114298391A - Distribution route determining method, device and equipment - Google Patents

Distribution route determining method, device and equipment Download PDF

Info

Publication number
CN114298391A
CN114298391A CN202111590452.6A CN202111590452A CN114298391A CN 114298391 A CN114298391 A CN 114298391A CN 202111590452 A CN202111590452 A CN 202111590452A CN 114298391 A CN114298391 A CN 114298391A
Authority
CN
China
Prior art keywords
distribution
elements
matrix
points
original matrix
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.)
Pending
Application number
CN202111590452.6A
Other languages
Chinese (zh)
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.)
Rajax Network Technology Co Ltd
Original Assignee
Rajax Network Technology Co 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 Rajax Network Technology Co Ltd filed Critical Rajax Network Technology Co Ltd
Priority to CN202111590452.6A priority Critical patent/CN114298391A/en
Publication of CN114298391A publication Critical patent/CN114298391A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a method, a device and equipment for determining a distribution route, relates to the technical field of computers, and can shorten the solving time required to be applied by using an operation and research optimization algorithm and improve the solving speed of the distribution route so as to meet the reasonable planning of the distribution route under the emergency condition. The method comprises the following steps: defining an original matrix for solving a distribution route, wherein elements in the original matrix represent the distance and/or time formed by two distribution points; adjusting elements which meet preset conditions in the original matrix by utilizing the dependency relationship between the two distribution points to obtain an optimized matrix; and taking the sum of the distances and/or the time of the selected elements in the optimization matrix as an objective function, and solving a distribution route which enables the objective function to be minimum under a preset constraint condition, wherein the preset constraint condition is established by using a distribution relation agreed by two distribution points in the distribution process.

Description

Distribution route determining method, device and equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for determining a distribution route.
Background
With the development of mobile internet and shared economy, the service boundaries of various e-commerce platforms are continuously expanded, from take-out to business super-daily use, fresh vegetables and fruits, delivery of articles for people, and then to leg running service for buying and handling by agency, so that more service scenes are widened to meet more diversified requirements of users, and the full coverage of consumption scenes is realized.
The semi-instant delivery mode can be completed under the condition of separate delivery and delivery as a scene needing to complete delivery performance at a specific time point/segment, such as delivery of breakfast and delivery of afternoon tea, and specifically, for the afternoon tea delivery scene of a plurality of office buildings near a business district, after a plurality of users place orders, a rider can firstly obtain articles from different suppliers, place the articles of different suppliers at a specified delivery point, then take the articles through delivery resources with larger carrying capacity so as to deliver the articles to the delivery points corresponding to different demanders, and other delivery personnel finish sorting.
In the above-mentioned semi-instant delivery mode, the delivery route planning from the point to the delivery point seriously affects the delivery cost and delivery efficiency of the delivery resources, and in the related art, an operation optimization algorithm is usually used to solve the delivery route of the delivery resources, and the delivery resources are controlled to deliver the articles from the point to the delivery point according to the delivery route. However, with the increase of distribution tasks, the point taking and point sending of the articles also increase exponentially, and a large number of point taking and point sending enable the operation and research optimization algorithm to need to apply a large amount of solving time, so that the solving speed of the distribution route is slow, and the reasonable planning of the distribution route under an emergency situation is difficult to meet.
Disclosure of Invention
In view of this, the application provides a method, a device and equipment for determining a distribution route, and mainly aims to solve the problem that in the prior art, a large amount of solution time needs to be applied to an operation and research optimization algorithm, so that the solution speed of the distribution route is slow.
According to a first aspect of the present application, there is provided a delivery route determination method, including:
defining an original matrix for solving a distribution route, wherein elements in the original matrix represent the distance and/or time formed by two distribution points;
adjusting elements which meet preset conditions in the original matrix by utilizing the dependency relationship between the two distribution points to obtain an optimized matrix;
and taking the sum of the distances and/or the time of the selected elements in the optimization matrix as an objective function, and solving a distribution route which enables the objective function to be minimum under a preset constraint condition, wherein the preset constraint condition is established by using a distribution relation agreed by two distribution points in the distribution process.
Further, the defining an original matrix for solving the distribution route specifically includes:
acquiring at least one first distribution point and at least one second distribution point covered in a distribution area;
and selecting the time and/or the distance formed by two distribution points from the at least one first distribution point and the at least one second distribution point as elements, and defining an original matrix for solving the distribution route.
Further, the distribution point is selected from a first distribution point or a second distribution point, and the elements meeting the preset condition in the original matrix are adjusted by using the dependency relationship between the two distribution points to obtain an optimized matrix, which specifically includes:
constructing a network graph structure representing the distribution relation between the two distribution points by using the dependency relation between the two distribution points;
dividing the network graph structure into at least two communities by using a community detection algorithm, wherein each community comprises a first distribution point and/or a second distribution point;
and adjusting elements meeting preset conditions in the original matrix according to the distribution conditions of two distribution points corresponding to the elements in the original matrix in the at least two communities to obtain an optimized matrix.
Further, the constructing a network graph structure representing the delivery relationship between the two delivery points by using the dependency relationship between the two delivery points specifically includes:
determining whether an appointed distribution relation exists between the two distribution points according to a distribution order contained in a distribution area;
and connecting the two distribution points without the appointed distribution relation by taking the first distribution point and the second distribution point covered in the distribution area as nodes to construct a network graph structure representing the distribution relation between the two distribution points.
Further, the adjusting, according to distribution conditions of two distribution points corresponding to elements in the original matrix in the at least two communities, elements in the original matrix that meet preset conditions to obtain an optimized matrix specifically includes:
traversing and inquiring two distribution points corresponding to elements in the original matrix;
and taking elements, in the original matrix, of two distribution points which are not distributed in the same community as elements meeting preset conditions, and adjusting the elements meeting the preset conditions in the original matrix to obtain an optimized matrix.
Further, the adjusting of the elements in the original matrix that meet the preset condition to obtain the optimized matrix specifically includes:
summarizing the distances and/or the times corresponding to all the elements in the original matrix to obtain the total distances and/or the total times corresponding to all the elements;
and correspondingly adding the elements meeting the preset conditions in the original matrix to the total distance and/or the total time corresponding to all the elements to obtain an optimized matrix.
Further, after the defining an original matrix for solving delivery routes, the method further comprises:
predicting whether elements in the original matrix or the optimized matrix are selected in a future time period by utilizing the similarity of the planned delivery routes of the historical delivery orders to obtain element prediction information;
and converting the element prediction information into an additional constraint condition, and updating a preset constraint condition when the distribution route is solved.
Further, the predicting whether an element in the original matrix or the optimized matrix is selected in a future time period by using the similarity of the planned delivery routes of the historical delivery orders to obtain element prediction information specifically includes:
converting constraint conditions related to a distribution route formed by distributing orders in a preset historical time period into a graph neural network structure by utilizing the similarity of the distribution routes planned by historical distribution orders;
and predicting whether elements in the original matrix or the optimized matrix are selected in a future time period by supervised learning of the graph neural network structure to obtain element prediction information.
Further, the converting, by using the similarity of the distribution routes planned by the historical distribution orders, the constraint conditions related to the distribution routes formed by distributing the orders within the preset historical time period into a graph neural network structure specifically includes:
obtaining the distribution route formed by distributing orders in a historical time period, which relates to the selected condition of elements in the original matrix or the optimized matrix, by utilizing the similarity of the distribution routes planned by the historical distribution orders;
and converting the constraint conditions related to the distribution route into a graph neural network structure according to the selected condition of the elements in the original matrix or the optimized matrix.
Further, the predicting whether an element in the original matrix or the optimized matrix is selected in a future time period by supervised learning of the graph neural network structure to obtain element prediction information specifically includes:
generating a characteristic vector whether elements in the original matrix or the optimized matrix are selected or not aiming at a distribution route by supervised learning of the graph neural network structure;
splicing the feature vectors of whether the elements in the original matrix or the optimized matrix are selected;
and predicting whether elements in the original matrix or the optimized matrix are selected in a future time period by utilizing the spliced eigenvectors to obtain element prediction information.
According to a second aspect of the present application, there is provided a distribution route determination apparatus including:
the defining unit is used for defining an original matrix for solving a distribution route, and elements in the original matrix represent the distance and/or time formed by two distribution points;
the adjusting unit is used for adjusting elements which meet preset conditions in the original matrix by using the dependency relationship between the two distribution points to obtain an optimized matrix;
and the solving unit is used for solving the distribution route which enables the objective function to be minimum under a preset constraint condition by taking the sum of the distances and/or the time of the selected elements in the optimization matrix as the objective function, wherein the preset constraint condition is established by using a distribution relation agreed by two distribution points in the distribution process.
Further, the definition unit includes:
the system comprises an acquisition module, a distribution module and a control module, wherein the acquisition module is used for acquiring at least one first distribution point and at least one second distribution point covered in a distribution area;
and the selecting module is used for selecting the time and/or the distance formed by two distribution points from the at least one first distribution point and the at least one second distribution point as elements and defining an original matrix for solving the distribution route.
Further, the delivery point is selected from a first delivery point or a second delivery point, and the adjusting unit includes:
the construction module is used for constructing a network graph structure representing the distribution relation between the two distribution points by utilizing the dependency relation between the two distribution points;
the network graph structure comprises a dividing module, a judging module and a judging module, wherein the dividing module is used for dividing the network graph structure into at least two communities by using a community detection algorithm, and each community comprises a first delivery point and/or a second delivery point;
and the adjusting module is used for adjusting the elements meeting the preset conditions in the original matrix according to the distribution conditions of the two distribution points corresponding to the elements in the original matrix in the at least two communities to obtain an optimized matrix.
Further, the building module comprises:
the determining submodule is used for determining whether an agreed delivery relationship exists between the two delivery points according to delivery orders contained in a delivery area;
and the construction submodule is used for connecting the two distribution points without the appointed distribution relation by taking the first distribution point and the second distribution point covered in the distribution area as nodes, and constructing a network graph structure for representing the distribution relation between the two distribution points.
Further, the adjustment module includes:
the query submodule is used for traversing and querying two distribution points corresponding to the elements in the original matrix;
and the adjusting submodule is used for taking elements, which are not distributed in the same community, of the two distribution points in the original matrix as elements meeting preset conditions, and adjusting the elements meeting the preset conditions in the original matrix to obtain an optimized matrix.
Further, the adjusting submodule is specifically configured to sum up distances and/or times corresponding to all elements in the original matrix to obtain a total distance and/or a total time corresponding to all elements;
the adjusting submodule is further configured to add the total distance and/or the total time corresponding to all the elements to the elements meeting the preset condition in the original matrix, so as to obtain an optimized matrix.
Further, the apparatus further comprises:
the prediction unit is used for predicting whether elements in the original matrix or the optimized matrix are selected in a future time period by utilizing the similarity of the planned delivery routes of the historical delivery orders after the original matrix of the delivery routes is defined and solved to obtain element prediction information;
and the updating unit is used for converting the element prediction information into an additional constraint condition and updating a preset constraint condition when the distribution route is solved.
Further, the prediction unit includes:
the conversion module is used for converting the constraint conditions related to the distribution route formed by the distribution orders in the preset historical time period into a graph neural network structure by utilizing the similarity of the distribution routes planned by the historical distribution orders;
and the prediction module is used for predicting whether elements in the original matrix or the optimized matrix are selected in a future time period through supervised learning of the graph neural network structure to obtain element prediction information.
Further, the conversion module includes:
the obtaining submodule is used for obtaining the distribution route formed by distributing the orders in the historical time period by utilizing the similarity of the distribution routes planned by the historical distribution orders, wherein the distribution route relates to the selected condition of elements in the original matrix or the optimized matrix;
and the conversion sub-module is used for converting the constraint conditions related to the distribution route into a graph neural network structure according to the selected condition of the elements in the original matrix or the optimized matrix.
Further, the prediction module comprises:
the generation submodule is used for generating a characteristic vector whether elements in the original matrix or the optimized matrix are selected or not aiming at a distribution route through supervised learning of the graph neural network structure;
the splicing submodule is used for splicing the eigenvectors of whether the elements in the original matrix or the optimized matrix are selected;
and the prediction submodule is used for predicting whether elements in the original matrix or the optimized matrix are selected in a future time period by utilizing the spliced eigenvectors to obtain element prediction information.
According to a third aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described method of determining a delivery route.
According to a fourth aspect of the present application, there is provided a resource map acquisition apparatus, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the method for determining a distribution route described above when executing the program.
By means of the technical scheme, compared with the mode of solving the distribution route of the distribution resources by using an operation and research optimization algorithm in the existing mode, the method, the device and the equipment for determining the distribution route adjust the elements meeting the preset conditions in the original matrix by using the dependency relationship between two distribution points to obtain the optimized matrix, wherein the dependency relationship between the two distribution points can partially represent the distribution relationship agreed by the two distribution points, so that the elements which violate the agreed distribution relationship cannot appear in the optimized matrix after the elements are adjusted, the constraint conditions for solving the distribution route are reduced to a certain extent, the solution time required to be applied by using the operation and research optimization algorithm is shortened, the sum of the distance and/or time of the selected elements in the optimized matrix is further used as an objective function, the distribution route which enables the objective function to be minimum is solved under the preset constraint conditions, the solving speed of the distribution route is improved so as to meet the reasonable planning of the distribution route under the emergency situation.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flow chart illustrating a method for determining a delivery route according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart illustrating another method for determining a delivery route according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram illustrating a distribution route determination apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram illustrating another distribution route determination device according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In the related art, an operation and research optimization algorithm is generally used to solve a distribution route of a distribution resource, and control the distribution resource to carry an article from a point to a point according to the distribution route. However, with the increase of distribution tasks, the point taking and point sending of the articles also increase exponentially, and a large number of point taking and point sending enable the operation and research optimization algorithm to need to apply a large amount of solving time, so that the solving speed of the distribution route is slow, and the reasonable planning of the distribution route under an emergency situation is difficult to meet.
In order to solve the problem, the embodiment provides a method for determining a delivery route, as shown in fig. 1, the method is applied to a server side for delivering resources, and includes the following steps:
101. an original matrix is defined that solves for the delivery routes.
Wherein, the element in the original matrix represents the distance and/or time formed by two delivery points, for a semi-instant delivery scene, in order to facilitate the delivery of the article, a plurality of delivery points are usually arranged in the delivery area, where the delivery points can be arranged around the supplier and the demander of the delivery task in the delivery area, generally, the supplier is the supplier of the article, which is equivalent to a merchant, the demander is the buyer of the article, which is equivalent to a user or a company, the position of the supplier is the address of the merchant, and the address of the demander is the delivery address of the article, specifically, the supplier and the demander can be clustered respectively according to the position distribution condition of the supplier and the demander in the delivery area, at least two suppliers with close position distribution and at least two demanders with close position distribution are clustered together to form a plurality of supplier subsets and demanders subsets, and the relatively central position in each subset is selected as a distribution point. It should be noted that, if there are suppliers or demanders that are difficult to cluster together, a distribution point may be set for each supplier or demander, and subsequently, if there are newly added suppliers or demanders, the distribution point may be clustered accordingly.
For example, 5 merchant addresses and 20 delivery addresses are covered in a delivery area, clustering is performed on suppliers, two supplier subsets can be formed due to the fact that 2 merchant addresses are close to each other and 3 merchant addresses are close to each other, delivery points of two suppliers are arranged, clustering is performed on demanders, two demanders subsets can be formed due to the fact that 10 delivery addresses are in the same office building and the other 10 delivery addresses are in another office building, and delivery points of two demanders are arranged.
It can be understood that, in consideration of the specific requirement of the delivery task on time, the total distance and/or total time between the selected delivery points of the delivery resources in the delivery area may be used as an objective function, and the delivery route which makes the objective function the minimum is solved under the constraint condition of a specific scenario, where the constraint condition of the specific scenario may be a delivery sequence agreed between the delivery points, and may also be a real-time road condition and the like in the delivery area, and may be specifically characterized as an inequality group of different constraint quantities, and the delivery route is used as a solution under the constraint condition of the specific scenario, so that the efficiency of the delivery resources in executing the delivery task may be improved.
The execution main body of the embodiment of the invention can be a determining device of a distribution route, can be applied to a server, and can solve the distribution route suitable for distribution resources among a plurality of given distribution points under the constraint condition of a specific scene by defining an original matrix for solving the distribution route, so that the distance and/or the time of distribution among the whole distribution nodes are/is minimum, and the distribution efficiency is improved.
102. And adjusting elements which accord with preset conditions in the original matrix by utilizing the dependency relationship between the two distribution points to obtain an optimized matrix.
The dependency relationship between the two distribution points mainly considers a specific scene constraint condition, and specifically, whether two distribution points corresponding to elements in the original matrix have an agreed distribution sequence or not can be judged according to the agreed distribution sequence among the distribution points, if the elements having the agreed distribution sequence are equivalent to meet the specific scene constraint condition, the dependency relationship between the two distribution points is shown and does not need to be adjusted, and if the elements not having the agreed distribution sequence are not in accordance with the specific scene constraint condition, the dependency relationship does not exist between the two distribution points and needs to be adjusted, and the elements not having the dependency relationship in the original matrix are further adjusted as the elements meeting the preset condition to obtain the optimized matrix.
Specifically, in the process of adjusting the elements meeting the preset condition in the original matrix, because there is no dependency relationship between the two distribution points, a fixed value may be correspondingly added to the elements meeting the preset condition, where the fixed value may be a total time or a total distance corresponding to all the elements in the original matrix, or may be set, and is not limited herein.
103. And taking the sum of the distances and/or the time of the selected elements in the optimization matrix as an objective function, and solving the distribution route which enables the objective function to be minimum under the preset constraint condition.
Wherein the preset constraint condition is established by using a distribution relation agreed by two distribution points in the distribution process, since the elements in the optimization matrix do not all characterize the distance and/or time at which two delivery points are formed, but adjusted based on the dependency relationship between two distribution points in the elements, wherein the elements are judged by the dependency relationship and adjusted by a fixed value, so that the optimization matrix can expand the difference between different characterization elements, and then the elements corresponding to the two distribution points with the dependency relationship are preferentially selected when the distribution route is selected, so that the distribution points which violate the appointed distribution sequence can not appear in the distribution route, on the basis of using the same objective function for the distribution area, the constraint quantity of the original matrix represented under the constraint condition of a specific scene is reduced to a certain extent, and the time for solving the distribution route is further prolonged.
Compared with the method for solving the distribution route of the distribution resources by using the operation and research optimization algorithm in the existing method, the method for determining the distribution route adjusts the elements meeting the preset conditions in the original matrix by using the dependency relationship between the two distribution points to obtain the optimization matrix, wherein the dependency relationship between the two distribution points can partially represent the distribution relationship agreed by the two distribution points, so that the elements violating the agreed distribution relationship do not appear in the optimization matrix after the elements are adjusted, the constraint conditions for solving the distribution route are reduced to a certain extent, the solution time required to be applied by using the operation and research optimization algorithm is shortened, the sum of the distance and/or time of the selected elements in the optimization matrix is further used as an objective function, and the distribution route which enables the objective function to be minimum is solved under the preset constraint conditions, the solving speed of the distribution route is improved so as to meet the reasonable planning of the distribution route under the emergency situation.
Further, as a refinement and an extension of the above embodiment, in particular, in the process of defining the original matrix of the solved distribution route, the original matrix of the solved distribution route may be defined by acquiring at least one first distribution point and at least one second distribution point covered in the distribution area, and then selecting, as an element, a time and/or a distance formed by two distribution points from the at least one first distribution point and the at least one second distribution point. The first distribution point and the second distribution point are two different types of distribution points, one type of distribution point can be a point taking point set for a plurality of suppliers close to each other, so that distribution resources can simultaneously take articles distributed from the suppliers, the other type of distribution point can be a point taking point set for a plurality of demanders close to each other, so that the demanders can conveniently take the articles distributed by the corresponding suppliers to the point taking point, in general, the point taking point is close to the suppliers, so that the resources are conveniently distributed to take the articles, one point taking corresponds to the plurality of suppliers, the point taking point is close to the demanders, the demanders can conveniently take the articles, and a plurality of users correspond to one point taking. In practical applications, the delivery resource may be a large carrier, a delivery robot, a rider, etc., and is not limited herein.
It is understood that, in the process of selecting two distribution points, the two distribution points may be selected from the first distribution point or the second distribution point, and at this time, the two distribution points may be both the pick-up point and the delivery point, and one may be the pick-up point and one may be the delivery point.
In the process of solving a distribution route by using an operation and research optimization algorithm for an original matrix, considering the type difference of distribution points in a distribution area, a distribution relation exists between two distribution points represented by elements in the original matrix, here, a constraint condition for solving the distribution route can be set for the distribution relation existing between the two distribution points, and a distribution route with the minimum objective function is solved under the constraint condition by taking the distance and/or time of the selected elements in the original matrix as an objective function.
The constraint condition mainly has two aspects for the distribution relation existing between two distribution points, namely that the distribution point of the point taking type is before the distribution point of the point sending type in the distribution process, and that each distribution point can only pass through once in the distribution process.
In the process of solving the distribution route by the operational research optimization algorithm, a large amount of solution time is consumed along with the increase of distribution points, elements in the original matrix are adjusted in the embodiment to obtain the optimization matrix, the distribution route is solved by using the optimization matrix, specifically, a network graph structure representing the distribution relation between two distribution points can be constructed by using the dependency relation between the two distribution points, the network graph structure is divided into at least two communities by using a community detection algorithm, each community comprises a first distribution point and/or a second distribution point, and elements meeting preset conditions in the original matrix are adjusted according to the distribution conditions of the two distribution points corresponding to the elements in the original matrix in the at least two communities to obtain the optimization matrix. Here, the network graph structure includes nodes and edges, the nodes represent distribution points in a distribution area, and the edges represent whether a distribution relationship exists between two distribution points. In the process of dividing communities, the community detection algorithm can divide the connected distribution points into one community as the distribution points with relatively close relation according to the connection relation between the two distribution points, while the unconnected distribution points are usually divided into different communities, and edges of the distribution points can be continuously added and removed in the process of dividing the communities, so that at least two communities are finally formed.
In an actual application scenario, considering that a network graph structure needs to determine a dependency relationship between two delivery points in a construction process, it may be specifically determined whether an agreed delivery relationship exists between the two delivery points according to delivery orders included in a delivery area, and the two delivery points which do not have the agreed delivery relationship are connected by using a first delivery point and a second delivery point covered in the delivery area as nodes, so as to construct a network graph structure representing the delivery relationship between the two delivery points.
It can be understood that the distribution of the nodes in the community represents to some extent whether there is a distribution point with an agreed distribution relationship between the distribution points, if the distribution points are distributed in the same community, it is indicated that there is an agreed distribution relationship between the two distribution points, otherwise, it is indicated that there is no agreed distribution relationship between the two distribution points, here, the two distribution points corresponding to the elements in the original matrix may be searched in a traversal manner, the elements in the original matrix, which are not distributed in the same community, are taken as the elements meeting the preset condition, and the elements meeting the preset condition in the original matrix are adjusted to obtain the optimized matrix. As an adjustment mode for the elements, the distances and/or times corresponding to all the elements in the original matrix may be summarized to obtain the total distances and/or the total times corresponding to all the elements, and the elements meeting the preset condition in the original matrix are correspondingly added to the total distances and/or the total times corresponding to all the elements to obtain the optimized matrix.
By means of the mode of adjusting the elements in the original matrix, the optimized matrix can preferentially select the distribution points in the same community to form the distribution route in the process of solving the distribution route, and the distribution route formed by the distribution points in the cross-community can violate the constraint condition of the distribution relation, so that the optimized matrix does not solve the distribution route formed by the distribution points in the cross-community, the quantity of the constraints established by the original matrix is removed, and the solving time consumed by the distribution route is reduced.
The embodiment is used as an accelerated solving method for an operation and research optimization algorithm, a specific scene constraint condition in the operation and research optimization algorithm can be reduced by adjusting elements in an original matrix, and then the solving time required to be applied by the operation and research optimization algorithm is reduced, the application also provides another accelerated solving method for the operation and research optimization algorithm, after the original matrix for solving a distribution route is defined, whether the elements in the original matrix are selected in a future time period is predicted by utilizing the similarity of the distribution route planned by a historical distribution order, element prediction information is obtained, the element prediction information is converted into an additional constraint condition, and the constraint condition when the original matrix is used for solving the distribution route is updated, although the additional constraint condition is added on the constraint condition established by the original matrix, the additional constraint condition is equivalent to directly selecting a part of the elements in the original matrix, from another perspective, the process of solving the distribution route by the original matrix is omitted.
Further, in a case where two accelerated solution methods are used simultaneously, the embodiment provides another method for determining a distribution route, which focuses on describing another accelerated solution method provided for the operation optimization algorithm, as shown in fig. 2, and the method includes:
201. an original matrix is defined that solves for the delivery routes.
202. And adjusting elements which accord with preset conditions in the original matrix by utilizing the dependency relationship between the two distribution points to obtain an optimized matrix.
203. And predicting whether the elements in the optimization matrix are selected in a future time period by utilizing the similarity of the planned delivery routes of the historical delivery orders to obtain element prediction information.
The planned delivery route of the historical delivery order is combined with the actual delivery scene of the delivery resource, although the quantity of the delivered order changes, the delivery points in the delivery area do not change, and the constraint conditions established for the delivery points do not change, so that the delivery routes planned by the delivery orders in each time period have great similarity, and specifically, the constraint conditions related to the delivery routes formed by the delivery orders in the preset historical time period can be converted into a graph neural network structure by utilizing the similarity of the planned delivery routes of the historical delivery order, and whether elements in an optimization matrix in the future time period are selected or not can be predicted by the supervised learning graph neural network structure, so that element prediction information can be obtained.
In an actual application scenario, a plurality of distribution routes formed by distribution orders in a historical preset time period correspond to the condition that elements of the distribution routes in an optimization matrix are selected, wherein the selected condition of the elements in the optimization matrix, which is related to the distribution routes formed by the distribution orders in the historical time period, is extracted by utilizing the similarity of the distribution routes planned by the historical distribution orders, and the constraint conditions related to the distribution routes are converted into a plurality of graph neural network structures according to the selected condition of the elements in the optimization matrix. The method includes the steps that a distribution route formed by distribution orders in historical preset time is taken as an example, A represents a point-taking type distribution point, B represents a point-sending type distribution point, the distribution route passes through distribution points A1-B1-A3-B3-A4-B4, the selected condition of elements in an optimization matrix can be obtained according to the distribution points through which the distribution route passes, and further according to the selected condition of the elements in the optimization matrix, constraint conditions related to the distribution route are converted into a neural network structure.
It can be understood that, since the constraint condition may be characterized as a set of inequalities, variables in the set of inequalities may be converted into nodes of the graph neural network structure, and a connection relationship between the nodes is determined according to a selected condition of an element in the optimization matrix, for the selected element in the optimization matrix, it is described that a delivery point corresponding to the element has been used, meets the constraint condition and has a referential property, while an unselected element may not meet the constraint condition and has no referential property, and here, the constraint condition of the delivery route is converted into a process of the graph neural network structure.
It should be noted that, in general, delivery orders form a plurality of delivery routes within a preset time period of a history, and constraints related to each delivery route are converted into a neural network structure, where delivery orders for each day form a delivery route, and delivery orders for 30 days form 30 delivery routes. Specifically, a feature vector of whether an element in an optimization matrix is selected or not can be generated for a distribution route through a supervised learning graph neural network structure, the feature vectors of whether the element in the optimization matrix is selected or not are spliced, and whether the element in the optimization matrix is selected or not in a future time period is predicted by using the spliced feature vectors to obtain element prediction information. The feature vector is formed by aiming at whether a distribution point in one distribution route is selected or not, elements in an optimization matrix corresponding to the two selected distribution points can be represented as 1, elements in the optimization matrix corresponding to the two unselected distribution points can be represented as 0, the spliced feature vector can represent periodic features of the distribution route in a historical preset time period, the feature vector in the next time period is further predicted, and the obtained element prediction information can represent the selection condition of elements in the optimal matrix of the future distribution route.
It should be noted that, for the case that the element prediction information is predicted by supervised learning, and the eigenvector value corresponding to the selection condition of the element in the predicted optimization matrix may not be a stable value, specifically, the element characterization is not 0 or 1, at this time, the unstable eigenvector value in the element prediction information may be deleted, and the stable eigenvector value is retained for splicing as the element prediction information.
204. And converting the element prediction information into an additional constraint condition, and updating a preset constraint condition when the distribution route is solved.
The element prediction information may refer to a distribution route planned in a historical time period to predict a condition that an element in the future time period optimization matrix is selected, and update the condition that the element in the future time period optimization matrix is selected to a preset constraint condition for solving the distribution route, as an additional constraint condition.
205. And taking the sum of the distances and/or the time of the selected elements in the optimization matrix as an objective function, and solving the distribution route which enables the objective function to be minimum under the updated preset constraint condition.
It can be understood that although the updated preset constraint condition adds an additional constraint condition, the additional constraint condition is equivalent to the selection of some elements in the optimization matrix, and the process of solving the distribution route with the minimum objective function is to determine the distribution route according to the selection of the elements in the optimization matrix, at this time, for the elements in the optimization matrix for which the selection has been determined, the solution process does not need to be executed, so that the solution calculation time of the distribution route is saved.
Further, as a specific implementation of the method in fig. 1-2, an embodiment of the present application provides an apparatus for determining a route to be delivered, as shown in fig. 3, the apparatus includes: definition unit 31, adjustment unit 32, and solution unit 33.
A defining unit 31, which may be configured to define an original matrix for solving a distribution route, where elements in the original matrix represent a distance and/or a time formed by two distribution points;
the adjusting unit 32 may be configured to adjust, by using the dependency relationship between the two distribution points, elements in the original matrix that meet a preset condition to obtain an optimized matrix;
the solving unit 33 may be configured to use a sum of distances and/or times of selected elements in the optimization matrix as an objective function, and solve the distribution route that minimizes the objective function under a preset constraint condition, where the preset constraint condition is established by using a distribution relationship agreed by two distribution points in a distribution process.
Compared with the method for solving the distribution route of the distribution resources by using the operation and research optimization algorithm in the existing method, the method for determining the distribution route of the distribution resources adjusts the elements meeting the preset conditions in the original matrix by using the dependency relationship between the two distribution points to obtain the optimized matrix, wherein the dependency relationship between the two distribution points can partially represent the distribution relationship agreed by the two distribution points, so that the elements which violate the agreed distribution relationship do not appear in the optimized matrix after the elements are adjusted, the constraint condition for solving the distribution route is reduced to a certain extent, the solution time required to be applied by using the operation and research optimization algorithm is shortened, the sum of the distance and/or time of the selected elements in the optimized matrix is further used as an objective function, and the distribution route which enables the objective function to be minimum is solved under the preset constraint condition, the solving speed of the distribution route is improved so as to meet the reasonable planning of the distribution route under the emergency situation.
In a specific application scenario, as shown in fig. 4, the defining unit 31 includes:
an obtaining module 311, configured to obtain at least one first distribution point and at least one second distribution point covered in a distribution area;
the selecting module 312 may be configured to select, as an element, a time and/or a distance formed by two delivery points from the at least one first delivery point and the at least one second delivery point, and define an original matrix for solving the delivery route.
In a specific application scenario, as shown in fig. 4, the distribution point is selected from a first distribution point or a second distribution point, and the adjusting unit 32 includes:
a building module 321, configured to build a network graph structure representing a distribution relationship between two distribution points by using the dependency relationship between the two distribution points;
a dividing module 322, configured to divide the network graph structure into at least two communities by using a community detection algorithm, where each community includes a first distribution point and/or a second distribution point;
the adjusting module 323 may be configured to adjust, according to distribution conditions of two distribution points corresponding to elements in the original matrix in the at least two communities, elements in the original matrix that meet a preset condition, so as to obtain an optimized matrix.
In a specific application scenario, as shown in fig. 4, the building module 321 includes:
the determining sub-module 3211 may be configured to determine, according to a delivery order included in the delivery area, whether an agreed delivery relationship exists between the two delivery points;
the constructing sub-module 3212 may be configured to connect two distribution points that do not have an agreed distribution relationship with each other by using the first distribution point and the second distribution point covered in the distribution area as nodes, and construct a network graph structure representing the distribution relationship between the two distribution points.
In a specific application scenario, as shown in fig. 4, the adjusting module 323 includes:
the query submodule 3231 may be configured to query two distribution points corresponding to elements in the original matrix in a traversal manner;
the adjusting submodule 3232 may be configured to take an element, in the original matrix, of two distribution points that are not distributed in the same community as an element meeting a preset condition, and adjust the element meeting the preset condition in the original matrix to obtain an optimized matrix.
In a specific application scenario, the adjusting submodule 3232 may be specifically configured to summarize distances and/or times corresponding to all elements in the original matrix, so as to obtain a total distance and/or a total time corresponding to all elements;
the adjusting submodule 3232 may be further configured to add, to the elements in the original matrix that meet the preset condition, the total distance and/or the total time corresponding to all the elements, so as to obtain an optimized matrix.
In a specific application scenario, as shown in fig. 4, the apparatus further includes:
the prediction unit 34 may be configured to, after the original matrix of the delivery route is defined and solved, predict whether an element in the original matrix or the optimized matrix is selected in a future time period by using similarity of the delivery routes planned by historical delivery orders, so as to obtain element prediction information;
the updating unit 35 may be configured to convert the element prediction information into an additional constraint condition, and update a preset constraint condition when the delivery route is solved.
In a specific application scenario, as shown in fig. 4, the prediction unit 34 includes:
the conversion module 341 may be configured to convert, by using the similarity of the distribution routes planned by the historical distribution orders, constraints related to the distribution routes formed by distributing the orders within a preset historical time period into a graph neural network structure;
the prediction module 342 may be configured to predict whether an element in the original matrix or the optimized matrix is selected in a future time period by supervised learning of the graph neural network structure, so as to obtain element prediction information.
In a specific application scenario, as shown in fig. 4, the conversion module 341 includes:
the obtaining sub-module 3411 may be configured to obtain, by using similarities among distribution routes planned by historical distribution orders, that a distribution route formed by distributing orders in a historical time period relates to a selected condition of an element in the original matrix or the optimized matrix;
the conversion sub-module 3412 may be configured to convert the constraint conditions involved in the distribution route into a graph neural network structure according to the selected condition of the elements in the original matrix or the optimized matrix.
In a specific application scenario, as shown in fig. 4, the prediction module 342 includes:
a generating sub-module 3421, configured to generate a feature vector of whether elements in the original matrix or the optimized matrix are selected for a distribution route by supervised learning of the graph neural network structure;
a splicing submodule 3422, configured to splice the eigenvectors of whether the elements in the original matrix or the optimized matrix are selected;
the prediction sub-module 3423 may be configured to predict whether an element in the original matrix or the optimized matrix is selected in a future time period by using the spliced eigenvectors, so as to obtain element prediction information.
It should be noted that other corresponding descriptions of the functional units involved in the determining device for a delivery route applicable to a service end side provided in this embodiment may refer to the corresponding descriptions in fig. 1 and fig. 2, and are not repeated herein.
Based on the method shown in fig. 1-2, correspondingly, the present application further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method for determining the distribution route shown in fig. 1-2;
based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the method shown in fig. 1-2 and the virtual device embodiment shown in fig. 3-4, in order to achieve the above object, an embodiment of the present application further provides a physical device for determining a distribution route, which may be specifically a computer, a smart phone, a tablet computer, a smart watch, a server, or a network device, and the physical device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program for implementing the method for determining a delivery route as described above with reference to fig. 1-2.
Optionally, the above entity devices may further include a user interface, a network interface, a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), etc.
It will be understood by those skilled in the art that the structure of the determined physical device of a distribution route provided in the present embodiment does not constitute a limitation to the physical device, and may include more or less components, or some components in combination, or a different arrangement of components.
The storage medium may further include an operating system and a network communication module. The operating system is a program for managing hardware and software resources of the actual device for store search information processing, and supports the operation of the information processing program and other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and communication with other hardware and software in the information processing entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. Through the technical scheme, compared with the existing mode, the method has the advantages that the distribution relation agreed by the two distribution points is partially represented through the dependency relation between the two distribution points, so that elements which violate the agreed distribution relation cannot appear in the optimization matrix after element adjustment, the constraint conditions for solving the distribution route are reduced to a certain extent, the solution time required to be applied by using an operation and research optimization algorithm is shortened, the solution speed of the distribution route is increased, and the reasonable planning of the distribution route under the emergency condition is met.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. A method for determining a delivery route, comprising:
defining an original matrix for solving a distribution route, wherein elements in the original matrix represent the distance and/or time formed by two distribution points;
adjusting elements which meet preset conditions in the original matrix by utilizing the dependency relationship between the two distribution points to obtain an optimized matrix;
and taking the sum of the distances and/or the time of the selected elements in the optimization matrix as an objective function, and solving a distribution route which enables the objective function to be minimum under a preset constraint condition, wherein the preset constraint condition is established by using a distribution relation agreed by two distribution points in the distribution process.
2. The method of claim 1, wherein the defining an original matrix for solving the delivery routes comprises:
acquiring at least one first distribution point and at least one second distribution point covered in a distribution area;
and selecting the time and/or the distance formed by two distribution points from the at least one first distribution point and the at least one second distribution point as elements, and defining an original matrix for solving the distribution route.
3. The method according to claim 1, wherein the distribution point is selected from a first distribution point or a second distribution point, and the adjusting, by using the dependency relationship between the two distribution points, the elements in the original matrix that meet a preset condition to obtain an optimized matrix specifically includes:
constructing a network graph structure representing the distribution relation between the two distribution points by using the dependency relation between the two distribution points;
dividing the network graph structure into at least two communities by using a community detection algorithm, wherein each community comprises a first distribution point and/or a second distribution point;
and adjusting elements meeting preset conditions in the original matrix according to the distribution conditions of two distribution points corresponding to the elements in the original matrix in the at least two communities to obtain an optimized matrix.
4. The method according to claim 3, wherein the constructing a network graph structure characterizing a delivery relationship between two delivery points by using the dependency relationship between the two delivery points comprises:
determining whether an appointed distribution relation exists between the two distribution points according to a distribution order contained in a distribution area;
and connecting the two distribution points without the appointed distribution relation by taking the first distribution point and the second distribution point covered in the distribution area as nodes to construct a network graph structure representing the distribution relation between the two distribution points.
5. The method according to claim 3, wherein the adjusting, according to distribution conditions of two distribution points corresponding to elements in the original matrix in the at least two communities, elements in the original matrix that meet preset conditions to obtain an optimized matrix specifically includes:
traversing and inquiring two distribution points corresponding to elements in the original matrix;
and taking elements, in the original matrix, of two distribution points which are not distributed in the same community as elements meeting preset conditions, and adjusting the elements meeting the preset conditions in the original matrix to obtain an optimized matrix.
6. The method according to claim 5, wherein the adjusting of the elements in the original matrix that meet the preset condition to obtain the optimized matrix specifically comprises:
summarizing the distances and/or the times corresponding to all the elements in the original matrix to obtain the total distances and/or the total times corresponding to all the elements;
and correspondingly adding the elements meeting the preset conditions in the original matrix to the total distance and/or the total time corresponding to all the elements to obtain an optimized matrix.
7. The method of any of claims 1-6, wherein after the defining an original matrix to solve for delivery routes, the method further comprises:
predicting whether elements in the original matrix or the optimized matrix are selected in a future time period by utilizing the similarity of the planned delivery routes of the historical delivery orders to obtain element prediction information;
and converting the element prediction information into an additional constraint condition, and updating a preset constraint condition when the distribution route is solved.
8. A distribution route determination device, comprising:
the defining unit is used for defining an original matrix for solving a distribution route, and elements in the original matrix represent the distance and/or time formed by two distribution points;
the adjusting unit is used for adjusting elements which meet preset conditions in the original matrix by using the dependency relationship between the two distribution points to obtain an optimized matrix;
and the solving unit is used for solving the distribution route which enables the objective function to be minimum under a preset constraint condition by taking the sum of the distances and/or the time of the selected elements in the optimization matrix as the objective function, wherein the preset constraint condition is established by using a distribution relation agreed by two distribution points in the distribution process.
9. A storage medium on which a computer program is stored, the program, when executed by a processor, implementing the method of determining a delivery route according to any one of claims 1 to 7.
10. A distribution route determination device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the distribution route determination method according to any one of claims 1 to 7 when executing the program.
CN202111590452.6A 2021-12-23 2021-12-23 Distribution route determining method, device and equipment Pending CN114298391A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111590452.6A CN114298391A (en) 2021-12-23 2021-12-23 Distribution route determining method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111590452.6A CN114298391A (en) 2021-12-23 2021-12-23 Distribution route determining method, device and equipment

Publications (1)

Publication Number Publication Date
CN114298391A true CN114298391A (en) 2022-04-08

Family

ID=80969565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111590452.6A Pending CN114298391A (en) 2021-12-23 2021-12-23 Distribution route determining method, device and equipment

Country Status (1)

Country Link
CN (1) CN114298391A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116245449A (en) * 2023-05-06 2023-06-09 北京邮电大学 Low-carbon logistics distribution method, device and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116245449A (en) * 2023-05-06 2023-06-09 北京邮电大学 Low-carbon logistics distribution method, device and equipment

Similar Documents

Publication Publication Date Title
CN109840648B (en) Method and device for outputting bin information
Gao et al. Applying improved particle swarm optimization for dynamic service composition focusing on quality of service evaluations under hybrid networks
CN108492068B (en) Method and device for path planning
CN111079015B (en) Recommendation method and device, computer equipment and storage medium
CN111428991B (en) Method and device for determining delivery vehicles
CN102855259A (en) Parallelization of massive data clustering analysis
CN113239317A (en) Method and device for determining order fulfillment warehouse
CN111898221A (en) Address selection method and device and computer readable storage medium
CN111311005B (en) Distribution path planning method, distribution path planning device, distribution path planning medium and computer equipment
CN114429365A (en) Article sales information generation method and device, electronic equipment and computer medium
CN110348921A (en) The method and apparatus that shops's article is chosen
CN109447549A (en) A kind of method and relevant apparatus that material position is determining
CN115423555A (en) Commodity recommendation method and device, electronic equipment and storage medium
CN114298391A (en) Distribution route determining method, device and equipment
de Assis Corrêa et al. A decomposition approach for the probabilistic maximal covering location-allocation problem
CN103270520A (en) Importance class based data management
CN112950321A (en) Article recommendation method and device
Lee et al. Fog server deployment technique: An approach based on computing resource usage
Ouadah et al. SkyAP-S3: a hybrid approach for efficient skyline services selection
CN112308477A (en) Inventory positioning method and device
Erkal et al. An integrated IVIF-DEMATEL and IVIF-TOPSIS methodology for hotel information system selection
Hu et al. Betterlife 2.0: Large-scale social intelligence reasoning on cloud
CN115099865A (en) Data processing method and device
US20170323248A1 (en) System and Method of Parallelizing Order-By-Order Planning
CN110008970A (en) A kind of address information generation 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