A method and apparatus for model training, a computer device, and a storage medium

By randomly perturbing the first derivative of the route sample and training the time prediction model, the problem of inaccurate ETA prediction in the prior art is solved, and a more reliable and accurate time prediction is achieved.

CN113821535BActive Publication Date: 2025-07-01TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110800469.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-15
Publication Date
2025-07-01
Estimated Expiration
2041-07-15

AI Technical Summary

Technical Problem

The prior art relies on manual experience in ETA prediction and cannot effectively deal with complex road conditions, resulting in insufficient accuracy in the estimated time.

Method used

By randomly perturbing the first derivative corresponding to the route sample and training the time estimate model based on the processed derivative, the estimated time is avoided from falling on an unstable singularity.

Benefits of technology

The reliability and accuracy of the time prediction model are improved, so that the obtained estimated time is closer to the real time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113821535B_ABST
    Figure CN113821535B_ABST
Patent Text Reader

Abstract

The present application discloses a method and apparatus for model training, a computer device, and a storage medium, including: obtaining a first set of overall route features and a first set of actual arrival times, obtaining a first set of estimated arrival times through a time estimation model to be trained according to the first set of overall route features, obtaining a first derivative set according to the first set of estimated arrival times and the first set of actual arrival times, performing random perturbation processing on the first derivative set according to random numbers determined from a standard normal distribution to obtain a first derivative set after random perturbation processing, and training the time estimation model to be trained based on the first set of estimated arrival times and the first derivative set after random perturbation processing. Through the above method, it is possible to avoid the estimated time obtained during the iteration falling on an unstable singularity, and the obtained time estimation model can be more reliable and accurate. Therefore, the arrival time can be obtained more accurately through this time estimation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning in the field of artificial intelligence, and particularly to a method and device for model training, a computer device, and a storage medium. Background Art

[0002] Estimated time of arrival (ETA) is a function in a map that can estimate the time required to complete a route based on a given route on the map and the departure time.

[0003] Currently, in the field of ETA estimation, there is a method of cumulative addition for each section based on rules. This method needs to estimate the passing time of each section according to the length, speed, traffic lights and other conditions of each section, and then add the passing time of each intersection. In this way, the total time of the entire route is formed by accumulation. However, this method relies strongly on human experience, and in actual applications, the road conditions are very complex, and the rules set by humans cannot cover all situations, resulting in errors in the estimated time of each section. Moreover, since this method needs to accumulate the estimated times of each section, the errors in the estimated time of each section will also accumulate, making the finally determined arrival time inaccurate. Therefore, how to obtain the arrival time more accurately has become a problem to be solved. Summary of the Invention

[0004] The embodiments of this application provide a method and device for model training, a computer device, and a storage medium. By performing random perturbation processing on the first derivative corresponding to the route sample and training the time prediction model to be trained according to the first derivative after random perturbation processing, it is possible to avoid the estimated time obtained in the iterative process from falling on an unstable singularity, so that the obtained estimated time can be closer to the real time. Therefore, the obtained time prediction model can be more reliable and accurate, and by determining the passing time from the departure place to the arrival place through this time prediction model, the arrival time can be obtained more accurately.

[0005] In view of this, the first aspect of this application provides a method for model training, including:

[0006] Obtain a first set of overall route features and a first set of actual arrival times. Among them, the first set of overall route features includes the overall route features corresponding to S first route samples respectively, and the first set of actual arrival times includes the actual arrival times corresponding to S first route samples respectively. The overall route feature corresponding to the first route sample is a feature related to the passing time of the first route sample. S is an integer and S>1;

[0007] Obtain a first estimated arrival time set through a time estimation model to be trained according to the first overall route feature set, where the first estimated arrival time set includes the first estimated arrival times corresponding to S first route samples respectively;

[0008] Obtain a first derivative set according to the first estimated arrival time set and the first actual arrival time set, where the first derivative set includes the first derivatives corresponding to S first route samples respectively, and the first derivative is determined based on a loss function;

[0009] Perform random perturbation processing on the first derivative set according to the random numbers determined from the standard normal distribution to obtain the first derivative set after random perturbation processing;

[0010] Train the time estimation model to be trained based on the first estimated arrival time set and the first derivative set after random perturbation processing.

[0011] A second aspect of the present application provides a model training device, including:

[0012] An acquisition module, configured to acquire a first overall route feature set and a first actual arrival time set, where the first overall route feature set includes the overall route features corresponding to S first route samples respectively, the first actual arrival time set includes the actual arrival times corresponding to S first route samples respectively, the overall route feature corresponding to the first route sample is a feature related to the travel time of the first route sample, S is an integer, and S>1;

[0013] A generation module, configured to obtain a first estimated arrival time set through the time estimation model to be trained according to the first overall route feature set, where the first estimated arrival time set includes the first estimated arrival times corresponding to S first route samples respectively;

[0014] The generation module is further configured to obtain a first derivative set according to the first estimated arrival time set and the first actual arrival time set, where the first derivative set includes the first derivatives corresponding to S first route samples respectively, and the first derivative is determined based on a loss function;

[0015] A processing module, configured to perform random perturbation processing on the first derivative set according to the random numbers determined from the standard normal distribution to obtain the first derivative set after random perturbation processing;

[0016] A training module, configured to train the time estimation model to be trained based on the first estimated arrival time set and the first derivative set after random perturbation processing.

[0017] In a possible implementation manner, the model training device further includes a determination module;

[0018] The generation module is further configured to obtain a second set of estimated arrival times through the to-be-trained time estimation model according to the first set of overall route features;

[0019] The determination module is configured to determine a third set of estimated arrival times based on the first set of estimated arrival times and the second set of estimated arrival times;

[0020] The generation module is further configured to obtain a second derivative set according to the third set of estimated arrival times and the first set of actual arrival times, where the second derivative set includes second derivatives corresponding to S first route samples respectively, and the second derivative is determined based on a loss function;

[0021] The processing module is further configured to perform random perturbation processing on the second derivative set according to random numbers determined from a standard normal distribution to obtain a second derivative set after random perturbation processing.

[0022] In a possible implementation manner, the generation module is specifically configured to obtain a first set of estimated arrival times through the to-be-trained first learner according to the first set of overall route features;

[0023] The generation module is specifically configured to obtain a second set of estimated arrival times through the to-be-trained second learner according to the first set of overall route features;

[0024] The training module is specifically configured to train the to-be-trained first learner based on the first set of estimated arrival times and the first derivative set after random perturbation processing;

[0025] Train the to-be-trained second learner based on the third set of estimated arrival times and the second derivative set after random perturbation processing.

[0026] In a possible implementation manner, the processing module is further configured to perform initialization processing on the first set of estimated arrival times to obtain an initialized first set of estimated arrival times;

[0027] The generation module is specifically configured to obtain a first derivative set according to the initialized first set of estimated arrival times and the first set of actual arrival times;

[0028] The training module is specifically configured to train the to-be-trained time estimation model based on the initialized first set of estimated arrival times and the first derivative set after random perturbation processing.

[0029] In a possible implementation manner, the initialization processing is to add a preset value to each first estimated arrival time, or add a value within a preset range to each first estimated arrival time, or add the mean value of the actual arrival times to each first estimated arrival time.

[0030] In a possible implementation, the model training device further includes a sampling module;

[0031] The obtaining module is further configured to obtain K second route samples, where K is an integer and K > S;

[0032] The sampling module is configured to sample the K second route samples to obtain S first route samples.

[0033] In a possible implementation, the time estimation model includes N learners, where N is an integer and N ≥ 1;

[0034] The obtaining module is further configured to obtain P third route samples, where the P third route samples do not overlap with the S first route samples, and P is an integer and P ≥ 1;

[0035] The obtaining module is further configured to obtain a second route overall feature set and a second actual arrival time set, where the second route overall feature set includes the route overall features corresponding to the P third route samples respectively, and the second actual arrival time set includes the actual arrival times corresponding to the P third route samples respectively. The route overall feature corresponding to a third route sample is a feature related to the travel time of the third route sample.

[0036] The obtaining module is further configured to obtain M learners from the time estimation model, where M is an integer and 1 ≤ M < N;

[0037] The generating module is further configured to obtain a fourth estimated arrival time set through the M learners according to the second route overall feature set;

[0038] The generating module is further configured to obtain a fifth estimated arrival time set through the third learner to be trained according to the second route overall feature set;

[0039] The generating module is further configured to determine a sixth estimated arrival time set based on the fourth estimated arrival time set and the fifth estimated arrival time set;

[0040] The generating module is further configured to obtain a third derivative set according to the sixth estimated arrival time set and the second actual arrival time set, where the third derivative set includes the third derivatives corresponding to the P third route samples respectively, and the third derivative is determined based on a loss function;

[0041] The processing module is further configured to perform random perturbation processing on the third derivative set according to a random number determined from a standard normal distribution to obtain a third derivative set after random perturbation processing;

[0042] The training module is further configured to train the third learner to be trained based on the sixth estimated arrival time set and the third derivative set after random perturbation processing.

[0043] In a possible implementation, the generation module is further configured to, after the training module trains the third learner to be trained based on the sixth set of estimated arrival times and the third derivative set processed by random perturbation, obtain the third learner, and generate an updated time estimation model, where the updated time estimation model includes N learners, and the updated time estimation model includes M learners and the third learner.

[0044] In a possible implementation, the acquisition module is specifically configured to obtain the first M learners from the time estimation model;

[0045] Or,

[0046] Fix the first L learners in the time estimation model, and sample from the last N - L learners in the time estimation model to obtain M learners, where L is an integer and 1 ≤ L < M.

[0047] In a possible implementation, the first learner and the second learner include at least one of the following: decision tree, support vector machine (SVM), or multi - layer perceptron (MLP);

[0048] The first derivative is the first - order derivative of the loss function, or a higher - order derivative of the loss function.

[0049] In a possible implementation, the acquisition module is further configured to obtain a set of routes to be matched, where the set of routes to be matched includes Q routes to be matched, and a route to be matched is a passing route between a target departure place and a target arrival place, Q is an integer, and Q > 1;

[0050] The acquisition module is further configured to obtain a set of overall route features according to the set of routes to be matched, where the set of overall route features includes the overall route features corresponding to each route to be matched, and the overall route features corresponding to a route to be matched are features related to the passing time of the route to be matched;

[0051] The generation module is further configured to obtain a set of estimated arrival times to be selected through the time estimation model according to the set of overall route features, where the set of estimated arrival times to be selected includes the estimated arrival times to be selected corresponding to each route to be matched;

[0052] The determination module is further configured to determine a target estimated arrival time from the set of estimated arrival times to be selected, where the target estimated arrival time is the passing time from the target departure place to the target arrival place.

[0053] In a possible implementation, the time estimation model includes a first learner and a second learner;

[0054] A generation module, specifically configured to obtain a first set of to-be-selected estimated arrival times through a first learner according to the overall route feature set, where the first set of to-be-selected estimated arrival times includes the first to-be-selected estimated arrival time corresponding to each to-be-matched route;

[0055] Obtain a second set of to-be-selected estimated arrival times through a second learner according to the overall route feature set, where the second set of to-be-selected estimated arrival times includes the second to-be-selected estimated arrival time corresponding to each to-be-matched route;

[0056] Determine the set of to-be-selected estimated arrival times based on the first set of to-be-selected estimated arrival times and the second set of to-be-selected estimated arrival times.

[0057] The third aspect of the present application provides a computer-readable storage medium, in which instructions are stored, and when they run on a computer, the computer is made to execute the methods described in the above aspects.

[0058] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0059] In an embodiment of the present application, a method for model training is provided. First, a first set of overall route features and a first set of actual arrival times are obtained. The first set of overall route features includes the overall route features corresponding to multiple first route samples respectively, and the first set of actual arrival times includes the actual arrival times corresponding to multiple first route samples respectively. The overall route feature corresponding to a first route sample is a feature related to the travel time of the first route sample. Then, the first set of overall route features is used as the input of the time prediction model to be trained. The time prediction model to be trained outputs a first set of predicted arrival times, and the first set of predicted arrival times includes the first predicted arrival times corresponding to multiple first route samples respectively. Furthermore, a first derivative set is obtained according to the first set of predicted arrival times and the first set of actual arrival times. The first derivative set includes the first derivatives corresponding to multiple first route samples respectively, and the first derivative is determined based on a loss function. Further, according to the random numbers determined from the standard normal distribution, the first derivative set is randomly perturbed to obtain a first derivative set after random perturbation processing. Finally, the time prediction model to be trained is trained based on the first set of predicted arrival times and the first derivative set after random perturbation processing. By adopting the above method, since the first derivative corresponding to the route sample is randomly perturbed and the time prediction model to be trained is trained according to the first derivative after random perturbation processing, it can be avoided that the predicted time obtained in the iterative process falls on an unstable singularity, so that the obtained predicted time can be closer to the real time. Therefore, the obtained time prediction model can be more reliable and accurate, and by using this time prediction model to determine the travel time from the departure place to the arrival place, the arrival time can be obtained more accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 FIG. is a schematic architecture diagram of a model training system in an embodiment of the present application;

