Disclosure of Invention
In view of the above, the present invention provides a method for establishing a multi-level delivery path of an order and a multi-level delivery system, which are used to establish a multi-level delivery of an order and calculate a freight rate for each level of delivery.
According to a first aspect of the present invention, there is provided a method for establishing a multi-stage distribution path, including: acquiring a distribution path as an initial path according to a distribution address of goods to be distributed, wherein the distribution path comprises a starting address and an arrival address; taking the initial path as an initial value, retrieving the path related information in an iterative mode, and taking the initial address of the delivery path retrieved each time as the arrival address of the next retrieval to obtain each stage of delivery path until the delivery path cannot be retrieved from the path related information; and forming the initial path and the multiple retrieved distribution paths into the multi-stage distribution path.
Preferably, the acquiring a distribution path as an initial path according to a distribution address of goods to be distributed includes: retrieving the path-related information by using a fourth-level address of the delivery address of the goods to be delivered as an arrival address; for each level of addresses from the third level to the first level of addresses of the delivery addresses of the goods to be delivered, when the upper level of addresses do not retrieve the delivery paths from the path related information, the path related information is continuously retrieved; and using the retrieved delivery path as the initial path.
Preferably, the method further comprises the following steps: and respectively retrieving and obtaining the corresponding carriers according to the initial path and each stage of distribution path.
Preferably, when the corresponding carriers are more than 1, the carriers are selected according to the path matching policy.
Preferably, the path matching policy includes random assignment, fixed ratio assignment, under-level carrier matching, category matching, brand matching, and age matching.
Preferably, the method further comprises the following steps: and calculating freight according to the freight rule of the carrier.
According to a second aspect of the present invention, there is provided a multi-stage delivery system comprising: the data acquisition module is used for acquiring a delivery address of goods to be delivered; the basic information maintenance module is used for maintaining the relevant information of the path; the distribution path calculation module is used for acquiring an initial path according to the distribution address and retrieving and acquiring each stage of distribution path in an iterative mode according to the initial path; and the output module is used for outputting the initial path and retrieving the multi-stage distribution path formed by each stage of distribution paths.
Preferably, the delivery route calculation module further includes: an initial determining unit, configured to retrieve the path-related information using fourth-level to first-level addresses of the delivery address as arrival addresses, respectively, to obtain an initial path; and the iteration calculation unit is used for searching the path related information in an iterative mode by taking the initial path as an initial value, and the initial address of the distribution path searched each time is used as the arrival address searched next time to obtain each stage of distribution path until the distribution path cannot be searched from the path related information.
Preferably, the method further comprises the following steps: and the carrier determining module is used for retrieving the carriers according to the initial path and each stage of distribution path and determining the carriers according to the path matching strategy.
Preferably, the method further comprises the following steps: and the freight calculation module is used for calculating the freight of the goods to be delivered.
Preferably, the path matching policy includes random assignment, fixed ratio assignment, under-level carrier matching, category matching, brand matching, and age matching.
The method for establishing the multistage distribution path comprises the following steps: retrieving path related information according to the order address, and acquiring a distribution path as an initial path, wherein the distribution path comprises an initial address and an arrival address; and taking the initial path as an initial value, retrieving the path related information in an iterative mode, and taking the initial address of the delivery path retrieved each time as the arrival address of the next retrieval to obtain each stage of delivery path until the delivery path cannot be retrieved from the path related information. The method realizes the mode that one order is cooperatively delivered by a plurality of carriers, and ensures the reasonable utilization of delivery resources. Through a plurality of matching strategies, the scene that the same distribution path can be simultaneously distributed by a plurality of carriers is supported, the problem that the distribution resources of one carrier are insufficient for certain distribution paths with large order quantity is solved, and the distribution mode with a plurality of distribution types and distribution services coexisting is realized.
Detailed Description
The present invention will be described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, and procedures have not been described in detail so as not to obscure the present invention. The figures are not necessarily drawn to scale.
The flowcharts and block diagrams in the figures and block diagrams illustrate the possible architectures, functions, and operations of the systems, methods, and apparatuses according to the embodiments of the present invention, and may represent a module, a program segment, or merely a code segment, which is an executable instruction for implementing a specified logical function. It should also be noted that the executable instructions that implement the specified logical functions may be recombined to create new modules and program segments. The blocks of the drawings, and the order of the blocks, are thus provided to better illustrate the processes and steps of the embodiments and should not be taken as limiting the invention itself.
The terms in this embodiment explain:
a delivery path: the method comprises the following steps of (1) forming a starting address and an arrival address, wherein the starting address comprises the following steps: the Shijiazhuang-baoding form a distribution path, and each distribution path comprises attribute information such as an area, a center and a path state to which the distribution path belongs; each delivery path corresponds to one or more carriers, freight rules, etc. information.
Multi-stage distribution: that is, the distribution process of an order is composed of a plurality of distribution paths, such as: the multi-stage distribution path of an order comprises: Shijiazhuang-Baoding (first grade), Baoding-28095, State (second grade), 28095, State-City district (third grade). The order is cooperatively delivered by the three paths, and each stage of delivery path corresponds to a corresponding carrier and freight rule. If the primary delivery route is the representative, the representative is sent by a carrier directly from the warehouse to the customer.
The carrier: the delivery carrier, a single delivery path, may be delivered by multiple carriers, or a carrier may deliver multiple paths simultaneously, but for an order, there may be only one carrier per delivery path.
Fig. 1 is a flowchart of a method for establishing a multi-stage distribution path according to an embodiment of the present invention. The method for establishing the multi-stage distribution path comprises steps 101 to 105.
In step 101, route related information is retrieved according to a delivery address of goods to be delivered, and a delivery route is acquired as an initial route. In this step, the order address is used as the arrival address, the corresponding delivery route is retrieved from the route-related information table, and the retrieved delivery route is used as the initial route. The path related information comprises predefined or prestored information of each section of distribution path, and each section of distribution path comprises information such as a starting address, an arrival address, a belonging area, a center, a routing state and the like.
In step 102, the start address of the initial path is used as the arrival address to retrieve the path-related information, and the distribution path is obtained.
In step 103, the start address of the retrieved distribution route is set as the arrival address, and route-related information is retrieved.
In step 104, whether it was retrieved. In this step, it is determined whether a delivery path is retrieved in step 103, if yes, step 103 is executed, the retrieved start address of the new delivery path is used as the arrival address to continue the retrieval, and if not, the current-stage path is the final path, and the start address is the address of the logistics storage center.
In step 105, a multi-level delivery path is formed. And forming the initial path and the paths obtained by the multiple times of retrieval into a multi-level delivery path of the goods to be delivered.
In the method for establishing a multi-stage delivery path shown in fig. 1, relevant information of the delivery path is established by a delivery center worker, and is maintained at any time. In this embodiment, the path-related information table is retrieved in an iterative manner, and the multilevel distribution paths are obtained by one-level retrieval, and are combined to form a logistics distribution route of the order. The method for establishing the distribution path can generate the logistics route only by inputting the distribution address of the goods to be distributed instead, and is suitable for e-commerce and logistics companies to distribute the ordered goods.
Fig. 2 is a flowchart of a method for establishing a multi-stage distribution path according to another embodiment of the present invention. The method for establishing the multi-stage distribution path comprises steps 201 to 213.
In step 201, path-related information is retrieved based on the fourth level address. The detailed address of the order includes four levels of addresses of province, city, district (town, village), street (village). The fourth level address of the order refers to an address specific to this level of the street (village). And taking the address as the related information of the arrival address retrieval path, and acquiring a distribution path arriving at the address.
In step 202, whether there is a path to the fourth level address. In step 202, if there is a delivery route with the arrival address being the fourth-level address, step 210 is executed, otherwise step 203 is executed.
In step 203, path-related information is retrieved based on the third level address. In this step, the third level address, i.e., province, city, district (town, village) address, is used to retrieve the path-related information.
In step 204, whether there is a path to the address that is a third level address. If there is a delivery route to the third level address, step 210 is performed, otherwise step 205 is performed.
In step 205, path-related information is retrieved based on the second level address. In this step, the second level address, i.e., province and city address, is used to retrieve the path-related information.
In step 206, there is no path to the second level address. If there is a delivery route with the arrival address being the second level address, step 210 is performed, otherwise step 207 is performed.
In step 207, path-related information is retrieved based on the first level address. In this step, the path-related information is retrieved using the first level address, i.e. the provincial address.
In step 208, there is no path to the first level address. If there is a delivery path with the arrival address being the first level address, step 210 is executed, otherwise step 209 is executed, which indicates that the path establishment fails. The reason for the failure may be that the logistics system is not yet established or that the path related data is not maintained.
In step 209, the exception ends.
In step 210, carriers are selected according to the routing policy. And searching and obtaining the carrier through the delivery path, and determining a path matching strategy to determine the carrier.
In step 211, the retrieved start address of the delivery route is used as the arrival address, and route-related information is retrieved.
In step 212, in this step, it is determined whether a delivery route was retrieved in step 211, if yes, step 210 is performed, and if no, step 213 is performed.
In step 213, a multi-level delivery path for the order is composed. And forming the initial path and the paths obtained by the multiple times of retrieval into a multi-level delivery path of the goods to be delivered.
The embodiment of the invention specifically describes that the initial path is obtained according to the related information of the multi-level address retrieval path in the delivery address of the delivery goods, and then each level of delivery path is obtained through multi-level retrieval according to the initial path.
The step of determining the carrier as shown in fig. 3 includes steps 301-305.
In step 301, carriers are retrieved based on delivery paths
In step 302, the number of carriers is retrieved and determined. If the number of carriers is 0, step 305 is executed, if the number of carriers is 1, step 304 is executed, and if the number of carriers is greater than 1, step 303 is executed.
In step 303, a path matching policy is selected, and a carrier is selected based on the matching policy.
In step 304, the corresponding carrier is obtained.
In step 305, the exception ends. When the number of carriers is 0, the carriers cannot be acquired, and the acquisition method fails.
In a preferred embodiment, when there are multiple carriers corresponding to the same delivery route, different distribution strategies need to be established for the carriers, including: a random distribution strategy, a fixed proportion distribution strategy, a subordinate carrier matching strategy, a category matching strategy, a brand matching strategy and an aging matching strategy, which are described in the following table.
Fig. 4 is a flow chart of a freight calculation method according to an embodiment of the present invention.
In step 401, a route freight calculation rule is obtained.
In step 402, the charging type is determined.
In steps 403, 406, 409 and 414, the freight rate is calculated according to the piece type. And according to the charging rule, acquiring the area type of the route and the unit price of the part of the type corresponding to the area type, and calculating the freight charge of the goods to be distributed on the route.
In step 404, 408, 411, 413, freight is calculated according to the order volume. Firstly, whether the carrier calculates the freight according to the volume of a single order or the total order volume of the current day is obtained according to freight rules, if the carrier calculates according to the volume of the single order, the unit price corresponding to the volume is obtained according to the volume of the order, and the freight of the order on the path is calculated.
In steps 405, 407, 410, 412, if the carriers on the route calculate freight rate uniformly according to the total volume of orders on the same day, the volume of the orders is added into the freight rate table to be calculated, after 24 o' clock, the total volume of orders of the carriers on the route on the previous day is calculated through a timing task, and the total freight rate of the carriers on the previous day on the delivery route is calculated according to the unit price corresponding to the volume in the calculation rule.
The various freight calculation methods meet the freight calculation requirements of different types of carriers.
The multi-level path establishing method provided by the invention realizes a mode that goods to be delivered are delivered by a plurality of carriers in a coordinated manner, ensures the reasonable utilization of delivery resources and realizes the delivery of goods in remote areas. Through a plurality of matching strategies, the scene that the same distribution path can be simultaneously distributed by a plurality of carriers is supported, the problem that the distribution resources of one carrier are insufficient for certain distribution paths with large order quantity is solved, and the distribution mode with a plurality of distribution types and distribution services coexisting is realized. And the orders, the delivery paths and the carriers are transported in a multi-level delivery mode.
The present invention also provides a multi-level distribution system 500 corresponding to the above-mentioned establishment method. As shown in fig. 5, it includes a data acquisition module 501, a delivery path calculation module 502, a carrier determination module 503, a freight calculation module 504, a basic information maintenance module 505, and an output module 506.
The data acquisition module 501 acquires order data or logistics data from an external system. The order data is a record of a customer purchasing goods through an E-commerce system, the logistics data is delivery information of a logistics company, and the attribute information of the order data or the logistics data comprises information such as a name of a next person, a time of placing an order, a delivery address and the like.
The delivery path calculation module 502 acquires each level of delivery paths from the basic information maintenance module 505 and assigns the each level of delivery paths.
The carrier determination module 503 retrieves the carrier from the basic information maintenance module 505 based on the initial path and each stage of the delivery path, and determines the carrier based on the path matching policy.
The freight calculation module 504 calculates freight rates for the goods to be delivered. Further, orders requiring daily, piece by piece, volume by volume are independently accounted for according to freight type. The daily order is summarized at a fixed time each day.
The basic information maintenance module 505 maintains path-related information. The path related information includes path base information, path carrier information, path allocation policies, and path-to-freight rules. The path basic information comprises information such as a starting address, an arrival address, a belonging area, a center, a routing state and the like of each distribution path. The path related information is maintained by distribution center personnel, and when the position of the storage center is changed or the carrier of a certain road section is changed, the distribution center personnel can modify the related data.
The output module 506 outputs the initial path and retrieves the multi-level distribution path composed of each level of the distribution paths. Further, the carrier and freight rate corresponding to each level of the path are output.
In a preferred embodiment, the delivery path calculation module further includes: an initial determining unit, configured to retrieve the path-related information using fourth-level to first-level addresses of the delivery address as arrival addresses, respectively, to obtain an initial path; and the iteration calculation unit is used for searching the path related information in an iterative mode by taking the initial path as an initial value, and the initial address of the distribution path searched each time is used as the arrival address searched next time to obtain each stage of distribution path until the distribution path cannot be searched from the path related information.
In a preferred embodiment, carriers are selected by a path matching strategy that includes random assignment, fixed ratio assignment, under-level carrier matching, category matching, brand matching, and age matching.
The multi-level delivery system provided by the invention realizes the mode that one order is cooperatively delivered by a plurality of carriers, ensures the reasonable utilization of delivery resources and realizes the delivery of commodities in remote areas. Through a plurality of matching strategies, the scene that the same distribution path can be simultaneously distributed by a plurality of carriers is supported, the problem that the distribution resources of one carrier are insufficient for certain distribution paths with large order quantity is solved, and the distribution mode with a plurality of distribution types and distribution services coexisting is realized. And the orders, the delivery paths and the carriers are transported in a multi-level delivery mode.
It will be understood by those skilled in the art that the various modules or units of the system according to the invention may be implemented in hardware, firmware or software. The software includes, for example, a code program formed using various programming languages such as JAVA, C/C + +/C #, SQL, and the like. Although the steps and sequence of steps of the embodiments of the present invention are presented in method and method diagrams, the executable instructions of the steps implementing the specified logical functions may be re-combined to create new steps. The sequence of the steps should not be limited to the sequence of the steps in the method and the method illustrations, and can be modified at any time according to the functional requirements. Such as performing some of the steps in parallel or in reverse order.
Systems and methods according to the present invention may be deployed on a single server or on multiple servers. For example, different modules may be deployed on different servers, respectively, to form a dedicated server. Alternatively, the same functional unit, module or system may be deployed in a distributed fashion across multiple servers to relieve load stress. The server includes but is not limited to a plurality of PCs, PC servers, blades, supercomputers, etc. on the same local area network and connected via the Internet.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.