Route planning and model training method, device, equipment, medium and program product
By abstracting the vehicle route planning problem into multiple task types and training the route planning model using pre-trained models and training sample data, the problem of low efficiency in vehicle route planning is solved, and the effect of quickly determining delivery routes is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BAIDU INT TECH (SHENZHEN) CO LTD
- Filing Date
- 2022-12-12
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, vehicle route planning problems require problem modeling and solving from scratch, resulting in low efficiency.
Different types of vehicle route planning problems are abstracted into multiple task types. A pre-trained model is trained using the first training sample data corresponding to the multiple task types, and a route planning model is trained using the second training sample data of the current task type to quickly determine the delivery route.
It improves the efficiency of vehicle route planning, enabling the rapid determination of delivery routes for different task types.
Smart Images

Figure CN115936383B_ABST
Abstract
Description
Technical Field
[0001] This disclosure provides a route planning and model training method, apparatus, device, medium, and program product, relating to the field of artificial intelligence technology, specifically deep learning and big data technology. Background Technology
[0002] With the rapid development of computer technology, artificial intelligence technology has also developed rapidly.
[0003] Vehicle routing problem (VRP) is a classic and widely studied topic in the fields of transportation and operations research. The most basic VRP mainly involves three concepts: Depot, Customers, and Vehicles. Its core objective is to plan the optimal route while satisfying various constraints, ensuring that vehicles, following the route, deliver goods to different customers in a timely manner and meet their needs.
[0004] Currently, for different types of vehicle route planning problems, it is necessary to start the process of problem modeling and problem solving from scratch, which results in low efficiency in vehicle route planning. Summary of the Invention
[0005] This disclosure provides a route planning and model training method, apparatus, device, medium, and program product.
[0006] One aspect of this disclosure provides a route planning method, comprising:
[0007] Obtain information on multiple delivery points and the current task type;
[0008] By inputting the information of the multiple delivery outlets and the current task type into the route planning model, a target delivery route corresponding to the current task type is obtained.
[0009] The route planning model is a model obtained by training a pre-trained model with the second training sample data corresponding to the current task type among multiple task types; the pre-trained model is a model obtained by training the first training sample data corresponding to the multiple task types.
[0010] Another aspect of this disclosure provides a model training method, comprising:
[0011] Collect first training sample data and second training sample data, wherein the first training sample data is sample data corresponding to multiple task types, and each first training sample data includes its respective task type; the second training sample data is sample data corresponding to the target task type among the multiple task types.
[0012] Based on the first training sample data, the initial model is trained to obtain a pre-trained model;
[0013] Based on the second training sample data, the pre-trained model is trained to obtain a target model corresponding to the target task type.
[0014] Another aspect of this disclosure provides a route planning device, comprising:
[0015] The acquisition module is used to obtain information on multiple delivery outlets and the current task type;
[0016] The model module is used to input the information of the multiple delivery outlets and the current task type into the route planning model to obtain the target delivery route corresponding to the current task type;
[0017] The route planning model is a model obtained by training a pre-trained model with the second training sample data corresponding to the current task type among multiple task types; the pre-trained model is a model obtained by training the first training sample data corresponding to the multiple task types.
[0018] In another aspect of this disclosure, a model training apparatus is provided, comprising:
[0019] The collection module is used to collect first training sample data and second training sample data, wherein the first training sample data is sample data corresponding to multiple task types, and each first training sample data includes its respective task type; the second training sample data is sample data corresponding to the target task type among the multiple task types.
[0020] The first training module is used to train the initial model based on the first training sample data to obtain a pre-trained model.
[0021] The second training module is used to train the pre-trained model based on the second training sample data to obtain a target model corresponding to the target task type.
[0022] In another aspect of this disclosure, an electronic device is provided, comprising:
[0023] At least one processor; and
[0024] A memory communicatively connected to the at least one processor; wherein,
[0025] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described above.
[0026] In another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the methods described above.
[0027] In another aspect of this disclosure, a computer program product is provided, comprising a computer program / instructions that, when executed by a processor, implement the steps of the method described above.
[0028] In some embodiments of this disclosure, different types of vehicle route planning problems are abstracted into multiple task types. A pre-trained model is trained using first training sample data corresponding to multiple task types, and a route planning model is trained using second training sample data corresponding to the current task type among the multiple task types. Multiple delivery point information and the current task type are input into the route planning model to obtain the target delivery route corresponding to the current task type. The route planning model can quickly determine delivery routes for different task types, thereby improving the efficiency of vehicle route planning.
[0029] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0030] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0031] Figure 1 A flowchart illustrating a route planning method provided in Embodiment 1 of this disclosure;
[0032] Figure 2 A schematic diagram of the structure of an initial decoder provided for an exemplary embodiment of this disclosure;
[0033] Figure 3 This is a flowchart illustrating a model training method provided in Embodiment 2 of this disclosure;
[0034] Figure 4 A schematic diagram of the structure of a route planning device provided for an exemplary embodiment of this disclosure;
[0035] Figure 5 A schematic diagram of the structure of a model training apparatus provided for an exemplary embodiment of this disclosure;
[0036] Figure 6 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0037] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0038] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0039] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0040] With the rapid development of computer technology, artificial intelligence technology has also developed rapidly.
[0041] Vehicle routing problem (VRP) is a classic and widely studied topic in the fields of transportation and operations research. The most basic VRP mainly involves three concepts: Depot, Customers, and Vehicles. Its core objective is to plan the optimal route while satisfying various constraints, ensuring that vehicles, following the route, deliver goods to different customers in a timely manner and meet their needs.
[0042] Currently, the main methods for solving vehicle route planning problems include the following:
[0043] First, an exact solution. This method first models the vehicle routing problem as a mixed-integer programming model based on the actual scenario. This mixed-integer programming model includes the objective, decision variables, and constraints. Then, an exact solver is used to solve the problem. Exact solvers include SPI and CPLEX. However, this method cannot solve large-scale vehicle routing problems within a reasonable timeframe.
[0044] Second, heuristic solution. This method typically involves two stages: first, constructing an initial solution based on strategies such as greedy algorithms, and then using strategies such as neighborhood search to locally optimize the previous solution.
[0045] Third, the machine learning model. This method primarily involves first training a decision model using supervised learning and reinforcement learning, and then directly using this model to generate solutions, build neighborhoods, or replace a module in a heuristic algorithm with this model: for example, initial solution construction, neighborhood search, etc. During model training, the initial parameters of the model are usually randomly generated. These parameters lack prior knowledge, which typically leads to slower convergence speeds in reinforcement learning model training.
[0046] Currently, for different types of vehicle route planning problems, it is necessary to start the process of problem modeling and problem solving from scratch, which results in low efficiency in vehicle route planning.
[0047] To address the aforementioned technical problems, in some embodiments of this disclosure, different types of vehicle route planning problems are abstracted into multiple task types. A pre-trained model is trained using first training sample data corresponding to multiple task types, and a route planning model is trained using second training sample data corresponding to the current task type. Multiple delivery point information and the current task type are input into the route planning model to obtain the target delivery route corresponding to the current task type. The route planning model can quickly determine delivery routes for different task types, thereby improving the efficiency of vehicle route planning.
[0048] The technical solutions provided by the embodiments of this disclosure are described in detail below with reference to the accompanying drawings.
[0049] Figure 1 This is a flowchart illustrating a route planning method provided in Embodiment 1 of this disclosure. Figure 1 As shown, the method includes:
[0050] S101: Obtain information on multiple delivery points and the current task type;
[0051] S102: Input multiple delivery point information and the current task type into the route planning model to obtain the target delivery route corresponding to the current task type;
[0052] Among them, the route planning model is a model obtained by training the pre-trained model with the second training sample data corresponding to the current task type among multiple task types; the pre-trained model is a model obtained by training the first training sample data corresponding to multiple task types.
[0053] In this embodiment, the execution entity is not limited to any of the following: smart car, personal computer, tablet computer, smartphone, smart TV, smart speaker, smart wearable device and server.
[0054] When executed as a server, the implementation form of the server is not limited. For example, a server can be a regular server, a cloud server, a cloud host, a virtual data center, or other server devices. The main components of a server include a processor, hard drive, memory, system bus, and common computer architecture types.
[0055] It should be noted that this disclosure constructs vehicle route planning problems with different constraints or objectives into different tasks. These include, but are not limited to, the following task types:
[0056] Task 1: The optimization objective is to minimize the total distance traveled by all vehicles.
[0057] Task 2, the optimization goal is to make the distance traveled by different vehicles more balanced;
[0058] Task 3 is a vehicle route planning problem with time window constraints. The optimization objective is to minimize the total distance traveled by all vehicles.
[0059] Task 4: Consider different constraints and optimization objectives.
[0060] In this embodiment, different types of vehicle route planning problems are abstracted into multiple task types. A pre-trained model is trained using the first training sample data corresponding to the multiple task types, and a route planning model is trained using the second training sample data corresponding to the current task type. Multiple delivery point information and the current task type are input into the route planning model to obtain the target delivery route corresponding to the current task type. The route planning model can quickly determine the delivery routes for different task types, thereby improving the efficiency of vehicle route planning.
[0061] It should be noted that delivery point information refers to the information of the delivery points that the vehicle needs to reach for the current delivery task. Delivery points include, for example, warehouses and recipients. Delivery point information includes, but is not limited to, the following: location, required quantity of goods, and delivery time period.
[0062] Before using the route planning model, it is necessary to train the model to obtain the route planning model. The following explains the model training process.
[0063] In this embodiment, a pre-training approach is used to train the model in two stages to obtain the target model. In the first stage, a pre-trained model is trained based on first training sample data corresponding to multiple task types; in the second stage, the target model is trained based on second training sample data of the target task type. One possible approach is to collect first and second training sample data, wherein the first training sample data consists of sample data corresponding to multiple task types, each first training sample data including its respective task type, and the second training sample data consists of sample data corresponding to the target task type among the multiple task types; the initial model is trained based on the first training sample data to obtain the pre-trained model; the pre-trained model is then trained based on the second training sample data to obtain the target model corresponding to the target task type. This disclosure uses a pre-training approach to first learn the common knowledge of multiple task types, and then learn the personalized knowledge corresponding to the target task type, thereby accelerating the model training speed.
[0064] In one application scenario, each first training sample data also includes information on multiple first sample delivery points and corresponding first sample delivery routes. Each second training sample data includes information on multiple second sample delivery points corresponding to the target task type and corresponding second sample delivery routes. Based on the information on multiple first sample delivery points, corresponding first sample delivery routes, and task types, the initial model is trained to obtain a pre-trained model. Based on the information on multiple second sample delivery points, corresponding second sample delivery routes, and target task types, the pre-trained model is trained to obtain a route planning model corresponding to the target task type. This disclosure uses the first training sample data to train the model, obtaining a pre-trained model containing common knowledge required to solve different tasks; then, it uses the second training sample data of the target task type to train the model, obtaining a route planning model. The pre-trained model trained in this way contains certain prior knowledge, which may accelerate the convergence speed of the route planning model.
[0065] In some embodiments of this disclosure, the initial model includes an initial encoder and an initial decoder. The initial model is trained using first training sample data to obtain a pre-trained model. One possible approach is to input the first training sample data into the initial encoder to obtain feature information; input the feature information into the initial decoder to obtain a decoding result; determine a loss function based on the decoding result and the first training sample data; and train the initial encoder and initial decoder using the loss function to obtain a pre-trained model.
[0066] In the above embodiments, the encoding architecture of the initial encoder of this disclosure is unordered, that is, the optimal solution to the vehicle route planning problem is independent of the input order of the delivery points.
[0067] Figure 2 This is a schematic diagram of the structure of an initial decoder provided as an exemplary embodiment of this disclosure. For example... Figure 2 As shown, the initial decoder includes a task-shared layer corresponding to multiple task types and a task-specific layer corresponding to each task type. The task-shared layer consists of three layers: a task-one shared layer, a task-two shared layer, and a task-three shared layer. Each of the three task types corresponds to a separate task-specific layer: a task-one exclusive layer, a task-two exclusive layer, and a task-three exclusive layer. The task-shared layer is used to learn common task feature information for multiple task types; the task-specific layer is used to learn target task feature information corresponding to the target task type.
[0068] It should be noted that this disclosure can train the pre-trained model based on training data of different task types to obtain the route planning model for the corresponding task type.
[0069] After obtaining the route planning model corresponding to the current task type, use the route planning model to plan the delivery route corresponding to the current task type.
[0070] In some embodiments of this disclosure, the route planning model includes an encoder and a decoder; multiple delivery point information and the current task type are input into the route planning model to obtain the target delivery route. One possible implementation is that, within the route planning model, multiple delivery point information and the current task type are input into the encoder to obtain delivery point information features; these features are then input into the decoder to obtain the target delivery route corresponding to the current task type. This disclosure uses an encoder to encode multiple delivery point information and the current task type, and a decoder to decode the encoded delivery point information features to obtain the target delivery route. The model has a simple and compact internal structure and good scalability.
[0071] In some embodiments of this disclosure, the decoder includes a task-sharing layer corresponding to multiple task types and a task-specific layer corresponding to each task type. Network point information features are input into the decoder to obtain the target delivery route corresponding to the current task type. The decoder used in this disclosure performs multi-task decoding by setting up a task-sharing layer and a task-specific layer. The task-sharing layer is used to learn general task feature information for multiple task types; the task-specific layer is used to learn target task feature information corresponding to the target task type. For newly defined tasks, it can be quickly embedded into the current model framework, improving the model's scalability.
[0072] Based on the descriptions of the above embodiments, Figure 3This is a flowchart illustrating a model training method provided in Embodiment 2 of this disclosure. Figure 3 As shown, the training method includes:
[0073] S301: Collect first training sample data and second training sample data, wherein the first training sample data is sample data corresponding to multiple task types, and each first training sample data includes its own task type; the second training sample data is sample data corresponding to the target task type among the multiple task types.
[0074] S302: Based on the first training sample data, train the initial model to obtain a pre-trained model;
[0075] S303: Based on the second training sample data, train the pre-trained model to obtain the target model corresponding to the target task type.
[0076] In this embodiment, the implementation methods of each step in the above method can be found in the descriptions of the foregoing embodiments, and will not be repeated here. Furthermore, this embodiment also achieves the technical effects of the corresponding parts of the foregoing embodiments.
[0077] In this embodiment, the execution entity is not limited to any of the following: smart car, personal computer, tablet computer, smartphone, smart TV, smart speaker, smart wearable device and server.
[0078] When executed as a server, the implementation form of the server is not limited. For example, a server can be a regular server, a cloud server, a cloud host, a virtual data center, or other server devices. The main components of a server include a processor, hard drive, memory, system bus, and common computer architecture types.
[0079] In the above-described method embodiments of this disclosure, different types of vehicle route planning problems are abstracted into multiple task types. A pre-trained model is trained using first training sample data corresponding to multiple task types, and a route planning model is trained using second training sample data corresponding to the current task type among the multiple task types. Multiple delivery point information and the current task type are input into the route planning model to obtain the target delivery route corresponding to the current task type. The route planning model can quickly determine delivery routes for different task types, thereby improving the efficiency of vehicle route planning.
[0080] Figure 4 This is a schematic diagram of the structure of a route planning device 40 provided for an exemplary embodiment of the present disclosure. The route planning device 40 includes an acquisition module 41 and a model module 42.
[0081] Among them, the acquisition module 41 is used to acquire information on multiple delivery outlets and the current task type;
[0082] Model module 42 is used to input multiple delivery network information and the current task type into the route planning model to obtain the target delivery route corresponding to the current task type;
[0083] Among them, the route planning model is a model obtained by training the pre-trained model with the second training sample data corresponding to the current task type among multiple task types; the pre-trained model is a model obtained by training the first training sample data corresponding to multiple task types.
[0084] Optionally, the route planning model includes an encoder and a decoder. When inputting multiple delivery point information and the current task type into the route planning model to obtain the target delivery route, model module 42 is used for:
[0085] Within the route planning model, information on multiple delivery points and the current task type are input into the encoder to obtain the point information features;
[0086] By inputting the network point information features into the decoder, the target delivery route corresponding to the current task type is obtained.
[0087] Optionally, the decoder includes a task-sharing layer corresponding to multiple task types and a task-exclusive layer corresponding to each task type. When the model module 42 inputs the network point information features into the decoder to obtain the target delivery route corresponding to the current task type, it is used for:
[0088] Input the network information features into the task sharing layer to obtain the general task feature information corresponding to the current task type;
[0089] Input the general task feature information into the task-specific layer corresponding to the current task type to obtain the target delivery route corresponding to the current task type.
[0090] Figure 5 This is a schematic diagram of the structure of a model training device 50 provided for an exemplary embodiment of the present disclosure. The model training device 50 includes a collection module 51, a first training module 52, and a second training module 53.
[0091] The collection module 51 is used to collect first training sample data and second training sample data. The first training sample data consists of sample data corresponding to multiple task types, and each first training sample data includes its own task type. The second training sample data consists of sample data corresponding to the target task type among the multiple task types.
[0092] The first training module 52 is used to train the initial model based on the first training sample data to obtain a pre-trained model;
[0093] The second training module 53 is used to train the pre-trained model based on the second training sample data to obtain the target model corresponding to the target task type.
[0094] Optionally, the initial model includes an initial encoder and an initial decoder. When the first training module 52 trains the initial model based on the first training sample data to obtain a pre-trained model, it is used to:
[0095] The first training sample data is input into the initial encoder to obtain feature information;
[0096] The feature information is input into the initial decoder to obtain the decoding result;
[0097] Based on the decoding results and the first training sample data, determine the loss function;
[0098] Based on the loss function, the initial encoder and initial decoder are trained to obtain a pre-trained model.
[0099] Optionally, the initial decoder includes a task-shared layer corresponding to multiple task types and a task-exclusive layer corresponding to each task type;
[0100] The task sharing layer is used to learn common task feature information for multiple task types;
[0101] The task-specific layer is used to learn the target task feature information corresponding to the target task type.
[0102] Optionally, each first training sample data also includes multiple first sample delivery point information and a first sample delivery route corresponding to the multiple first sample delivery point information, and each second training sample data includes multiple second sample delivery point information corresponding to the target task type and a second sample delivery route corresponding to the multiple second sample delivery point information, and the target model is a route planning model;
[0103] When the first training module 52 trains the initial model based on the first training sample data to obtain a pre-trained model, it is used for:
[0104] Based on the information of multiple first sample delivery outlets and the first sample delivery routes and task types corresponding to the information of multiple first sample delivery outlets, the initial model is trained to obtain a pre-trained model;
[0105] When the second training module 53 trains the pre-trained model based on the second training sample data to obtain the target model corresponding to the target task type, it is used for:
[0106] Based on information from multiple second-sample delivery points and the corresponding second-sample delivery routes and target task types, the pre-trained model is trained to obtain a route planning model corresponding to the target task type.
[0107] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here. Furthermore, the route planning apparatus of this disclosure can also achieve the same beneficial effects as the route planning method described above.
[0108] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0109] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0110] like Figure 6 As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded from storage unit 608 into random access memory (RAM) 603. RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0111] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0112] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as route planning methods. For example, in some embodiments, the route planning method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the route planning method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform route planning methods by any other suitable means (e.g., by means of firmware).
[0113] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0115] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0117] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0118] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0119] In the embodiments of the above-disclosed apparatus, equipment, storage device, and computer program products, different types of vehicle route planning problems are abstracted into multiple task types. A pre-trained model is trained using first training sample data corresponding to multiple task types, and a route planning model is trained using second training sample data corresponding to the current task type among the multiple task types. Multiple delivery point information and the current task type are input into the route planning model to obtain the target delivery route corresponding to the current task type. The route planning model can quickly determine delivery routes for different task types, thereby improving the efficiency of vehicle route planning.
[0120] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0121] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A route planning method, comprising: Obtain information on multiple delivery points and the current task type; By inputting the information of the multiple delivery outlets and the current task type into the route planning model, a target delivery route corresponding to the current task type is obtained. The route planning model is a model obtained by training a pre-trained model with the second training sample data corresponding to the current task type among multiple task types; the pre-trained model is a model obtained by training the first training sample data corresponding to the multiple task types, wherein each first training sample data also includes multiple first sample delivery point information and a first sample delivery route corresponding to the multiple first sample delivery point information, and each second training sample data includes multiple second sample delivery point information corresponding to the target task type and a second sample delivery route corresponding to the multiple second sample delivery point information.
2. The method according to claim 1, wherein, The route planning model includes an encoder and a decoder. The step of inputting the multiple delivery point information and the current task type into the route planning model to obtain the target delivery route includes: Within the route planning model, the information of the multiple delivery points and the current task type are input into the encoder to obtain the point information features; The network point information features are input into the decoder to obtain the target delivery route corresponding to the current task type.
3. The method according to claim 2, wherein, The decoder includes a task-sharing layer corresponding to the multiple task types and a task-specific layer corresponding to each task type. The step of inputting the network point information features into the decoder to obtain the target delivery route corresponding to the current task type includes: The network information features are input into the task sharing layer to obtain the general task feature information corresponding to the current task type; The general task feature information is input into the task-specific layer corresponding to the current task type to obtain the target delivery route corresponding to the current task type.
4. A model training method, comprising: Collect first training sample data and second training sample data, wherein the first training sample data consists of sample data corresponding to multiple task types, and each first training sample data includes its own task type; the second training sample data consists of sample data corresponding to the target task type among the multiple task types; each first training sample data also includes multiple first sample delivery point information and a first sample delivery route corresponding to the multiple first sample delivery point information; and each second training sample data includes multiple second sample delivery point information corresponding to the target task type and a second sample delivery route corresponding to the multiple second sample delivery point information. Based on the first training sample data, the initial model is trained to obtain a pre-trained model; Based on the second training sample data, the pre-trained model is trained to obtain a target model corresponding to the target task type.
5. The method according to claim 4, wherein, The initial model includes an initial encoder and an initial decoder. The step of training the initial model using the first training sample data to obtain a pre-trained model includes: The first training sample data is input into the initial encoder to obtain feature information; The feature information is input into the initial decoder to obtain the decoding result; Based on the decoding result and the first training sample data, determine the loss function; Based on the loss function, the initial encoder and initial decoder are trained to obtain a pre-trained model.
6. The method according to claim 5, wherein, The initial decoder includes a task-sharing layer corresponding to the multiple task types and a task-exclusive layer corresponding to each task type; The task sharing layer is used to learn common task feature information of multiple task types; The task-specific layer is used to learn the target task feature information corresponding to the target task type.
7. The method according to claim 4, wherein, The target model is a route planning model; The step of training the initial model based on the first training sample data to obtain a pre-trained model includes: Based on information from multiple first sample delivery points and the corresponding first sample delivery routes and task types, the initial model is trained to obtain a pre-trained model. Based on the second training sample data, the pre-trained model is trained to obtain a target model corresponding to the target task type, including: Based on information from multiple second sample delivery points and the corresponding second sample delivery routes and target task types, the pre-trained model is trained to obtain a route planning model corresponding to the target task type.
8. A route planning device, comprising: The acquisition module is used to obtain information on multiple delivery outlets and the current task type; The model module is used to input the information of the multiple delivery outlets and the current task type into the route planning model to obtain the target delivery route corresponding to the current task type; The route planning model is a model obtained by training a pre-trained model with the second training sample data corresponding to the current task type among multiple task types; the pre-trained model is a model obtained by training the first training sample data corresponding to the multiple task types, wherein each first training sample data also includes multiple first sample delivery point information and a first sample delivery route corresponding to the multiple first sample delivery point information, and each second training sample data includes multiple second sample delivery point information corresponding to the target task type and a second sample delivery route corresponding to the multiple second sample delivery point information.
9. The apparatus according to claim 8, wherein, The route planning model includes an encoder and a decoder. When the model module inputs the multiple delivery point information and the current task type into the route planning model to obtain the target delivery route, it is used for: Within the route planning model, the information of the multiple delivery points and the current task type are input into the encoder to obtain the point information features; The network point information features are input into the decoder to obtain the target delivery route corresponding to the current task type.
10. The apparatus according to claim 9, wherein, The decoder includes a task-sharing layer corresponding to the multiple task types and a task-specific layer corresponding to each task type. When the model module inputs the network point information features into the decoder to obtain the target delivery route corresponding to the current task type, it is used for: The network information features are input into the task sharing layer to obtain the general task feature information corresponding to the current task type; The general task feature information is input into the task-specific layer corresponding to the current task type to obtain the target delivery route corresponding to the current task type.
11. A model training device, comprising: The collection module is used to collect first training sample data and second training sample data. The first training sample data consists of sample data corresponding to multiple task types, and each first training sample data includes its own task type. The second training sample data consists of sample data corresponding to the target task type among the multiple task types. Each first training sample data also includes information on multiple first sample delivery points and a first sample delivery route corresponding to the information on multiple first sample delivery points. Each second training sample data includes information on multiple second sample delivery points corresponding to the target task type and a second sample delivery route corresponding to the information on multiple second sample delivery points. The first training module is used to train the initial model based on the first training sample data to obtain a pre-trained model. The second training module is used to train the pre-trained model based on the second training sample data to obtain a target model corresponding to the target task type.
12. The apparatus according to claim 11, wherein, The initial model includes an initial encoder and an initial decoder. When the first training module trains the initial model based on the first training sample data to obtain a pre-trained model, it is used to: The first training sample data is input into the initial encoder to obtain feature information; The feature information is input into the initial decoder to obtain the decoding result; Based on the decoding result and the first training sample data, determine the loss function; Based on the loss function, the initial encoder and initial decoder are trained to obtain a pre-trained model.
13. The apparatus according to claim 12, wherein, The initial decoder includes a task-sharing layer corresponding to the multiple task types and a task-exclusive layer corresponding to each task type; The task sharing layer is used to learn common task feature information of multiple task types; The task-specific layer is used to learn the target task feature information corresponding to the target task type.
14. The apparatus according to claim 11, wherein, The target model is a route planning model; When the first training module trains the initial model based on the first training sample data to obtain a pre-trained model, it is used to: Based on information from multiple first sample delivery points and the corresponding first sample delivery routes and task types, the initial model is trained to obtain a pre-trained model. When the second training module trains the pre-trained model based on the second training sample data to obtain a target model corresponding to the target task type, it is used to: Based on information from multiple second sample delivery points and the corresponding second sample delivery routes and target task types, the pre-trained model is trained to obtain a route planning model corresponding to the target task type.
15. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3 or 4-7.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-3 or 4-7.
17. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-3 or 4-7.