[0061] Figure 2 FIG. is a schematic diagram of an embodiment of a method for model training in an embodiment of the present application;

[0062] Figure 3 FIG. is a schematic diagram of an embodiment of training a time prediction model to be trained in an embodiment of the present application;

[0063] Figure 4 FIG. is a schematic diagram of an embodiment of obtaining a second derivative set in an embodiment of the present application;

[0064] Figure 5 FIG. is a schematic diagram of another embodiment of training a time prediction model to be trained in an embodiment of the present application;

[0065] Figure 6 FIG. is a schematic structural diagram of a model training device provided in an embodiment of the present application;

[0066] Figure 7 Schematic diagram of an embodiment of the server in the embodiments of the present application;

[0067] Figure 8 Schematic diagram of an embodiment of the terminal device in the embodiments of the present application. Detailed implementation manners

[0068] The embodiments of the present application provide a method and device for model training, a computer device, and a storage medium. By performing random perturbation processing on the first derivative corresponding to the route sample and training the time prediction model to be trained according to the first derivative after random perturbation processing, it is possible to avoid the predicted time obtained during the iteration from falling on an unstable singularity, so that the obtained predicted time can be closer to the real time. Therefore, the obtained time prediction model can be more reliable and accurate, and by determining the travel time from the departure place to the arrival place through this time prediction model, the arrival time can be obtained more accurately.

[0069] Terms such as "first", "second", "third", "fourth", etc. (if any) in the specification, claims, and the above-mentioned drawings of the present application are used to distinguish similar objects and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "correspond to" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0070] ETA is a function in the map, and the function it performs is to estimate the time required to complete a route on the map given a route and a departure time. However, the rule-based method of accumulating section by section relies strongly on human experience, and in practical applications, the road conditions are very complex, and the rules set by humans cannot cover all situations, resulting in errors in the estimated time for each section and inaccurate determination of the final arrival time. Therefore, how to obtain the arrival time more accurately has become an urgent problem to be solved. Based on this, the embodiments of the present application provide a method for model training to obtain a more reliable and accurate time prediction model, so as to obtain the arrival time more accurately.

[0071] For ease of understanding, some terms or concepts related to the embodiments of the present application are explained.

[0072] I. Estimated Time of Arrival (ETA)

[0073] ETA is the time estimated to complete a route on a given map based on the departure time, for a given route on a given map and departure time.

[0074] II. Route

[0075] In a map application, a route is a complete line connecting the starting point and the ending point. In the actual scenario, the length of a route usually ranges from one kilometer to dozens of kilometers.

[0076] III. Link

[0077] In a map application, a route is expressed as a sequence of links. In map data, a road is divided into segments of line segments, the lengths of these line segments vary from dozens of meters to several kilometers, and each line segment is called a link and is assigned a globally unique identity document (ID). Therefore, a route in the map is the sequence composed of all the links in this route.

[0078] IV. Actual Time of Arrival (ATA)

[0079] In the historical data of map services, the actual time of arrival (Actual Time of Arrival, ATA) of a route can be extracted. Therefore, this data can be used as the ground truth to train machine learning algorithms to estimate the arrival time.

[0080] V. Continuous Learning / Incremental Learning

[0081] Continuous learning (also known as incremental learning) means that a machine learning model can be updated incrementally as new data arrives, without having to be retrained from scratch. Usually, the data in incremental learning is generated batch by batch, and the model is updated batch by batch, once for each batch of data.

[0082] VI. Gradient Descent Method

[0083] The gradient descent method is an iterative optimization algorithm. In machine learning, for a loss function F(x), where x is a vector, to calculate the value that makes it reach the minimum, it can be solved through the following iterative equation:

[0084]

[0085] where γ is the learning rate, and F(x n ) is the loss function.

[0086] The above loss function F(xn ) is the sum over all samples, so we can obtain From this, we can obtain Based on this, the above iterative equation (1) can be transformed into the following iterative equation (2):

[0087]

[0088] where γ is the learning rate, and F i (x n ) is the loss function.

[0089] VII. Stochastic Gradient Descent

[0090] The stochastic gradient descent method is based on the aforementioned gradient descent method. When calculating the gradient, instead of computing the gradients of all samples, it only samples k samples from all N samples, resulting in the following iterative equation (3):

[0091]

[0092] where γ is the learning rate, and F i (x n ) is the loss function, and S k is a set consisting of k samples sampled from all N samples.

[0093] VIII. Gradient Boosting Decision Tree (GBDT)

[0094] The basic principle of GBDT is similar to that of the gradient descent method. GBDT uses a series of decision trees to fit the previous residuals. Specifically, by training a decision tree in each round and finally aggregating the results of all decision trees, the final prediction value is obtained. Among them, when training each tree, its goal is to fit the residuals of the previous results. This process is equivalent to each tree fitting the gradient, so it is called the gradient boosting decision tree.

[0095] GBDT can be expressed as the following iterative equation (4):

[0096]

[0097] where γ is the learning rate, F m (x) is the Mth decision tree, L is the loss function, and y i is the label of sample i.

[0098] IX. Stochastic Gradient Boosting Decision Tree (SGB)

[0099] Compared with the aforementioned gradient boosting decision tree, when training each tree, instead of using all samples, only a subset of samples (i.e., sampling k samples from all N samples as mentioned above) is sampled from the samples for training. Since sampling introduces randomness, this method is called stochastic gradient boosting decision tree.

[0100] Based on the iterative equation (4), SGB can be expressed as the following iterative equation (5):

[0101]

[0102] where γ is the learning rate, F m (x) is the M-th decision tree, L is the loss function, y i is the label of sample i, and S k is a set formed by sampling k samples from all N samples.

[0103] X. Stochastic Gradient Langevin Dynamics (SGLD)

[0104] SGLD is a method for sampling from a probability distribution originating from Brownian motion. In Brownian motion, due to thermal fluctuations, the motion of particles is affected by a random force. Similarly, in the traditional stochastic gradient descent algorithm, adding a random perturbation that follows a normal distribution constitutes stochastic gradient Langevin dynamics sampling. This method has been widely applied in Bayesian neural networks.

[0105] Specifically, the Langevin stochastic differential equation corresponding to SGLD is:

[0106]

[0107] where B t is Brownian motion.

[0108] The discrete form corresponding to the stochastic differential equation (6) is:

[0109]

[0110] where γ is the learning rate, and Z K+1 is a sample sampled from the standard normal distribution.

[0111] Based on this, for machine learning tasks, U in formula (7) can be set as the loss function, so formula (7) can be written as:

[0112]

[0113] where γ is the learning rate, and Z K+1 is a sample sampled from a standard normal distribution, and L i is the loss function.

[0114] Further, similar to the aforementioned stochastic gradient descent method, a subset is sampled from the samples (i.e., k samples are sampled from all N samples), and the following formula can be obtained based on formula (8):

[0115]

[0116] where γ is the learning rate, and Z K+1 is a sample sampled from a standard normal distribution, and L i is the loss function, and S k is a set composed of k samples sampled from all N samples.

[0117] Some terms or concepts related to the embodiments of the present application are explained above. For a better understanding of the solution, the application scenarios of the embodiments of the present application are introduced below. It can be understood that the method for training the model can be executed by a terminal device or by a server. Implementably, the method for training the model provided by the present application is applied to a model training system as Figure 1 shown. Please refer to Figure 1 , Figure 1 which is a schematic architecture diagram of the model training system in the embodiments of the present application. As Figure 1 shown, the model training system includes a terminal device and a server. Specifically, after the server obtains the first route overall feature set and the first actual arrival time set, it can train the time prediction model to be trained through the method provided by the embodiments of the present application, so as to obtain the time prediction model. Similarly, after the terminal device obtains the first route overall feature set and the first actual arrival time set, it can also train the time prediction model to be trained through the method provided by the embodiments of the present application, so as to obtain the time prediction model.

[0118] Alternatively, the server or the terminal device can also save the first overall route feature set and the first actual arrival time set on the blockchain. When model training is required, the first overall route feature set and the first actual arrival time set are downloaded from the blockchain, and the method provided by the embodiments of the present application is used to train the time prediction model to be trained, so as to obtain the time prediction model. Alternatively, after the terminal device obtains the first overall route feature set and the first actual arrival time set, it can choose to send the first overall route feature set and the first actual arrival time set to the server, and the server uses the method provided by the embodiments of the present application to train the time prediction model to be trained, so as to obtain the time prediction model. This solution does not specifically limit the specific manner in which the terminal device and the server obtain the first overall route feature set and the first actual arrival time set.

[0119] The server involved in the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, a smart TV, etc., but is not limited thereto. And the terminal device and the server can communicate through a wireless network, a wired network or a removable storage medium. Among them, the above-mentioned wireless network uses standard communication technologies and / or protocols. The wireless network is usually the Internet, but can also be any network, including but not limited to any combination of Bluetooth, Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, private network or virtual private network). In some embodiments, customized or dedicated data communication technologies can be used to replace or supplement the above data communication technologies. The removable storage medium can be a Universal Serial Bus (USB) flash drive, a mobile hard disk or other removable storage media, etc.

[0120] Although Figure 1 only shows five terminal devices and one server, it should be understood that Figure 1 the examples in

[0121] Further, when it is necessary to estimate the travel time from a target departure location to a target arrival location, the time estimation model obtained by the method provided in the embodiments of the present application can be used for time estimation. Based on this, the method provided in the embodiments of the present application can be applied to various scenarios. For example, in the scenario of applying to a map software, after the user selects the starting point and the ending point, the map software estimates the travel time of multiple selectable paths based on the time estimation model obtained in the embodiments of the present application, and thus can determine the path with the shortest travel time from multiple selectable paths. Or, in the scenario where the user needs to navigate, after the user initiates navigation, during the start and process of navigation, the time estimation model obtained in the embodiments of the present application can be used to output the time required for the remaining journey to the user in real time. Or, in the scenario of applying to a food delivery application, the purpose is to reasonably allocate orders for food delivery personnel, and the order allocation is based on the time estimation model obtained in the embodiments of the present application, and the estimated time for the food delivery personnel to pick up food from the store and deliver it to the customer's location is calculated based on the customer's location, the store's location, and the food delivery personnel. Or, in the scenario of applying to a food delivery application, the purpose is to reasonably match users and taxis to minimize the empty driving time of taxis, and the route planning from the starting point to the ending point can accurately estimate the time of each possible route through the time estimation model obtained in the embodiments of the present application. This solution can also be applied to more scenarios, which will not be enumerated here.

[0122] Since in the embodiments of the present application, it is necessary to perform model training based on machine learning technology in the field of artificial intelligence, before introducing the method for model training provided in the embodiments of the present application, some basic concepts in the field of artificial intelligence will be introduced first. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a way similar to human intelligence. Artificial intelligence is also the study of the design principles and implementation methods of various intelligent machines, enabling the machines to have the functions of perception, reasoning, and decision-making. Artificial intelligence technology is an interdisciplinary subject involving a wide range of fields, including both hardware-level technologies and software-level technologies. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0123] With the research and progress of artificial intelligence technology, the research of artificial intelligence technology has been carried out in various directions. Machine Learning (ML) is an important direction in the fields of computer science and artificial intelligence. Machine learning is an interdisciplinary subject that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rote learning.

[0124] Combined with the above introduction, the solution provided in the embodiments of this application relates to the machine learning technology of artificial intelligence. The method for model training in this application will be introduced below. Please refer to Figure 2 , Figure 2 is a schematic diagram of an embodiment of the method for model training in the embodiments of this application. As Figure 2 shown, an embodiment of the method for model training in the embodiments of this application includes:

[0125] 101. Obtain the first overall route feature set and the first actual arrival time set. Among them, the first overall route feature set includes the overall route features corresponding to S first route samples respectively, and the first actual arrival time set includes the actual arrival times corresponding to S first route samples respectively. The overall route feature corresponding to the first route sample is a feature related to the travel time of the first route sample. S is an integer, and S>1.

[0126] In this embodiment, the model training device first obtains the first overall route feature set. The first overall route feature set includes the overall route features corresponding to S first route samples respectively. The overall route feature corresponding to the first route sample is a feature related to the travel time of the first route sample. The travel time of the aforementioned first route sample is specifically the time taken to complete the travel on the first route sample. For example, if the starting point of the first route sample is A and the ending point is B, then the travel time of the first route sample is the time from the starting point A to the ending point B. It should be understood that the travel times corresponding to different means of transportation are different. For example, the time taken to walk from the starting point A to the ending point B is 20 minutes, the time taken to ride a bicycle from the starting point A to the ending point B is 10 minutes, and the time taken to drive from the starting point A to the ending point B is 6 minutes, etc. The travel time of the first route sample described in this solution is the time corresponding to the same type of means of transportation.

[0127] Specifically, the overall characteristics of the first route include, but are not limited to, road information such as the total length of the entire first route sample, the average speed limit for the entire first route sample, or the average free-flow speed of the entire first route sample, as well as the average vehicle speed of the first route sample calculated based on real-time collected global positioning system (GPS) data, and speed information such as the average vehicle speed of the entire first route sample within 5 minutes (or 10 minutes, 15 minutes, etc.) before and after the same moment of the first route sample mined from historical GPS data collected in the past few months. No specific limitation is imposed on the overall characteristics of the first route here.

[0128] Secondly, the model training device can also obtain a first set of actual arrival times, and the first set of actual arrival times includes the actual arrival times corresponding to S first route samples respectively. The actual arrival time is the ATA introduced above, that is, the actual arrival time of the first route sample is extracted from the historical data of the map service.

[0129] Optionally, the S first route samples can be all the route samples, or the route samples after sampling all the route samples, and no limitation is made here.

[0130] 102. Obtain a first set of estimated arrival times through the time estimation model to be trained according to the set of overall characteristics of the first route, where the first set of estimated arrival times includes the first estimated arrival times corresponding to S first route samples respectively.

[0131] In this embodiment, the model training device uses the set of overall characteristics of the first route as the input of the time estimation model to be trained, and the time estimation model to be trained can output a first set of estimated arrival times. The first set of estimated arrival times includes the first estimated arrival times corresponding to S first route samples respectively. The first estimated arrival time is the ETA introduced above, that is, the estimated time required to complete the passage of the first route sample.

[0132] Exemplarily, the set of overall characteristics of the first route includes the overall characteristics of the first route sample A, the overall characteristics of the first route sample B, and the overall characteristics of the first route sample C. Inputting the above set of overall characteristics of the first route into the time estimation model to be trained can obtain a first set of estimated arrival times, and the first set of estimated arrival times includes the first estimated arrival time corresponding to the first route sample A (that is, the estimated time required to complete the passage of the first route sample A), the first estimated arrival time corresponding to the first route sample B (that is, the estimated time required to complete the passage of the first route sample B), and the first estimated arrival time corresponding to the first route sample C (that is, the estimated time required to complete the passage of the first route sample C).

[0133] 103. Obtain a first derivative set based on the first estimated arrival time set and the first actual arrival time set, where the first derivative set includes the first derivatives corresponding to S first route samples respectively, and the first derivative is determined based on a loss function.

[0134] In this embodiment, the model training device obtains a first derivative set according to the first estimated arrival time set obtained in step 102 and the first actual arrival time set obtained in step 101. The first derivative set includes the first derivatives corresponding to S first route samples respectively, and the first derivative is determined based on a loss function. Specifically, the model training device calculates the first derivative of the first estimated arrival time corresponding to each first route sample and its corresponding actual arrival time, and denotes the first derivative as g i , the first derivative g i specifically corresponds to in the formula (5) introduced above, where L is the loss function, F m (x i ) is the first estimated arrival time corresponding to the first route sample x i , y i is the first actual arrival time corresponding to the first route sample x i , so this first derivative is determined based on the loss function L.

[0135] 104. Perform random perturbation processing on the first derivative set according to the random numbers determined from the standard normal distribution to obtain the first derivative set after random perturbation processing.

[0136] In this embodiment, the model training device performs random perturbation processing on the first derivative set according to the random numbers determined from the standard normal distribution to obtain the first derivative set after random perturbation processing. Specifically, for each first route sample, the model training device randomly samples a random number from the standard normal distribution, that is, the sample of the random number sampled from the standard normal distribution, and denotes the random number as s i , and the random number s i corresponds to Z k+1 in the formula (9) introduced above.

[0137] Furthermore, according to the random numbers determined from the standard normal distribution for each first route sample, perform random perturbation processing on the first derivative set obtained in step 103, that is, based on the formula (8) introduced above, add the random number s that follows the standard normal distribution corresponding to the first route sample to the first derivative corresponding to each first route sample i , so as to obtain the first derivative set after random perturbation processing. It should be understood that since the random number s i follows the standard normal distribution, and the standard normal distribution is symmetric, the first derivative set after random perturbation processing can be denoted as or The aforementioned γ is the learning rate.

[0138] 105. Train the time prediction model to be trained based on the first set of predicted arrival times and the first derivative set after random perturbation processing.

[0139] In this embodiment, the model training device trains the time prediction model to be trained based on the first set of predicted arrival times and the first derivative set after random perturbation processing. Specifically, the model training device takes the (first derivative after random perturbation processing) corresponding to each first route sample as the target for iterative training, that is, determines the loss value of the loss function according to the difference between the first set of predicted arrival times and the first derivative set after random perturbation processing corresponding thereto, and determines whether the loss function reaches the convergence condition according to the loss value of the loss function. If the convergence condition is not reached, the model parameters of the time prediction model to be trained are updated using the loss value of the loss function.

[0140] Since when predicting the first predicted arrival time corresponding to the first route sample, the optimization target can minimize the possibility of making mistakes for the first route sample, in the embodiments of the present application, taking the cross-entropy loss function to measure the difference loss between the first predicted arrival time corresponding to each first route sample and the first derivative after random perturbation processing corresponding to each first route sample as an example, that is, the loss function in this embodiment is the formula (10) shown below:

[0141] loss = ∑ -[y i lnp i +(1 - y i )ln(1 - p i )]; (10)

[0142] where p i is the first predicted arrival time corresponding to the first route sample, and y i is the first derivative after random perturbation processing corresponding to the first route sample.

[0143] Secondly, the convergence condition of the loss function can be that the value of the loss function is less than or equal to a first preset threshold. As an example, for instance, the value of the first preset threshold can be 0.005, 0.01, 0.02, or other values approaching 0. It can also be that the difference between two adjacent values of the loss function is less than or equal to a second preset threshold, and the value of the second threshold can be the same as or different from the value of the threshold. As an example, for instance, the value of the second preset threshold can be 0.005, 0.01, 0.02, or other values approaching 0, etc. Other convergence conditions can also be adopted, which are not limited herein. It should be understood that in practical applications, the loss function can also be a mean squared error loss function, a ranking loss function, a focal loss function, etc., which are not limited specifically herein.

[0144] For a further understanding of this solution, please refer to Figure 3 , Figure 3 which is a schematic diagram of an embodiment for training the time prediction model to be trained in an embodiment of the present application. As Figure 3 shown, A1 refers to the first route sample, A2 refers to the time prediction model to be trained, A3 refers to the first predicted arrival time output by the time prediction model A2, A4 refers to the first actual arrival time corresponding to the first route sample, A5 refers to the first derivative obtained based on the first predicted arrival time A3 and the first actual arrival time A4 corresponding to the first route sample in the manner introduced in the foregoing embodiments, A6 refers to the first derivative after random perturbation processing obtained in the manner introduced in the foregoing embodiments. The time prediction model to be trained is iteratively trained using the first route sample A1, the first derivative A6 after random perturbation processing, and the loss function. It should be understood that Figure 3 the examples in

[0145] are only for facilitating the understanding of this solution and are not used to limit this solution.

[0146] Optionally, on the basis of the corresponding embodiment described above, in an optional embodiment of the model training method provided in an embodiment of the present application, the model training method further includes: Figure 2

[0147] ​Obtain a second set of estimated arrival times through the to-be-trained travel time estimation model according to the first set of overall characteristics of the routes;

[0148] Determine a third set of estimated arrival times based on the first set of estimated arrival times and the second set of estimated arrival times;

[0149] Obtain a second derivative set according to the third set of estimated arrival times and the first set of actual arrival times, where the second derivative set includes the second derivatives corresponding to S first route samples respectively, and the second derivative is determined based on a loss function;

[0150] Perform random perturbation processing on the second derivative set according to the random numbers determined from the standard normal distribution to obtain the second derivative set after random perturbation processing.

[0151] In this embodiment, the model training device can also use the first set of overall characteristics of the routes as the input of the to-be-trained travel time estimation model again, and output the second set of estimated arrival times through the to-be-trained travel time estimation model. Similar to the first set of estimated arrival times, the second set of estimated arrival times includes the second estimated arrival times corresponding to S first route samples respectively. The first estimated arrival time and the second estimated arrival time corresponding to each first route sample may be the same or different, which is not limited here. Then the model training device determines the third set of estimated arrival times based on the first set of estimated arrival times and the second set of estimated arrival times. The third set of estimated arrival times includes the third estimated arrival times corresponding to S first route samples respectively. Specifically, the third estimated arrival time at this time is also the ETA introduced above, that is, the estimated time required to complete the passage of the first route sample. The method for determining the third estimated arrival time specifically uses the formula (11) shown below:

[0152] (1 - βγ)f k-1 + γf k ; (11)

[0153] where γ is the learning rate, β is the regularization parameter, and f k-1 is the first estimated arrival time, and f k is the second estimated arrival time.

[0154] In this embodiment, the value of the regularization parameter can be 1, or can be selected as other values according to actual applications, which is not limited here.

[0155] Further, the model training device obtains a second derivative set based on the third estimated arrival time set and the first actual arrival time set. At this time, the second derivative set includes the second derivatives corresponding to S first route samples respectively, and the second derivative is determined based on the loss function. The specific manner of obtaining the second derivative set is similar to step 103 and will not be elaborated here. Further still, according to the random numbers determined from the standard normal distribution, a random perturbation process is performed on the second derivative set to obtain the second derivative set after the random perturbation process. That is, for each first route sample, a random number is randomly sampled from the standard normal distribution, and then according to the random number determined from the standard normal distribution for each first route sample, a random number that conforms to the normal distribution of the standard is added to the second derivative corresponding to each first route sample, so as to obtain the second derivative set after the random perturbation process. The specific manner of obtaining the second derivative set after the random perturbation process is similar to step 104 and will not be elaborated here.

[0156] Similarly, for a further understanding of this solution, please refer to Figure 4 , Figure 4 which is a schematic diagram of an embodiment for obtaining the second derivative set in the embodiment of the present application. As Figure 4 shown, B1 refers to the first route sample, B2 refers to the time prediction model to be trained, B3 refers to the first estimated arrival time output by the time prediction model B2 to be trained, B4 refers to the second estimated arrival time output by the time prediction model B2 to be trained, B5 refers to the third estimated arrival time obtained based on the first estimated arrival time B3 and the second estimated arrival time B4 through the manner introduced in the foregoing embodiment, B6 refers to the first actual arrival time corresponding to the first route sample, B7 refers to the second derivative obtained based on the third estimated arrival time B5 and the first actual arrival time B6 corresponding to the first route sample through the manner introduced in the foregoing embodiment, and B8 refers to the second derivative after the random perturbation process obtained through the manner introduced in the foregoing embodiment. It should be understood that Figure 4 the examples in

[0157] are only for facilitating the understanding of this solution and are not used to limit this solution.

[0158] Optionally, based on the above Figure 2 In an alternative embodiment of the method for model training provided by the embodiments of the present application, based on the corresponding embodiment, according to the overall feature set of the first route, a first set of estimated arrival times is obtained through the time estimation model to be trained, specifically including:

[0159] Obtaining a first set of estimated arrival times through the first learner to be trained according to the overall feature set of the first route;

[0160] According to the overall feature set of the first route, obtaining a second set of estimated arrival times through the time estimation model to be trained, specifically including:

[0161] Obtaining a second set of estimated arrival times through the second learner to be trained according to the overall feature set of the first route;

[0162] Training the time estimation model to be trained based on the first set of estimated arrival times and the first derivative set after random perturbation processing, specifically including:

[0163] Training the first learner to be trained based on the first set of estimated arrival times and the first derivative set after random perturbation processing;

[0164] Training the second learner to be trained based on the third set of estimated arrival times and the second derivative set after random perturbation processing.

[0165] In this embodiment, the model training device specifically inputs the overall feature set of the first route into the first learner to be trained, and outputs a first set of estimated arrival times through the first learner to be trained. Similarly, it can be known that the overall feature set of the first route is specifically input into the second learner to be trained, and a second set of estimated arrival times is output through the second learner to be trained. Based on this, the model training device trains the first learner to be trained based on the first set of estimated arrival times and the first derivative set after random perturbation processing. Specifically, the model training device uses the first derivative after random perturbation processing corresponding to each first route sample as the target for iterative training, that is, determines the loss value of the loss function according to the difference between the first set of estimated arrival times and the first derivative set after random perturbation processing corresponding thereto, and determines whether the loss function reaches the convergence condition according to the loss value of the loss function. If the convergence condition is not reached, the model parameters of the first learner to be trained are updated using the loss value of the loss function.

[0166] Similarly, it can be known that the model training device also trains the second learner to be trained based on the third set of estimated arrival times and the second derivative set after random perturbation processing. Specifically, the model training device uses the second derivative after random perturbation processing corresponding to each first route sample as the target for iterative training, that is, determines the loss value of the loss function according to the difference between the third set of estimated arrival times and the corresponding second derivative set after random perturbation processing, and judges whether the loss function reaches the convergence condition according to the loss value of the loss function. If the convergence condition is not reached, the model parameters of the second learner to be trained are updated using the loss value of the loss function.

[0167] Based on this, after the model training device completes the training of the first learner to be trained, it can obtain the first learner. Specifically, after the model training device obtains the first estimated arrival time corresponding to each first route sample in the first route sample set, it determines the loss value of the loss function in a similar manner as described above until the loss function reaches the convergence condition, and then generates the first learner according to the model parameters obtained after the last update of the model parameters. Similarly, it can be known that after the model training device completes the training of the second learner to be trained, it can obtain the second learner. Specifically, after the model training device obtains the second estimated arrival time corresponding to each first route sample in the first route sample set, and determines the third estimated arrival time corresponding to each first route sample in a similar manner as described above, and then determines the loss value of the loss function in a similar manner as described above until the loss function reaches the convergence condition, and then generates the second learner according to the model parameters obtained after the last update of the model parameters, thus obtaining a time estimation model including the first learner and the second learner.

[0168] Specifically, the convergence condition of the loss function can be that the value of the loss function is less than or equal to the first preset threshold. As an example, for example, the value of the first preset threshold can be 0.005, 0.01, 0.02 or other values approaching 0. It can also be that the difference between the values of the loss function in two adjacent times is less than or equal to the second preset threshold, and the value of the second threshold can be the same as or different from the value of the threshold. As an example, for example, the value of the second preset threshold can be 0.005, 0.01, 0.02 or other values approaching 0, etc. Other convergence conditions can also be adopted, which are not limited here.

[0169] For a further understanding of this solution, please refer to Figure 5 , Figure 5 which is another schematic diagram of the embodiment for training the time estimation model to be trained in the embodiment of the present application. As shown in Figure 5As shown, C1 refers to the first route sample, C2 refers to the time prediction model to be trained. The time prediction model C2 to be trained includes a first learner C21 to be trained and a second learner C22 to be trained. C3 refers to the first predicted arrival time output by the first learner C21 to be trained in the time prediction model C2 to be trained. C4 refers to the second predicted arrival time output by the second learner C22 to be trained in the time prediction model C2 to be trained. C5 refers to the first actual arrival time corresponding to the first route sample. C6 refers to the first derivative obtained based on the first predicted arrival time C3 and the first actual arrival time C5 through the method introduced in the foregoing embodiments. C7 refers to the first derivative after random perturbation processing obtained through the method introduced in the foregoing embodiments. Then, using the first route sample C1, the first derivative C7 after random perturbation processing, and the loss function, the first learner to be trained is iteratively trained to obtain the first learner. Similarly, C8 refers to the third predicted arrival time obtained based on the first predicted arrival time C3 and the second predicted arrival time C4 through the method introduced in the foregoing embodiments. C9 refers to the second derivative obtained based on the third predicted arrival time C5 and the first actual arrival time C5 corresponding to the first route sample through the method introduced in the foregoing embodiments. C10 refers to the second derivative after random perturbation processing obtained through the method introduced in the foregoing embodiments. It should be understood that then, using the first route sample C1, the second derivative C10 after random perturbation processing, and the loss function, the second learner to be trained is iteratively trained to obtain the second learner, thereby obtaining a time prediction model including the first learner and the second learner. It should be understood that Figure 5 The examples in

[0170] It should be understood that the first learner and the second learner introduced in this embodiment are not limitations on the learners in the time prediction model. The time prediction model may further include more learners. Exemplarily, if the time prediction model includes a total of 3 learners, then during the training process, the to-be-trained time prediction model may further include a to-be-trained fourth learner. Based on this, the model training device inputs the overall feature set of the first route into the to-be-trained fourth learner, and outputs a seventh predicted arrival time set through the to-be-trained fourth learner. In a manner similar to the foregoing embodiment, an eighth predicted arrival time set is determined based on the second predicted arrival time set and the seventh predicted arrival time set, and a fourth derivative set is obtained according to the eighth predicted arrival time set and the first actual arrival time set. At this time, the fourth derivative set includes the fourth derivatives corresponding to S first route samples respectively, and the fourth derivatives are also determined based on the loss function. Then, according to the random numbers determined from the standard normal distribution, the fourth derivative set is randomly perturbed to obtain the randomly perturbed fourth derivative set. Finally, the to-be-trained fourth learner is trained based on the eighth predicted arrival time set and the randomly perturbed fourth derivative set, and the fourth learner can be obtained. At this time, the generated time prediction model includes the first learner, the second learner, and the fourth learner. The foregoing examples are all used to understand this solution and should not be construed as limitations of this solution.

[0171] In an embodiment of the present application, another model training method is provided. By using the above method, specifically, it is limited to train through different learners based on the respectively obtained predicted times and corresponding parameters, so as to obtain a time prediction model including multiple learners. On the basis of improving the feasibility of this solution, the predicted results of multiple different learners are further fitted, so that the loss function can converge to the global optimum rather than the local optimum. Therefore, the predicted time obtained by the learner after multiple fittings can be closer to the real time, and further improve the reliability and accuracy of the obtained time prediction model.

[0172] Optionally, on the basis of the above Figure 2 corresponding embodiment, in an optional embodiment of the model training method provided in the embodiment of the present application, the model training method further includes:

[0173] Perform an initialization process on the first predicted arrival time set to obtain the initialized first predicted arrival time set;

[0174] Obtain a first derivative set according to the first predicted arrival time set and the first actual arrival time set, specifically including:

[0175] Obtain a first derivative set according to the initialized first predicted arrival time set and the first actual arrival time set;

[0176] Training the time prediction model to be trained based on the first set of predicted arrival times and the first set of derivatives after random perturbation processing, specifically including:

[0177] Training the time prediction model to be trained based on the initialized first set of predicted arrival times and the first set of derivatives after random perturbation processing.

[0178] In this embodiment, the model training device can also perform initialization processing on the first set of predicted arrival times to obtain the initialized first set of predicted arrival times. Based on this, a first set of derivatives is obtained according to the initialized first set of predicted arrival times and the first set of actual arrival times. Specifically, the model training device calculates the first derivative of the initialized first predicted arrival time corresponding to each first route sample and its corresponding actual arrival time. Similar to step S103, the first derivative is denoted as g i , the first derivative g i Specifically corresponds to in the formula (5) introduced above, but at this time, L is the loss function, and F m (x i ) is the initialized first predicted arrival time corresponding to the first route sample x i , y i is the first actual arrival time corresponding to the first route sample x i , and this first derivative is determined based on the loss function L.

[0179] Furthermore, in a similar manner to step 104, the first set of derivatives is processed by random perturbation according to random numbers determined from the standard normal distribution to obtain the first set of derivatives after random perturbation processing, and the time prediction model to be trained is trained based on the initialized first set of predicted arrival times and the first set of derivatives after random perturbation processing. Specifically, the model training device takes the (first derivative after random perturbation processing) corresponding to each first route sample as the target for iterative training, that is, determines the loss value of the loss function according to the difference between the first set of predicted arrival times and the corresponding first set of derivatives after random perturbation processing, and judges whether the loss function reaches the convergence condition according to the loss value of the loss function. If the convergence condition is not reached, the model parameters of the time prediction model to be trained are updated using the loss value of the loss function.

[0180] Optionally, based on the corresponding embodiment above, in an alternative embodiment of the model training method provided in this application embodiment, the initialization processing is to add a preset value to each first predicted arrival time, or add a value within a preset range to each first predicted arrival time, or add the mean of the actual arrival time to each first predicted arrival time. Figure 2

[0181] In this embodiment, the initialization process introduced in the foregoing embodiment is to add each first estimated arrival time to a preset value. Specifically, after obtaining the first estimated arrival time set, the model training device adds each first estimated arrival time in the first estimated arrival time set to the preset value. For ease of understanding, taking the preset value as 1 as an example, if the first route sample set includes the first route sample A, the first route sample B, and the first route sample C, and the obtained first estimated arrival time set includes the first estimated arrival time of 30 minutes (min) corresponding to the first route sample A, the first estimated arrival time of 31 min corresponding to the first route sample B, and the first estimated arrival time of 29 min corresponding to the first route sample C. Then, by adding each first estimated arrival time to the preset value, the initialized first estimated arrival time of 31 min corresponding to the first route sample A, the initialized first estimated arrival time of 32 min corresponding to the first route sample B, and the initialized first estimated arrival time of 30 min corresponding to the first route sample C can be obtained.

[0182] Alternatively, add each first estimated arrival time to a value within a preset range. Specifically, after obtaining the first estimated arrival time set, the model training device adds each first estimated arrival time in the first estimated arrival time set to a value within the preset range. For ease of understanding, taking the preset range as 1 to 2 as an example, if the first route sample set includes the first route sample A and the first route sample B, and the obtained first estimated arrival time set includes the first estimated arrival time of 30 min corresponding to the first route sample A and the first estimated arrival time of 31 min corresponding to the first route sample B. Then, by adding each first estimated arrival time to a value within the preset range, if the first estimated arrival time corresponding to the first route sample A is added to 2, the initialized first estimated arrival time of 32 min corresponding to the first route sample A can be obtained. Secondly, the first estimated arrival time corresponding to the first route sample B is added to 1, and the initialized first estimated arrival time of 32 min corresponding to the first route sample B can be obtained.

[0183] Alternatively, add the mean of each first estimated arrival time and the actual arrival time. Specifically, after obtaining the set of first estimated arrival times, the model training device adds the mean of each first estimated arrival time in the set of first estimated arrival times and the actual arrival time. For ease of understanding, if the set of first route samples includes first route sample A and first route sample B, and the set of first actual arrival times includes the first actual arrival time of 29 minutes corresponding to first route sample A and the first actual arrival time of 31 minutes corresponding to first route sample B, the mean of the actual arrival times can be obtained as 30 minutes. Based on the obtained set of first estimated arrival times including the first estimated arrival time of 30 minutes corresponding to first route sample A and the first estimated arrival time of 31 minutes corresponding to first route sample B. Thus, the initialized first estimated arrival time corresponding to first route sample A can be obtained as 59 minutes, and the initialized first estimated arrival time corresponding to first route sample B can be obtained as 61 minutes.

[0184] It should be understood that the foregoing examples are all for understanding this solution. In practical applications, the preset values and preset ranges should be determined according to the actual situation, and it is necessary to determine which initialization method to adopt according to the actual application scenario.

[0185] In the embodiments of the present application, another model training method is provided. By adopting the above method, the set of initialized first estimated arrival times can reduce the instability of the estimated time, so that the difference between each estimated time in the set of estimated times is within a relatively small error, thereby improving the reliability of model training. Further, initialization processing can also be performed through different initialization methods, thereby improving the flexibility of this solution.

[0186] Optionally, on the basis of the corresponding embodiments described above, in an optional embodiment of the model training method provided by the embodiments of the present application, the model training method further includes: Figure 2 Obtain K second route samples, where K is an integer and K > S;

[0187] Sample the K second route samples to obtain S first route samples.

[0188]

[0189] ​In this embodiment, since the number of route samples obtained during model training is usually large, and loading the entire set of obtained route samples for calculation at each step incurs a very large time cost and memory overhead. To reduce the time and memory overhead of model training, the model training device can obtain K second route samples, where the K second route samples are all the obtained route samples, K is an integer, and K > S. Then, sample the K second route samples to obtain S first route samples. This sampling can be random sampling or sampling according to actual requirements, which is not limited here. Specifically, the model is trained by the method of Stochastic Gradient Langevin Dynamics (SGLD) introduced in the foregoing embodiment. Since it can avoid the estimated time obtained during the iteration falling on an unstable singularity, the obtained estimated time can be closer to the real time. Therefore, the obtained model training result can more easily converge to the local optimum.

[0190] In an embodiment of the present application, a method for sampling route samples is provided. By using the above method, the S first route samples are obtained after sampling. First, it can reduce the number of samples, thereby reducing the time of model training and improving the efficiency of model training. And it can avoid the estimated time obtained during the iteration falling on an unstable singularity, so that the obtained estimated time can be closer to the real time. Therefore, the obtained model training result can more easily converge to the local optimum, thereby improving the reliability of model training.

[0191] Optionally, based on the above Figure 2 corresponding embodiment, in an optional embodiment of the method for model training provided by the embodiment of the present application, the time estimation model includes N learners, where N is an integer and N ≥ 1;

[0192] The method for model training further includes:

[0193] Obtain P third route samples, where the P third route samples do not overlap with the S first route samples, P is an integer, and P ≥ 1;

[0194] Obtain a second set of overall route features and a second set of actual arrival times, where the second set of overall route features includes the overall route features corresponding to the P third route samples respectively, and the second set of actual arrival times includes the actual arrival times corresponding to the P third route samples respectively. The overall route feature corresponding to the third route sample is a feature related to the travel time of the third route sample,

[0195] Obtain M learners from the time estimation model, where M is an integer and 1 ≤ M < N;

[0196] Obtain a fourth set of estimated arrival times through the M learners according to the second set of overall route features;

[0197] Obtain a fifth set of estimated arrival times through a third learner to be trained according to the second set of overall route features;

[0198] Determine a sixth set of estimated arrival times based on the fourth set of estimated arrival times and the fifth set of estimated arrival times;

[0199] Obtain a third derivative set according to the sixth set of estimated arrival times and the second set of actual arrival times, where the third derivative set includes third derivatives corresponding to P third route samples respectively, and the third derivative is determined based on a loss function;

[0200] Perform random perturbation processing on the third derivative set according to random numbers determined from a standard normal distribution to obtain a third derivative set after random perturbation processing;

[0201] Train the third learner to be trained based on the sixth set of estimated arrival times and the third derivative set after random perturbation processing.

[0202] In this embodiment, after completing the training of the time estimation model to be trained and obtaining the time estimation model, if new training samples appear, incremental learning can be performed based on the obtained time estimation model at this time. At this time, the time estimation model includes N learners, N is an integer, and N≥1. Specifically, the model training device obtains P third route samples, and the P third route samples do not overlap with the S first route samples. P is an integer, P≥1, that is, the P third route samples are new training samples compared with the S first route samples. Optionally, the P third route samples can be all the new route samples, or the route samples after sampling all the new route samples, which is not limited here.

[0203] Based on this, the model training device obtains a second set of overall route features and a second set of actual arrival times, where the second set of overall route features includes the overall route features corresponding to P third route samples respectively, and the second set of actual arrival times includes the actual arrival times corresponding to P third route samples respectively. The overall route feature corresponding to the third route sample is a feature related to the travel time of the third route sample. Specifically, the travel time of the third route sample is specifically the time taken to complete the passage on the third route sample, which is similar to the travel time of the first route sample introduced in step 101 and will not be elaborated here.

[0204] Similarly, the overall characteristics of the second route include, but are not limited to, road information such as the total length of the entire journey of the third route sample, the average speed limit of the entire journey of the third route sample, or the average free-flow speed of the entire journey of the third route sample, as well as the average vehicle speed of the third route sample calculated based on real-time collected GPS data, and the vehicle speed information such as the average vehicle speed of the entire journey within 5 minutes (or 10 minutes, 15 minutes, etc.) before and after the same moment of the third route sample mined from historical GPS data collected in the past few months. Here, the overall characteristics of the route are not specifically limited. Similarly, the model training device can also obtain the second set of actual arrival times, and the second set of actual arrival times includes the actual arrival times corresponding to P third route samples respectively. The actual arrival time is the ATA introduced above, that is, the actual arrival time of the third route sample is extracted from the historical data of the map service.

[0205] Further, the model training device obtains M learners from the trained time prediction model, where M is an integer and 1 ≤ M < N. Then, the set of overall characteristics of the second route is used as the input of the M learners, and the fourth set of predicted arrival times is output through the M learners. The fourth set of predicted arrival times includes the fourth predicted arrival times corresponding to P third route samples respectively. Furthermore, the fifth set of predicted arrival times is obtained through the third learner to be trained based on the set of overall characteristics of the second route, and the sixth set of predicted arrival times is determined based on the fourth set of predicted arrival times and the fifth set of predicted arrival times. The specific method for determining the sixth set of predicted arrival times is similar to the method for determining the third set of predicted arrival times described above, and will not be elaborated here. Based on this, the model training device obtains the third derivative set according to the sixth set of predicted arrival times and the second set of actual arrival times. The third derivative set includes the third derivatives corresponding to P third route samples respectively. The third derivative is determined based on the loss function. The specific method for obtaining the third derivative set is similar to step 103 and will not be elaborated here.

[0206] Still further, the model training device performs random perturbation processing on the third derivative set according to the random numbers determined from the standard normal distribution, and obtains the third derivative set after random perturbation processing, that is, for each third route sample, a random number is randomly sampled from the standard normal distribution, and then according to the random number determined from the standard normal distribution for each third route sample, a random number that conforms to the normal distribution is added to the third derivative corresponding to each third route sample, so as to obtain the third derivative set after random perturbation processing. The specific method for obtaining the third derivative set after random perturbation processing is similar to step 104 and will not be elaborated here.

[0207] Based on this, the model training device trains the third learner to be trained based on the sixth set of estimated arrival times and the third derivative set after random perturbation processing. Specifically, the model training device uses the third derivative after random perturbation processing corresponding to each third route sample as the target for iterative training, that is, determines the loss value of the loss function according to the difference between the sixth set of estimated arrival times and the corresponding third derivative set after random perturbation processing, and judges whether the loss function reaches the convergence condition according to the loss value of the loss function. If the convergence condition is not reached, the model parameters of the third learner to be trained are updated using the loss value of the loss function.

[0208] Optionally, based on the above Figure 2 corresponding embodiment, in an optional embodiment of the model training method provided by the embodiments of the present application, after training the third learner to be trained based on the sixth set of estimated arrival times and the third derivative set after random perturbation processing, the model training method further includes:

[0209] Obtain the third learner and generate an updated time prediction model, where the updated time prediction model includes N learners, and the updated time prediction model includes M learners and the third learner.

[0210] In this embodiment, after the model training device trains the third learner to be trained based on the sixth set of estimated arrival times and the third derivative set after random perturbation processing, it can obtain the third learner, thereby generating an updated time prediction model. Since the time prediction model includes N learners, the updated time prediction model also includes N learners, and the updated time prediction model specifically includes M learners and the third learner.

[0211] Specifically, the model training device determines the loss value of the loss function according to the difference between the sixth estimated arrival time set and the third derivative set processed by the corresponding random perturbation, and determines whether the loss function reaches the convergence condition according to the loss value of the loss function. If the convergence condition is not reached, the model parameters of the third learner to be trained are updated using the loss value of the loss function, and the second route sample set is input into the third learner to be trained with the updated model parameters. After the third learner to be trained outputs the sixth estimated arrival time corresponding to each second route sample again, the loss value of the loss function is determined based on a similar manner as described above until the loss function reaches the convergence condition. Then, the third learner is generated according to the model parameters obtained after the last update of the model parameters of the third learner. Wherein, the convergence condition of the loss function can be that the value of the loss function is less than or equal to the first preset threshold. As an example, the value of the first preset threshold can be 0.005, 0.01, 0.02 or other values approaching 0. It can also be that the difference between two adjacent values of the loss function is less than or equal to the second preset threshold, and the value of the second threshold can be the same as or different from the value of the threshold. As an example, the value of the second preset threshold can be 0.005, 0.01, 0.02 or other values approaching 0, etc. Other convergence conditions can also be adopted, which are not limited herein.

[0212] In the embodiments of the present application, a method for model training based on incremental learning is provided. By adopting the above method, in the scenario of newly added route samples, at least one learner is obtained from the time estimation model that has been trained, which can enable the information of the training samples included in these learners to be utilized during the incremental learning process, thereby improving the reliability of the model training based on incremental learning. Secondly, the updated time estimation model can maintain the total number of N learners, so that the online inference time can remain stable instead of continuously increasing, further ensuring the reliability of the model training.

[0213] Optionally, on the basis of the above Figure 2 corresponding embodiment, in an optional embodiment of the model training method provided by the embodiments of the present application, obtaining M learners from the time estimation model specifically includes:

[0214] Obtaining the first M learners from the time estimation model;

[0215] Or,

[0216] Fixing the first L learners in the time estimation model, and sampling from the last N - L learners in the time estimation model to obtain M learners, where L is an integer and 1 ≤ L < M.

[0217] In this embodiment, the value of M should be as close to N as possible. For example, M is N-1 or N-2. When the number of samples of the P third routes is small, the value of M can be N-1. Therefore, the fewer P third-route samples are only enough to train one learner. When the number of samples of the P third routes is large, the value of M can be N-2 or N-3. It should be understood that the specific value needs to be flexibly determined according to multiple experimental data and specific situations.

[0218] Based on this, the model training device obtains the first M learners from the time estimation model. For ease of understanding, taking the time estimation model including 5 (N) learners and obtaining 2 (M) learners as an example for illustration, based on this, during the training process of the time estimation model to be trained, the learners obtained in sequence are sorted. For example, learner A is the first learner, learner B is the second learner, and so on. Learner E is the fifth learner. At this time, learner A and learner B are used as the selected learners, and based on learner A and learner B, training is performed based on the P third-route samples.

[0219] Alternatively, the model training device fixes the first L learners in the time estimation model and samples from the latter N-L learners in the time estimation model to obtain M learners, where L is an integer and 1≤L<M. For ease of understanding, taking the time estimation model including 5 (N) learners and obtaining 2 (M) learners as an example for illustration, based on this, during the training process of the time estimation model to be trained, the learners obtained in sequence are sorted. For example, learner A is the first learner, learner B is the second learner, and so on. Learner E is the fifth learner. At this time, learner A is fixed and used as one of the M learners. And one learner is randomly determined from learners B to E. If learner D is determined, then learner A and learner E are used as the selected learners, and based on learner A and learner E, training is performed based on the P third-route samples.

[0220] In the embodiment of the present application, a method for obtaining learners is provided. By using the above method, since during the model training process, the more training times, that is, the more convergent the loss function is, the new samples for training based on the later learners will result in fewer iteration times. Therefore, selecting the earlier learners can obtain more comprehensive information of the new samples, thus ensuring that the updated time estimation model obtained is more stable and reliable.

[0221] Optionally, in the above Figure 2Based on the corresponding embodiments, in an alternative embodiment of the model training method provided in the embodiments of the present application, the first learner and the second learner include at least one of the following: decision tree, support vector machine (SVM), or multi-layer perceptron (MLP);

[0222] The first derivative is the first-order derivative of the loss function, or the higher-order derivative of the loss function.

[0223] In this embodiment, the learners described in the foregoing embodiments may include at least one of the following: decision tree, or support vector machine (SVM), or multi-layer perceptron (MLP). That is, the first learner, the second learner, the third learner, and the fourth learner are respectively a decision tree, or an SVM, or an MLP.

[0224] Secondly, the derivative described in the foregoing embodiments is the first-order derivative of the loss function, or the higher-order derivative of the loss function. For example, the first derivative may be the first-order derivative of the loss function formed by the first estimated arrival time and the first actual arrival time, or the higher-order derivative of the loss function formed by the first estimated arrival time and the first actual arrival time. And the second derivative may be the first-order derivative of the loss function formed by the third estimated arrival time and the first actual arrival time, or the higher-order derivative of the loss function formed by the third estimated arrival time and the first actual arrival time.

[0225] In the embodiments of the present application, another model training method is provided. By using the above method, the learner can be a different type of method framework for model training, and the derivative can be a first-order or higher-order derivative. Therefore, the requirements of different model training scenarios can be met, thereby improving the flexibility of model training.

[0226] Optionally, in the above Figure 2 Based on the corresponding embodiments, in an alternative embodiment of the model training method provided in the embodiments of the present application, the model training method further includes:

[0227] Obtain a set of routes to be matched, where the set of routes to be matched includes Q routes to be matched. The route to be matched is a passing route between a target departure place and a target arrival place. Q is an integer and Q>1;

[0228] Obtain a set of overall route features according to the set of routes to be matched, where the set of overall route features includes the overall route features corresponding to each route to be matched. The overall route features corresponding to the route to be matched are features related to the passing time of the route to be matched;

[0229] According to the overall route feature set, a set of estimated arrival times to be selected is obtained through a time estimation model. Among them, the set of estimated arrival times to be selected includes the estimated arrival times to be selected corresponding to each route to be matched.

[0230] Determine the target estimated arrival time from the set of estimated arrival times to be selected. Among them, the target estimated arrival time is the travel time from the target departure place to the target arrival place.

[0231] In this embodiment, in different scenarios, before a user travels from the target departure place to the target arrival place, the estimated time can be obtained through the time estimation model trained in the foregoing embodiment.

[0232] Specifically, the model training device first obtains a set of routes to be matched, which includes multiple routes to be matched. The routes to be matched are the travel routes between the target departure place and the target arrival place. For example, there are 3 different travel routes between the target departure place A and the target arrival place A. At this time, the obtained set of routes to be matched may include the route to be matched A, the route to be matched B, and the route to be matched C.

[0233] Based on this, the model training device then obtains an overall route feature set according to the set of routes to be matched. The overall route feature set includes the overall route features corresponding to each route to be matched. The overall route features corresponding to the routes to be matched are the features related to the travel time of the routes to be matched. The specific overall route features include, but are not limited to, the total length of the whole journey of the route to be matched, the average speed limit of the whole journey of the route to be matched, or the average free flow speed of the whole journey of the route to be matched and other road information, as well as the average vehicle speed of the route to be matched calculated according to the real-time collected GPS data, and the average vehicle speed of the whole journey in the 5 minutes (or 10 minutes, 15 minutes, etc.) before and after the same moment of the route to be matched mined from the historical GPS data collected in the past few months and other vehicle speed information. Here, the overall route features corresponding to the routes to be matched are not specifically limited.

[0234] Further, the model training device takes the overall route feature set as the input of the time estimation model, and the time estimation model outputs a set of estimated arrival times to be selected, which includes the estimated arrival times to be selected corresponding to each route to be matched. The route to be matched A corresponds to the estimated arrival time A to be selected, the route to be matched B corresponds to the estimated arrival time B to be selected, and the route to be matched C corresponds to the estimated arrival time C to be selected. Then the model training device determines the target estimated arrival time from the set of estimated arrival times to be selected. Among them, the target estimated arrival time is the travel time from the target departure place to the target arrival place.

[0235] Optionally, the model training device determines the target estimated arrival time from the set of candidate estimated arrival times. It can select the candidate estimated arrival time with the shortest time consumption from multiple candidate estimated arrival times included in the set of candidate estimated arrival times as the target estimated arrival time. Alternatively, when obtaining the candidate estimated arrival times, it is also possible to display the road conditions and real-time driving status corresponding to different candidate routes on the terminal device used by the user. Thus, the user determines the target estimated arrival time from the set of candidate estimated arrival times according to their needs. At this time, the target estimated arrival time is not necessarily the time with the shortest time consumption.

[0236] For ease of understanding, the scenarios to which this solution can be applied are introduced below.

[0237] 1. When the user initiates navigation from the target departure location to the target arrival location, first obtain multiple candidate routes, then the time estimation model obtained by the training method of this solution outputs the estimated arrival time corresponding to each candidate route. Then select the candidate estimated arrival time with the shortest time consumption as the target estimated arrival time and display it to the user for the user to navigate based on the target estimated arrival time and the candidate route corresponding to the target estimated arrival time.

[0238] Furthermore, based on the application scenario of navigation, after the user starts navigation, when the preset time is reached, the real-time location can also be determined, and the time estimation model obtained by the training method of this solution outputs the time for calculating the remaining route between the real-time location and the target arrival location, so as to facilitate the user to arrange the itinerary in real time.

[0239] 2. The time estimation model obtained by the training method of this solution outputs the estimated arrival time corresponding to each candidate route, and group planning is performed based on the estimated arrival times corresponding to multiple candidate routes to obtain areas reachable within 15 minutes, areas reachable within half an hour, or areas reachable within one hour, etc., so as to facilitate the user to understand the living radius of a certain location.

[0240] 3. When a delivery person is making a delivery, the estimated arrival time corresponding to each candidate route obtained by this solution can be used to better assign orders to the delivery person and improve the delivery efficiency of takeaways.

[0241] 4. In the scenario where a passenger takes a taxi through a terminal device, the estimated arrival time corresponding to each candidate route obtained by this solution can also be used to better arrange for the driver to receive the order and improve the passenger transportation efficiency.

[0242] 5. The estimated arrival time corresponding to each candidate route obtained by this solution is provided for upstream services to use, so that the upstream services can evaluate the advantages and disadvantages of each candidate route, and then push the optimal route to the user based on the estimated arrival time and other judgment criteria.

[0243] 6. Determine the influence weight of each to-be-matched route on the estimated arrival time corresponding to each to-be-matched route obtained through this solution for use by upstream services, such as for avoiding congestion, explaining the estimated time, etc.

[0244] In the embodiment of the present application, a method for estimating the arrival time based on a model is provided. By adopting the above method, the time estimation model obtained through the foregoing embodiments can be more reliable and accurate. Therefore, by determining the travel time from the departure place to the arrival place through this time estimation model, the arrival time can be obtained more accurately.

[0245] Optionally, on the basis of the above Figure 2 In an optional embodiment of the method for model training provided in the embodiment of the present application corresponding to the above embodiment, the time estimation model includes a first learner and a second learner;

[0246] According to the overall route feature set, obtain the set of to-be-selected estimated arrival times through the time estimation model, specifically including:

[0247] According to the overall route feature set, obtain the first set of to-be-selected estimated arrival times through the first learner, where the first set of to-be-selected estimated arrival times includes the first to-be-selected estimated arrival time corresponding to each to-be-matched route;

[0248] According to the overall route feature set, obtain the second set of to-be-selected estimated arrival times through the second learner, where the second set of to-be-selected estimated arrival times includes the second to-be-selected estimated arrival time corresponding to each to-be-matched route;

[0249] Based on the first set of to-be-selected estimated arrival times and the second set of to-be-selected estimated arrival times, determine the set of to-be-selected estimated arrival times.

[0250] In this embodiment, the time estimation model includes a first learner and a second learner. Based on this, the model training device obtains the first set of to-be-selected estimated arrival times through the first learner according to the overall route feature set. The first set of to-be-selected estimated arrival times includes the first to-be-selected estimated arrival time corresponding to each to-be-matched route, and then obtains the second set of to-be-selected estimated arrival times through the second learner according to the overall route feature set. The second set of to-be-selected estimated arrival times includes the second to-be-selected estimated arrival time corresponding to each to-be-matched route.

[0251] Then, the time estimation model determines the set of to-be-selected estimated arrival times based on the first set of to-be-selected estimated arrival times and the second set of to-be-selected estimated arrival times. That is, based on the formula (11) introduced above, obtain the to-be-selected estimated arrival time corresponding to each to-be-matched route. For the sake of understanding, formula (11) is shown again:

[0252] (1 - βγ)f k-1 +γf k ;(11)

[0253] Where γ is the learning rate, β is the regularization parameter, and f k-1 is the first estimated arrival time, and f k is the second estimated arrival time.

[0254] In this embodiment, the value of the regularization parameter can be 1, or can be selected as other values according to actual applications, and is not limited here.

[0255] In the embodiment of the present application, a method for determining a set of to-be-selected estimated arrival times is provided. By using the above method, by fitting the estimated results of multiple different learners, the loss function can converge to the global optimum instead of the local optimum. Therefore, the estimated time obtained by the learner after multiple fittings can be closer to the real time, thereby improving the accuracy of the to-be-selected estimated arrival time.

[0256] The following will describe in detail the model training device in the present application. Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of a model training device provided in an embodiment of the present application. As Figure 6 shown, the model training device 600 includes:

[0257] An acquisition module 601, configured to acquire a first set of overall route features and a first set of actual arrival times. Among them, the first set of overall route features includes the overall route features corresponding to S first route samples respectively, and the first set of actual arrival times includes the actual arrival times corresponding to S first route samples respectively. The overall route feature corresponding to the first route sample is a feature related to the travel time of the first route sample, S is an integer, and S>1;

[0258] A generation module 602, configured to obtain a first set of estimated arrival times through a to-be-trained time estimation model according to the first set of overall route features. Among them, the first set of estimated arrival times includes the first estimated arrival times corresponding to S first route samples respectively;

[0259] The generation module 602 is further configured to obtain a first derivative set according to the first set of estimated arrival times and the first set of actual arrival times. Among them, the first derivative set includes the first derivatives corresponding to S first route samples respectively, and the first derivative is determined based on the loss function;

[0260] A processing module 603, configured to perform random perturbation processing on the first derivative set according to a random number determined from a standard normal distribution to obtain a first derivative set after random perturbation processing;

[0261] A training module 604, configured to train a time prediction model to be trained based on a first set of predicted arrival times and a first set of derivatives after random perturbation processing.

[0262] Optionally, based on the corresponding embodiment above, Figure 6 In another embodiment of the model training device 600 provided by the embodiment of the present application, the model training device further includes a determination module 605;

[0263] The generation module 602 is further configured to obtain a second set of predicted arrival times through the time prediction model to be trained according to the first set of overall route features;

[0264] The determination module 605 is configured to determine a third set of predicted arrival times based on the first set of predicted arrival times and the second set of predicted arrival times;

[0265] The generation module 602 is further configured to obtain a second set of derivatives according to the third set of predicted arrival times and the first set of actual arrival times, where the second set of derivatives includes second derivatives corresponding to S first route samples respectively, and the second derivative is determined based on a loss function;

[0266] The processing module 603 is further configured to perform random perturbation processing on the second set of derivatives according to random numbers determined from a standard normal distribution to obtain a second set of derivatives after random perturbation processing.

[0267] Optionally, based on the corresponding embodiment above, Figure 6 In another embodiment of the model training device 600 provided by the embodiment of the present application, the generation module 602 is specifically configured to obtain a first set of predicted arrival times through a first learner to be trained according to the first set of overall route features;

[0268] The generation module 602 is specifically configured to obtain a second set of predicted arrival times through a second learner to be trained according to the first set of overall route features;

[0269] The training module 604 is specifically configured to train the first learner to be trained based on the first set of predicted arrival times and the first set of derivatives after random perturbation processing;

[0270] Train the second learner to be trained based on the third set of predicted arrival times and the second set of derivatives after random perturbation processing.

[0271] Optionally, based on the corresponding embodiment above, Figure 6 In another embodiment of the model training device 600 provided by the embodiment of the present application, the processing module 603 is further configured to perform initialization processing on the first set of predicted arrival times to obtain an initialized first set of predicted arrival times;

[0272] The generation module 602 is specifically configured to obtain a first derivative set according to the initialized first estimated arrival time set and the first actual arrival time set;

[0273] The training module 604 is specifically configured to train the time prediction model to be trained based on the initialized first estimated arrival time set and the first derivative set after random perturbation processing.

[0274] Optionally, on the basis of the corresponding embodiment above, in another embodiment of the model training device 600 provided by the embodiment of the present application, the initialization process is to add a preset value to each first estimated arrival time, or add a value within a preset range to each first estimated arrival time, or add the average value of the actual arrival time to each first estimated arrival time. Figure 6

[0275] Optionally, on the basis of the corresponding embodiment above, in another embodiment of the model training device 600 provided by the embodiment of the present application, the model training device 600 further includes a sampling module 606; Figure 6

[0276] The obtaining module 601 is further configured to obtain K second route samples, where K is an integer and K > S;

[0277] The sampling module 606 is configured to sample the K second route samples to obtain S first route samples.

[0278] Optionally, on the basis of the corresponding embodiment above, in another embodiment of the model training device 600 provided by the embodiment of the present application, the time prediction model includes N learners, where N is an integer and N ≥ 1; Figure 6

[0279] The obtaining module 601 is further configured to obtain P third route samples, where the P third route samples do not overlap with the S first route samples, and P is an integer and P ≥ 1;

[0280] The obtaining module 601 is further configured to obtain a second route overall feature set and a second actual arrival time set, where the second route overall feature set includes the route overall features corresponding to the P third route samples respectively, the second actual arrival time set includes the actual arrival times corresponding to the P third route samples respectively, and the route overall feature corresponding to the third route sample is a feature related to the travel time of the third route sample,

[0281] The obtaining module 601 is further configured to obtain M learners from the time prediction model, where M is an integer and 1 ≤ M < N;

[0282] ​​​The generating module 602 is further configured to obtain a fourth set of estimated arrival times through M learners according to the second set of overall route features;

[0283] The generating module 602 is further configured to obtain a fifth set of estimated arrival times through a third learner to be trained according to the second set of overall route features;

[0284] The generating module 602 is further configured to determine a sixth set of estimated arrival times based on the fourth set of estimated arrival times and the fifth set of estimated arrival times;

[0285] The generating module 602 is further configured to obtain a third derivative set according to the sixth set of estimated arrival times and the second set of actual arrival times, where the third derivative set includes third derivatives corresponding to P third route samples respectively, and the third derivative is determined based on a loss function;

[0286] The processing module 603 is further configured to perform random perturbation processing on the third derivative set according to random numbers determined from a standard normal distribution to obtain a third derivative set after random perturbation processing;

[0287] The training module 604 is further configured to train the third learner to be trained based on the sixth set of estimated arrival times and the third derivative set after random perturbation processing.

[0288] Optionally, based on the above Figure 6 In another embodiment of the model training apparatus 600 provided in the embodiments of the present application, on the basis of the corresponding embodiment, the generating module 602 is further configured to, after the training module 604 trains the third learner to be trained based on the sixth set of estimated arrival times and the third derivative set after random perturbation processing, obtain a third learner, and generate an updated time prediction model, where the updated time prediction model includes N learners, and the updated time prediction model includes M learners and the third learner.

[0289] Optionally, based on the above Figure 6 In another embodiment of the model training apparatus 600 provided in the embodiments of the present application, on the basis of the corresponding embodiment, the obtaining module 601 is specifically configured to obtain the first M learners from the time prediction model;

[0290] Or,

[0291] Fix the first L learners in the time prediction model, and sample from the last N - L learners in the time prediction model to obtain M learners, where L is an integer and 1 ≤ L < M.

[0292] Optionally, based on the above Figure 6Based on the corresponding embodiment, in another embodiment of the model training device 600 provided by the embodiments of the present application, the first learner and the second learner include at least one of the following: decision tree, support vector machine (SVM), or multi-layer perceptron (MLP);

[0293] The first derivative is the first-order derivative of the loss function, or a higher-order derivative of the loss function.

[0294] Optionally, based on the above Figure 6 Based on the corresponding embodiment, in another embodiment of the model training device 600 provided by the embodiments of the present application, the obtaining module 601 is further configured to obtain a set of to-be-matched routes, where the set of to-be-matched routes includes Q to-be-matched routes, the to-be-matched routes are the passing routes between the target departure place and the target arrival place, Q is an integer, and Q > 1;

[0295] The obtaining module 601 is further configured to obtain a set of overall route features according to the set of to-be-matched routes, where the set of overall route features includes the overall route features corresponding to each to-be-matched route, and the overall route features corresponding to the to-be-matched routes are the features related to the passing time of the to-be-matched routes;

[0296] The generating module 602 is further configured to obtain a set of to-be-selected estimated arrival times through the time estimation model according to the set of overall route features, where the set of to-be-selected estimated arrival times includes the to-be-selected estimated arrival times corresponding to each to-be-matched route;

[0297] The determining module 605 is further configured to determine a target estimated arrival time from the set of to-be-selected estimated arrival times, where the target estimated arrival time is the passing time from the target departure place to the target arrival place.

[0298] Optionally, based on the above Figure 6 Based on the corresponding embodiment, in another embodiment of the model training device 600 provided by the embodiments of the present application, the time estimation model includes a first learner and a second learner;

[0299] The generating module 602 is specifically configured to obtain a first set of to-be-selected estimated arrival times through the first learner according to the set of overall route features, where the first set of to-be-selected estimated arrival times includes the first to-be-selected estimated arrival times corresponding to each to-be-matched route;

[0300] Obtain a second set of to-be-selected estimated arrival times through the second learner according to the set of overall route features, where the second set of to-be-selected estimated arrival times includes the second to-be-selected estimated arrival times corresponding to each to-be-matched route;

[0301] Determine the set of to-be-selected estimated arrival times based on the first set of to-be-selected estimated arrival times and the second set of to-be-selected estimated arrival times.

[0302] Another model training device is also provided in an embodiment of the present application. The model training device can be deployed on a server or on a terminal device. In the present application, the case where the model training device is deployed on a server is taken as an example for illustration. Please refer to Figure 7 , Figure 7 which is a schematic diagram of an embodiment of the server in an embodiment of the present application. As shown in the figure, the server 1000 may vary greatly due to configuration or performance differences, and may include one or more central processing units (CPUs) 1022 (for example, one or more processors) and a memory 1032, and one or more storage media 1030 (for example, one or more mass storage devices) for storing application programs 1042 or data 1044. Among them, the memory 1032 and the storage media 1030 can be transient storage or persistent storage. The program stored in the storage media 1030 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Further, the central processing unit 1022 can be set to communicate with the storage media 1030 and execute a series of instruction operations in the storage media 1030 on the server 1000.

[0303] The server 1000 may further include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input / output interfaces 1058, and / or one or more operating systems 1041, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM and so on.

[0304] The steps performed by the server in the above embodiments can be based on the Figure 7 server structure shown.

[0305] The CPU 1022 included in the server is used to execute the embodiments shown in Figure 2 and the corresponding various embodiments. Figure 2

[0306] The present application also provides a terminal device for executing Figure 2 the embodiments shown and Figure 2 the steps performed by the model training device in the corresponding various embodiments. As Figure 8As shown, for the sake of convenience of description, only the parts related to the embodiments of the present application are shown. For the specific technical details not disclosed, please refer to the method part of the embodiments of the present application. Taking the terminal device as a mobile phone as an example for illustration:

[0307] Figure 8 The block diagram of a part of the structure of the mobile phone related to the terminal provided by the embodiments of the present application is shown. Refer to Figure 8 , the mobile phone includes: Radio Frequency (RF) circuit 1110, memory 1120, input unit 1130, display unit 1140, sensor 1150, audio circuit 1160, wireless fidelity (WiFi) module 1170, processor 1180, and power supply 1190 and other components. Those skilled in the art can understand that Figure 8 the structure of the mobile phone shown in

[0308] does not constitute a limitation to the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or different component arrangements. Figure 8 The following specifically introduces each component of the mobile phone:

[0309] The RF circuit 1110 can be used for receiving and sending signals during the process of receiving and sending information or making a call. Specifically, after receiving the downlink information of the base station, it is given to the processor 1180 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 1110 includes but is not limited to antennas, at least one amplifier, transceiver, coupler, Low Noise Amplifier (LNA), duplexer, etc. In addition, the RF circuit 1110 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0310] The memory 1120 can be used to store software programs and modules. The processor 1180 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1120. The memory 1120 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 1120 can include high-speed random access memory and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0311] The input unit 1130 can be used to receive input digital or character information and generate key signal inputs related to the user settings and function control of the mobile phone. Specifically, the input unit 1130 can include a touch panel 1131 and other input devices 1132. The touch panel 1131, also known as a touch screen, can collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel 1131), and drive corresponding connecting devices according to a preset program. Optionally, the touch panel 1131 can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch orientation of the user, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 1180, and can receive and execute commands sent by the processor 1180. In addition, the touch panel 1131 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1131, the input unit 1130 can also include other input devices 1132. Specifically, the other input devices 1132 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.

[0312] The display unit 1140 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1140 may include a display panel 1141. Optionally, the display panel 1141 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, a touch panel 1131 can cover the display panel 1141. When the touch panel 1131 detects a touch operation on or near it, it is transmitted to the processor 1180 to determine the type of touch event. Subsequently, the processor 1180 provides a corresponding visual output on the display panel 1141 according to the type of touch event. Although in Figure 8 the touch panel 1131 and the display panel 1141 are implemented as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 1131 and the display panel 1141 can be integrated to realize the input and output functions of the mobile phone.

[0313] The mobile phone may further include at least one sensor 1150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 1141 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1141 and / or the backlight when the mobile phone is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used in applications for identifying the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be elaborated here.

[0314] The audio circuit 1160, the speaker 1161, and the microphone 1162 can provide an audio interface between the user and the mobile phone. The audio circuit 1160 can transmit the electrical signal converted from the received audio data to the speaker 1161, and the speaker 1161 converts it into a sound signal for output; on the other hand, the microphone 1162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1160 and then converted into audio data. After the audio data is output to the processor 1180 for processing, it is sent to another mobile phone, for example, via the RF circuit 1110, or the audio data is output to the memory 1120 for further processing.

[0315] WiFi belongs to short - range wireless transmission technology. Through the WiFi module 1170, a mobile phone can help users send and receive emails, browse the web, and access streaming media, etc. It provides users with wireless broadband Internet access. Although Figure 8 shows the WiFi module 1170, it can be understood that it does not belong to an essential component of the mobile phone.

[0316] The processor 1180 is the control center of the mobile phone. It connects various parts of the entire mobile phone using various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 1120, and by calling the data stored in the memory 1120, it executes various functions of the mobile phone and processes data. Optionally, the processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above - mentioned modem processor may not be integrated into the processor 1180 either.

[0317] The mobile phone also includes a power supply 1190 (such as a battery) that powers each component. Preferably, the power supply can be logically connected to the processor 1180 through a power management system, so as to manage functions such as charging, discharging, and power consumption management through the power management system.

[0318] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be elaborated here.

[0319] In the embodiments of the present application, the processor 1180 included in the terminal is used to execute the embodiments as Figure 2 shown and Figure 2 the corresponding various embodiments.

[0320] In the embodiments of the present application, a computer - readable storage medium is also provided. A computer program is stored in the computer - readable storage medium. When it runs on a computer, it causes the computer to execute the methods described in the embodiments as Figure 2 shown and Figure 2 the steps executed by the model training device in the corresponding various described methods.

[0321] In the embodiments of the present application, a computer program product including a program is also provided. When it runs on a computer, it causes the computer to execute the steps executed by the model training device in the methods described in the embodiments as Figure 2 shown.

[0322] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0323] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0324] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0325] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0326] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0327] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims

1. A method for model training, characterized in that, Including: Obtain a first set of overall route features and a first set of actual arrival times. Among them, the first set of overall route features includes the overall route features corresponding to S first route samples respectively, the first set of actual arrival times includes the actual arrival times corresponding to S first route samples respectively, the overall route feature corresponding to the first route sample is a feature related to the travel time of the first route sample, S is an integer, and S > 1; Obtain a first set of estimated arrival times through the time prediction model to be trained according to the first set of overall route features. Among them, the first set of estimated arrival times includes the first estimated arrival times corresponding to S first route samples respectively; Obtain a first derivative set according to the first set of estimated arrival times and the first set of actual arrival times. Among them, the first derivative set includes the first derivatives corresponding to S first route samples respectively, and the first derivative is determined based on a loss function; Perform random perturbation processing on the first derivative set according to the random numbers determined from the standard normal distribution to obtain the first derivative set after random perturbation processing; Train the time prediction model to be trained based on the first set of estimated arrival times and the first derivative set after random perturbation processing.

2. The method according to claim 1, wherein The method further includes: Obtain a second set of estimated arrival times through the time prediction model to be trained according to the first set of overall route features; Determine a third set of estimated arrival times based on the first set of estimated arrival times and the second set of estimated arrival times; Obtain a second derivative set according to the third set of estimated arrival times and the first set of actual arrival times. Among them, the second derivative set includes the second derivatives corresponding to S first route samples respectively, and the second derivative is determined based on the loss function; Perform random perturbation processing on the second derivative set according to the random numbers determined from the standard normal distribution to obtain the second derivative set after random perturbation processing.

3. The method according to claim 2, characterized in that The step of obtaining a first set of estimated arrival times through the time prediction model to be trained according to the first set of overall route features includes: Obtain the first set of estimated arrival times through the first learner to be trained according to the first set of overall route features; The step of obtaining a second set of estimated arrival times through the time prediction model to be trained according to the first set of overall route features includes: Obtain the second set of estimated arrival times through the second learner to be trained according to the first set of overall route features; The step of training the time prediction model to be trained based on the first set of estimated arrival times and the first derivative set after random perturbation processing includes: Train the first learner to be trained based on the first set of estimated arrival times and the first derivative set after random perturbation processing; Train the second learner to be trained based on the third set of estimated arrival times and the second derivative set after random perturbation processing.

4. The method according to claim 1, wherein The method further includes: Perform initialization processing on the first set of estimated arrival times to obtain the initialized first set of estimated arrival times; Obtaining a first derivative set based on the first estimated arrival time set and the first actual arrival time set includes: Obtaining the first derivative set according to the initialized first estimated arrival time set and the first actual arrival time set; Training the to-be-trained time estimation model based on the first estimated arrival time set and the first derivative set after random perturbation processing includes: Training the to-be-trained time estimation model based on the initialized first estimated arrival time set and the first derivative set after random perturbation processing.

5. The method according to claim 4, wherein The initialization process is to add a preset value to each first estimated arrival time, or add a value within a preset range to each first estimated arrival time, or add the mean value of the actual arrival times to each first estimated arrival time.

6. The method according to claim 4, characterized in that, The method further includes: Obtaining K second route samples, where K is an integer and K > S; Sampling the K second route samples to obtain S first route samples.

7. The method according to claim 3, wherein The time estimation model includes N learners, where N is an integer and N ≥ 1; The method further includes: Obtaining P third route samples, where the P third route samples do not overlap with the S first route samples, and P is an integer and P ≥ 1; Obtaining a second route overall feature set and a second actual arrival time set, where the second route overall feature set includes the overall route features corresponding to the P third route samples respectively, and the second actual arrival time set includes the actual arrival times corresponding to the P third route samples respectively, and the overall route feature corresponding to the third route sample is a feature related to the travel time of the third route sample; Obtaining M learners from the time estimation model, where M is an integer and 1 ≤ M < N; Obtaining a fourth estimated arrival time set through the M learners according to the second route overall feature set; Obtaining a fifth estimated arrival time set through a to-be-trained third learner according to the second route overall feature set; Determining a sixth estimated arrival time set based on the fourth estimated arrival time set and the fifth estimated arrival time set; Obtaining a third derivative set according to the sixth estimated arrival time set and the second actual arrival time set, where the third derivative set includes the third derivatives corresponding to the P third route samples respectively, and the third derivative is determined based on the loss function; Performing random perturbation processing on the third derivative set according to a random number determined from a standard normal distribution to obtain a third derivative set after random perturbation processing; Training the to-be-trained third learner based on the sixth estimated arrival time set and the third derivative set after random perturbation processing.

8. The method according to claim 7, characterized in that, After training the to-be-trained third learner based on the sixth estimated arrival time set and the third derivative set after random perturbation processing, the method further includes: Obtain a third learner and generate an updated time estimation model, where the updated time estimation model includes N learners, and the updated time estimation model includes the M learners and the third learner.

9. The method according to claim 7, wherein The obtaining M learners from the time estimation model includes: Obtaining the first M learners from the time estimation model; Or, Fixing the first L learners in the time estimation model and sampling from the subsequent N - L learners in the time estimation model to obtain the M learners, where L is an integer and 1 ≤ L < M.

10. The method according to claim 3, characterized in that, The first learner and the second learner include at least one of the following: decision tree, support vector machine (SVM), or multi - layer perceptron (MLP); The first derivative is the first - order derivative of the loss function, or a higher - order derivative of the loss function.

11. The method according to any one of claims 1 to 10, characterized in that, The method further includes: Obtaining a set of routes to be matched, where the set of routes to be matched includes Q routes to be matched, and the route to be matched is a passing route between a target departure place and a target arrival place, Q is an integer, and Q > 1; Obtaining a set of overall route features according to the set of routes to be matched, where the set of overall route features includes the overall route features corresponding to each route to be matched, and the overall route feature corresponding to the route to be matched is a feature related to the passing time of the route to be matched; Obtaining a set of estimated arrival times to be selected through the time estimation model according to the set of overall route features, where the set of estimated arrival times to be selected includes the estimated arrival times to be selected corresponding to each route to be matched; Determining a target estimated arrival time from the set of estimated arrival times to be selected, where the target estimated arrival time is the passing time from the target departure place to the target arrival place.

12. The method according to claim 11, wherein The time estimation model includes a first learner and a second learner; The obtaining the set of estimated arrival times to be selected through the time estimation model according to the set of overall route features includes: Obtaining a first set of estimated arrival times to be selected through the first learner according to the set of overall route features, where the first set of estimated arrival times to be selected includes the first estimated arrival times to be selected corresponding to each route to be matched; Obtaining a second set of estimated arrival times to be selected through the second learner according to the set of overall route features, where the second set of estimated arrival times to be selected includes the second estimated arrival times to be selected corresponding to each route to be matched; Determining the set of estimated arrival times to be selected based on the first set of estimated arrival times to be selected and the second set of estimated arrival times to be selected.

13. A model training device, characterized in that, Including: An obtaining module, configured to obtain a first set of overall route features and a first set of actual arrival times, where the first set of overall route features includes the overall route features corresponding to S first route samples respectively, the first set of actual arrival times includes the actual arrival times corresponding to S first route samples respectively, the overall route feature corresponding to the first route sample is a feature related to the passing time of the first route sample, and S is an integer, S > 1; A generation module, configured to obtain a first set of estimated arrival times through a time estimation model to be trained according to the first set of overall route features, where the first set of estimated arrival times includes the first estimated arrival times corresponding to S first route samples respectively; The generation module is further configured to obtain a first derivative set according to the first set of estimated arrival times and the first set of actual arrival times, where the first derivative set includes the first derivatives corresponding to S first route samples respectively, and the first derivative is determined based on a loss function; A processing module, configured to perform random perturbation processing on the first derivative set according to random numbers determined from a standard normal distribution to obtain a first derivative set after random perturbation processing; A training module, configured to train the time estimation model to be trained based on the first set of estimated arrival times and the first derivative set after random perturbation processing.

14. The device according to claim 13, wherein The apparatus further includes a determination module; The generation module is further configured to obtain a second set of estimated arrival times through the time estimation model to be trained according to the first set of overall route features; The determination module is configured to determine a third set of estimated arrival times based on the first set of estimated arrival times and the second set of estimated arrival times; The generation module is further configured to obtain a second derivative set according to the third set of estimated arrival times and the first set of actual arrival times, where the second derivative set includes the second derivatives corresponding to S first route samples respectively, and the second derivative is determined based on the loss function; The processing module is further configured to perform random perturbation processing on the second derivative set according to random numbers determined from the standard normal distribution to obtain a second derivative set after random perturbation processing.

15. The device according to claim 14, characterized in that, The generation module is specifically configured to obtain the first set of estimated arrival times through a first learner to be trained according to the first set of overall route features; The generation module is specifically configured to obtain the second set of estimated arrival times through a second learner to be trained according to the first set of overall route features; The training module is specifically configured to train the first learner to be trained based on the first set of estimated arrival times and the first derivative set after random perturbation processing; The training module is specifically configured to train the second learner to be trained based on the third set of estimated arrival times and the second derivative set after random perturbation processing.

16. The apparatus according to claim 13, wherein The processing module is further configured to perform initialization processing on the first set of estimated arrival times to obtain an initialized first set of estimated arrival times; The generation module is specifically configured to obtain the first derivative set according to the initialized first set of estimated arrival times and the first set of actual arrival times; The training module is specifically configured to train the time estimation model to be trained based on the initialized first set of estimated arrival times and the first derivative set after random perturbation processing.

17. The device according to claim 16, characterized in that, The initialization process is to add each first estimated arrival time to a preset value, or add each first estimated arrival time to a value within a preset range, or add each first estimated arrival time to the average of the actual arrival times.

18. The device according to claim 16, characterized in that, The device further includes: a sampling module; The obtaining module is further configured to obtain K second route samples, where K is an integer and K > S; The sampling module is configured to sample the K second route samples to obtain S first route samples.

19. The device according to claim 15, characterized in that, The time prediction model includes N learners, where N is an integer and N ≥ 1; The obtaining module is further configured to obtain P third route samples, where the P third route samples do not overlap with the S first route samples, and P is an integer and P ≥ 1; The obtaining module is further configured to obtain a second route overall feature set and a second actual arrival time set, where the second route overall feature set includes the overall route features corresponding to the P third route samples respectively, and the second actual arrival time set includes the actual arrival times corresponding to the P third route samples respectively, and the overall route feature corresponding to the third route sample is a feature related to the travel time of the third route sample; The obtaining module is further configured to obtain M learners from the time prediction model, where M is an integer and 1 ≤ M < N; The generating module is further configured to obtain a fourth estimated arrival time set through the M learners according to the second route overall feature set; The generating module is further configured to obtain a fifth estimated arrival time set through a third learner to be trained according to the second route overall feature set; The generating module is further configured to determine a sixth estimated arrival time set based on the fourth estimated arrival time set and the fifth estimated arrival time set; The generating module is further configured to obtain a third derivative set according to the sixth estimated arrival time set and the second actual arrival time set, where the third derivative set includes the third derivatives corresponding to the P third route samples respectively, and the third derivative is determined based on the loss function; The processing module is further configured to perform random perturbation processing on the third derivative set according to a random number determined from a standard normal distribution to obtain a third derivative set after random perturbation processing; The training module is further configured to train the third learner to be trained based on the sixth estimated arrival time set and the third derivative set after random perturbation processing.

20. The device according to claim 19, characterized in that The generating module is further configured to, after training the third learner to be trained based on the sixth estimated arrival time set and the third derivative set after random perturbation processing, obtain the third learner and generate an updated time prediction model, where the updated time prediction model includes N learners, and the updated time prediction model includes the M learners and the third learner.

21. The device according to claim 19, characterized in that, The obtaining module is specifically configured to: Obtain the first M learners from the time prediction model; Or, Fix the first L learners in the time prediction model, and sample from the remaining N - L learners in the time prediction model to obtain the M learners, where L is an integer and 1 ≤ L < M.

22. The device according to claim 15, characterized in that, The first learner and the second learner include at least one of the following: decision tree, support vector machine (SVM), or multi-layer perceptron (MLP); The first derivative is the first-order derivative of the loss function, or a higher-order derivative of the loss function.

23. The device according to any one of claims 13 to 22, characterized in that, The device includes a determination module; The acquisition module is further configured to acquire a set of routes to be matched, where the set of routes to be matched includes Q routes to be matched, and the route to be matched is a traffic route between a target departure place and a target arrival place, Q is an integer, and Q > 1; The acquisition module is further configured to obtain a set of overall route features according to the set of routes to be matched, where the set of overall route features includes the overall route features corresponding to each route to be matched, and the overall route features corresponding to the route to be matched are features related to the travel time of the route to be matched; The generation module is further configured to obtain a set of estimated arrival times to be selected through a time prediction model according to the set of overall route features, where the set of estimated arrival times to be selected includes the estimated arrival times to be selected corresponding to each route to be matched; The determination module is configured to determine a target estimated arrival time from the set of estimated arrival times to be selected, where the target estimated arrival time is the travel time from the target departure place to the target arrival place.

24. The device according to claim 23, wherein, The time prediction model includes a first learner and a second learner; specifically, the generation module is configured to: Obtain a first set of estimated arrival times to be selected through the first learner according to the set of overall route features, where the first set of estimated arrival times to be selected includes the first estimated arrival times to be selected corresponding to each route to be matched; Obtain a second set of estimated arrival times to be selected through the second learner according to the set of overall route features, where the second set of estimated arrival times to be selected includes the second estimated arrival times to be selected corresponding to each route to be matched; Determine the set of estimated arrival times to be selected based on the first set of estimated arrival times to be selected and the second set of estimated arrival times to be selected.

25. A computer device, characterized in that, Comprising: A memory, a transceiver, a processor, and a bus system; Wherein, the memory is used to store programs; The processor is configured to execute the programs in the memory to implement the method according to any one of claims 1 to 12; The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.

26. A computer-readable storage medium, including instructions, which when running on a computer, cause the computer to execute the method according to any one of claims 1 to 12.

27. A computer program product including a program, which when running on a computer, causes the computer to execute the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Network model training method, information pushing method and related devices

    CN112434213A

  • Training adaptable neural networks based on evolvability search

    US20200151576A1